:root {
    --navy-950: #0a1628;
    --navy-900: #0f2240;
    --navy-800: #163056;
    --navy-700: #1e4070;
    --gold-400: #d4a853;
    --gold-500: #c9982e;
    --gold-600: #b8860b;
    --white: #ffffff;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-400: #94a3b8;
    --gray-600: #475569;
    --gray-800: #1e293b;
    --success: #059669;
    --error: #dc2626;
    --radius: 16px;
    --shadow: 0 25px 50px -12px rgba(10, 22, 40, 0.25);
    --font: 'DM Sans', system-ui, sans-serif;
    --font-display: 'Playfair Display', Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font);
    background: linear-gradient(135deg, var(--navy-950) 0%, var(--navy-800) 50%, var(--navy-900) 100%);
    color: var(--gray-800);
    min-height: 100vh;
    line-height: 1.6;
}

.bg-pattern {
    position: fixed;
    inset: 0;
    background-image: radial-gradient(circle at 20% 50%, rgba(212, 168, 83, 0.08) 0%, transparent 50%),
                      radial-gradient(circle at 80% 20%, rgba(255,255,255,0.03) 0%, transparent 40%);
    pointer-events: none;
    z-index: 0;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; position: relative; z-index: 1; }
.container-narrow { max-width: 800px; }

.site-header {
    padding: 24px 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.header-inner { display: flex; align-items: center; justify-content: space-between; }

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: var(--white);
}

.brand-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--gold-400), var(--gold-600));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
    color: var(--navy-950);
}

.brand-text { display: flex; flex-direction: column; }
.brand-text strong { font-size: 18px; font-weight: 600; }
.brand-text small { font-size: 12px; opacity: 0.7; }

.site-main { padding: 48px 0 80px; }

.hero-section { padding: 40px 0 60px; }

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}

.hero-content { color: var(--white); }

.badge {
    display: inline-block;
    background: rgba(212, 168, 83, 0.15);
    color: var(--gold-400);
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 20px;
    border: 1px solid rgba(212, 168, 83, 0.3);
}

.hero-content h1 {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 4vw, 3.2rem);
    line-height: 1.15;
    margin-bottom: 20px;
}

.hero-content h1 em {
    font-style: normal;
    color: var(--gold-400);
}

.hero-content > p {
    font-size: 17px;
    opacity: 0.85;
    margin-bottom: 28px;
    max-width: 480px;
}

.hero-features {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.hero-features li {
    font-size: 14px;
    opacity: 0.75;
    padding-left: 20px;
    position: relative;
}

.hero-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--gold-400);
}

.query-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 36px;
    box-shadow: var(--shadow);
}

.query-card-header h2 {
    font-size: 22px;
    margin-bottom: 6px;
    color: var(--navy-900);
}

.query-card-header p {
    color: var(--gray-600);
    font-size: 14px;
    margin-bottom: 24px;
}

.form-group { margin-bottom: 20px; }

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-600);
    margin-bottom: 8px;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--gray-200);
    border-radius: 10px;
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--gold-500);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.15s, box-shadow 0.15s;
}

.btn svg { width: 18px; height: 18px; }

.btn-primary {
    background: linear-gradient(135deg, var(--gold-400), var(--gold-600));
    color: var(--navy-950);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(201, 152, 46, 0.35);
}

.btn-secondary {
    background: var(--gray-100);
    color: var(--gray-800);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--gray-200);
    color: var(--gray-800);
}

.btn-block { width: 100%; }
.btn-sm { padding: 8px 16px; font-size: 13px; }

.query-divider {
    text-align: center;
    margin: 24px 0;
    position: relative;
}

.query-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gray-200);
}

.query-divider span {
    background: var(--white);
    padding: 0 16px;
    position: relative;
    color: var(--gray-400);
    font-size: 13px;
}

.qr-hint {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    background: var(--gray-50);
    padding: 16px;
    border-radius: 10px;
}

.qr-hint svg {
    width: 40px;
    height: 40px;
    color: var(--navy-700);
    flex-shrink: 0;
}

.qr-hint p { font-size: 13px; color: var(--gray-600); }

.info-section { padding: 20px 0 40px; }

.info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.info-card {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius);
    padding: 28px;
    color: var(--white);
}

.info-icon {
    font-family: var(--font-display);
    font-size: 28px;
    color: var(--gold-400);
    margin-bottom: 12px;
}

.info-card h3 { font-size: 17px; margin-bottom: 8px; }
.info-card p { font-size: 14px; opacity: 0.75; }

.alert {
    padding: 14px 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-error {
    background: #fef2f2;
    color: var(--error);
    border: 1px solid #fecaca;
}

.result-section, .error-section { padding: 20px 0; }

.result-header {
    text-align: center;
    color: var(--white);
    margin-bottom: 32px;
}

.verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(5, 150, 105, 0.2);
    color: #6ee7b7;
    padding: 8px 18px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
}

.verified-badge svg { width: 18px; height: 18px; }

.result-header h1 {
    font-family: var(--font-display);
    font-size: 2.4rem;
    margin-bottom: 8px;
}

.result-header p { opacity: 0.8; }

.cert-details-card, .cert-viewer-card, .error-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow);
    margin-bottom: 24px;
}

.cert-details-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.detail-item .label {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-400);
    margin-bottom: 4px;
}

.detail-item strong { font-size: 16px; color: var(--navy-900); }
.status-active { color: var(--success) !important; }

.viewer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.viewer-header h2 { font-size: 18px; color: var(--navy-900); }

.cert-iframe {
    width: 100%;
    height: 600px;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
}

.cert-image {
    width: 100%;
    border-radius: 8px;
}

.result-actions { text-align: center; margin-top: 24px; }

.error-card { text-align: center; max-width: 480px; margin: 0 auto; }
.error-icon svg { width: 56px; height: 56px; color: var(--error); margin-bottom: 16px; }
.error-card h1 { font-size: 24px; margin-bottom: 12px; color: var(--navy-900); }
.error-card p { color: var(--gray-600); margin-bottom: 24px; }

.site-footer {
    padding: 24px 0;
    text-align: center;
    color: rgba(255,255,255,0.5);
    font-size: 13px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

@media (max-width: 900px) {
    .hero-grid, .info-grid, .cert-details-grid { grid-template-columns: 1fr; }
    .hero-content { text-align: center; }
    .hero-content > p, .hero-features { justify-content: center; }
}

.lang-switcher {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
}

.lang-switcher a {
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    padding: 4px 8px;
    border-radius: 6px;
    transition: color 0.15s, background 0.15s;
}

.lang-switcher a:hover,
.lang-switcher a.active {
    color: var(--gold-400);
    background: rgba(255,255,255,0.08);
}

.lang-switcher .lang-divider {
    color: rgba(255,255,255,0.3);
    user-select: none;
}
