/* ============================================
   EXCELMEDIA ANALYZER - STYLES
   Matches the ExcelMedia dark brand DNA
   ============================================ */

:root {
    --bg: #0a0a0f;
    --bg-secondary: #0e0e14;
    --bg-card: rgba(255,255,255,0.03);
    --bg-card-hover: rgba(255,255,255,0.06);
    --text: #f0f0f5;
    --text-secondary: #a1a1aa;
    --text-muted: #6b6b76;
    --accent: #ffffff;
    --accent-glow: rgba(255, 255, 255, 0.15);
    --border: rgba(255,255,255,0.07);
    --border-hover: rgba(255,255,255,0.14);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --transition: 0.3s ease;
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;
    --shadow-card: 0 4px 24px -4px rgba(0,0,0,0.4);
    --green: #22c55e;
    --yellow: #eab308;
    --red: #ef4444;
    --orange: #f97316;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: #333 #0a0a0f;
}
html::-webkit-scrollbar { width: 6px; }
html::-webkit-scrollbar-track { background: #0a0a0f; }
html::-webkit-scrollbar-thumb { background: #333; border-radius: 3px; }

body {
    font-family: var(--font-primary);
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
    background-image:
        radial-gradient(ellipse at 20% 50%, rgba(255, 255, 255, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    background-attachment: fixed;
}

a { text-decoration: none; color: inherit; }
button, input, textarea, select { font-family: inherit; }

.container { max-width: 720px; margin: 0 auto; padding: 0 24px; }

/* === GRID OVERLAY === */
.grid-overlay {
    position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: 0.03;
    background-image: linear-gradient(rgba(255,255,255,0.15) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(255,255,255,0.15) 1px, transparent 1px);
    background-size: 60px 60px;
}

/* === NAV === */
.nav {
    position: fixed; top: 0; left: 0; right: 0;
    padding: 0 32px; height: 64px;
    display: flex; align-items: center; justify-content: space-between;
    z-index: 1000;
    background: rgba(10,10,15,0.75);
    backdrop-filter: blur(20px) saturate(1.4);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.nav-logo {
    font-size: 15px; font-weight: 600; letter-spacing: -0.3px;
    color: var(--text);
    display: flex; align-items: center; gap: 10px;
}
.nav-logo-img {
    height: 28px; width: auto;
}
.logo-accent { color: var(--text-secondary); font-weight: 400; }
.nav-right { display: flex; align-items: center; gap: 16px; }
.nav-link-muted {
    font-size: 13px; color: var(--text-muted);
    transition: color var(--transition);
}
.nav-link-muted:hover { color: var(--text); }
.uses-badge {
    font-size: 12px; padding: 4px 12px; border-radius: 20px;
    background: rgba(34,197,94,0.1); color: var(--green);
    border: 1px solid rgba(34,197,94,0.2);
}
.uses-badge.warning { background: rgba(234,179,8,0.1); color: var(--yellow); border-color: rgba(234,179,8,0.2); }
.uses-badge.depleted { background: rgba(239,68,68,0.1); color: var(--red); border-color: rgba(239,68,68,0.2); }

/* === HERO === */
.hero {
    padding: 160px 0 80px;
    text-align: center;
    position: relative; z-index: 1;
}
.hero-badge {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 13px; color: var(--text-secondary);
    padding: 6px 16px; border-radius: 20px;
    background: var(--bg-card); border: 1px solid var(--border);
    margin-bottom: 24px;
}
.hero-badge-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 8px rgba(34,197,94,0.5);
    animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}
.hero-title {
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 300; line-height: 1.15;
    letter-spacing: -1.5px;
    margin-bottom: 20px;
}
.hero-title-italic {
    font-family: var(--font-serif);
    font-style: italic; font-weight: 400;
    color: var(--red);
}
.hero-title-bold { font-weight: 700; }
.hero-sub {
    font-size: 16px; color: var(--text-secondary);
    max-width: 520px; margin: 0 auto 32px;
    line-height: 1.7;
}

/* Hero fade animation */
.hero-fade {
    opacity: 0; transform: translateY(16px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.hero-fade.loaded { opacity: 1; transform: translateY(0); }

/* === BUTTONS === */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 12px 28px; border-radius: var(--radius-sm);
    font-size: 14px; font-weight: 500;
    cursor: pointer; border: none;
    transition: all var(--transition);
    text-decoration: none;
}
.btn-primary {
    background: var(--accent); color: #000;
}
.btn-primary:hover { opacity: 0.85; transform: translateY(-1px); }
.btn-secondary {
    background: transparent; color: var(--text);
    border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: var(--border-hover); background: var(--bg-card); }
.btn:disabled {
    opacity: 0.4; cursor: not-allowed; transform: none !important;
}

/* === FORM SECTION === */
.form-section {
    display: none;
    min-height: calc(100vh - 64px);
    padding: 0 0 60px;
    position: relative; z-index: 1;
    align-items: center; justify-content: center;
}
.form-section.active { display: flex; }

.form-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px;
    position: relative;
}

/* Progress */
.progress-bar {
    position: absolute; top: 0; left: 0; right: 0;
    height: 3px; background: rgba(255,255,255,0.05);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    overflow: hidden;
}
.progress-fill {
    height: 100%; width: 16.66%;
    background: var(--accent);
    transition: width 0.4s ease;
}
.step-indicator {
    font-size: 12px; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 1px;
    margin-bottom: 24px;
}

/* Steps */
.form-step {
    display: none;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}
.form-step.active {
    display: block;
    animation: stepIn 0.25s ease forwards;
}
@keyframes stepIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.step-title {
    font-size: 24px; font-weight: 600; letter-spacing: -0.5px;
    margin-bottom: 8px;
}
.step-desc {
    font-size: 14px; color: var(--text-secondary);
    margin-bottom: 28px;
}

/* Option Buttons */
.option-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 540px) { .option-grid { grid-template-columns: 1fr; } }

.option-btn {
    display: flex; flex-direction: column; align-items: flex-start;
    padding: 18px 20px; border-radius: var(--radius);
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border);
    cursor: pointer; text-align: left;
    transition: all var(--transition);
    color: var(--text);
}
.option-btn:hover {
    background: rgba(255,255,255,0.05);
    border-color: var(--border-hover);
}
.option-btn.selected {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.3);
}
.option-icon { font-size: 22px; margin-bottom: 8px; }
.option-label { font-size: 15px; font-weight: 600; }
.option-detail { font-size: 13px; color: var(--text-muted); margin-top: 2px; }

/* Text Inputs */
.form-textarea, .form-input {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 15px; line-height: 1.6;
    resize: vertical;
    transition: border-color var(--transition);
}
.form-textarea:focus, .form-input:focus {
    outline: none;
    border-color: rgba(255,255,255,0.25);
}
.form-textarea::placeholder, .form-input::placeholder {
    color: var(--text-muted);
}

.step-next-btn { margin-top: 20px; width: 100%; }

.optional-tag {
    font-size: 12px; font-weight: 400;
    color: var(--text-muted);
    background: rgba(255,255,255,0.05);
    padding: 2px 8px; border-radius: 4px;
    margin-left: 8px;
}

/* Back Button */
.back-btn {
    margin-top: 20px;
    background: none; border: none;
    color: var(--text-muted); cursor: pointer;
    font-size: 13px;
    transition: color var(--transition);
}
.back-btn:hover { color: var(--text); }

/* Validation */
.form-textarea.error, .form-input.error {
    border-color: var(--red);
}
.error-msg {
    color: var(--red); font-size: 13px; margin-top: 6px;
}

/* === LOADING === */
.loading-section {
    display: none; padding: 120px 0; text-align: center;
    position: relative; z-index: 1;
}
.loading-section.active { display: block; }

.loading-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 60px 40px;
}

.loading-spinner {
    width: 48px; height: 48px;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 24px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading-title {
    font-size: 22px; font-weight: 600;
    margin-bottom: 32px; letter-spacing: -0.3px;
}

.loading-steps { display: flex; flex-direction: column; gap: 12px; max-width: 300px; margin: 0 auto; }
.loading-step {
    display: flex; align-items: center; gap: 10px;
    font-size: 14px; color: var(--text-muted);
    transition: color 0.3s ease;
}
.loading-step.active { color: var(--text); }
.loading-step.done { color: var(--green); }

/* === RESULTS === */
.results-section {
    display: none; padding: 100px 0 80px;
    position: relative; z-index: 1;
}
.results-section.active { display: block; }

.result-block {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 36px;
    margin-bottom: 20px;
    animation: fadeIn 0.5s ease;
}
.result-heading {
    font-size: 18px; font-weight: 600;
    margin-bottom: 20px; letter-spacing: -0.3px;
}
.tag-ready {
    font-size: 11px; font-weight: 500;
    background: rgba(34,197,94,0.12); color: var(--green);
    padding: 3px 10px; border-radius: 4px;
    margin-left: 8px;
}

/* Score Grid */
.scores-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
    opacity: 0; transform: translateY(16px);
    animation: resultAppear 0.5s ease forwards;
}
.score-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 20px;
    text-align: center;
}
.score-card-main {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
}
.score-card-main .score-ring-wrap {
    margin-bottom: 8px;
}
.score-card-number {
    font-size: 32px; font-weight: 700;
    letter-spacing: -1px; line-height: 1;
    margin-bottom: 6px;
}
.score-card-label {
    font-size: 11px; font-weight: 600;
    text-transform: uppercase; letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 4px;
}
.score-card-bar {
    height: 4px; background: rgba(255,255,255,0.06);
    border-radius: 2px; margin-top: 10px;
    overflow: hidden;
}
.score-card-fill {
    height: 100%; border-radius: 2px;
    background: var(--green);
    transition: width 1.5s ease;
    width: 0;
}
.score-verdict {
    font-size: 12px; color: var(--text-secondary);
    line-height: 1.5; margin-top: 4px;
}
@media (max-width: 768px) {
    .scores-grid {
        grid-template-columns: 1fr 1fr 1fr;
    }
    .score-card-main {
        grid-column: 1 / -1;
    }
}
@media (max-width: 400px) {
    .scores-grid { grid-template-columns: 1fr; }
}

/* Score Ring */
.score-ring-wrap {
    position: relative; width: 100px; height: 100px; flex-shrink: 0;
}
.score-ring { width: 100px; height: 100px; transform: rotate(-90deg); }
.score-ring-bg {
    fill: none; stroke: rgba(255,255,255,0.06); stroke-width: 8;
}
.score-ring-fill {
    fill: none; stroke: var(--green); stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 326.73;
    stroke-dashoffset: 326.73;
    transition: stroke-dashoffset 1.5s ease, stroke 0.3s ease;
}
.score-number {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 28px; font-weight: 700; letter-spacing: -1px;
}

/* Problems */
.problem-item {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 16px;
    background: rgba(239,68,68,0.04);
    border: 1px solid rgba(239,68,68,0.1);
    border-radius: var(--radius);
    margin-bottom: 10px;
}
.problem-item:last-child { margin-bottom: 0; }
.problem-severity {
    font-size: 11px; font-weight: 600;
    padding: 2px 8px; border-radius: 4px;
    flex-shrink: 0; margin-top: 2px;
    text-transform: uppercase; letter-spacing: 0.5px;
}
.severity-high { background: rgba(239,68,68,0.15); color: var(--red); }
.severity-medium { background: rgba(234,179,8,0.15); color: var(--yellow); }
.severity-low { background: rgba(249,115,22,0.15); color: var(--orange); }
.problem-text { font-size: 14px; line-height: 1.5; }
.problem-title { font-weight: 600; margin-bottom: 2px; }
.problem-desc { color: var(--text-secondary); }

/* Improved Content */
.improved-item {
    padding: 20px;
    background: rgba(34,197,94,0.04);
    border: 1px solid rgba(34,197,94,0.1);
    border-radius: var(--radius);
    margin-bottom: 12px;
}
.improved-item:last-child { margin-bottom: 0; }
.improved-label {
    font-size: 11px; font-weight: 600;
    text-transform: uppercase; letter-spacing: 1px;
    color: var(--green); margin-bottom: 8px;
}
.improved-text {
    font-size: 16px; font-weight: 500; line-height: 1.5;
}
.improved-sub {
    font-size: 14px; color: var(--text-secondary);
    margin-top: 6px; line-height: 1.5;
}
.copy-btn {
    margin-top: 10px;
    font-size: 12px; padding: 4px 12px;
    background: rgba(255,255,255,0.06); border: 1px solid var(--border);
    border-radius: 6px; color: var(--text-muted);
    cursor: pointer; transition: all var(--transition);
}
.copy-btn:hover { color: var(--text); border-color: var(--border-hover); }

/* Compare */
.compare-grid { display: flex; flex-direction: column; gap: 16px; }
.compare-row {
    display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
@media (max-width: 540px) {
    .compare-row { grid-template-columns: 1fr; }
}
.compare-label {
    font-size: 12px; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.8px; margin-bottom: 12px;
    color: var(--text-muted);
}
.compare-before, .compare-after {
    padding: 16px; border-radius: var(--radius);
    font-size: 14px; line-height: 1.5;
}
.compare-before {
    background: rgba(239,68,68,0.04);
    border: 1px solid rgba(239,68,68,0.1);
}
.compare-after {
    background: rgba(34,197,94,0.04);
    border: 1px solid rgba(34,197,94,0.1);
}
.compare-section-label {
    font-size: 12px; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.8px; color: var(--text-muted);
    margin-bottom: 4px;
}

/* Why Text */
.why-text {
    font-size: 15px; color: var(--text-secondary); line-height: 1.75;
}

/* CTA Block */
.cta-block { text-align: center; padding: 48px 36px; }
.cta-title { font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.cta-desc { font-size: 14px; color: var(--text-secondary); margin-bottom: 24px; max-width: 400px; margin-left: auto; margin-right: auto; }
.cta-buttons { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.uses-remaining {
    font-size: 12px; color: var(--text-muted);
    margin-top: 16px;
}

/* === ERROR STATE === */
.error-banner {
    background: rgba(239,68,68,0.08);
    border: 1px solid rgba(239,68,68,0.2);
    border-radius: var(--radius);
    padding: 16px 20px;
    font-size: 14px; color: var(--red);
    margin-bottom: 20px;
    display: none;
}
.error-banner.active { display: block; }

/* === NAV LOGIN / USER === */
.btn-nav-login {
    font-size: 12px; padding: 5px 14px; border-radius: 6px;
    background: rgba(255,255,255,0.06); border: 1px solid var(--border);
    color: var(--text-secondary); cursor: pointer;
    transition: all var(--transition);
}
.btn-nav-login:hover { color: var(--text); border-color: var(--border-hover); }
.nav-user {
    font-size: 12px; color: var(--text-muted);
    max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* === PAYWALL / PRICING === */
.paywall-section {
    display: none; padding: 120px 0 80px;
    position: relative; z-index: 1;
}
.paywall-section.active { display: block; }

.container-wide { max-width: 960px; margin: 0 auto; padding: 0 24px; }

.paywall-header { text-align: center; margin-bottom: 48px; }
.paywall-title {
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 700; letter-spacing: -1px;
    margin-top: 20px; margin-bottom: 12px;
}
.paywall-sub {
    font-size: 15px; color: var(--text-secondary);
    max-width: 520px; margin: 0 auto; line-height: 1.7;
}

.pricing-grid {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 16px; margin-bottom: 40px;
}
@media (max-width: 768px) {
    .pricing-grid { grid-template-columns: 1fr; max-width: 400px; margin-left: auto; margin-right: auto; }
}

.pricing-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px 28px;
    display: flex; flex-direction: column;
    position: relative;
}
.pricing-card-popular {
    border-color: rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.05);
}
.pricing-popular-tag {
    position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
    font-size: 11px; font-weight: 600;
    padding: 4px 14px; border-radius: 20px;
    background: var(--accent); color: #000;
    white-space: nowrap;
}
.pricing-header { margin-bottom: 24px; }
.pricing-name {
    font-size: 16px; font-weight: 600; margin-bottom: 8px;
    color: var(--text-secondary);
}
.pricing-price {
    font-size: 44px; font-weight: 700; letter-spacing: -2px;
    line-height: 1;
}
.pricing-period { font-size: 16px; font-weight: 400; color: var(--text-muted); }

.pricing-features {
    list-style: none; flex: 1; margin-bottom: 24px;
}
.pricing-features li {
    font-size: 14px; color: var(--text-secondary);
    padding: 6px 0; padding-left: 20px;
    position: relative;
}
.pricing-features li::before {
    content: '✓'; position: absolute; left: 0;
    color: var(--green); font-size: 13px;
}
.pricing-btn { width: 100%; }

.paywall-login {
    text-align: center; font-size: 14px; color: var(--text-muted);
}
.link-btn {
    background: none; border: none; color: var(--accent);
    cursor: pointer; font-size: 14px; text-decoration: underline;
    transition: opacity var(--transition);
}
.link-btn:hover { opacity: 0.7; }

/* === LOGIN MODAL === */
.modal-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,0.7); backdrop-filter: blur(8px);
    z-index: 2000;
    align-items: center; justify-content: center;
}
.modal-overlay.active { display: flex; }
.modal-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 36px;
    max-width: 420px; width: 90%;
    position: relative;
}
.modal-close {
    position: absolute; top: 16px; right: 16px;
    background: none; border: none;
    color: var(--text-muted); cursor: pointer;
    font-size: 18px; line-height: 1;
}
.modal-close:hover { color: var(--text); }
.modal-title { font-size: 20px; font-weight: 600; margin-bottom: 6px; }
.modal-desc { font-size: 14px; color: var(--text-secondary); margin-bottom: 20px; }
.modal-btn { width: 100%; margin-top: 12px; }
.modal-error {
    font-size: 13px; color: var(--red); margin-top: 10px;
    min-height: 18px;
}

/* === RESPONSIVE === */
@media (max-width: 640px) {
    .nav { padding: 0 16px; }
    .nav-link-muted { display: none; }
    .hero { padding: 130px 0 60px; }
    .hero-title { font-size: 28px; }
    .form-card { padding: 28px 20px; }
    .result-block { padding: 24px 20px; }
    .score-block { padding: 28px 20px; }
    .modal-card { padding: 24px 20px; }
    .pricing-price { font-size: 36px; }
}

/* === TOAST NOTIFICATIONS === */
.toast {
    position: fixed; top: 80px; right: 24px;
    display: flex; align-items: center; gap: 14px;
    padding: 16px 20px; border-radius: var(--radius);
    background: rgba(10, 15, 10, 0.95);
    border: 1px solid rgba(34,197,94,0.3);
    backdrop-filter: blur(12px);
    z-index: 3000;
    transform: translateX(120%);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
    max-width: 380px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
.toast.active {
    transform: translateX(0);
    opacity: 1;
}
.toast-error {
    border-color: rgba(239,68,68,0.3);
    background: rgba(15, 10, 10, 0.95);
}
.toast-icon {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: rgba(34,197,94,0.15);
    color: var(--green);
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 700;
    flex-shrink: 0;
}
.toast-error .toast-icon {
    background: rgba(239,68,68,0.15);
    color: var(--red);
}
.toast-content { flex: 1; min-width: 0; }
.toast-title { font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.toast-desc { font-size: 13px; color: var(--text-secondary); }
.toast-close {
    background: none; border: none;
    color: var(--text-muted); cursor: pointer;
    font-size: 14px; padding: 4px;
    transition: color var(--transition);
    flex-shrink: 0;
}
.toast-close:hover { color: var(--text); }
@media (max-width: 640px) {
    .toast { right: 12px; left: 12px; max-width: none; }
}

/* === PRICING ENHANCEMENTS === */
.pricing-cost-per {
    font-size: 12px; color: var(--text-muted);
    margin-top: 4px;
}
.pricing-card-popular {
    transform: scale(1.03);
}
@media (max-width: 768px) {
    .pricing-card-popular { transform: none; }
}
.pricing-guarantee {
    text-align: center; font-size: 13px; color: var(--text-muted);
    margin-top: 8px;
}

/* === LOADING IMPROVEMENTS === */
.loading-step .loading-step-icon {
    width: 20px; display: inline-block; text-align: center;
    font-style: normal;
}
.loading-step.active .loading-step-icon {
    animation: pulseIcon 1s ease infinite;
}
@keyframes pulseIcon {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}
.loading-step.done .loading-step-icon {
    color: var(--green);
    animation: none;
}
.loading-subtitle {
    font-size: 14px; color: var(--text-muted);
    margin-top: -20px; margin-bottom: 32px;
}

/* === RESULT APPEAR ANIMATIONS === */
.result-block {
    opacity: 0; transform: translateY(16px);
    animation: resultAppear 0.5s ease forwards;
}
.result-block:nth-child(1) { animation-delay: 0s; }
.result-block:nth-child(2) { animation-delay: 0.1s; }
.result-block:nth-child(3) { animation-delay: 0.2s; }
.result-block:nth-child(4) { animation-delay: 0.3s; }
.result-block:nth-child(5) { animation-delay: 0.4s; }
.result-block:nth-child(6) { animation-delay: 0.5s; }
@keyframes resultAppear {
    to { opacity: 1; transform: translateY(0); }
}

/* === FOOTER === */
.analyzer-footer {
    text-align: center; padding: 40px 24px;
    font-size: 12px; color: var(--text-muted);
    border-top: 1px solid var(--border);
    margin-top: 60px;
    position: relative; z-index: 1;
}
.analyzer-footer a {
    color: var(--text-secondary);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.analyzer-footer a:hover { color: var(--text); }

/* === PREVIEW HERO (split layout) === */
.preview-hero {
    border-bottom: 1px solid var(--border);
    margin-bottom: 40px;
}
.preview-topbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    background: var(--card-bg);
}
.preview-topbar-left {
    display: flex; align-items: center; gap: 16px;
}
.preview-title {
    font-size: 15px; font-weight: 600; letter-spacing: -0.3px;
    margin: 0;
}
.preview-toggle {
    display: flex; gap: 2px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 3px;
}
.preview-toggle-btn {
    padding: 5px 16px; border-radius: var(--radius-sm);
    font-size: 12px; font-weight: 500;
    background: none; border: none; color: var(--text-muted);
    cursor: pointer; transition: all 0.15s;
}
.preview-toggle-btn.active {
    background: var(--accent); color: #000; font-weight: 600;
}
.preview-toggle-btn:hover:not(.active) {
    color: var(--text-primary);
}
.preview-fullscreen-btn {
    display: flex; align-items: center; gap: 6px;
    padding: 6px 14px; border-radius: var(--radius-sm);
    font-size: 12px; font-weight: 500;
    background: none; border: 1px solid var(--border);
    color: var(--text-secondary); cursor: pointer;
    transition: all 0.15s;
}
.preview-fullscreen-btn:hover {
    color: var(--text-primary); border-color: var(--text-muted);
}

/* Split: preview left, panel right */
.preview-split {
    display: flex; min-height: 600px;
}
.preview-frame-wrap {
    flex: 1; position: relative; background: #fff;
    min-width: 0;
}
.preview-frame {
    width: 100%; height: 100%; border: none; display: block;
    background: #fff; min-height: 600px;
}
.preview-loading {
    position: absolute; inset: 0;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 12px; background: var(--card-bg);
    color: var(--text-muted); font-size: 13px;
    z-index: 2;
}
.preview-loading.hidden { display: none; }
.preview-spinner {
    width: 24px; height: 24px;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Right panel */
.preview-panel {
    width: 320px; flex-shrink: 0;
    border-left: 1px solid var(--border);
    display: flex; flex-direction: column;
    background: var(--bg);
    overflow-y: auto; max-height: 600px;
}
.preview-panel-header {
    font-size: 11px; font-weight: 600;
    text-transform: uppercase; letter-spacing: 1px;
    color: var(--text-muted);
    padding: 16px 20px 12px;
    border-bottom: 1px solid var(--border);
}
.preview-panel-list {
    display: flex; flex-direction: column;
}
.preview-change-item {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}
.preview-change-item:last-child { border-bottom: none; }
.preview-change-section {
    font-size: 12px; font-weight: 600; color: var(--text-primary);
    margin-bottom: 8px;
}
.preview-change-before {
    font-size: 12px; color: var(--text-muted);
    line-height: 1.5; margin-bottom: 6px;
    text-decoration: line-through;
}
.preview-change-after {
    font-size: 12px; color: var(--green);
    line-height: 1.5;
}
.preview-change-why {
    font-size: 11px; color: var(--text-muted);
    margin-top: 8px; line-height: 1.5;
    font-style: italic;
}

/* Responsive: stack on mobile */
@media (max-width: 768px) {
    .preview-split { flex-direction: column; }
    .preview-panel {
        width: 100%; max-height: none;
        border-left: none; border-top: 1px solid var(--border);
    }
    .preview-frame { min-height: 400px; }
    .preview-topbar { flex-wrap: wrap; gap: 10px; }
    .preview-title { width: 100%; }
}

/* === FULLSCREEN OVERLAY === */
.fullscreen-overlay {
    display: none; position: fixed; inset: 0; z-index: 9999;
    background: var(--bg);
    flex-direction: column;
}
.fullscreen-overlay.active { display: flex; }
.fullscreen-topbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 24px;
    border-bottom: 1px solid var(--border);
    background: var(--card-bg);
    flex-shrink: 0;
}
.fullscreen-topbar-left {
    display: flex; align-items: center; gap: 16px;
}
.fullscreen-label {
    font-size: 12px; color: var(--text-muted);
}
.fullscreen-close-btn, .fullscreen-back-btn {
    display: flex; align-items: center; gap: 6px;
    padding: 6px 14px; border-radius: var(--radius-sm);
    font-size: 13px; font-weight: 500;
    background: none; border: 1px solid var(--border);
    color: var(--text-secondary); cursor: pointer;
    transition: all 0.15s;
}
.fullscreen-close-btn:hover, .fullscreen-back-btn:hover {
    color: var(--text-primary); border-color: var(--text-muted);
}
.fullscreen-frame {
    flex: 1; width: 100%; border: none;
    background: #fff;
}

/* === RESULT CTA SECTION === */
.result-cta-section {
    display: flex; align-items: center; justify-content: space-between;
    gap: 24px;
    padding: 32px 36px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-top: 24px; margin-bottom: 24px;
    opacity: 0; transform: translateY(16px);
    animation: resultAppear 0.5s ease 0.4s forwards;
}
.result-cta-left { flex: 1; }
.result-cta-title {
    font-size: 18px; font-weight: 700;
    letter-spacing: -0.3px; margin-bottom: 4px;
}
.result-cta-desc {
    font-size: 13px; color: var(--text-secondary);
    line-height: 1.6; max-width: 400px;
}
.result-cta-actions {
    display: flex; gap: 10px; flex-shrink: 0;
}
@media (max-width: 640px) {
    .result-cta-section { flex-direction: column; text-align: center; }
    .result-cta-actions { width: 100%; flex-direction: column; }
    .result-cta-desc { max-width: none; }
}
