/* ---
RemovEXIF - main.css
Style inspired by Remove.bg with "Bold Color Block" Header/Footer (Footer height adjusted)
--- */

/* 1. Global Styles & Variables
------------------------------------- */
:root {
    --primary-color: #3d8dff;
    --primary-hover-color: #2176f8;
    --text-color: #0c1e42; /* Dark navy blue */
    --light-text-color: #6a7387;
    --footer-text-color: #adb5bd; /* Lighter gray for footer text */
    --footer-link-color: #ced4da; /* Even lighter gray for footer links */
    --background-color: #f8f9fc;
    --white-color: #ffffff;
    --border-color: #e5e7f0;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --container-width: 840px;
    --border-radius: 16px;
    --box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    --transition-speed: 0.2s;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    margin: 0;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2 {
    margin-top: 0;
    font-weight: 700;
}

h1 {
    font-size: 2.75rem;
    line-height: 1.2;
    letter-spacing: -1px;
    margin-bottom: 1rem;
}

h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

a {
    color: var(--primary-color);
    text-decoration: none;
}
a:hover {
    color: var(--primary-hover-color);
}

/* 2. Header & Footer (Bold Color Block Style)
------------------------------------- */
.main-header {
    padding: 20px 0;
    background-color: var(--primary-color);
    color: var(--white-color);
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--white-color);
}
.logo:hover { color: var(--white-color); }

.main-nav a {
    color: var(--white-color);
    margin-left: 30px;
    font-weight: 500;
    opacity: 0.9;
    transition: opacity var(--transition-speed) ease;
}
.main-nav a:hover {
    color: var(--white-color);
    opacity: 1;
}

.main-footer {
    padding: 28px 0; /* UPDATED: Reduced from 40px */
    margin-top: 80px;
    text-align: center;
    background-color: var(--text-color); /* Dark navy background */
    color: var(--footer-text-color);
}

.footer-links a {
    margin: 0 15px;
    color: var(--footer-link-color);
    transition: color var(--transition-speed) ease;
}

.footer-links a:hover {
    color: var(--white-color);
}

.footer-copyright {
    margin-top: 15px;
    font-size: 0.9rem;
}


/* 3. Main Content & Sections
------------------------------------- */
main {
    padding: 40px 0;
}

.hero {
    text-align: center;
    padding: 20px 0 40px;
}

.hero .subtitle {
    font-size: 1.2rem;
    color: var(--light-text-color);
    max-width: 580px;
    margin: 1rem auto 0;
}

/* 4. Uploader (Card Style)
------------------------------------- */
.uploader-section {
    background: var(--white-color);
    border-radius: var(--border-radius);
    padding: 40px;
    box-shadow: var(--box-shadow);
}

.drop-zone {
    border: 2px dashed #cdd4e0;
    border-radius: 12px;
    padding: 50px;
    text-align: center;
    cursor: pointer;
    background-color: #fcfdff;
    transition: background-color var(--transition-speed) ease, border-color var(--transition-speed) ease;
}

.drop-zone:hover, .drop-zone.drag-over {
    background-color: #f5f9ff;
    border-color: var(--primary-color);
}

.drop-zone-prompt p {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 500;
}

.drop-zone-prompt .light-text {
    font-size: 1rem;
    margin: 0.5rem 0 1.25rem 0;
}

.processing-info {
    text-align: center;
    margin-top: 20px;
    font-size: 0.9rem;
    color: var(--light-text-color);
}


/* 5. Buttons
------------------------------------- */
.button-primary, .button-secondary {
    display: inline-block;
    border: none;
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 50px; /* Pill-shaped buttons */
    cursor: pointer;
    text-align: center;
    transition: transform var(--transition-speed) ease, background-color var(--transition-speed) ease;
}
.button-primary:hover { transform: translateY(-2px); }

.button-primary {
    background-color: var(--primary-color);
    color: var(--white-color);
}
.button-primary:hover {
    background-color: var(--primary-hover-color);
    color: var(--white-color);
}

.button-secondary {
    background-color: #eef0f5;
    color: var(--text-color);
}
.button-secondary:hover {
    background-color: #e5e7f0;
}

.button-large {
    padding: 16px 32px;
    font-size: 1.1rem;
}

.action-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
}

/* 6. File List & Download Section
------------------------------------- */
.hidden {
    display: none;
}

.file-list-section, .download-section {
    background: var(--white-color);
    border-radius: var(--border-radius);
    padding: 30px 40px;
    box-shadow: var(--box-shadow);
    margin-top: 50px;
    text-align: center;
}

.file-list {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
}

.file-list li {
    display: flex;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}
.file-list li:last-child {
    border-bottom: none;
}
.file-info .file-name {
    font-weight: 600;
}
.file-info .file-size {
    font-size: 0.9rem;
    color: var(--light-text-color);
}
.file-status {
    margin-left: auto;
    font-weight: 500;
}


/* 7. Responsive Design
------------------------------------- */

/* Tablet Landscape */
@media (max-width: 1024px) {
    .container {
        padding: 0 15px;
    }
    h1 {
        font-size: 2.5rem;
    }
}

/* Tablet Portrait */
@media (max-width: 768px) {
    h1 {
        font-size: 2.25rem;
        line-height: 1.3;
    }
    h2 {
        font-size: 1.3rem;
    }
    .main-header .container {
        flex-direction: column;
        gap: 15px;
    }
    .main-nav a { 
        margin: 0 10px;
        padding: 10px 15px;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    .uploader-section { 
        padding: 20px 15px; 
    }
    .drop-zone { 
        padding: 25px 20px;
        min-height: 120px;
        font-size: 1rem;
    }
    .action-buttons {
        flex-direction: column;
        gap: 12px;
    }
    .button, .button-secondary {
        min-height: 48px;
        font-size: 1rem;
        padding: 12px 24px;
    }
    
    /* Language switcher mobile optimization */
    .language-switcher {
        width: 100%;
        justify-content: center;
    }
    
    /* File list mobile optimization */
    .file-list li {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 15px;
    }
    
    .file-list .button-secondary {
        width: 100%;
        text-align: center;
    }
}

/* Mobile Landscape */
@media (max-width: 640px) {
    .container {
        padding: 0 12px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .main-nav {
        width: 100%;
        text-align: center;
    }
    
    .main-nav a {
        margin: 0 5px;
        padding: 8px 12px;
        font-size: 0.9rem;
    }
}

/* Mobile Portrait */
@media (max-width: 480px) {
    body {
        font-size: 14px;
    }
    
    .container {
        padding: 0 10px;
    }
    
    h1 {
        font-size: 1.8rem;
        margin-bottom: 0.8rem;
    }
    
    h2 {
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }
    
    .main-header {
        padding: 15px 0;
    }
    
    .main-nav a {
        font-size: 0.85rem;
        padding: 6px 10px;
    }
    
    .uploader-section {
        padding: 15px 10px;
    }
    
    .drop-zone {
        padding: 20px 15px;
        min-height: 100px;
        font-size: 0.9rem;
    }
    
    .file-upload-icon {
        font-size: 2rem;
    }
    
    /* Ensure touch targets are at least 44x44px */
    .button, .button-secondary, input[type="file"] + label {
        min-height: 44px;
        padding: 12px 20px;
        font-size: 0.9rem;
    }
    
    /* Advantage items mobile */
    .advantages-grid {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .advantage-item {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
    
    /* Footer mobile */
    .footer-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .footer-nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }
}
/* ADD TO THE END OF main.css */

/* 8. Download List Styles
------------------------------------- */
.processed-files {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 25px;
    text-align: left;
}

.processed-file-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    background-color: #f8f9fc;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.processed-file-card span:first-child {
    font-weight: 600;
    word-break: break-all;
    margin-right: 15px;
}

.processed-file-card .button-secondary {
    padding: 8px 16px;
    border-radius: 30px;
    white-space: nowrap;
}
/* ADD TO THE END OF main.css */

/* 9. Progress Bar Styles
------------------------------------- */
.file-list li {
    flex-wrap: wrap; /* Allow items to wrap to the next line */
}

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: var(--secondary-color);
    border-radius: 4px;
    margin-top: 8px;
    overflow: hidden;
    display: none; /* Hidden by default */
}

.progress-bar-fill {
    width: 0%;
    height: 100%;
    background-color: var(--primary-color);
    border-radius: 4px;
    transition: width 0.4s ease-in-out;
}
/* ADD TO THE END OF main.css */

/* 10. Ad Container Styles
------------------------------------- */
.ad-container-top {
    /* This container will only take up space if the ad script fills it. */
    min-height: 0; 
    text-align: center;
    padding: 20px 0;
}
/* ADD TO THE END OF main.css */

/* 11. EXIF Viewer Styles
------------------------------------- */
.file-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.exif-info-btn {
    background: none;
    border: none;
    padding: 5px;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.exif-info-btn:hover {
    background-color: var(--secondary-color);
}

.exif-info-btn svg {
    width: 20px;
    height: 20px;
    stroke: var(--light-text-color);
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: none; /* Hidden by default */
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.modal-content {
    background-color: var(--white-color);
    padding: 30px;
    border-radius: var(--border-radius);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    position: relative;
}

.modal-close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    font-weight: bold;
    color: var(--light-text-color);
    cursor: pointer;
    border: none;
    background: none;
}

.modal-content h2 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    text-align: left;
}

.exif-data-pre {
    background-color: #f8f9fc;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: monospace;
    font-size: 0.9rem;
    color: var(--text-color);
}
```css
/* ADD TO THE END OF main.css */

/* 12. UI Hints and Modal Polish
------------------------------------- */
.hint-text {
    color: var(--light-text-color);
    font-size: 0.9rem;
    text-align: center;
    margin-top: -1.25rem;
    margin-bottom: 1.5rem;
}

/* Modal Redesign */
.modal-overlay {
    transition: opacity 0.3s ease;
}

.modal-content {
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.modal-overlay.visible {
    display: flex;
}

.modal-overlay.visible .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.modal-close-btn {
    position: static; /* Remove absolute positioning */
    font-size: 1.5rem;
}

/* EXIF Data Table */
.exif-data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 1rem;
}

.exif-data-table td {
    padding: 10px;
    border-bottom: 1px solid var(--border-color);
}

.exif-data-table tr:last-child td {
    border-bottom: none;
}

.exif-data-table td:first-child {
    font-weight: 600;
    color: var(--text-color);
    width: 35%;
}
.exif-data-table td:last-child {
    color: var(--light-text-color);
    word-break: break-all;
}

.no-exif-message {
    color: var(--light-text-color);
    font-style: italic;
    padding: 20px;
    text-align: center;
}

/* Language Switcher Styles */
.language-switcher {
    position: relative;
    display: inline-block;
}

.language-current {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: var(--white-color);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
    transition: all var(--transition-speed);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
}

.language-current:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(61, 141, 255, 0.2);
    transform: translateY(-1px);
}

.language-current:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(61, 141, 255, 0.15);
}

.language-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--white-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    min-width: 180px;
    z-index: 1000;
    display: none;
    margin-top: 6px;
    padding: 6px;
    backdrop-filter: blur(10px);
    animation: fadeInDown 0.3s ease-out;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.language-menu.show {
    display: block;
}

.language-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    text-decoration: none;
    color: var(--text-color);
    font-size: 14px;
    font-weight: 500;
    transition: all var(--transition-speed);
    border-radius: 6px;
    margin: 2px;
}

.language-option:hover {
    background-color: var(--background-color);
    transform: translateX(2px);
}

.language-option.active {
    background-color: var(--primary-color);
    color: var(--white-color);
}

.flag-icon {
    font-size: 0;
    line-height: 1;
    display: inline-block;
    width: 24px;
    height: 16px;
    border-radius: 3px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all var(--transition-speed);
    border: 1px solid rgba(0, 0, 0, 0.1);
    overflow: hidden;
    position: relative;
}

/* 德国国旗 - 黑红金三色横条 */
.flag-icon.flag-de {
    background: linear-gradient(to bottom, 
        #000000 0%, #000000 33.33%,
        #dd0000 33.33%, #dd0000 66.66%,
        #ffce00 66.66%, #ffce00 100%
    );
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.1);
}

/* 美国国旗 - 简化版星条旗 */
.flag-icon.flag-en {
    background: linear-gradient(to bottom,
        #b22234 0%, #b22234 7.69%,
        #ffffff 7.69%, #ffffff 15.38%,
        #b22234 15.38%, #b22234 23.07%,
        #ffffff 23.07%, #ffffff 30.76%,
        #b22234 30.76%, #b22234 38.45%,
        #ffffff 38.45%, #ffffff 46.14%,
        #b22234 46.14%, #b22234 53.83%,
        #ffffff 53.83%, #ffffff 61.52%,
        #b22234 61.52%, #b22234 69.21%,
        #ffffff 69.21%, #ffffff 76.90%,
        #b22234 76.90%, #b22234 84.59%,
        #ffffff 84.59%, #ffffff 92.28%,
        #b22234 92.28%, #b22234 100%
    );
}

.flag-icon.flag-en::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 40%;
    height: 53.8%;
    background: #3c3b6e;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.1);
}

/* 日本国旗 - 红色圆点 */
.flag-icon.flag-ja {
    background: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.1);
}

.flag-icon.flag-ja::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    background: #bc002d;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 2px rgba(188, 0, 45, 0.3);
}

.flag-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.language-option:hover .flag-icon {
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.language-current .flag-icon {
    width: 28px;
    height: 19px;
    margin-right: 8px;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.25);
}

.language-option.active .flag-icon {
    box-shadow: 0 2px 8px rgba(61, 141, 255, 0.4);
    border-color: var(--primary-color);
}

.chevron {
    transition: transform var(--transition-speed);
}

.language-switcher.open .chevron {
    transform: rotate(180deg);
}

/* Header layout adjustments for language switcher */
.main-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 32px;
}

@media (max-width: 768px) {
    .main-header .container {
        flex-wrap: wrap;
        gap: 16px;
    }
    
    .language-switcher {
        order: 3;
        margin-top: 8px;
    }
}
/* ADD TO THE END OF main.css */

/* 13. Advantages Section Styles
------------------------------------- */
.advantages-section {
    text-align: center;
    padding: 40px 0;
    margin-bottom: 2rem;
}

.advantages-section h2 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.advantages-section .subtitle {
    font-size: 1.1rem;
    color: var(--light-text-color);
    max-width: 650px;
    margin: 0 auto 2.5rem auto;
}

.advantages-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.advantage-item {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-color);
    padding: 10px 20px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    font-size: 0.95rem;
    background-color: var(--white-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* Mobile Touch Optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Remove hover effects on touch devices */
    .button:hover, .button-secondary:hover {
        transform: none;
        box-shadow: var(--box-shadow);
    }
    
    /* Increase touch targets */
    .language-menu button {
        min-height: 48px;
        padding: 12px 16px;
    }
    
    /* Better tap highlighting */
    .button, .button-secondary, a, button {
        -webkit-tap-highlight-color: rgba(61, 141, 255, 0.2);
    }
    
    /* Disable zoom on input focus (iOS) */
    input, select, textarea {
        font-size: 16px;
    }
}

/* Prevent horizontal scroll on small screens */
* {
    box-sizing: border-box;
}

/* Ensure images are responsive */
img {
    max-width: 100%;
    height: auto;
}

/* Cookie Consent Banner Styles */
.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, #2a76f5 100%);
    color: var(--white-color);
    padding: 20px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out;
    border-top: 3px solid rgba(255, 255, 255, 0.2);
}

.cookie-consent-banner.show {
    transform: translateY(0);
}

.cookie-consent-content {
    max-width: var(--container-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.cookie-consent-text {
    flex: 1;
    font-size: 0.95rem;
    line-height: 1.5;
}

.cookie-consent-text a {
    color: var(--white-color);
    text-decoration: underline;
    font-weight: 500;
}

.cookie-consent-text a:hover {
    text-decoration: none;
}

.cookie-consent-buttons {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.cookie-consent-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 44px;
    white-space: nowrap;
}

.cookie-consent-accept {
    background-color: var(--white-color);
    color: var(--primary-color);
}

.cookie-consent-accept:hover {
    background-color: #f0f0f0;
    transform: translateY(-1px);
}

.cookie-consent-decline {
    background-color: transparent;
    color: var(--white-color);
    border: 2px solid var(--white-color);
}

.cookie-consent-decline:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.cookie-consent-learn-more {
    background-color: transparent;
    color: var(--white-color);
    border: 1px solid rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    padding: 8px 16px;
}

.cookie-consent-learn-more:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: var(--white-color);
}

/* Mobile responsive for cookie banner */
@media (max-width: 768px) {
    .cookie-consent-content {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .cookie-consent-buttons {
        flex-direction: column;
        width: 100%;
        gap: 8px;
    }
    
    .cookie-consent-btn {
        width: 100%;
        padding: 12px;
    }
    
    .cookie-consent-text {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .cookie-consent-banner {
        padding: 15px;
    }
    
    .cookie-consent-text {
        font-size: 0.85rem;
    }
    
    .cookie-consent-btn {
        font-size: 0.85rem;
        padding: 10px;
    }
}