/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Image loading and error handling */
img {
    max-width: 100%;
    height: auto;
}

img[src=""], img:not([src]) {
    display: none;
}

/* Loading state for images */
img:not([src]) {
    background: #f0f0f0;
    border: 1px dashed #ccc;
}

/* Ensure external images load properly */
.portfolio-header-image,
.profile-image,
.section-image {
    object-fit: cover;
    object-position: center;
    background-color: #f8f8f8;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: white;
    color: black;
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Portfolio viewer specific styles */
.portfolio-viewer .container {
    max-width: 600px;
    padding: 15px;
}

/* Dark Mode Toggle */
.dark-mode-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.dark-mode-btn {
    background: white;
    border: 2px solid #333;
    border-radius: 50%;
    padding: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.dark-mode-btn:hover {
    background: #f8f8f8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.toggle-icon {
    width: 20px;
    height: 20px;
    color: #333;
}

/* Dark Mode Styles */
.dark-mode {
    background-color: #1a1a1a !important;
    color: #e0e0e0 !important;
}

.dark-mode .portfolio-viewer .container {
    background-color: #1a1a1a;
    color: #e0e0e0;
}

.dark-mode .portfolio-header-image-container {
    border-color: #444 !important;
    box-shadow: 0 6px 24px rgba(255, 255, 255, 0.1) !important;
}

.dark-mode .work-item-preview,
.dark-mode .education-item-preview,
.dark-mode .project-item-preview,
.dark-mode .link-item-preview,
.dark-mode .resume-item-preview,
.dark-mode .file-item-preview {
    background: #2a2a2a !important;
    border-color: #444 !important;
    color: #e0e0e0 !important;
}

.dark-mode .section-title {
    color: #e0e0e0 !important;
    border-bottom-color: #e0e0e0 !important;
}

.dark-mode .portfolio-name {
    color: #e0e0e0 !important;
}

.dark-mode .portfolio-title {
    color: #b0b0b0 !important;
}

.dark-mode .portfolio-bio {
    color: #d0d0d0 !important;
}

.dark-mode .item-title {
    color: #e0e0e0 !important;
}

.dark-mode .item-description {
    color: #d0d0d0 !important;
}

.dark-mode .item-company,
.dark-mode .item-duration {
    color: #b0b0b0 !important;
}

.dark-mode .social-link {
    background: #2a2a2a !important;
    border-color: #444 !important;
    color: #e0e0e0 !important;
}

.dark-mode .social-link:hover {
    background: #3a3a3a !important;
    border-color: #555 !important;
}

.dark-mode .file-input {
    background: #2a2a2a !important;
    border-color: #444 !important;
    color: #e0e0e0 !important;
}

.dark-mode .file-input:hover {
    border-color: #007bff !important;
    background: #1a1a1a !important;
}

.dark-mode .file-info {
    background: #1a3a1a !important;
    border-color: #4caf50 !important;
}

.dark-mode .file-item {
    background: #2a2a2a !important;
    border-color: #444 !important;
}

.dark-mode .file-item input,
.dark-mode .file-item textarea {
    background: #1a1a1a !important;
    border-color: #444 !important;
    color: #e0e0e0 !important;
}

.dark-mode .file-item .file-upload {
    background: #1a1a1a !important;
    border-color: #444 !important;
    color: #e0e0e0 !important;
}

.dark-mode .file-item .file-upload:hover {
    border-color: #007bff !important;
    background: #1a1a1a !important;
}

.dark-mode .resume-download {
    background: #2a2a2a !important;
    border-color: #444 !important;
    color: #e0e0e0 !important;
}

.dark-mode .resume-download:hover {
    background: #3a3a3a !important;
    border-color: #555 !important;
    color: #e0e0e0 !important;
}

.dark-mode .dark-mode-btn {
    background: #2a2a2a !important;
    border-color: #444 !important;
    color: #e0e0e0 !important;
}

.dark-mode .dark-mode-btn:hover {
    background: #3a3a3a !important;
}

.dark-mode .toggle-icon {
    color: #e0e0e0 !important;
}

/* Additional Dark Mode Styles */
.dark-mode .portfolio-content {
    background-color: #1a1a1a !important;
    color: #e0e0e0 !important;
}

.dark-mode .portfolio-header {
    background-color: #1a1a1a !important;
    color: #e0e0e0 !important;
}

.dark-mode .portfolio-section {
    background-color: transparent !important;
    color: #e0e0e0 !important;
}

.dark-mode .section-image-container {
    background-color: #2a2a2a !important;
    border-color: #444 !important;
}

.dark-mode .social-icons {
    background-color: transparent !important;
}

.dark-mode .social-icon {
    background-color: transparent !important;
    border-color: transparent !important;
}

.dark-mode .social-icon:hover {
    background-color: transparent !important;
    border-color: transparent !important;
}

.dark-mode .social-icon svg {
    fill: #e0e0e0 !important;
}

.dark-mode .social-icon:hover svg {
    fill: #ffffff !important;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px 0;
    border-bottom: 2px solid black;
}

header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: -0.02em;
}

header p {
    font-size: 1.2rem;
    font-weight: 400;
    opacity: 0.8;
}

/* Main layout */
.builder-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

/* Form styles */
.form-container {
    background: white;
    border: 2px solid black;
    padding: 30px;
    border-radius: 20px;
}

.form-container h2 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 30px;
    text-align: center;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    font-size: 1rem;
}

input[type="text"],
input[type="url"],
textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid black;
    background: white;
    color: black;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    border-radius: 20px;
    transition: all 0.2s ease;
}

input[type="text"]:focus,
input[type="url"]:focus,
textarea:focus {
    outline: none;
    border-color: black;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

textarea {
    resize: vertical;
    min-height: 80px;
}

/* Work Experience, Education, Projects and Links */
.work-item,
.education-item,
.project-item,
.link-item {
    border: 1px solid black;
    padding: 20px;
    margin-bottom: 15px;
    background: white;
}

/* Projects Layout */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.projects-grid .project-item-preview {
    margin-bottom: 0;
}

/* Project Links Container - Side by Side Links */
.project-links-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 15px;
    margin-bottom: 20px;
}


/* Desktop Projects Grid */
@media (min-width: 768px) {
    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
        gap: 25px;
    }
}

.work-item input,
.work-item textarea,
.education-item input,
.education-item textarea,
.project-item input,
.project-item textarea,
.link-item input,
.link-item textarea {
    margin-bottom: 10px;
    border: 1px solid black;
}

.work-item input:last-child,
.work-item textarea:last-child,
.education-item input:last-child,
.education-item textarea:last-child,
.project-item input:last-child,
.project-item textarea:last-child,
.link-item input:last-child,
.link-item textarea:last-child {
    margin-bottom: 0;
}

.add-btn {
    background: black;
    color: white;
    border: 2px solid black;
    padding: 10px 20px;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 20px;
}

.add-btn:hover {
    background: white;
    color: black;
}

/* File Input */
.file-input {
    width: 100%;
    padding: 10px;
    border: 2px dashed #ddd;
    border-radius: 8px;
    background: #f9f9f9;
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-input:hover {
    border-color: #007bff;
    background: #f0f8ff;
}

.file-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    background: #e8f5e8;
    border: 1px solid #4caf50;
    border-radius: 6px;
    margin-top: 10px;
}

.file-name {
    color: #2e7d32;
    font-weight: 500;
}

.remove-file-btn {
    background: #f44336;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-file-btn:hover {
    background: #d32f2f;
}

/* File Items */
.file-item {
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #f9f9f9;
}

.file-item input,
.file-item textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.file-item input:last-child,
.file-item textarea:last-child {
    margin-bottom: 0;
}

.file-item .file-upload {
    border: 2px dashed #ddd;
    background: #f9f9f9;
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-item .file-upload:hover {
    border-color: #007bff;
    background: #f0f8ff;
}

/* Resume Section */
.resume-section {
    margin-bottom: 20px;
}

.resume-download {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 60px;
    background: #f0f0f0;
    color: #333;
    text-decoration: none;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.resume-download:hover {
    background: #e0e0e0;
    color: #333;
    border-color: #bbb;
}

.resume-download svg {
    width: 24px;
    height: 24px;
    display: block;
    margin: 0 auto;
    left: -4px;
    top: -2px;
    position: relative;
}

/* Social Links */
.social-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.social-links input {
    margin-bottom: 0;
}

/* Custom URL Section */
.custom-url-container {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
    overflow: visible;
    position: relative;
    margin-bottom: 20px;
}

.url-prefix {
    background: #f8f9fa;
    padding: 12px 15px;
    border-right: 1px solid #ddd;
    color: #666;
    font-weight: 500;
    white-space: nowrap;
    font-size: 14px;
}

.custom-url {
    flex: 1;
    border: none;
    padding: 12px 40px 12px 15px;
    font-size: 14px;
    outline: none;
    background: transparent;
    color: #333;
}

.custom-url:focus {
    outline: none;
}

.url-info-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    cursor: help;
    z-index: 10;
    transition: color 0.3s ease;
}

.url-info-icon:hover {
    color: #007bff;
}

.url-info-icon svg {
    width: 16px;
    height: 16px;
    display: block;
}

/* Tooltip */
.tooltip-content {
    position: absolute;
    bottom: calc(100% + 8px);
    right: -10px;
    background: #333;
    color: white;
    padding: 12px;
    border-radius: 6px;
    font-size: 12px;
    line-height: 1.4;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transform: translateY(4px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    min-width: 200px;
}

.tooltip-content::after {
    content: '';
    position: absolute;
    top: 100%;
    right: 20px;
    border: 5px solid transparent;
    border-top-color: #333;
}

.url-info-icon:hover .tooltip-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.tooltip-title {
    font-weight: 600;
    margin-bottom: 6px;
    color: #fff;
}

.tooltip-rules {
    color: #e0e0e0;
}

.tooltip-rules div {
    margin-bottom: 2px;
}

/* Dark mode for custom URL */
.dark-mode .custom-url-container {
    background: #1a1a1a !important;
    border-color: #444 !important;
}

.dark-mode .url-prefix {
    background: #2a2a2a !important;
    border-color: #444 !important;
    color: #ccc !important;
}

.dark-mode .custom-url {
    color: #e0e0e0 !important;
    background: transparent !important;
}

.dark-mode .url-info-icon {
    color: #999 !important;
}

.dark-mode .url-info-icon:hover {
    color: #007bff !important;
}

.dark-mode .tooltip-content {
    background: #1a1a1a !important;
    border: 1px solid #444 !important;
}

.dark-mode .tooltip-content::after {
    border-top-color: #1a1a1a !important;
}

/* Social Icons */
.social-icons {
    display: flex;
    justify-content: center;
    gap: 25px;
    flex-wrap: wrap;
    margin-top: 25px;
}

.social-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    background: transparent;
}

.social-icon:hover {
    transform: translateY(-2px);
}

.social-icon svg {
    width: 24px;
    height: 24px;
    fill: black;
}

/* Unified icon style - all same color */
.social-icon.linkedin,
.social-icon.github,
.social-icon.twitter,
.social-icon.youtube,
.social-icon.instagram,
.social-icon.tiktok,
.social-icon.website {
    background: transparent;
    color: black;
}

/* Create Button */
.create-btn {
    width: 100%;
    background: black;
    color: white;
    border: 2px solid black;
    padding: 15px;
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 20px;
    margin-top: 20px;
}

.create-btn:hover {
    background: white;
    color: black;
}

/* Preview Container */
.preview-container {
    background: white;
    border: 2px solid black;
    padding: 30px;
    border-radius: 20px;
}

.preview-container h2 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 30px;
    text-align: center;
}

.preview-placeholder {
    text-align: center;
    padding: 60px 20px;
    border: 2px dashed black;
    color: black;
    opacity: 0.6;
}

/* Portfolio Preview */
.portfolio-preview {
    min-height: 400px;
}

.portfolio-content {
    background: white;
    color: black;
}

.portfolio-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: none;
    position: relative;
    margin-top: 150px;
    z-index: 2;
    padding-top: 80px;
}

.portfolio-header-image-container {
    position: absolute;
    top: -80px;
    left: 50%;
    transform: translateX(-50%);
    width: 500px;
    height: 200px;
    z-index: 3;
    overflow: hidden;
    border-radius: 20px;
    border: 3px solid transparent;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0);
}

.portfolio-header-image {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    object-position: center;
    margin: 0;
    border-radius: 20px;
    border: none;
    position: absolute;
    top: 0;
    left: 0;
    display: block;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}




.profile-image {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgb(177, 177, 177);
    margin-bottom: 20px;
    background: white;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0);
    opacity: 1;
    z-index: 10;
    position: relative;
}

.portfolio-name {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.portfolio-title {
    font-size: 1.2rem;
    font-weight: 500;
    opacity: 0.8;
    margin-bottom: 15px;
}

.portfolio-bio {
    font-size: 1rem;
    line-height: 1.6;
    max-width: 400px;
    margin: 0 auto;
}

/* Mobile-optimized portfolio viewer styles */
.portfolio-viewer .portfolio-header {
    margin-bottom: 25px;
    padding-bottom: 15px;
    margin-top: 100px;
    padding-top: 60px;
    position: relative;
}

.portfolio-viewer .portfolio-header-image-container {
    position: absolute;
    top: -80px;
    left: 50%;
    transform: translateX(-50%);
    width: 450px;
    height: 180px;
    margin: 0;
    z-index: 3;
    display: block;
    overflow: hidden;
    border-radius: 20px;
    border: 3px solid transparent;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.1);
}

/* Desktop - Make header image bigger */
@media (min-width: 1024px) {
    .portfolio-viewer .portfolio-header-image-container {
        width: 600px;
        height: 240px;
    }
}

.portfolio-viewer .portfolio-header-image {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    object-position: center;
    margin: 0;
    border-radius: 20px;
    border: none;
    position: absolute;
    top: 0;
    left: 0;
    display: block;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

.portfolio-viewer 

.portfolio-viewer 

.portfolio-viewer .profile-image {
    width: 250px;
    height: 250px;
    margin-bottom: 15px;
    opacity: 1;
    z-index: 10;
    position: relative;
}

.portfolio-viewer .portfolio-name {
    font-size: 1.6rem;
    margin-bottom: 8px;
}

.portfolio-viewer .portfolio-title {
    font-size: 1rem;
    margin-bottom: 12px;
}

.portfolio-viewer .portfolio-bio {
    font-size: 0.95rem;
    max-width: 100%;
    padding: 0 10px;
}

.portfolio-section {
    margin-bottom: 30px;
}

.section-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 15px;
    border-bottom: 1px solid black;
    padding-bottom: 5px;
}

.work-item-preview,
.education-item-preview,
.project-item-preview,
.link-item-preview,
.resume-item-preview,
.file-item-preview {
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid black;
    display: flex;
    align-items: center;
    gap: 20px;
}

.work-item-preview,
.education-item-preview,
.project-item-preview,
.link-item-preview {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: white;
}

.section-content {
    flex: 1;
    text-align: left;
    order: 1;
}

.section-image-container {
    width: 80px;
    height: 60px;
    position: relative;
    overflow: hidden;
    border-radius: 6px;
    flex-shrink: 0;
    order: 2;
}

.section-image {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    position: relative;
    z-index: 1;
}

.section-image::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100% !important;
    height: 100% !important;
    background: transparent;
    z-index: 2;
    pointer-events: none;
}


.item-title {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.item-company,
.item-duration {
    font-size: 0.9rem;
    opacity: 0.7;
    margin-bottom: 5px;
}

.item-description {
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Mobile-optimized sections */
.portfolio-viewer .portfolio-section {
    margin-bottom: 25px;
}

.portfolio-viewer .section-title {
    font-size: 1.2rem;
    margin-bottom: 12px;
}

    
.portfolio-viewer .work-item-preview,
.portfolio-viewer .education-item-preview,
.portfolio-viewer .project-item-preview {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 12px;
    margin-bottom: 15px;
    padding: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: white;
}

.portfolio-viewer .section-content {
    flex: 1;
    text-align: left;
    order: 1;
}

.portfolio-viewer .section-image-container {
    width: 70px;
    height: 50px;
    flex-shrink: 0;
    order: 2;
}

.portfolio-viewer .item-title {
    font-size: 1rem;
    margin-bottom: 4px;
}

.portfolio-viewer .item-company,
.portfolio-viewer .item-duration {
    font-size: 0.85rem;
    margin-bottom: 4px;
}

.portfolio-viewer .item-description {
    font-size: 0.9rem;
    line-height: 1.4;
}

.social-links-preview {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.social-link {
    color: black;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 16px;
    border: 1px solid black;
    transition: all 0.2s ease;
}

.social-link:hover {
    background: black;
    color: white;
}

/* Mobile-optimized social links */
.portfolio-viewer .social-links-preview {
    gap: 12px;
}

.portfolio-viewer .social-link {
    padding: 6px 12px;
    font-size: 0.9rem;
}

/* Share Section */
.share-section {
    text-align: center;
    padding: 40px;
    border: 2px solid black;
    background: white;
}

.share-section h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 30px;
}

.share-link {
    margin-bottom: 30px;
}

.share-link label {
    display: block;
    font-weight: 500;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.link-container {
    display: flex;
    gap: 10px;
    max-width: 600px;
    margin: 0 auto;
}

.link-container input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid black;
    background: white;
    color: black;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
}

.copy-btn,
.view-btn {
    background: black;
    color: white;
    border: 2px solid black;
    padding: 12px 24px;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 20px;
}

.copy-btn:hover,
.view-btn:hover {
    background: white;
    color: black;
}

.view-btn {
    font-size: 1.1rem;
    padding: 15px 30px;
}

/* Edit Page Styles */
.edit-code-section {
    max-width: 600px;
    margin: 0 auto 40px auto;
    padding: 30px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.edit-code-section h2 {
    color: #333;
    margin-bottom: 10px;
    font-family: 'Inter', sans-serif;
}

.edit-code-section p {
    color: #666;
    margin-bottom: 20px;
    font-family: 'Inter', sans-serif;
}

.code-input-container {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.code-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.3s ease;
}

.code-input:focus {
    outline: none;
    border-color: #007bff;
}

.load-btn {
    padding: 12px 24px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.load-btn:hover {
    background: #0056b3;
}

.load-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

.error-message {
    color: #dc3545;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    padding: 10px;
    border-radius: 4px;
    margin-top: 10px;
    font-family: 'Inter', sans-serif;
}

.loading-message {
    color: #007bff;
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    padding: 10px;
    border-radius: 4px;
    margin-top: 10px;
    font-family: 'Inter', sans-serif;
}

.back-link {
    display: inline-block;
    margin-top: 10px;
    color: #007bff;
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
}

.back-link:hover {
    text-decoration: underline;
}

/* Portfolio Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out;
}

.loading-container {
    text-align: center;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-top: 3px solid black;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1.2);
        opacity: 1;
    }
}

/* Portfolio Content Fade-in */
#portfolioContainer {
    opacity: 0;
    animation: fadeIn 0.8s ease-in-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Watermark */
.watermark {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-family: 'Inter', sans-serif;
    z-index: 1000;
    text-align: center;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.5s ease;
    opacity: 1;
}

.watermark a {
    color: #4CAF50;
    text-decoration: none;
    font-weight: 600;
}

.watermark a:hover {
    color: #66BB6A;
    text-decoration: underline;
}

/* Dark mode watermark */
.dark-mode .watermark {
    background: rgba(0, 0, 0, 0.8) !important;
    color: white;
}

.dark-mode .watermark a {
    color: #2E7D32;
}

.dark-mode .watermark a:hover {
    color: #388E3C;
}

/* Pro Section */
.pro-section {
    background: white;
    border: 2px solid black;
    padding: 20px;
    border-radius: 20px;
    margin-top: 10px;
}

.pro-input-container {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    align-items: center;
}

.pro-code-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid black;
    background: white;
    color: black;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    border-radius: 20px;
    transition: all 0.2s ease;
}

.pro-code-input:focus {
    outline: none;
    border-color: black;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

.pro-btn {
    background: black;
    color: white;
    border: 2px solid black;
    padding: 12px 20px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 20px;
}

.pro-btn:hover {
    background: white;
    color: black;
}

.pro-btn:disabled {
    background: #ccc;
    color: #666;
    border-color: #ccc;
    cursor: not-allowed;
}

.pro-benefits h4 {
    margin: 0 0 15px 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: black;
}

.pro-benefits ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pro-benefits li {
    padding: 8px 0;
    font-size: 0.95rem;
    color: #333;
    border-bottom: 1px solid #eee;
}

.pro-benefits li:last-child {
    border-bottom: none;
}

.pro-benefits li:hover {
    color: black;
    transform: translateX(5px);
    transition: all 0.2s ease;
}

/* Dark mode pro section */
.dark-mode .pro-section {
    background: #1a1a1a;
    border-color: #444;
    color: #e0e0e0;
}

.dark-mode .pro-code-input {
    background: #1a1a1a;
    border-color: #444;
    color: #e0e0e0;
}

.dark-mode .pro-code-input:focus {
    border-color: #e0e0e0;
    box-shadow: 0 0 0 3px rgba(224, 224, 224, 0.1);
}

.dark-mode .pro-btn {
    background: #444;
    border-color: #444;
    color: #e0e0e0;
}

.dark-mode .pro-btn:hover {
    background: #e0e0e0;
    color: #1a1a1a;
}

.dark-mode .pro-benefits h4 {
    color: #e0e0e0;
}

.dark-mode .pro-benefits li {
    color: #d0d0d0;
    border-bottom-color: #333;
}

.dark-mode .pro-benefits li:hover {
    color: #e0e0e0;
}

/* Pro Success Notification */
.pro-success-notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border: 2px solid #4CAF50;
    border-radius: 12px;
    padding: 0;
    z-index: 10000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: proNotificationSlide 0.3s ease-out;
}

.pro-success-content {
    padding: 30px;
    text-align: center;
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    border-radius: 10px;
}

.pro-success-content h3 {
    margin: 0 0 15px 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.pro-success-content p {
    margin: 0 0 20px 0;
    font-size: 1rem;
    opacity: 0.9;
}

.pro-success-content button {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    transition: all 0.3s ease;
}

.pro-success-content button:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

@keyframes proNotificationSlide {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Pro Active State */
.pro-active .pro-benefits h4::after {
    content: ' ✅';
}

/* Hide analytics and edit sections when pro is not active */
#analyticsSection,
#editSection {
    display: none;
}

/* Show analytics and edit sections when pro is active */
.pro-active #analyticsSection,
.pro-active #editSection {
    display: block;
}

/* Pro Activation Page */
.result-section {
    margin-top: 30px;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
}

.success-message {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 25px;
    text-align: left;
}

.success-message h3 {
    color: #28a745;
    font-size: 1.2rem;
    font-weight: 500;
    margin: 0 0 10px 0;
}

.success-message p {
    color: #6c757d;
    font-size: 0.9rem;
    margin: 0 0 20px 0;
    line-height: 1.4;
}

.portfolio-link {
    display: inline-block;
    padding: 10px 20px;
    background: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 400;
    font-size: 0.9rem;
    margin-top: 15px;
}

.portfolio-link:hover {
    background: #0056b3;
}

.error-message {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
    color: white;
    padding: 30px;
    border-radius: 12px;
}

.error-message h3 {
    margin: 0 0 15px 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.error-message p {
    margin: 0;
    font-size: 1rem;
    opacity: 0.9;
}

/* Dark mode for activation page */
.dark-mode .success-message {
    background: #1a1a1a;
    border-color: #333;
}

.dark-mode .success-message h3 {
    color: #20c997;
}

.dark-mode .success-message p {
    color: #adb5bd;
}

.dark-mode .portfolio-link {
    background: #0d6efd;
}

.dark-mode .portfolio-link:hover {
    background: #0a58ca;
}
@media (max-width: 768px) {
    .loading-spinner {
        width: 50px;
        height: 50px;
    }
    
    .builder-section {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .container {
        padding: 10px;
    }
    
    .portfolio-viewer .container {
        padding: 10px;
        max-width: 100%;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .form-container,
    .preview-container {
        padding: 20px;
    }
    
    .social-links {
        grid-template-columns: 1fr;
    }
    
    .social-icons {
        gap: 15px;
    }
    
    .social-icon {
        width: 35px;
        height: 35px;
    }
    
    .social-icon svg {
        width: 20px;
        height: 20px;
    }
    
    .link-container {
        flex-direction: column;
    }
    
    .social-links-preview {
        flex-direction: column;
        align-items: center;
    }
    
    /* Extra mobile optimizations for portfolio viewer */
    .portfolio-viewer .portfolio-header {
        margin-bottom: 20px;
        padding-bottom: 12px;
        margin-top: 80px;
        padding-top: 40px;
        text-align: center;
    }
    
    .portfolio-viewer .portfolio-header-image-container {
        position: absolute;
        top: -60px;
        left: 50%;
        transform: translateX(-50%);
        width: 95vw;
        max-width: 350px;
        height: 150px;
        margin: 0;
        z-index: 3;
        display: block;
        overflow: hidden;
        border-radius: 20px;
        border: 2px solid transparent;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    }
    
    .portfolio-viewer .portfolio-header-image {
        width: 100%;
        height: 100%;
        object-fit: cover;
        margin: 0;
        border-radius: 20px;
        border: none;
        position: absolute;
        top: 0;
        left: 0;
        display: block;
    }
    
    .portfolio-viewer .portfolio-header-image-clear {
        filter: none;
        z-index: 1;
    }
    
    
    
    .portfolio-viewer .profile-image {
        width: 200px;
        height: 200px;
        margin: 0 auto 12px auto;
        opacity: 1;
        z-index: 10;
        position: relative;
    }
    
    .portfolio-viewer .portfolio-name {
        font-size: 1.4rem;
    }
    
    .portfolio-viewer .portfolio-title {
        font-size: 0.95rem;
    }
    
    .portfolio-viewer .portfolio-bio {
        font-size: 0.9rem;
        padding: 0 5px;
    }
    
    .portfolio-viewer .portfolio-section {
        margin-bottom: 20px;
    }
    
    .portfolio-viewer .work-item-preview,
    .portfolio-viewer .education-item-preview,
    .portfolio-viewer .project-item-preview,
    .portfolio-viewer .link-item-preview,
    .portfolio-viewer .resume-item-preview,
    .portfolio-viewer .file-item-preview {
        padding: 10px;
        margin-bottom: 12px;
        flex-direction: row;
        gap: 12px;
        align-items: flex-start;
    }
    
    
    /* Mobile Projects Grid */
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    /* Mobile Project Links */
    .project-links-container {
        gap: 10px;
        margin-top: 10px;
        margin-bottom: 15px;
    }
    
    
    .portfolio-viewer .section-content {
        flex: 1;
        text-align: left;
        order: 1;
    }
    
/* Mobile-specific improvements */
@media (max-width: 768px) {
    /* Ensure fonts load properly on mobile */
    body {
        font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
    
    /* Mobile image handling */
    img {
        max-width: 100%;
        height: auto;
        display: block;
    }
    
    /* Ensure portfolio images are visible on mobile */
    .portfolio-header-image,
    .profile-image,
    .section-image {
        display: block !important;
        max-width: 100%;
    }
    
    /* Mobile-specific image containers */
    .portfolio-header-image-container {
        width: 100vw;
        max-width: 100%;
        height: auto;
        min-height: 200px;
    }
    
    .section-image-container {
        width: 60px;
        height: 45px;
        flex-shrink: 0;
        order: 2;
        display: block;
    }
}

/* Pro Activation Success - Minimal Left-Aligned Design */
.pro-details {
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    text-align: left;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding: 8px 0;
}

.detail-item:last-child {
    margin-bottom: 0;
}

.detail-label {
    font-weight: 500;
    color: #495057;
    font-size: 0.9rem;
}

.detail-value {
    color: #212529;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    font-weight: 400;
    font-size: 0.85rem;
}

.code-section {
    margin: 25px 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.code-item {
    padding: 20px;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    text-align: left;
}

.code-item h4 {
    margin: 0 0 15px 0;
    font-size: 1rem;
    font-weight: 500;
    color: #212529;
}

.code-container {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
}

.code-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    background: #f8f9fa;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    font-size: 0.85rem;
    color: #495057;
}

.code-input:focus {
    outline: none;
    border-color: #333;
    background: white;
}

.copy-btn {
    padding: 8px 12px;
    background: #333;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 400;
    min-width: 60px;
}

.copy-btn:hover {
    background: #555;
}

.action-btn {
    display: inline-block;
    padding: 8px 16px;
    background: white;
    color: #333;
    border: 1px solid #333;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 400;
    text-align: center;
    width: 100%;
}

.action-btn:hover {
    background: #333;
    color: white;
}

/* Dark mode for pro activation - Minimal */
.dark-mode .pro-details {
    background: #2a2a2a;
    border-color: #333;
}

.dark-mode .detail-label {
    color: #e9ecef;
}

.dark-mode .detail-value {
    color: #f8f9fa;
}

.dark-mode .code-item {
    background: #1a1a1a;
    border-color: #333;
}

.dark-mode .code-item h4 {
    color: #f8f9fa;
}

.dark-mode .code-input {
    background: #2a2a2a;
    border-color: #333;
    color: #e9ecef;
}

.dark-mode .code-input:focus {
    border-color: #e0e0e0;
    background: #333;
}

.dark-mode .copy-btn {
    background: #e0e0e0;
    color: #1a1a1a;
}

.dark-mode .copy-btn:hover {
    background: #c0c0c0;
}

.dark-mode .action-btn {
    background: #1a1a1a;
    color: #e0e0e0;
    border-color: #e0e0e0;
}

.dark-mode .action-btn:hover {
    background: #e0e0e0;
    color: #1a1a1a;
}

/* Dodo Popup Window */
.dodo-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: none;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
}

.modal-window {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    max-width: 300px;
    width: auto;
    animation: popupSlideIn 0.3s ease-out;
    border: 1px solid #ddd;
    z-index: 1001;
}

@keyframes popupSlideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.modal-content {
    padding: 15px 15px;
    text-align: center;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 5px;
    right: 8px;
    background: none;
    border: none;
    font-size: 16px;
    color: #999;
    cursor: pointer;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: #f5f5f5;
    color: #333;
}

.modal-content h2 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin: 0 0 10px 0;
}

.gif-container {
    margin: 10px 0;
    display: flex;
    justify-content: center;
}

.congrats-gif {
    max-width: 150px;
    width: 100%;
    height: auto;
    border-radius: 6px;
}

.congrats-text {
    font-size: 0.8rem;
    color: #666;
    margin: 10px 0 0 0;
    font-weight: 400;
}

/* Dark mode for dodo popup */
.dark-mode .modal-window {
    background: #1a1a1a;
}

.dark-mode .modal-content h2 {
    color: #e0e0e0;
}

.dark-mode .congrats-text {
    color: #b0b0b0;
}

.dark-mode .modal-close {
    color: #b0b0b0;
}

.dark-mode .modal-close:hover {
    background: #333;
    color: #e0e0e0;
}

/* Mobile responsiveness for dodo popup */
@media (max-width: 768px) {
    .modal-window {
        top: 10px;
        right: 10px;
        max-width: 280px;
    }
    
    .modal-content {
        padding: 12px 12px;
    }
    
    .modal-content h2 {
        font-size: 1.1rem;
    }
    
    .congrats-gif {
        max-width: 120px;
    }
    
    .congrats-text {
        font-size: 0.75rem;
    }
}

/* Image Upload Components */
.image-upload-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.image-url-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
}

.upload-section {
    display: flex;
    align-items: center;
    gap: 8px;
}

.upload-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.upload-btn:hover {
    background: #0056b3;
    transform: translateY(-1px);
}

.upload-btn svg {
    flex-shrink: 0;
}

.image-preview {
    position: relative;
    margin-top: 8px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #e0e0e0;
    background: #f8f9fa;
}

.image-preview img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
}

.remove-image-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(220, 53, 69, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.remove-image-btn:hover {
    background: rgba(220, 53, 69, 1);
    transform: scale(1.1);
}

.upload-progress {
    margin-top: 8px;
    padding: 8px;
    background: #e3f2fd;
    border-radius: 4px;
    font-size: 12px;
    color: #1976d2;
    display: none;
}

.upload-progress.show {
    display: block;
}

.upload-error {
    margin-top: 8px;
    padding: 8px;
    background: #ffebee;
    border-radius: 4px;
    font-size: 12px;
    color: #c62828;
    display: none;
}

.upload-error.show {
    display: block;
}

/* Dark mode for upload components */
.dark-mode .image-url-input {
    background: #2a2a2a;
    border-color: #444;
    color: #e0e0e0;
}

.dark-mode .image-url-input::placeholder {
    color: #888;
}

.dark-mode .upload-btn {
    background: #4a90e2;
}

.dark-mode .upload-btn:hover {
    background: #357abd;
}

.dark-mode .image-preview {
    border-color: #444;
    background: #2a2a2a;
}

.dark-mode .upload-progress {
    background: #1a237e;
    color: #90caf9;
}

.dark-mode .upload-error {
    background: #4a148c;
    color: #f48fb1;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .upload-section {
        flex-direction: column;
        align-items: stretch;
    }
    
    .upload-btn {
        justify-content: center;
        padding: 10px;
    }
    
    .image-preview img {
        height: 100px;
    }
}}