* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #8b5cf6;
    --accent: #a78bfa;
    --success: #10b981;
    --danger: #ef4444;
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-card: rgba(30, 41, 59, 0.9);
    --bg-glass: rgba(30, 41, 59, 0.8);
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border: rgba(255, 255, 255, 0.08);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    --shadow-glow: 0 0 25px rgba(99, 102, 241, 0.35);
    --radius-md: 16px;
    --radius-lg: 20px;
    --radius-full: 9999px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--bg-glass);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.nav-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
}

.logo-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.logo-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    position: relative;
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: width 0.25s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.btn-nav-cta {
    padding: 10px 16px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--text-primary);
    border: none;
    box-shadow: var(--shadow-glow);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
}

.nav-toggle span {
    width: 24px;
    height: 3px;
    border-radius: var(--radius-full);
    background: var(--text-primary);
}

/* Hero */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 140px 20px 80px;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.6;
}

.orb-1 { width: 520px; height: 520px; background: #6366f1; top: -200px; left: -180px; }
.orb-2 { width: 420px; height: 420px; background: #8b5cf6; bottom: -180px; right: -160px; }
.orb-3 { width: 320px; height: 320px; background: #22d3ee; top: 40%; right: 12%; }

.hero-container {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 36px;
    align-items: center;
}

.hero-content {
    animation: fadeInUp 0.9s ease;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: var(--radius-full);
    background: var(--bg-glass);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    margin-bottom: 14px;
    font-size: 0.95rem;
}

.badge-icon {
    font-size: 1.1rem;
}

.hero-title {
    font-size: 3rem;
    line-height: 1.1;
    margin-bottom: 14px;
    font-weight: 800;
}

.title-line {
    display: block;
}

.title-line.highlight {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    color: var(--text-secondary);
    font-size: 1.05rem;
    margin-bottom: 20px;
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 22px;
    border-radius: 14px;
    border: 1px solid transparent;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.25s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--text-primary);
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 32px rgba(99, 102, 241, 0.5);
}

.btn-secondary {
    background: var(--bg-glass);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-2px);
}

.btn-large { padding: 14px 26px; }
.btn-block { width: 100%; }

.hero-stats {
    display: flex;
    gap: 22px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.stat-item { text-align: center; }
.stat-number {
    font-size: 1.9rem;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #00f2fe 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.stat-label { color: var(--text-muted); font-size: 0.95rem; }

.hero-visual {
    animation: fadeInRight 0.9s ease;
    display: flex;
    justify-content: center;
}

/* Scanner Card */
.scanner-card {
    width: 100%;
    max-width: 520px;
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.95));
    border-radius: var(--radius-lg);
    padding: 26px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.scanner-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 20%, rgba(99, 102, 241, 0.12), transparent 35%);
    pointer-events: none;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.chip {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: linear-gradient(135deg, #22d3ee, #6366f1);
    box-shadow: var(--shadow-glow);
    opacity: 0.8;
}

.card-kicker {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.scanner-card h2 {
    font-size: 1.8rem;
    font-weight: 700;
}

.instruction {
    color: var(--text-secondary);
    margin: 8px 0 18px;
    text-align: left;
}

.qr-reader-container {
    margin: 16px 0 26px;
}

.qr-reader-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.qr-tab-btn {
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.qr-tab-btn:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.qr-tab-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: transparent;
    box-shadow: var(--shadow-glow);
}

.qr-tab-content { display: none; }
.qr-tab-content.active { display: block; }

.qr-reader-box {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
}

.file-upload-area {
    padding: 30px 18px;
    text-align: center;
    border: 1px dashed var(--border);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.02);
}

.file-upload-label {
    display: block;
    color: var(--text-primary);
    cursor: pointer;
}

.upload-icon {
    font-size: 2.4rem;
    margin-bottom: 10px;
}

.upload-hint {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-top: 6px;
}

.btn-select-file {
    margin-top: 14px;
    padding: 12px 18px;
    border-radius: 12px;
    border: none;
    background: var(--primary);
    color: var(--text-primary);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-select-file:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

#file-preview {
    padding: 14px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    border: 1px solid var(--border);
    margin-top: 14px;
}

#file-preview img {
    width: 100%;
    max-width: 320px;
    border-radius: 10px;
    border: 1px solid var(--border);
}

#file-status {
    margin-top: 10px;
    font-weight: 700;
}

.manual-input {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}

.or-divider {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 16px;
    position: relative;
}

.or-divider::before,
.or-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 38%;
    height: 1px;
    background: var(--border);
}

.or-divider::before { left: 0; }
.or-divider::after { right: 0; }

#manual-qr-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#qr-code-input {
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.2s ease;
}

#qr-code-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18);
}

button[type="submit"] {
    border: none;
}

.muted { color: var(--text-muted); }

/* Info */
.info-section {
    padding: 80px 0;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
}

.section-header {
    text-align: center;
    margin-bottom: 32px;
}

.section-title {
    font-size: 2.2rem;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    color: var(--text-secondary);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.info-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.info-card h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.info-card p,
.info-card li {
    color: var(--text-secondary);
}

.info-card ul {
    margin-left: 16px;
    margin-top: 10px;
    display: grid;
    gap: 8px;
}

.medical-warning {
    margin: 12px 0 10px;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid rgba(239, 68, 68, 0.35);
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(127, 29, 29, 0.18));
    color: #fecdd3;
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.15);
}

/* Footer */
.footer {
    background: var(--bg-primary);
    border-top: 1px solid var(--border);
    padding: 50px 0 26px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 26px;
}

.footer-section {
    color: var(--text-secondary);
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.footer-description {
    color: var(--text-secondary);
}

.footer-title {
    color: var(--text-primary);
    margin-bottom: 12px;
    font-weight: 700;
}

.footer-links {
    list-style: none;
    display: grid;
    gap: 8px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--text-primary);
}

.footer-bottom {
    text-align: center;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
    padding-top: 16px;
}

/* Animations */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(28px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(28px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Responsive */
@media (max-width: 900px) {
    .nav-menu {
        position: fixed;
        top: 72px;
        left: -100%;
        flex-direction: column;
        width: 100%;
        background: var(--bg-card);
        padding: 16px;
        border-bottom: 1px solid var(--border);
        transition: left 0.25s ease;
    }

    .nav-menu.active { left: 0; }
    .nav-toggle { display: flex; }
    .hero { padding-top: 120px; }
    .hero-title { font-size: 2.3rem; }
    .hero-stats { justify-content: flex-start; }
}

@media (max-width: 600px) {
    .hero-title { font-size: 2rem; }
    .scanner-card { padding: 20px; }
    .nav-container { padding: 12px 16px; }
}

