/* ==========================================================================
   Meta Glasses EXIF Remover - Minimalist Black & White Styling
   Inspired by Google/Netflix/OpenAI design principles
   ========================================================================== */

/* ==========================================================================
   1. GLOBAL STYLES & RESET
   ========================================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color-bg: #FFFFFF;
    --color-text: #000000;
    --color-border: #000000;
    --color-error: #CC0000;
    --color-subtle: #666666;
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-xxl: 4rem;
    --max-width: 800px;
    --border-radius: 4px;
    --transition: all 0.3s ease;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-weight: 400;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ==========================================================================
   2. TYPOGRAPHY
   ========================================================================== */

h1 {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
}

h2 {
    font-size: 1.75rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: var(--spacing-sm);
}

h3 {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: var(--spacing-sm);
}

p {
    font-size: 1rem;
    margin-bottom: var(--spacing-sm);
}

.subtitle {
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--color-subtle);
    margin-bottom: var(--spacing-md);
}

/* ==========================================================================
   3. LAYOUT CONTAINER
   ========================================================================== */

.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: var(--spacing-md);
    flex: 1;
}

/* ==========================================================================
   4. HEADER
   ========================================================================== */

header {
    text-align: center;
    padding: var(--spacing-xl) var(--spacing-md) var(--spacing-md);
    border-bottom: none;
}

header h1 {
    margin-bottom: var(--spacing-xs);
}

header .subtitle {
    margin-bottom: 0;
}

/* ==========================================================================
   5. MAIN CONTENT
   ========================================================================== */

main {
    flex: 1;
    padding: var(--spacing-md) var(--spacing-md);
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

section {
    margin-bottom: 0;
}

/* Section visibility states */
.hidden {
    display: none;
}

.fade-in {
    animation: fadeIn 0.3s ease-in;
}

.fade-out {
    animation: fadeOut 0.3s ease-out;
}

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

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

/* ==========================================================================
   6. UPLOAD SECTION
   ========================================================================== */

#upload-section {
    text-align: center;
}

.drop-zone {
    width: 100%;
    max-width: 1100px;
    min-height: 550px;
    margin: 0 auto var(--spacing-lg);
    border: 2px solid #E5E5E5;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    padding: var(--spacing-xxl) var(--spacing-xl);
    background-color: #FFFFFF;
    position: relative;
}

.drop-zone::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 6px;
    right: 6px;
    bottom: 6px;
    border: 2px dashed #D0D0D0;
    border-radius: 4px;
    pointer-events: none;
}

.drop-zone:hover {
    border-color: #D0D0D0;
    background-color: #FAFAFA;
}

.drop-zone.drag-over {
    border-color: var(--color-border);
    background-color: #F0F0F0;
}

.drop-zone-content {
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

/* Allow clicks on interactive elements */
.drop-zone-content .btn,
.drop-zone-content button {
    pointer-events: auto;
}

.drop-zone-content .upload-icon {
    pointer-events: auto;
    cursor: pointer;
}

.upload-icon {
    width: 64px;
    height: 64px;
    margin-bottom: var(--spacing-md);
    display: block;
    color: var(--color-text);
    margin-left: auto;
    margin-right: auto;
}

.drop-zone-text {
    font-size: 1.125rem;
    font-weight: 500;
    margin-bottom: var(--spacing-md);
    color: var(--color-text);
    text-align: center;
}

.drop-zone-divider {
    font-size: 1rem;
    font-weight: 400;
    color: var(--color-subtle);
    margin: var(--spacing-md) 0;
    text-align: center;
}

.drop-zone .subtitle {
    font-size: 0.875rem;
    margin-bottom: 0;
}

#file-input {
    display: none;
}

.upload-info {
    text-align: center;
    margin-top: var(--spacing-md);
    margin-bottom: 0;
}

.supported-formats,
.max-file-size {
    font-size: 0.95rem;
    color: var(--color-subtle);
    margin-bottom: 0.25rem;
    font-weight: 400;
}

/* ==========================================================================
   7. BUTTONS
   ========================================================================== */

button,
.btn {
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    padding: 12px 40px;
    border: 2px solid var(--color-border);
    border-radius: 4px;
    background-color: var(--color-bg);
    color: var(--color-text);
    cursor: pointer;
    transition: var(--transition);
    display: inline-block;
    text-decoration: none;
    text-align: center;
    min-width: 140px;
    touch-action: manipulation;
    user-select: none;
}

button:hover,
.btn:hover {
    background-color: var(--color-text);
    color: var(--color-bg);
}

button:active,
.btn:active {
    transform: scale(0.98);
}

button:disabled,
.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

button:disabled:hover,
.btn:disabled:hover {
    background-color: var(--color-bg);
    color: var(--color-text);
}

/* Primary button (filled) */
.btn-primary {
    background-color: #000000;
    color: #FFFFFF;
    border-color: #000000;
}

.btn-primary:hover {
    background-color: #333333;
    border-color: #333333;
    color: #FFFFFF;
}

/* Large button */
.btn-large {
    font-size: 1.125rem;
    padding: 16px 32px;
    min-width: 200px;
}

/* Secondary button (text only) */
.btn-secondary {
    border: none;
    background-color: transparent;
    color: var(--color-text);
    text-decoration: underline;
    min-width: auto;
}

.btn-secondary:hover {
    background-color: transparent;
    opacity: 0.7;
}

/* Button group */
.button-group {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: center;
    flex-wrap: wrap;
}

/* ==========================================================================
   8. PROCESSING SECTION
   ========================================================================== */

#processing-section {
    text-align: center;
    padding: var(--spacing-xl) 0;
}

/* Loading spinner */
.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--color-bg);
    border-top: 4px solid var(--color-border);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: var(--spacing-lg) auto;
}

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

/* Progress bar container */
.progress-container {
    width: 100%;
    max-width: 400px;
    margin: var(--spacing-lg) auto;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background-color: var(--color-text);
    transition: width 0.3s ease;
    width: 0%;
}

/* Indeterminate progress animation */
.progress-fill.indeterminate {
    width: 30%;
    animation: indeterminateProgress 1.5s ease-in-out infinite;
}

@keyframes indeterminateProgress {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(400%);
    }
}

.progress-text {
    font-size: 0.875rem;
    font-weight: 600;
    margin-top: var(--spacing-sm);
    color: var(--color-text);
}

/* ==========================================================================
   9. DOWNLOAD SECTION
   ========================================================================== */

#download-section {
    text-align: center;
    padding: var(--spacing-xl) 0;
}

#download-section h2 {
    margin-bottom: var(--spacing-md);
}

#download-section .button-group {
    margin-top: var(--spacing-lg);
}

/* File info display */
.file-info {
    background-color: #FAFAFA;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    padding: var(--spacing-md);
    margin: var(--spacing-md) 0;
    text-align: left;
}

.file-info-row {
    display: flex;
    justify-content: space-between;
    padding: var(--spacing-xs) 0;
    border-bottom: 1px solid #E0E0E0;
}

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

.file-info-label {
    font-weight: 600;
}

.file-info-value {
    color: var(--color-subtle);
}

/* ==========================================================================
   10. ERROR SECTION
   ========================================================================== */

#error-section {
    text-align: center;
    padding: var(--spacing-lg) 0;
}

.error-box {
    background-color: var(--color-bg);
    border: 2px solid var(--color-error);
    border-radius: var(--border-radius);
    padding: var(--spacing-lg);
    margin: var(--spacing-md) 0;
}

.error-box h3 {
    color: var(--color-error);
    margin-bottom: var(--spacing-sm);
}

.error-message {
    color: var(--color-error);
    font-size: 1rem;
    font-weight: 400;
    margin-bottom: var(--spacing-md);
}

/* ==========================================================================
   11. FOOTER
   ========================================================================== */

footer {
    text-align: center;
    padding: var(--spacing-md) var(--spacing-md);
    border-top: none;
    font-size: 0.875rem;
    color: var(--color-subtle);
    margin-top: var(--spacing-sm);
}

footer p {
    margin-bottom: var(--spacing-xs);
}

footer a {
    color: var(--color-text);
    text-decoration: none;
    border-bottom: 1px solid var(--color-text);
    transition: var(--transition);
}

footer a:hover {
    opacity: 0.7;
}

/* ==========================================================================
   12. UTILITY CLASSES
   ========================================================================== */

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

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

.text-right {
    text-align: right;
}

.mt-sm { margin-top: var(--spacing-sm); }
.mt-md { margin-top: var(--spacing-md); }
.mt-lg { margin-top: var(--spacing-lg); }

.mb-sm { margin-bottom: var(--spacing-sm); }
.mb-md { margin-bottom: var(--spacing-md); }
.mb-lg { margin-bottom: var(--spacing-lg); }

.pt-sm { padding-top: var(--spacing-sm); }
.pt-md { padding-top: var(--spacing-md); }
.pt-lg { padding-top: var(--spacing-lg); }

.pb-sm { padding-bottom: var(--spacing-sm); }
.pb-md { padding-bottom: var(--spacing-md); }
.pb-lg { padding-bottom: var(--spacing-lg); }

/* ==========================================================================
   13. RESPONSIVE DESIGN
   ========================================================================== */

/* Mobile (default styles above) */

/* Tablet: 600px and up */
@media (min-width: 600px) {
    :root {
        --spacing-xl: 3.5rem;
        --spacing-xxl: 5rem;
    }

    h1 {
        font-size: 3rem;
    }

    h2 {
        font-size: 2rem;
    }

    .drop-zone {
        height: 350px;
    }

    .container {
        padding: var(--spacing-lg);
    }
}

/* Desktop: 800px and up */
@media (min-width: 800px) {
    :root {
        --spacing-xl: 4rem;
        --spacing-xxl: 6rem;
    }

    h1 {
        font-size: 3.5rem;
    }

    .drop-zone {
        min-height: 600px;
        max-width: 1200px;
    }

    .upload-icon {
        width: 80px;
        height: 80px;
    }
}

/* Large Desktop: 1200px and up */
@media (min-width: 1200px) {
    .drop-zone {
        min-height: 650px;
        max-width: 1300px;
    }
}

/* Extra Large Desktop: 1400px and up */
@media (min-width: 1400px) {
    .drop-zone {
        min-height: 700px;
        max-width: 1400px;
    }
}

/* Large screens: 1200px and up */
@media (min-width: 1200px) {
    html {
        font-size: 18px;
    }
}

/* ==========================================================================
   14. ACCESSIBILITY
   ========================================================================== */

/* Focus states */
button:focus,
.btn:focus,
.drop-zone:focus,
a:focus {
    outline: 2px solid var(--color-text);
    outline-offset: 2px;
}

/* Ensure minimum touch target size on mobile */
@media (max-width: 599px) {
    button,
    .btn {
        min-height: 44px;
        min-width: 44px;
    }

    /* Hide divider on mobile */
    .drop-zone-divider {
        display: none;
    }

    /* Smaller progress bar on mobile */
    .progress-container {
        max-width: 200px;
    }
}

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

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --color-subtle: #000000;
    }

    .drop-zone:hover,
    .drop-zone.drag-over {
        background-color: var(--color-bg);
    }
}

/* ==========================================================================
   15. PRINT STYLES
   ========================================================================== */

@media print {
    header,
    footer,
    button,
    .btn {
        display: none;
    }

    body {
        background-color: white;
        color: black;
    }

    .container {
        max-width: 100%;
    }
}
