/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #7C3AED;
    --primary-hover: #6D28D9;
    --secondary-color: #7C3AEE;
    --text-primary: #1F2937;
    --text-secondary: #6B7280;
    --text-light: #9CA3AF;
    --background: #FFFFFF;
    --background-secondary: #F9FAFB;
    --border-color: #E5E7EB;
    --border-hover: #D1D5DB;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--background);
    /* Font smoothing for better cross-browser rendering */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* Prevent text selection issues on mobile */
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    /* Improve scrolling on mobile */
    -webkit-overflow-scrolling: touch;
}

/* Header Styles */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: var(--background);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    /* Cross-browser transitions */
    -webkit-transition: var(--transition);
    -moz-transition: var(--transition);
    -o-transition: var(--transition);
    transition: var(--transition);
    /* Cross-browser transforms */
    -webkit-transform: translateY(0);
    -moz-transform: translateY(0);
    -ms-transform: translateY(0);
    transform: translateY(0);
}

.header.hidden {
    -webkit-transform: translateY(-100%);
    -moz-transform: translateY(-100%);
    -ms-transform: translateY(-100%);
    transform: translateY(-100%);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
}

.logo-text {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
}

/* Error Message Container - Fixed below header */
.error-message-container {
    position: fixed;
    top: 50px; /* Below header */
    left: 0;
    right: 0;
    width: 100%; /* Full width from left to right */
    z-index: 999;
    padding: 6px 20px; /* Minimal vertical padding for tight spacing */
    text-align: center;
    animation: errorSlideDown 0.3s ease-out;
    transition: top 0.2s ease-out;
    background: rgba(220, 38, 38, 0.08); /* Light transparent red background - full width */
}

.error-message {
    color: #DC2626;
    font-size: 18px; /* Larger text size */
    font-weight: 600;
    line-height: 1.5;
    text-align: center;
    margin: 0 auto;
    max-width: 1200px;
    padding: 8px 20px; /* Padding around text */
    /* Background removed from here - now on container */
    border-radius: 8px; /* Rounded corners for professional look */
    display: inline-block; /* Text width only */
}

/* Adjust main content padding when error message is shown */
.error-message-container:not([style*="display: none"]) ~ .main-content {
    padding-top: 110px; /* 50px header + ~60px error message */
}

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

/* Main Content */
.main-content {
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    /* Content starts below header and stays in upper portion of viewport */
    padding-top: 80px;
    padding-left: 20px;
    padding-right: 20px;
    padding-bottom: 40px;
    transition: padding-top 0.3s ease;
}

.container {
    max-width: 800px;
    width: 100%;
    text-align: center;
}

/* Title Section */
.title-section {
    margin-bottom: 40px;
}

.main-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 9px;
    letter-spacing: -0.02em;
}

.subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    font-weight: 400;
    max-width: 600px;
    margin: 0 auto;
}

/* Upload Section */
.upload-section {
    position: relative;
    margin-bottom: 30px;
}

.upload-box {
    width: 100%;
    height: 300px;
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    background: var(--background-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: var(--transition);
    cursor: pointer;
    overflow: visible;
}

.upload-box:hover {
    border-color: var(--primary-color);
    background: rgba(124, 58, 237, 0.02);
}

.upload-box.dragover {
    border-color: var(--primary-color);
    background: rgba(124, 58, 237, 0.05);
    transform: scale(1.02);
}

.upload-content {
    text-align: center;
}

.select-files-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 auto 12px;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
}

.select-files-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.select-files-btn:active {
    transform: translateY(0);
}

.dropdown-arrow {
    transition: var(--transition);
}

.select-files-btn:hover .dropdown-arrow {
    transform: translateY(1px);
}

.drag-text {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 400;
}

/* File Source Dropdown */
.file-source-dropdown {
    position: absolute;
    top: calc(50% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--background);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    padding: 0;
    min-width: 200px;
    max-width: calc(100% - 40px);
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.file-source-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 14px;
    font-weight: 500;
}

.dropdown-item:first-child {
    padding-top: 8px;
}

.dropdown-item:last-child {
    padding-bottom: 8px;
}

.dropdown-item:hover {
    background: var(--background-secondary);
}

.dropdown-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

/* File List */
.file-list-container {
    position: relative;
    margin-top: 20px;
    max-height: 400px;
    overflow-y: auto;
    border-radius: var(--radius-md);
    background: var(--background);
    border: 1px solid var(--border-color);
    display: none;
    z-index: 10;
    margin-bottom: 7.2%;
    margin-top: 50px;
}

.file-list-container.show {
    display: block;
}

.file-item {
    display: flex;
    align-items: center;
    padding: 11px 20px;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.file-item:last-child {
    border-bottom: none;
}

.file-item:hover {
    background: var(--background-secondary);
}

.file-preview {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    object-fit: contain;
    margin-right: 16px;
    border: 1px solid var(--border-color);
    background: var(--background);
    padding: 4px;
}

.file-info {
    flex: 1;
    text-align: left;
    min-width: 0; /* Allow flex child to shrink */
    overflow: hidden; /* Prevent overflow */
}

.file-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
    white-space: nowrap; /* Keep on single line */
    overflow: hidden; /* Hide overflow */
    text-overflow: ellipsis; /* Show (...) for truncated text */
    max-width: 100%; /* Respect parent width */
}

.file-size {
    font-size: 12px;
    color: var(--text-light);
}

.file-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

    /* Mobile touch target optimization - maintain same design */
    .file-action-btn {
        width: 32px;
        height: 32px;
        /* Minimum 44x44px for mobile touch (already 32px is acceptable for icons) */
        min-width: 32px;
        min-height: 32px;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    color: var(--text-secondary);
}

.file-action-btn:hover {
    background: var(--background-secondary);
    color: var(--text-primary);
}

.file-action-btn.delete:hover {
    background: #FEF2F2;
    color: #DC2626;
}

/* Output Settings */
.output-settings {
    position: relative;
    margin-bottom: 15px;
    right: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 15;
    justify-content: flex-end;
}

.output-settings.show {
    opacity: 1;
    visibility: visible;
}

.output-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

.format-dropdown {
    position: relative;
}

.format-btn {
    background: var(--background);
    border: 1px solid var(--border-color);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    min-width: 80px;
    justify-content: space-between;
}

.format-btn:hover {
    border-color: var(--border-hover);
    background: var(--background-secondary);
}

.format-options {
    position: absolute;
    bottom: 100%;
    right: 0;
    background: var(--background);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    padding: 8px 0;
    min-width: 120px;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 4px;
}

.format-options.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(-8px);
}

.format-option {
    padding: 8px 16px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 14px;
    font-weight: 500;
}

.format-option:hover {
    background: var(--background-secondary);
}

.format-option.selected {
    background: var(--primary-color);
    color: white;
}

/* Convert Button */
.convert-btn {
    width: 100%;
    background: var(--secondary-color);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.convert-btn:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.convert-btn:active:not(:disabled) {
    transform: translateY(0);
}

.convert-btn:disabled {
    background: var(--text-light);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.convert-btn.download {
    background: #1F2937;
}

.convert-btn.download:hover {
    background: #111827;
}

/* Download button click animation - scale only */
.convert-btn {
    transition: transform 200ms ease;
}

.convert-btn.clicked {
    transform: scale(0.95);
}

.btn-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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


/* Progress Bar */
.progress-container {
    margin: 0 0 16px 0;
    text-align: center;
}

/* Removed progress-counter styling */

.progress-bar {
    width: 52%;
    height: 8px;
    background: rgba(229, 231, 235, 0.7);
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin: 0 auto 12px auto;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, rgba(124, 58, 237, 0.7), rgba(109, 40, 217, 0.7));
    border-radius: var(--radius-sm);
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    width: 0%;
    position: relative;
    overflow: hidden;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background-image: linear-gradient(
        -45deg,
        rgba(255, 255, 255, 0.2) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255, 255, 255, 0.2) 50%,
        rgba(255, 255, 255, 0.2) 75%,
        transparent 75%,
        transparent
    );
    background-size: 20px 20px;
    animation: progress-stripes 1s linear infinite;
}

@keyframes progress-stripes {
    0% { background-position: 0 0; }
    100% { background-position: 20px 0; }
}

.progress-text {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 400;
    margin: 0 0 8px 0;
    opacity: 0.8;
}

.progress-container.done {
    animation: done-pulse 0.6s ease-in-out;
}

/* Removed progress-counter done styling */

.progress-container.done .progress-text {
    color: #065F46;
    font-weight: 600;
}

@keyframes done-bounce {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

@keyframes done-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}


/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--background);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
}

.modal-close:hover {
    background: var(--background-secondary);
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
}

.modal-body input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    margin-bottom: 16px;
    transition: var(--transition);
}

.modal-body input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.modal-btn {
    width: 100%;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.modal-btn:hover {
    background: var(--primary-hover);
}

.modal-btn:disabled {
    background: var(--text-light);
    cursor: not-allowed;
}

/* Toast notifications removed */

/* Desktop and Desktop Mode on Mobile - Ensure content stays in upper portion */
@media (min-width: 769px) {
    .main-content {
        /* Content starts below header (50px) with spacing, stays in upper portion */
        padding-top: 80px !important;
        padding-left: 20px;
        padding-right: 20px;
        padding-bottom: 40px;
        align-items: flex-start !important;
        justify-content: center;
        /* Force content to start from top, not center */
        min-height: auto;
    }
    
    /* Ensure container doesn't have extra spacing */
    .container {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-content {
        padding: 60px 16px 20px;
    }
    
    .container {
        max-width: 100%;
    }
    
    .main-title {
        font-size: 2.5rem;
    }
    
    .subtitle {
        font-size: 16px;
    }
    
    .upload-box {
        height: 250px;
    }
    
    .select-files-btn {
        padding: 14px 28px;
        font-size: 15px;
    }
    
    .file-item {
        padding: 8px 16px;
    }
    
    .file-preview {
        width: 40px;
        height: 40px;
        padding: 3px;
    }
    
    .output-settings {
        /* Keep same design and position - only adjust size */
        justify-content: flex-end;
        gap: 10px;
        margin-bottom: 15px;
    }
    
    .output-label {
        font-size: 13px;
    }
    
    .format-btn {
        /* Maintain same design, only reduce size */
        padding: 7px 10px;
        font-size: 13px;
        min-width: 70px;
        justify-content: space-between;
    }
    
    .format-options {
        min-width: 110px;
        right: 0;
    }
    
    .format-option {
        padding: 7px 14px;
        font-size: 13px;
    }
    
    .modal-content {
        width: 95%;
        margin: 20px;
    }
    
    /* Convert button mobile - maintain same design */
    .convert-btn {
        padding: 14px 28px;
        font-size: 15px;
        /* Design same - colors, borders, shadows same */
    }
    
    /* Progress bar mobile - maintain same design */
    .progress-bar {
        width: 75%;
        /* Design same - colors, animations same */
    }
    
    .progress-text {
        font-size: 12px;
    }
    
    /* File list container mobile - maintain same design */
    .file-list-container {
        max-height: 350px;
        margin-bottom: 10px;
        /* Design same - borders, background same */
    }
    
    /* Toast responsive styles removed */
}

@media (max-width: 480px) {
    .header-content {
        padding: 0 16px;
    }
    
    .logo-text {
        font-size: 16px;
    }
    
    .main-title {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 14px;
    }
    
    .upload-box {
        height: 200px;
    }
    
    .select-files-btn {
        padding: 12px 24px;
        font-size: 14px;
    }
    
    .file-item {
        padding: 7px 12px;
    }
    
    .file-preview {
        width: 36px;
        height: 36px;
        padding: 2px;
    }
    
    .file-name {
        font-size: 13px;
        /* Truncation already applied from base styles */
    }
    
    .file-size {
        font-size: 11px;
    }
    
    /* Convert button mobile optimization */
    .convert-btn {
        padding: 14px 24px;
        font-size: 15px;
    }
    
    /* Progress bar mobile optimization */
    .progress-bar {
        width: 85%;
    }
    
    .progress-text {
        font-size: 12px;
    }
    
    /* File list container mobile optimization */
    .file-list-container {
        max-height: 300px;
        margin-bottom: 15px;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles */
button:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* High contrast mode */
@media (prefers-contrast: high) {
    :root {
        --border-color: #000000;
        --text-secondary: #000000;
        --text-light: #333333;
    }
}

/* Guide Section Styles */
.guide-section {
    margin-top: 50px;
    padding: 30px 0;
    background: var(--background-secondary);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.guide-title {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 20px;
}

.guide-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.guide-intro {
    font-size: 1.1rem;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 40px;
    line-height: 1.6;
}

.guide-steps {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
    max-width: 600px;
    margin: 0 auto;
}

.guide-step {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 15px;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    justify-content: flex-start;
}

.step-number {
    flex-shrink: 0;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
    min-width: 30px;
}

.step-content {
    text-align: left;
}


.step-content h3 {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.step-content p {
    color: var(--text-light);
    line-height: 1.5;
    margin-bottom: 6px;
    font-size: 0.95rem;
}

.step-content p:last-child {
    margin-bottom: 0;
}

/* Responsive Design for Guide */
@media (max-width: 768px) {
    .guide-section {
        margin-top: 40px;
        padding: 30px 0;
    }
    
    .guide-title {
        font-size: 1.5rem;
        margin-bottom: 15px;
    }
    
    .guide-content {
        padding: 0 15px;
    }
    
    .guide-intro {
        font-size: 1rem;
        margin-bottom: 30px;
    }
    
    .guide-steps {
        gap: 12px;
    }
    
    .guide-step {
        gap: 12px;
        padding: 0;
    }
    
    .step-number {
        font-size: 1rem;
        min-width: 25px;
    }
    
    .step-content h3 {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .guide-section {
        margin-top: 30px;
        padding: 20px 0;
    }
    
    .guide-title {
        font-size: 1.3rem;
    }
    
    .guide-step {
        padding: 0;
    }
    
}

/* Features Container within Guide Section */
.guide-content .features-container {
    display: flex;
    flex-direction: row;
    gap: 30px;
    max-width: 1000px;
    margin: 40px auto 0;
    padding: 0 20px;
}

.feature-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px;
    background: var(--background);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    display: block;
}

.feature-content h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.feature-content p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

/* Responsive Design for Features within Guide */
@media (max-width: 768px) {
    .guide-content .features-container {
        flex-direction: column;
        gap: 20px;
        padding: 0 15px;
        margin-top: 30px;
    }
    
    .feature-item {
        padding: 15px;
    }
    
    .feature-icon {
        font-size: 2rem;
        margin-bottom: 12px;
    }
    
    .feature-content h3 {
        font-size: 1.1rem;
        margin-bottom: 10px;
    }
    
    .feature-content p {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .guide-content .features-container {
        margin-top: 25px;
    }
    
    .feature-item {
        padding: 12px;
    }
    
    .feature-icon {
        font-size: 1.8rem;
    }
}

/* FAQ Section */
.faq-section {
    background: var(--background);
    padding: 60px 0;
    margin-top: 40px;
}

.faq-title {
    font-size: 1.98rem;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 40px;
    opacity: 0.96;
}

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

.faq-item {
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 0;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.faq-question:hover {
    color: var(--primary-color);
}

.faq-question h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    flex: 1;
    opacity: 0.96;
}

.faq-icon {
    font-size: 0.8rem;
    color: var(--text-secondary);
    transition: transform 0.3s ease;
    margin-left: 15px;
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding: 0 0 0 0;
}

.faq-item.active .faq-answer {
    max-height: 500px;
    padding: 0 0 20px 0;
}

.faq-answer p {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0 0 15px 0;
    opacity: 0.96;
}

.faq-answer p:last-child {
    margin-bottom: 0;
}

/* Responsive FAQ */
@media (max-width: 768px) {
    .faq-section {
        padding: 40px 0;
    }
    
    .faq-title {
        font-size: 1.62rem;
        margin-bottom: 30px;
    }
    
    .faq-container {
        padding: 0 15px;
    }
    
    .faq-item {
        max-width: 100%;
    }
    
    .faq-question {
        padding: 15px 0;
    }
    
    .faq-question h3 {
        font-size: 1.1rem;
    }
    
    .faq-answer p {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .faq-title {
        font-size: 1.35rem;
    }
    
    .faq-question h3 {
        font-size: 1rem;
    }
}

/* Footer */
.footer {
    background-color: #292931;
    color: #ffffff;
    padding: 40px 0 20px 0;
    margin-top: 60px;
}

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

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-section h4 {
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 15px;
    opacity: 0.9;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section ul li a {
    color: #cccccc;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #7C3AED;
}

.language-selector {
    position: relative;
}

/* Desktop: Show native select, hide custom dropdown */
.language-select-native {
    display: block;
    background-color: #3a3a42;
    color: #ffffff;
    border: 1px solid #4a4a52;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 0.9rem;
    width: 100%;
    max-width: 200px;
    cursor: pointer;
    transition: border-color 0.3s ease;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.language-select-custom {
    display: none;
}

.language-select-native:hover {
    border-color: #7C3AED;
}

.language-select-native:focus {
    outline: none;
    border-color: #7C3AED;
    box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.2);
}

/* Language Coming Soon popup - overlay (doesn't shift layout) */
.language-coming-soon-popup {
    position: absolute;
    left: 0;
    display: none;
    color: #FFFFFF;
    font-size: 14px;
    font-weight: 600;
    text-align: left;
    padding: 8px 16px;
    pointer-events: none; /* allow clicks to pass through */
    animation: fadeIn 0.2s ease-in;
    z-index: 2;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.85) 0%, rgba(159, 122, 234, 0.85) 100%);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.4);
    margin: 4px 0;
    width: fit-content;
    white-space: nowrap;
}

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

.footer-bottom {
    border-top: 1px solid #3a3a42;
    padding-top: 20px;
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-bottom p {
    color: #cccccc;
    font-size: 0.9rem;
    margin: 0;
}

.footer-social {
    display: flex;
    gap: 20px;
}

.social-link {
    color: #cccccc;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.social-link:hover {
    color: #7C3AED;
}

/* Responsive Footer */
@media (max-width: 768px) {
    .footer {
        padding: 30px 0 15px 0;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        margin-bottom: 25px;
    }
    
    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .footer-social {
        justify-content: center;
    }
    
        /* Language selector mobile optimization - custom compact dropdown */
    .language-selector {
        width: 100%;
        max-width: 160px;
        display: inline-block;
        position: relative;
    }
    
    /* Hide native select on mobile */
    .language-select-native {
        display: none !important;
    }
    
    /* Custom dropdown container */
    .language-select-custom {
        display: none;
        position: relative;
        width: 100%;
        max-width: 160px;
    }
    
    /* Custom button */
    .language-select-button {
        background-color: #3a3a42;
        color: #ffffff;
        border: 1px solid #4a4a52;
        border-radius: 6px;
        padding: 6px 10px;
        font-size: 0.8rem;
        width: 100%;
        max-width: 160px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: space-between;
        transition: border-color 0.3s ease;
        box-sizing: border-box;
    }
    
    .language-select-button:hover,
    .language-select-button-active {
        border-color: #7C3AED;
    }
    
    .language-select-button-text {
        flex: 1;
        text-align: left;
    }
    
    .language-select-arrow {
        width: 12px;
        height: 8px;
        transition: transform 0.3s ease;
        flex-shrink: 0;
        margin-left: 8px;
    }
    
    .language-select-button-active .language-select-arrow {
        transform: rotate(180deg);
    }
    
    /* Custom dropdown list - compact overlay (shows above button) */
    .language-select-dropdown {
        display: none;
        position: absolute;
        bottom: calc(100% + 4px);
        top: auto;
        left: 0;
        right: 0;
        background-color: #3a3a42;
        border: 1px solid #4a4a52;
        border-radius: 6px;
        max-height: 200px;
        overflow-y: auto;
        overflow-x: hidden;
        z-index: 1000;
        box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.3);
        box-sizing: border-box;
    }
    
    .language-select-dropdown-open {
        display: block;
    }
    
    /* Language option */
    .language-option {
        padding: 8px 10px;
        font-size: 0.8rem;
        color: #ffffff;
        cursor: pointer;
        transition: background-color 0.2s ease;
        border-bottom: 1px solid #4a4a52;
        box-sizing: border-box;
    }
    
    .language-option:last-child {
        border-bottom: none;
    }
    
    .language-option:hover {
        background-color: #4a4a52;
    }
}

@media (max-width: 480px) {
    .footer-container {
        padding: 0 15px;
    }
    
    .footer-section h4 {
        font-size: 1rem;
    }
    
    .footer-section ul li a {
        font-size: 0.85rem;
    }
    
    /* Language selector - extra small mobile - very compact custom dropdown */
    .language-selector {
        width: 100%;
        max-width: 130px;
        display: inline-block;
        position: relative;
    }
    
    /* Hide native select on small mobile */
    .language-select-native {
        display: none !important;
    }
    
    /* Custom dropdown container */
    .language-select-custom {
        display: none;
        position: relative;
        width: 100%;
        max-width: 130px;
    }
    
    /* Custom button - smaller */
    .language-select-button {
        font-size: 0.75rem !important;
        padding: 5px 8px !important;
        max-width: 130px !important;
        width: 130px !important;
    }
    
    /* Custom dropdown list - compact overlay */
    .language-select-dropdown {
        max-width: 130px;
        max-height: 180px;
    }
    
    /* Language option - smaller */
    .language-option {
        font-size: 0.75rem;
        padding: 6px 8px;
    }
    
    .footer-bottom p {
        font-size: 0.85rem;
    }
    
    .social-link {
        font-size: 0.85rem;
    }
}

/* Print styles */
@media print {
    .header,
    .upload-section,
    .modal,
    /* Toast print styles removed */
    
    .main-content {
        padding-top: 0;
    }
    
    .guide-section {
        background: white;
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .feature-item {
        background: white;
        box-shadow: none;
        border: 1px solid #ccc;
    }
}
