/* ===== CSS Variables ===== */
:root {
    /* Colors - Glassmorphism Palette */
    --color-bg-primary: #E0E5EC;
    --color-bg-secondary: #FFFFFF;
    --color-surface: rgba(255, 255, 255, 0.7);
    --color-surface-hover: rgba(255, 255, 255, 0.9);
    --color-text-primary: #2C3E50;
    --color-text-secondary: #5A6C7D;
    --color-accent: #4361ee;
    --color-accent-hover: #3651d4;
    --color-success: #06D6A0;
    --color-danger: #EF476F;
    --color-warning: #FFD166;
    --color-border: #D1D9E6;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    
    /* Typography */
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.5rem;
    --font-size-2xl: 2rem;
    
    /* Effects */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --blur-glass: blur(10px);
    --border-radius: 1rem;
    --transition: all 0.3s ease;
    
    /* Layout */
    --bottom-nav-height: 70px;
    --header-height: 80px;
}

/* Dark Mode Variables */
[data-theme="dark"] {
    --color-bg-primary: #1a1a2e;
    --color-bg-secondary: #16213e;
    --color-surface: rgba(30, 30, 46, 0.7);
    --color-surface-hover: rgba(30, 30, 46, 0.9);
    --color-text-primary: #E0E5EC;
    --color-text-secondary: #A3B1C6;
    --color-border: #2C3E50;
}

/* ===== Reset & Base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--color-text-primary);
    background: var(--color-bg-primary);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* ===== Loading Screen ===== */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-bg-primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    animation: fadeIn 0.5s ease forwards;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--color-border);
    border-top-color: var(--color-accent);
    border-radius: 50%;
    animation: spin 1s linear infinite, pulse 2s ease-in-out infinite;
}

.loading-screen p {
    margin-top: var(--spacing-md);
    color: var(--color-text-secondary);
    font-weight: 500;
    animation: fadeInUp 0.6s ease 0.3s both;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

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

/* ===== Main Container ===== */
.main-container {
    min-height: 100vh;
    padding-bottom: calc(var(--bottom-nav-height) + var(--spacing-md));
}

/* ===== Sections ===== */
.section {
    display: none;
    padding: var(--spacing-md);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.section.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
    animation: slideInUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-lg);
    padding-top: var(--spacing-md);
}

.section-header h1 {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    margin-bottom: var(--spacing-xs);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
}

.section-header .logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 8px;
}

.section-header p {
    color: var(--color-text-secondary);
    font-size: var(--font-size-base);
}

.content {
    max-width: 600px;
    margin: 0 auto;
}

/* ===== Cards ===== */
.form-card,
.option-card,
.status-card {
    background: var(--color-surface);
    backdrop-filter: var(--blur-glass);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    box-shadow: var(--shadow-md);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.form-card::before,
.option-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(67, 97, 238, 0.05), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.form-card:hover,
.option-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
    border-color: var(--color-accent);
}

.form-card:hover::before,
.option-card:hover::before {
    opacity: 1;
}

/* ===== Forms ===== */
label {
    display: block;
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
    color: var(--color-text-primary);
}

input[type="text"],
input[type="password"],
textarea {
    width: 100%;
    padding: var(--spacing-sm);
    border: 2px solid var(--color-border);
    border-radius: calc(var(--border-radius) / 2);
    font-size: var(--font-size-base);
    font-family: var(--font-family);
    background: var(--color-bg-secondary);
    color: var(--color-text-primary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
    transform: translateY(-1px);
    background: var(--color-bg-secondary);
}

input:focus + label,
textarea:focus + label {
    color: var(--color-accent);
    transform: scale(0.95);
}

input:invalid:not(:focus),
textarea:invalid:not(:focus) {
    border-color: var(--color-danger);
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-2px); }
    75% { transform: translateX(2px); }
}

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

.input-group {
    display: flex;
    gap: var(--spacing-xs);
}

.input-group input {
    flex: 1;
}

.help-text {
    display: block;
    margin-top: var(--spacing-xs);
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
}

/* ===== Buttons ===== */
button {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    cursor: pointer;
    border: none;
    transition: var(--transition);
}

.btn-primary {
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--color-accent);
    color: white;
    border-radius: calc(var(--border-radius) / 2);
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

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

.btn-primary:hover:not(:disabled)::before {
    left: 100%;
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: var(--shadow-md);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-danger {
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--color-danger);
    color: white;
    border-radius: calc(var(--border-radius) / 2);
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
}

.btn-danger:hover {
    background: #d63659;
    box-shadow: var(--shadow-lg);
}

.btn-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--color-accent);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.btn-icon:hover {
    background: var(--color-accent-hover);
    transform: scale(1.1);
}

.option-btn {
    width: 100%;
    padding: var(--spacing-lg);
    background: var(--color-surface);
    border: 2px solid var(--color-border);
    border-radius: var(--border-radius);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-sm);
    color: var(--color-text-primary);
    font-weight: 600;
}

.option-btn i {
    font-size: 2.5rem;
    color: var(--color-accent);
}

.option-btn:hover {
    background: var(--color-surface-hover);
    border-color: var(--color-accent);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* ===== Scanner Options ===== */
.scanner-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

/* ===== Image Preview ===== */
.image-preview {
    position: relative;
    margin-bottom: var(--spacing-md);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.image-preview img {
    width: 100%;
    height: auto;
    display: block;
}

.image-preview .btn-icon {
    position: absolute;
    top: var(--spacing-sm);
    right: var(--spacing-sm);
    background: var(--color-danger);
}

/* ===== Manual Input ===== */
.manual-input {
    margin-bottom: var(--spacing-md);
}

/* ===== Alert Status ===== */
.alert-status {
    background: var(--color-surface);
    backdrop-filter: var(--blur-glass);
    border-radius: var(--border-radius);
    padding: var(--spacing-lg);
    text-align: center;
    margin-bottom: var(--spacing-lg);
    box-shadow: var(--shadow-lg);
    animation: scaleIn 0.3s ease;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.alert-status.danger {
    border: 3px solid var(--color-danger);
}

.alert-status.safe {
    border: 3px solid var(--color-success);
}

.alert-icon {
    font-size: 4rem;
    margin-bottom: var(--spacing-sm);
}

.alert-status.danger .alert-icon::before {
    content: '☠️';
}

.alert-status.safe .alert-icon::before {
    content: '✅';
}

.alert-title {
    font-size: var(--font-size-xl);
    font-weight: 700;
    margin-bottom: var(--spacing-xs);
}

.alert-status.danger .alert-title {
    color: var(--color-danger);
}

.alert-status.safe .alert-title {
    color: var(--color-success);
}

.alert-message {
    color: var(--color-text-secondary);
    line-height: 1.6;
}

/* ===== Processing Status ===== */
.processing-status {
    text-align: center;
    padding: var(--spacing-lg);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--color-border);
    border-top-color: var(--color-accent);
    border-radius: 50%;
    margin: 0 auto var(--spacing-sm);
    animation: spin 1s linear infinite, pulse 2s ease-in-out infinite;
    position: relative;
}

.spinner::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    background: var(--color-accent);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: bounce 1s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.2); }
}

/* ===== Allergies List ===== */
.allergies-list h3 {
    margin-bottom: var(--spacing-sm);
    color: var(--color-text-primary);
}

.list-items {
    list-style: none;
}

.list-items li {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: calc(var(--border-radius) / 2);
    padding: var(--spacing-sm) var(--spacing-md);
    margin-bottom: var(--spacing-xs);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.list-items li:hover {
    background: var(--color-surface-hover);
    transform: translateX(4px);
}

.list-items li button {
    background: transparent;
    color: var(--color-danger);
    padding: var(--spacing-xs);
    font-size: var(--font-size-lg);
}

.list-items li button:hover {
    transform: scale(1.2);
}

.empty-message {
    text-align: center;
    color: var(--color-text-secondary);
    padding: var(--spacing-lg);
    font-style: italic;
}

/* ===== Status Card ===== */
.status-text {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.status-text i {
    font-size: var(--font-size-sm);
}

.status-text.configured i {
    color: var(--color-success);
}

.status-text.not-configured i {
    color: var(--color-danger);
}

/* ===== Toggle Switch ===== */
.toggle-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
}

.toggle-switch {
    position: relative;
    width: 50px;
    height: 26px;
}

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

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--color-border);
    transition: var(--transition);
    border-radius: 26px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: var(--transition);
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: var(--color-accent);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

/* ===== Share Section ===== */
.share-section {
    border: 2px solid var(--color-accent);
    background: linear-gradient(135deg, rgba(67, 97, 238, 0.05), rgba(67, 97, 238, 0.1));
}

.share-section h3 {
    color: var(--color-accent);
    margin-bottom: var(--spacing-sm);
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.share-section p {
    color: var(--color-text-secondary);
    margin-bottom: var(--spacing-md);
    font-size: var(--font-size-sm);
}

.share-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: var(--spacing-sm);
}

.share-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-sm);
    border: 2px solid var(--color-border);
    border-radius: calc(var(--border-radius) / 2);
    background: var(--color-bg-secondary);
    color: var(--color-text-primary);
    font-weight: 600;
    font-size: var(--font-size-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.share-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.share-btn:hover::before {
    left: 100%;
}

.share-btn i {
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.share-btn:hover i {
    transform: scale(1.1);
}

.share-btn span {
    font-size: var(--font-size-sm);
    font-weight: 600;
}

/* WhatsApp */
.share-btn.whatsapp {
    border-color: #25D366;
    color: #25D366;
}

.share-btn.whatsapp:hover {
    background: #25D366;
    color: white;
    border-color: #25D366;
}

/* Facebook */
.share-btn.facebook {
    border-color: #1877F2;
    color: #1877F2;
}

.share-btn.facebook:hover {
    background: #1877F2;
    color: white;
    border-color: #1877F2;
}

/* Twitter */
.share-btn.twitter {
    border-color: #1DA1F2;
    color: #1DA1F2;
}

.share-btn.twitter:hover {
    background: #1DA1F2;
    color: white;
    border-color: #1DA1F2;
}

/* Telegram */
.share-btn.telegram {
    border-color: #0088CC;
    color: #0088CC;
}

.share-btn.telegram:hover {
    background: #0088CC;
    color: white;
    border-color: #0088CC;
}

/* Copy */
.share-btn.copy {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.share-btn.copy:hover {
    background: var(--color-accent);
    color: white;
    border-color: var(--color-accent);
}

/* ===== Danger Zone ===== */
.danger-zone {
    border: 2px solid var(--color-danger);
}

.danger-zone h3 {
    color: var(--color-danger);
    margin-bottom: var(--spacing-sm);
}

/* ===== FAQ ===== */
.faq-container {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.faq-item {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.faq-question {
    width: 100%;
    padding: var(--spacing-md);
    background: transparent;
    color: var(--color-text-primary);
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    transition: var(--transition);
}

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

.faq-icon {
    font-size: var(--font-size-xl);
    font-weight: 300;
    transition: var(--transition);
}

.faq-question[aria-expanded="true"] .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    padding: 0 var(--spacing-md);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-answer:not([hidden]) {
    padding: var(--spacing-md);
    max-height: 500px;
}

.faq-answer p {
    color: var(--color-text-secondary);
    line-height: 1.6;
}

.faq-answer a {
    color: var(--color-accent);
    text-decoration: none;
}

.faq-answer a:hover {
    text-decoration: underline;
}

/* ===== Bottom Navigation ===== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--bottom-nav-height);
    background: var(--color-surface);
    backdrop-filter: var(--blur-glass);
    border-top: 1px solid var(--color-border);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: var(--spacing-xs);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: var(--spacing-xs);
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex: 1;
    border-radius: calc(var(--border-radius) / 2);
    position: relative;
    overflow: hidden;
}

.nav-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: var(--color-accent);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-item i {
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.nav-item span {
    font-size: var(--font-size-sm);
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-item:hover {
    background: var(--color-surface-hover);
    transform: translateY(-2px);
}

.nav-item:hover i {
    transform: scale(1.1);
}

.nav-item.active {
    color: var(--color-accent);
    background: var(--color-surface-hover);
}

.nav-item.active::before {
    width: 80%;
}

.nav-item.active i {
    transform: scale(1.1);
}

/* ===== Footer ===== */
footer {
    text-align: center;
    padding: var(--spacing-md);
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
    margin-bottom: calc(var(--bottom-nav-height) + var(--spacing-sm));
}

footer a {
    color: var(--color-accent);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

.privacy-link {
    color: var(--color-text-secondary);
    text-decoration: none;
    font-size: var(--font-size-sm);
    opacity: 0.8;
    transition: var(--transition);
}

.privacy-link:hover {
    color: var(--color-accent);
    opacity: 1;
    text-decoration: underline;
}

/* ===== Toast Notifications ===== */
.toast-container {
    position: fixed;
    top: var(--spacing-md);
    right: var(--spacing-md);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.toast {
    background: var(--color-surface);
    backdrop-filter: var(--blur-glass);
    border: 1px solid var(--color-border);
    border-radius: calc(var(--border-radius) / 2);
    padding: var(--spacing-sm) var(--spacing-md);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    min-width: 250px;
    max-width: 350px;
    animation: slideInRight 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.toast::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--color-accent);
    animation: progressBar 3s linear;
    z-index: -1;
}

.toast.success::before {
    background: var(--color-success);
}

.toast.error::before {
    background: var(--color-danger);
}

.toast.warning::before {
    background: var(--color-warning);
}

@keyframes progressBar {
    from { width: 4px; }
    to { width: 4px; }
}

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

.toast.success {
    border-left: 4px solid var(--color-success);
}

.toast.error {
    border-left: 4px solid var(--color-danger);
}

.toast.warning {
    border-left: 4px solid var(--color-warning);
}

.toast i {
    font-size: var(--font-size-lg);
}

.toast.success i {
    color: var(--color-success);
}

.toast.error i {
    color: var(--color-danger);
}

.toast.warning i {
    color: var(--color-warning);
}

.toast span,
.toast p,
.toast div {
    position: relative;
    z-index: 2;
    color: var(--color-text-primary);
    font-weight: 500;
}

/* ===== Utility Classes ===== */
.hidden {
    display: none !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ===== Responsive Design ===== */
@media (min-width: 768px) {
    .section {
        padding: var(--spacing-lg);
    }
    
    .section-header h1 {
        font-size: 3rem;
    }
    
    .section-header .logo {
        width: 64px;
        height: 64px;
    }
    
    .scanner-options {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .bottom-nav {
        max-width: 600px;
        left: 50%;
        transform: translateX(-50%);
        border-radius: var(--border-radius) var(--border-radius) 0 0;
    }
    
    .btn-primary {
        max-width: 500px;
        margin: 0 auto;
    }
}

@media (max-width: 380px) {
    .nav-item span {
        font-size: 0.75rem;
    }
    
    .nav-item i {
        font-size: 1.25rem;
    }
    
    .section-header .logo {
        width: 40px;
        height: 40px;
    }
    
    .section-header h1 {
        font-size: 1.5rem;
        flex-direction: column;
        gap: var(--spacing-xs);
    }
}

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

/* Focus visible for keyboard navigation */
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 3px solid var(--color-accent);
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
    transform: scale(1.02);
}

/* Skip to content link for accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--color-accent);
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 10000;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 6px;
}

/* ===== Privacy Page Styles ===== */
.privacy-container {
    min-height: 100vh;
    background: var(--color-bg-primary);
    padding: var(--spacing-md);
}

.privacy-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
    padding-top: var(--spacing-lg);
}

.privacy-header .back-link {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    color: var(--color-accent);
    text-decoration: none;
    font-weight: 600;
    margin-bottom: var(--spacing-md);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: calc(var(--border-radius) / 2);
    background: var(--color-surface);
    backdrop-filter: var(--blur-glass);
    border: 1px solid var(--color-border);
    transition: var(--transition);
}

.privacy-header .back-link:hover {
    background: var(--color-surface-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.privacy-header h1 {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    margin-bottom: var(--spacing-xs);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
}

.privacy-header .logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 8px;
}

.privacy-header p {
    color: var(--color-text-secondary);
    font-size: var(--font-size-base);
}

.privacy-content {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
}

.privacy-section {
    background: var(--color-surface);
    backdrop-filter: var(--blur-glass);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    box-shadow: var(--shadow-md);
}

.privacy-section h2 {
    color: var(--color-accent);
    font-size: var(--font-size-xl);
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.privacy-section p {
    color: var(--color-text-primary);
    margin-bottom: var(--spacing-md);
}

.privacy-section ul {
    margin: var(--spacing-md) 0;
    padding-left: var(--spacing-lg);
}

.privacy-section li {
    color: var(--color-text-primary);
    margin-bottom: var(--spacing-xs);
}

.privacy-section li strong {
    color: var(--color-accent);
    font-weight: 600;
}

.privacy-section a {
    color: var(--color-accent);
    text-decoration: none;
    font-weight: 600;
}

.privacy-section a:hover {
    text-decoration: underline;
}

.privacy-footer {
    text-align: center;
    padding: var(--spacing-lg) 0;
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
    margin-top: var(--spacing-xl);
}

.privacy-footer a {
    color: var(--color-accent);
    text-decoration: none;
    font-weight: 600;
}

.privacy-footer a:hover {
    text-decoration: underline;
}

/* Responsive Privacy Page */
@media (min-width: 768px) {
    .privacy-container {
        padding: var(--spacing-xl);
    }
    
    .privacy-header h1 {
        font-size: 3rem;
    }
    
    .privacy-header .logo {
        width: 64px;
        height: 64px;
    }
}

@media (max-width: 380px) {
    .privacy-header .logo {
        width: 40px;
        height: 40px;
    }
    
    .privacy-header h1 {
        font-size: 1.5rem;
        flex-direction: column;
        gap: var(--spacing-xs);
    }
}
