/* cyberhub-styles.css - CyberHub Page Specific Styles */


/* ===== TAB BAR (Material Design 3 Segmented Buttons) ===== */
.tab-bar {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-bottom: 24px;
    padding: 4px;
    background-color: var(--md-sys-color-surface-variant);
    border-radius: 100px;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.tab-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 100px;
    background-color: transparent;
    color: var(--md-sys-color-on-surface-variant);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.1s ease;
}

.tab-button .material-icons {
    font-size: 20px;
}

.tab-button:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .tab-button:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

.tab-button.active {
    background-color: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
}

.tab-button.active:hover {
    background-color: var(--md-sys-color-primary);
    filter: brightness(1.1);
}

.tab-button:active {
    transform: scale(0.98);
}

/* ===== TAB CONTENT ===== */
.tab-content {
    display: none;
    animation: fadeIn 0.3s ease-out;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== PLACEHOLDER CARD (Coming Soon) ===== */
.placeholder-card {
    text-align: center;
    padding: 48px 24px;
}

.placeholder-icon {
    font-size: 64px;
    color: var(--md-sys-color-primary);
    margin-bottom: 16px;
    opacity: 0.7;
}

.placeholder-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--md-sys-color-on-surface);
    margin: 0 0 12px 0;
}

.placeholder-description {
    font-size: 1rem;
    color: var(--md-sys-color-on-surface-variant);
    margin: 0;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* Tablet/Mobile responsiveness */
@media (max-width: 480px) {
    .tab-bar {
        width: 100%;
        padding: 4px;
    }

    .tab-button {
        flex: 1;
        justify-content: center;
        padding: 10px 16px;
        font-size: 0.875rem;
    }

    .tab-button .material-icons {
        font-size: 18px;
    }
}

.card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
}

.card-header .material-icons {
    color: var(--md-sys-color-primary);
    font-size: 32px;
}

.card-description {
    font-size: 1.1rem;
    margin: 8px 0 24px 0;
}

.card-actions {
    display: flex;
    justify-content: flex-start;
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .card-header h2 {
        font-size: 1.75rem;
    }
}

/* Password Checker Styles */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.password-checker-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 32px;
}

.password-checker-header-text {
    flex: 1;
}

.password-input-group {
    display: flex;
    gap: 16px;
    margin-bottom: 32px;
    flex-wrap: wrap;
    align-items: center;
}

.input-wrapper {
    display: flex;
    align-items: center;
    width: 100%;
    border: 2px solid var(--md-sys-color-outline);
    border-radius: 50px;
    padding: 2px 20px;
    background-color: var(--md-sys-color-surface);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.input-wrapper:focus-within {
    border-color: var(--md-sys-color-primary);
    box-shadow: 0 0 0 1px var(--md-sys-color-primary);
}

.input-icon {
    color: var(--md-sys-color-outline);
    margin-right: 12px;
    font-size: 24px;
}

.password-input {
    flex: 1;
    border: none;
    background: transparent;
    color: var(--md-sys-color-on-surface);
    font-family: inherit;
    font-size: 1rem;
    padding: 10px 0;
    width: 100%;
}

.password-input::placeholder {
    color: var(--md-sys-color-outline);
    opacity: 1;
}

.password-input:focus {
    outline: none;
}

.password-toggle-btn {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: var(--md-sys-color-outline);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: color 0.2s, background-color 0.2s;
    outline: none;
}

.password-toggle-btn:hover {
    color: var(--md-sys-color-on-surface);
    background-color: rgba(0, 0, 0, 0.05);
}

.password-toggle-btn:focus {
    color: var(--md-sys-color-primary);
}



@media (max-width: 600px) {
    .password-input-group {
        flex-direction: column;
    }
}

/* Result Styles - Material Design Card Refactor */
.password-result.result-card {
    background-color: var(--md-sys-color-surface-variant);
    color: var(--md-sys-color-on-surface-variant);
    border-radius: 16px;
    overflow: hidden;
    padding: 0;
    margin-bottom: 0;

    /* Transition for smooth expand/collapse using Grid */
    display: grid;
    grid-template-rows: 0fr;
    opacity: 0;
    transition:
        grid-template-rows 0.6s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.4s ease-in-out,
        margin-bottom 0.4s ease;
}

.password-result.result-card.open {
    grid-template-rows: 1fr;
    opacity: 1;
    margin-bottom: 32px;
}

.result-card-inner {
    min-height: 0;
}

/* Card Header */
.result-card__header {
    padding: 24px 24px 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.header-top {
    display: flex;
    align-items: center;
    gap: 12px;
}

.result-card__header .result-icon {
    font-size: 32px;
    color: var(--md-sys-color-primary);
}

.headline-text {
    font-family: 'Roboto Mono', monospace;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--md-sys-color-on-surface);
}

/* Meter within Header */
.strength-meter {
    display: flex;
    gap: 6px;
    width: 100%;
    height: 8px;
    background-color: transparent;
    margin-bottom: 0;
}

.strength-block {
    flex: 1;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    transition: background-color 0.3s ease;
    width: auto;
}

/* Filled State colors per score */
.strength-meter.score-0 .strength-block:nth-child(1) {
    background-color: var(--strength-score-0);
}

.strength-meter.score-1 .strength-block:nth-child(-n+2) {
    background-color: var(--strength-score-1);
}

.strength-meter.score-2 .strength-block:nth-child(-n+3) {
    background-color: var(--strength-score-2);
}

.strength-meter.score-3 .strength-block:nth-child(-n+4) {
    background-color: var(--strength-score-3);
}

.strength-meter.score-4 .strength-block:nth-child(-n+5) {
    background-color: var(--strength-score-4);
}

/* Card Content (Crack Time) */
.result-card__content {
    padding: 0 24px 16px;
}

.crack-time-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 8px;
}

[data-theme="dark"] .crack-time-wrapper {
    background-color: rgba(0, 0, 0, 0.2);
}

.content-icon {
    color: var(--md-sys-color-primary);
    font-size: 24px;
}

.crack-time-text {
    margin: 0;
    font-size: 1rem;
    font-weight: 500;
    color: var(--md-sys-color-on-surface-variant);
}

/* Card Footer (Feedback) */
.result-card__footer {
    display: grid;
    grid-template-rows: 1fr;
    padding: 16px 24px 24px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    transition:
        grid-template-rows 0.4s cubic-bezier(0.22, 1, 0.36, 1),
        padding 0.4s ease,
        border-color 0.4s ease,
        opacity 0.3s ease;
    overflow: hidden;
}

.result-card__footer.footer-hidden {
    grid-template-rows: 0fr;
    padding: 0 24px;
    /* Keep horizontal padding to prevent width jump, vertical 0 */
    border-top-color: transparent;
    opacity: 0;
}

/* Inner wrapper for footer content to support grid animation */
.result-card__footer>* {
    min-height: 0;
}

[data-theme="dark"] .result-card__footer {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .result-card__footer.footer-hidden {
    border-top-color: transparent;
}

.feedback-item {
    margin-top: 12px;
}

.feedback-item:first-child {
    margin-top: 0;
}

.warning-row,
.suggestions-row {
    display: grid;
    grid-template-rows: 0fr;
    overflow: hidden;
    opacity: 0;
    margin-top: 0;
    /* Ensure no space when hidden */
    transition: grid-template-rows 0.4s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease, margin-top 0.3s ease;
}

.warning-row.visible,
.suggestions-row.visible {
    grid-template-rows: 1fr;
    opacity: 1;
}

.warning-row.visible:not(:first-child),
.suggestions-row.visible:not(:first-child) {
    margin-top: 12px;
    /* Restore margin only if not first child */
}

.feedback-content {
    min-height: 0;
    /* Required for grid animation */
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.feedback-warning {
    color: var(--md-sys-color-error);
    margin: 0;
    font-weight: 500;
}

.feedback-suggestions {
    margin: 0;
    padding: 0;
    list-style: none;
    color: var(--md-sys-color-on-surface-variant);
}

.feedback-suggestions li {
    margin-bottom: 4px;
}

/* Helper Icons colors */
.warning-row .result-icon {
    color: var(--md-sys-color-error);
}

.suggestions-row .result-icon {
    color: #FF8F00;
}

[data-theme="dark"] .suggestions-row .result-icon {
    color: #FFCA28;
}

@media (max-width: 600px) {
    .result-card__header {
        align-items: center;
        text-align: center;
    }

    .header-top {
        flex-direction: column;
        gap: 8px;
    }

    .result-card__header .result-icon {
        font-size: 48px;
    }

    .headline-text {
        font-size: 1.75rem;
    }

    .strength-meter {
        height: 12px;
    }

    /* Adjust Input padding for larger toggle button */
    .input-wrapper {
        padding: 4px 16px;
    }




}

/* ===== PASSWORD GENERATOR STYLES ===== */

.password-generator-card {
    margin-top: 24px;
}

.generator-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 32px;
}

.generator-header-text {
    flex: 1;
}

.generator-control-group {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.control-label {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--md-sys-color-on-surface-variant);
    min-width: 130px;
}

.sector-buttons {
    display: flex;
    gap: 4px;
    background-color: var(--md-sys-color-surface-variant);
    border-radius: 100px;
    padding: 4px;
    width: fit-content;
}

.sector-button {
    min-width: 40px;
    height: 32px;
    padding: 0 12px;
    border: none;
    border-radius: 100px;
    background-color: transparent;
    color: var(--md-sys-color-on-surface-variant);
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.sector-button:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .sector-button:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

.sector-button.active {
    background-color: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
}

.sector-button.active:hover {
    filter: brightness(1.1);
}

/* ===== MD3 SWITCH COMPONENT ===== */

.switch-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.switch-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-track {
    position: relative;
    width: 52px;
    height: 32px;
    background-color: var(--md-sys-color-surface-variant);
    border: 2px solid var(--md-sys-color-outline);
    border-radius: 100px;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.switch-thumb {
    position: absolute;
    top: 50%;
    left: 6px;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    background-color: var(--md-sys-color-outline);
    border-radius: 50%;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.switch-input:checked+.switch-track {
    background-color: var(--md-sys-color-primary);
    border-color: var(--md-sys-color-primary);
}

.switch-input:checked+.switch-track .switch-thumb {
    transform: translateY(-50%) translateX(20px);
    background-color: var(--md-sys-color-on-primary);
}

.switch-input:focus-visible+.switch-track {
    outline: 2px solid var(--md-sys-color-primary);
    outline-offset: 2px;
}

.switch-text {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--md-sys-color-on-surface);
}

/* ===== ADVANCED OPTIONS PANEL ===== */

.advanced-wrapper {
    margin-top: 8px;
}

.advanced-toggle {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 12px 16px;
    background-color: var(--md-sys-color-surface-variant);
    color: var(--md-sys-color-on-surface);
    border: none;
    border-radius: 12px;
    font-size: 0.95rem;
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    transition: background-color 0.2s ease;
}

.advanced-toggle:hover {
    background-color: rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .advanced-toggle:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

.advanced-toggle .toggle-icon {
    margin-right: 12px;
    font-size: 24px;
    color: var(--md-sys-color-primary);
}

.advanced-toggle .toggle-arrow {
    margin-left: auto;
    transition: transform 0.3s ease;
    color: var(--md-sys-color-primary);
}

.advanced-toggle[aria-expanded="true"] .toggle-arrow {
    transform: rotate(180deg);
}

.advanced-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    padding: 0 16px;
    margin-top: 0;
    transition: max-height 0.4s ease, opacity 0.3s ease, padding 0.3s ease, margin-top 0.3s ease;
}

.advanced-options.open {
    max-height: 400px;
    opacity: 1;
    padding: 16px;
    margin-top: 8px;
    background-color: var(--md-sys-color-surface-variant);
    border-radius: 12px;
}

/* ===== MD3 CHECKBOX COMPONENT ===== */

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 4px 0;
}

.checkbox-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.checkbox-box {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border: 2px solid var(--md-sys-color-outline);
    border-radius: 4px;
    background-color: transparent;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    flex-shrink: 0;
}

.checkbox-check {
    font-size: 16px;
    color: transparent;
    transition: color 0.2s ease;
}

.checkbox-input:checked+.checkbox-box {
    background-color: var(--md-sys-color-primary);
    border-color: var(--md-sys-color-primary);
}

.checkbox-input:checked+.checkbox-box .checkbox-check {
    color: var(--md-sys-color-on-primary);
}

.checkbox-input:focus-visible+.checkbox-box {
    outline: 2px solid var(--md-sys-color-primary);
    outline-offset: 2px;
}

.checkbox-text {
    font-size: 0.95rem;
    color: var(--md-sys-color-on-surface);
}

/* ===== PASSWORD ROW (Display + Buttons) ===== */

.password-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.password-display {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 2px 20px;
    background-color: var(--md-sys-color-surface);
    border: 2px solid var(--md-sys-color-outline);
    border-radius: 50px;
    overflow: hidden;
}

/* Password Animation Keyframes */
@keyframes pw-fade-in-zoom {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pw-fade-out-zoom {
    from {
        opacity: 1;
        transform: scale(1);
    }

    to {
        opacity: 0;
        transform: scale(1.1);
    }
}

.password-text {
    font-family: 'Roboto Mono', monospace;
    font-size: 1rem;
    font-weight: 500;
    color: var(--md-sys-color-on-surface);
    letter-spacing: 0.05em;
    word-break: break-all;
    text-align: center;
    transition: opacity 0.15s ease, transform 0.15s ease;
    user-select: all;
}

.password-text.anim-out {
    animation: pw-fade-out-zoom 0.2s cubic-bezier(0.4, 0.0, 0.2, 1) forwards;
}

.password-text.anim-in {
    animation: pw-fade-in-zoom 0.2s cubic-bezier(0.0, 0.0, 0.2, 1) forwards;
}

.password-text.placeholder {
    color: var(--md-sys-color-outline);
}

@media (max-width: 480px) {
    .password-text {
        font-size: 0.75rem;
        white-space: nowrap;
    }

    .password-display {
        padding: 8px 12px;
        overflow-x: auto;
    }
}

/* ===== ACTION BUTTONS ===== */

.generator-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.action-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 0 24px;
    border: none;
    border-radius: 100px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
}

#copyBtn {
    min-width: 165px;
    min-width: 165px;
}

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

.btn-content.anim-out {
    animation: pw-fade-out-zoom 0.2s cubic-bezier(0.4, 0.0, 0.2, 1) forwards;
}

.btn-content.anim-in {
    animation: pw-fade-in-zoom 0.2s cubic-bezier(0.0, 0.0, 0.2, 1) forwards;
}



.action-button .material-icons {
    font-size: 20px;
}

.action-button:active {
    transform: scale(0.98);
}

/* Filled Button (Primary) */
.action-button.filled {
    background-color: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
}

.action-button.filled:hover {
    filter: brightness(1.08);
}

/* Tonal Button (Secondary) */
.action-button.tonal {
    background-color: var(--md-sys-color-surface-variant);
    color: var(--md-sys-color-on-surface-variant);
}

.action-button.tonal:hover {
    background-color: rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .action-button.tonal:hover {
    background-color: rgba(255, 255, 255, 0.12);
}

@media (max-width: 480px) {
    .password-row {
        flex-direction: column;
    }

    .password-display {
        width: 100%;
    }

    .password-row .action-button {
        width: 100%;
        justify-content: center;
    }

    .generator-control-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .control-label {
        min-width: auto;
    }
}



/* Success State (Copied) - Override tonal/filled */
.action-button.success,
.action-button.tonal.success,
.action-button.filled.success {
    background-color: #c4eed0;
    color: #0c4b22;
}

.action-button.success .material-icons,
.action-button.tonal.success .material-icons,
.action-button.filled.success .material-icons {
    color: #0c4b22;
}

[data-theme="dark"] .action-button.success,
[data-theme="dark"] .action-button.tonal.success,
[data-theme="dark"] .action-button.filled.success {
    background-color: #0f391e;
    color: #a8dba8;
}

[data-theme="dark"] .action-button.success .material-icons,
[data-theme="dark"] .action-button.tonal.success .material-icons,
[data-theme="dark"] .action-button.filled.success .material-icons {
    color: #a8dba8;
}

/* ===== EXIF READER CARD ===== */

.exif-reader-card {
    margin-top: 24px;
}

.exif-reader-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
}

.exif-reader-header-text {
    flex: 1;
}

.exif-info-btn,
.info-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background-color: transparent;
    color: var(--md-sys-color-on-surface-variant);
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
    margin-left: 16px;
    margin-top: 4px;
    /* Align with title */
}

.exif-info-btn:hover,
.info-btn:hover {
    background-color: var(--md-sys-color-surface-variant);
    color: var(--md-sys-color-primary);
}

.exif-info-btn .material-icons,
.info-btn .material-icons {
    font-size: 24px;
}

/* Upload Area: Dropzone + Preview container */
.exif-upload-area {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

/* Side-by-side layout when preview is visible */
.exif-upload-area:has(.exif-preview.visible) {
    flex-direction: row;
    align-items: stretch;
}

.exif-upload-area:has(.exif-preview.visible) .exif-dropzone {
    flex: 1;
    min-width: 0;
    display: flex;
}

.exif-upload-area:has(.exif-preview.visible) .exif-preview {
    flex: 1;
    min-width: 0;
    margin-bottom: 0;
}

/* Make dropzone label fill full height in side-by-side mode */
.exif-upload-area:has(.exif-preview.visible) .dropzone-label {
    flex: 1;
    padding: 16px;
    box-sizing: border-box;
}

/* Remove dropzone margin in side-by-side mode */
.exif-upload-area:has(.exif-preview.visible) .exif-dropzone.has-image {
    margin-bottom: 0;
}

/* Dropzone */
.exif-dropzone {
    position: relative;
    margin-bottom: 0;
    transition: margin-bottom 0.3s ease;
}

.exif-dropzone.has-image {
    margin-bottom: 16px;
}

.dropzone-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 32px 24px;
    border: 2px solid var(--md-sys-color-outline);
    border-radius: 16px;
    background-color: var(--md-sys-color-surface);
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.dropzone-label:hover {
    border-color: var(--md-sys-color-primary);
    background-color: var(--md-sys-color-surface-variant);
}

[data-theme="dark"] .dropzone-label:hover {
    background-color: var(--md-sys-color-surface-variant);
}

.exif-dropzone.drag-over .dropzone-label {
    border-color: var(--md-sys-color-primary);
    box-shadow: 0 0 0 1px var(--md-sys-color-primary);
    background-color: var(--md-sys-color-surface-variant);
}

.dropzone-icon {
    font-size: 48px;
    color: var(--md-sys-color-primary);
}

.dropzone-text {
    font-size: 0.95rem;
    color: var(--md-sys-color-on-surface-variant);
    text-align: center;
}

/* Image Preview */
.exif-preview {
    display: none;
    position: relative;
    margin-bottom: 24px;
    border-radius: 16px;
    overflow: hidden;
    background-color: var(--md-sys-color-surface-variant);
}

.exif-preview.visible {
    display: flex;
    align-items: center;
    justify-content: center;
}

.exif-preview img {
    display: block;
    width: 100%;
    max-height: 300px;
    object-fit: contain;
    background-color: rgba(0, 0, 0, 0.02);
}

[data-theme="dark"] .exif-preview img {
    background-color: rgba(255, 255, 255, 0.02);
}

.exif-clear-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.6);
    color: #fff;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.exif-clear-btn:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.exif-clear-btn:active {
    transform: scale(0.95);
}

.exif-clear-btn .material-icons {
    font-size: 20px;
}

/* Results Container */
.exif-results {
    display: none;
    background-color: var(--md-sys-color-surface-variant);
    border-radius: 16px;
    overflow: hidden;
}

.exif-results.visible {
    display: block;
}

.exif-results-inner {
    padding: 16px;
}

/* No Data Message */
.exif-no-data {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 32px 16px;
    text-align: center;
}

.exif-no-data.visible {
    display: flex;
}

.exif-no-data .material-icons {
    font-size: 40px;
    color: var(--md-sys-color-outline);
    opacity: 0.6;
}

.exif-no-data p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--md-sys-color-on-surface-variant);
}

/* EXIF Category */
.exif-category {
    margin-bottom: 16px;
}

.exif-category:last-child {
    margin-bottom: 0;
}

.exif-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.exif-category-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--md-sys-color-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.exif-category-title .material-icons {
    font-size: 18px;
}

/* EXIF Items Grid */
.exif-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 8px;
}

.exif-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px 12px;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 8px;
}

[data-theme="dark"] .exif-item {
    background-color: rgba(0, 0, 0, 0.2);
}

.exif-item-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--md-sys-color-outline);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.exif-item-value {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--md-sys-color-on-surface);
    word-break: break-word;
}

/* Responsive */
@media (max-width: 480px) {
    .dropzone-label {
        padding: 24px 16px;
    }

    .dropzone-icon {
        font-size: 40px;
    }

    .dropzone-text {
        font-size: 0.875rem;
    }

    .exif-items {
        grid-template-columns: 1fr;
    }

    .exif-preview img {
        max-height: 200px;
    }

    /* Revert to column layout on small screens */
    .exif-upload-area:has(.exif-preview.visible) {
        flex-direction: column;
    }

    .exif-upload-area:has(.exif-preview.visible) .exif-dropzone,
    .exif-upload-area:has(.exif-preview.visible) .dropzone-label {
        height: auto;
    }
}

/* ===== EXIF SHOW MORE BUTTON ===== */

.exif-show-more {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 6px 12px;
    border: none;
    border-radius: 100px;
    background-color: transparent;
    color: var(--md-sys-color-primary);
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
    white-space: nowrap;
}

.exif-show-more:hover {
    background-color: rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] .exif-show-more:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

.exif-show-more .material-icons {
    font-size: 18px;
    transition: transform 0.2s ease;
}

.exif-show-more[data-expanded="true"] .material-icons {
    transform: rotate(180deg);
}

/* Hidden items (collapsed state) */
.exif-item.exif-hidden {
    display: none;
}

.exif-category.expanded .exif-item.exif-hidden {
    display: flex;
}

/* ===== EXIF INFO POPUP ===== */

.exif-info-popup-content,
.password-info-popup-content,
.generator-info-popup-content {
    max-width: 600px;
}

.exif-popup-section {
    margin-bottom: 24px;
}

.exif-popup-section:last-child {
    margin-bottom: 0px;
}

.exif-popup-icon-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.exif-popup-icon-title .material-icons {
    color: var(--md-sys-color-primary);
    font-size: 24px;
}

.exif-popup-icon-title h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--md-sys-color-on-surface);
}

.exif-popup-section p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--md-sys-color-on-surface-variant);
    padding-left: 36px;
    /* Align with text, below icon */
}

.exif-popup-list {
    margin: 0;
    padding-left: 56px;
    /* 36px + bullet indent */
    color: var(--md-sys-color-on-surface-variant);
}

.exif-popup-list li {
    margin-bottom: 8px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.exif-popup-list li:last-child {
    margin-bottom: 0;
}

.popup-divider {
    border: 0;
    height: 1px;
    background-color: var(--md-sys-color-outline);
    opacity: 0.2;
    margin: 24px 0;
}