/* === DESIGN TOKENS === */
:root {
    --bg-dark: #0f1115;
    --acc-gold: #D4AF37;
    --acc-gold-light: #F3E5AB;
    --text-main: #f4f4f5;
    --text-muted: #a1a1aa;
    --panel-bg: rgba(255, 255, 255, 0.03);
    --panel-border: rgba(255, 255, 255, 0.08);
    --success: #34d399;
    --warning: #fbbf24;
    --danger: #f87171;
    --font-sans: 'Inter', sans-serif;
    --font-serif: 'Playfair Display', serif;
}

/* === BASE STYLES === */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-sans);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    background-image: radial-gradient(circle at 50% 0%, rgba(212, 175, 55, 0.1) 0%, transparent 50%);
}

.hidden { display: none !important; }
.app-container { width: 100%; max-width: 900px; padding: 3rem 1.5rem; }

/* === GLASSMORPHISM === */
.glass-panel {
    background: var(--panel-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--panel-border);
    border-radius: 16px;
    padding: 3rem;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

/* === HERO SECTION === */
.hero { text-align: center; margin-bottom: 2rem; }
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: rgba(212, 175, 55, 0.1);
    color: var(--acc-gold);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 20px;
    margin-bottom: 1.5rem;
}
.hero h1 {
    font-family: var(--font-serif);
    font-size: 3rem;
    font-weight: 400;
    line-height: 1.2;
    margin-bottom: 1rem;
}
.hero .highlight { color: var(--acc-gold); font-style: italic; }
.hero .subtitle {
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 2rem;
    font-size: 1.1rem;
}

/* === FORM === */
.audit-form { display: flex; gap: 1rem; max-width: 600px; margin: 0 auto; position: relative; }
input[type="url"] {
    flex: 1;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--panel-border);
    background: rgba(0,0,0,0.2);
    color: var(--text-main);
    font-size: 1rem;
    font-family: var(--font-sans);
    transition: all 0.3s ease;
}
input[type="url"]:focus { outline: none; border-color: var(--acc-gold); box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.2); }
button, .primary-btn, .secondary-btn {
    padding: 1rem 2rem;
    border-radius: 30px;
    border: none;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-sans);
    text-align: center;
    line-height: 1.3;
}
button[type="submit"], .primary-btn {
    background: var(--acc-gold);
    color: #111;
    text-decoration: none;
    display: inline-block;
}
button[type="submit"]:hover, .primary-btn:hover { background: var(--acc-gold-light); transform: translateY(-2px); }
.secondary-btn {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--panel-border);
}
.secondary-btn:hover { background: rgba(255,255,255,0.05); }

/* === SPINNER === */
.spinner {
    width: 40px; height: 40px;
    border: 3px solid rgba(212, 175, 55, 0.3);
    border-radius: 50%;
    border-top-color: var(--acc-gold);
    animation: spin 1s ease-in-out infinite;
    margin: 2rem auto 1rem;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* === SCORE CARD === */
.score-card { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; padding: 2rem 3rem;}
.score-header h2 { font-family: var(--font-serif); font-size: 2rem; font-weight: 400; margin-bottom: 0.5rem; }
.score-header h3 { color: var(--text-muted); font-size: 1rem; font-weight: 400; }
.score-circle { width: 120px; }
.circular-chart { display: block; margin: 0 auto; max-width: 80%; max-height: 250px; }
.circle-bg { fill: none; stroke: var(--panel-border); stroke-width: 2.5; }
.circle { fill: none; stroke-width: 2.5; stroke-linecap: round; transition: stroke-dasharray 1.5s ease-out; stroke: var(--acc-gold); }
.percentage { fill: var(--text-main); font-family: var(--font-sans); font-size: 0.5em; font-weight: 600; text-anchor: middle; }

/* === REPORT ITEMS === */
.audit-details { margin-bottom: 3rem; }
.audit-details h3 { font-family: var(--font-serif); font-size: 1.5rem; font-weight: 400; margin-bottom: 1.5rem; border-bottom: 1px solid var(--panel-border); padding-bottom: 0.5rem; }
.report-item {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    gap: 1.5rem;
}
.status-icon { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: bold; flex-shrink: 0;}
.status-pass { background: rgba(52, 211, 153, 0.1); color: var(--success); }
.status-fail { background: rgba(248, 113, 113, 0.1); color: var(--danger); }
.status-warn { background: rgba(251, 191, 36, 0.1); color: var(--warning); }
.item-content h4 { font-size: 1.1rem; margin-bottom: 0.5rem; display: flex; align-items: center; gap: 0.5rem; }
.item-content p { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 1rem; }
.fix-box { background: rgba(212, 175, 55, 0.05); border-left: 3px solid var(--acc-gold); padding: 1rem; border-radius: 0 8px 8px 0; }
.fix-box p.fix-title { color: var(--acc-gold); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 0.25rem; font-weight: 600; }

/* === ACTION AREA === */
.action-area { text-align: center; }
.action-area h3 { font-family: var(--font-serif); font-size: 1.75rem; font-weight: 400; margin-bottom: 1rem; }
.action-area p { color: var(--text-muted); max-width: 600px; margin: 0 auto 2rem; }
.btn-group { display: flex; justify-content: center; gap: 1rem; }

/* === PRINT STYLES === */
#print-header { display: none; }
@media print {
    body { background: #fff; color: #000; background-image: none; }
    .app-container { max-width: 100%; padding: 0; }
    #hero-section, .btn-group { display: none !important; }
    #print-header { display: block; text-align: left; margin-bottom: 2rem; border-bottom: 2px solid #000; padding-bottom: 1rem; }
    #print-header h2 { font-family: var(--font-serif); font-size: 2.5rem; letter-spacing: 2px; margin-bottom: 0.5rem; }
    #print-header p.print-cta { margin-top: 1rem; font-size: 1.05rem; font-weight: bold; }
    #print-header a { color: #111; text-decoration: underline; text-decoration-color: var(--acc-gold); text-underline-offset: 4px; }
    .glass-panel { background: #fff; border: 1px solid #ccc; box-shadow: none; border-radius: 0; margin-bottom: 2rem; padding: 1rem; }
    .report-item { background: #fff; border: 1px solid #eee; page-break-inside: avoid; }
    .circle-bg { stroke: #eee; }
    .percentage { fill: #000; }
    .fix-box { background: #fafafa; border-left-color: #000; }
    .fix-box p.fix-title { color: #000; }
}

@media (max-width: 600px) {
    .audit-form, .btn-group { flex-direction: column; }
    .score-card { flex-direction: column; text-align: center; gap: 1.5rem; padding: 1.5rem; }
    .report-item { flex-direction: column; gap: 1rem; }
}
