/* =============================================================
   demo-shared-v2.css — VoteSecured Demo Portal Shared Styles
   Glassmorphic v2 design system tokens + base styles for all
   demo pages. Link this file, then add page-specific <style>.
   ============================================================= */

/* ── 1. Design Tokens ────────────────────────────────────── */
:root {
    --bg-primary: #08090E;
    --bg-card: rgba(255, 255, 255, 0.07);
    --bg-card-hover: rgba(255, 255, 255, 0.12);
    --glass-border: rgba(255, 255, 255, 0.08);

    --burgundy: #8B2252;
    --burgundy-light: #A63366;
    --burgundy-glow: rgba(139, 34, 82, 0.25);
    --gold: #C5A55A;
    --gold-dim: rgba(197, 165, 90, 0.12);
    --gold-glow: rgba(197, 165, 90, 0.2);
    --steel-blue: #4A7BC7;
    --steel-blue-glow: rgba(74, 123, 199, 0.3);

    --text-primary: #FFFFFF;
    --text-body: #E8E8EC;
    --text-secondary: #B8B8C0;
    --text-muted: #9CA3AF;

    --font-heading: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Open Sans', -apple-system, BlinkMacSystemFont, sans-serif;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;

    --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-medium: 300ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── 2. Reset ────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

/* ── 3. Body ─────────────────────────────────────────────── */
body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-body);
    line-height: 1.65;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Ambient glow */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background:
        radial-gradient(ellipse at 20% 40%, rgba(139, 34, 82, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse at 75% 20%, rgba(74, 123, 199, 0.04) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(197, 165, 90, 0.02) 0%, transparent 40%);
    pointer-events: none;
    z-index: 0;
}

/* ── 4. Typography ───────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 300;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    line-height: 1.2;
}

a { color: inherit; text-decoration: none; }

/* ── 5. Demo Header ─────────────────────────────────────── */
.demo-header {
    position: relative;
    z-index: 10;
    border-bottom: 1px solid var(--glass-border);
    padding: 0.75rem 0;
    background: rgba(8, 9, 14, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.demo-header-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 clamp(1.25rem, 4vw, 2.5rem);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.demo-header-logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--gold);
    text-decoration: none;
    white-space: nowrap;
}

.demo-header-logo img {
    width: 36px;
    height: 36px;
    border-radius: 8px;
}

.demo-header-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.demo-back {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 400;
    transition: color var(--transition-base);
    white-space: nowrap;
}

.demo-back:hover { color: var(--gold); }

.demo-back svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ── 6. Main Container ──────────────────────────────────── */
.demo-main {
    position: relative;
    z-index: 1;
    max-width: 1280px;
    margin: 0 auto;
    padding: clamp(1.5rem, 4vw, 3rem) clamp(1.25rem, 4vw, 2.5rem);
}

.demo-container {
    position: relative;
    z-index: 1;
    max-width: 960px;
    margin: 0 auto;
    padding: clamp(1.5rem, 4vw, 3rem) clamp(1.25rem, 4vw, 2.5rem);
}

/* ── 7. Glass Card ──────────────────────────────────────── */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
}

.glass-card-lg {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 2rem;
}

/* ── 8. Section Titles ──────────────────────────────────── */
.section-label {
    font-family: var(--font-heading);
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 1rem;
}

/* ── 9. Tags / Badges ───────────────────────────────────── */
.tag {
    display: inline-block;
    font-family: var(--font-heading);
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 3px 10px;
    border-radius: 4px;
}

.tag-live {
    background: linear-gradient(135deg, var(--burgundy), var(--burgundy-light));
    color: #fff;
}

.tag-tutorial {
    background: linear-gradient(135deg, #3a6ab5, var(--steel-blue));
    color: #fff;
}

.tag-walkthrough {
    background: linear-gradient(135deg, var(--gold), #D4B86A);
    color: #1a1a1a;
}

.tag-docs {
    background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
    color: var(--text-secondary);
    border: 1px solid var(--glass-border);
}

/* ── 10. Buttons ─────────────────────────────────────────── */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.5rem;
    border: none;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--burgundy), var(--burgundy-light));
    color: #fff;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: transform var(--transition-medium), box-shadow var(--transition-medium);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px var(--burgundy-glow);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.5rem;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    backdrop-filter: blur(8px);
    color: var(--text-body);
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: border-color var(--transition-base), background var(--transition-base);
}

.btn-secondary:hover {
    border-color: rgba(197, 165, 90, 0.3);
    background: var(--bg-card-hover);
}

/* ── 11. Status Indicators ──────────────────────────────── */
.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.status-dot.green  { background: #10b981; }
.status-dot.yellow { background: #f59e0b; }
.status-dot.red    { background: #ef4444; }

.status-dot.pulse {
    animation: statusPulse 2s infinite;
}

@keyframes statusPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* ── 12. Step Indicators ────────────────────────────────── */
.step-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 600;
    flex-shrink: 0;
}

.step-badge.active {
    background: linear-gradient(135deg, var(--burgundy), var(--burgundy-light));
    color: #fff;
}

.step-badge.completed {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.step-badge.pending {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
}

/* ── 13. Code / Mono Blocks ─────────────────────────────── */
.mono {
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 0.85em;
}

.code-block {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 1rem 1.25rem;
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 0.8rem;
    color: var(--text-body);
    overflow-x: auto;
    line-height: 1.6;
}

/* ── 14. Tabs ────────────────────────────────────────────── */
.tab-bar {
    display: flex;
    gap: 2px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-sm);
    padding: 3px;
    overflow-x: auto;
}

.tab-btn {
    flex: 1;
    min-width: 0;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    cursor: pointer;
    transition: color var(--transition-base), background var(--transition-base);
    white-space: nowrap;
}

.tab-btn:hover { color: var(--text-body); }

.tab-btn.active {
    background: var(--bg-card);
    color: var(--text-primary);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

/* ── 15. Progress Bar ───────────────────────────────────── */
.progress-track {
    height: 6px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.6s ease;
}

.progress-fill.burgundy { background: linear-gradient(90deg, var(--burgundy), var(--burgundy-light)); }
.progress-fill.gold     { background: linear-gradient(90deg, #b8953f, var(--gold)); }
.progress-fill.steel    { background: linear-gradient(90deg, #3a6ab5, var(--steel-blue)); }
.progress-fill.green    { background: linear-gradient(90deg, #059669, #10b981); }

/* ── 16. Demo Footer ────────────────────────────────────── */
.demo-footer {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 2rem clamp(1.25rem, 4vw, 2.5rem);
    border-top: 1px solid var(--glass-border);
    margin-top: 2rem;
}

.demo-footer-links {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.demo-footer-link {
    color: var(--text-muted);
    font-size: 0.8rem;
    transition: color var(--transition-base);
}

.demo-footer-link:hover { color: var(--gold); }

.demo-footer-note {
    color: rgba(255, 255, 255, 0.2);
    font-size: 0.7rem;
}

/* ── 17. Responsive ─────────────────────────────────────── */
@media (max-width: 768px) {
    .demo-header-title { display: none; }

    .demo-main,
    .demo-container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .tab-bar {
        flex-wrap: wrap;
    }

    .tab-btn {
        flex: 1 1 auto;
        min-width: 0;
    }
}
