:root {
    --bg-primary: #2E3E7C;
    --bg-panel: #1E2945;
    --bg-card: rgba(30, 41, 69, 0.88);
    --accent-gold: #FACC15;
    --accent-green: #22C55E;
    --accent-red: #EF4444;
    --accent-cyan: #38BDF8;
    --text-light: #F8FAFC;
    --text-muted: #CBD5E1;
    --border-subtle: rgba(255, 255, 255, 0.14);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-light);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

.sim-ribbon {
    background: linear-gradient(90deg, #16203A, #1E2945, #16203A);
    border-bottom: 1px solid rgba(250, 204, 21, 0.35);
    color: var(--accent-gold);
    font-size: 0.78rem;
    letter-spacing: 0.4px;
    padding: 6px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    z-index: 900;
}

.sim-badge {
    background: rgba(250, 204, 21, 0.15);
    border: 1px solid var(--accent-gold);
    padding: 2px 9px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.72rem;
}

.sk-container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 14px 20px;
    flex: 1;
}

.sk-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 22px;
    box-shadow: 0 14px 35px rgba(10, 15, 35, 0.45);
    backdrop-filter: blur(8px);
}

.btn-sk {
    background: linear-gradient(135deg, #2563EB, #1D4ED8);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.2);
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.22s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

    .btn-sk:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 18px rgba(37, 99, 235, 0.45);
    }

.btn-gold {
    background: linear-gradient(135deg, #FACC15, #EAB308);
    color: #1E2945;
    font-weight: 700;
}

.btn-green {
    background: linear-gradient(135deg, #22C55E, #16A34A);
    color: #fff;
    font-weight: 700;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-subtle);
    color: var(--text-light);
}

.form-control-sk {
    width: 100%;
    background: #131B31;
    border: 1px solid rgba(255,255,255,0.22);
    color: #fff;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.95rem;
}

/* Auto-Guided Ghost Cursor & Flashing Red Ripple */
#demo-ghost-cursor {
    position: fixed;
    width: 34px;
    height: 34px;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: left 0.85s cubic-bezier(0.22, 1, 0.36, 1), top 0.85s cubic-bezier(0.22, 1, 0.36, 1);
    display: none;
}

.cursor-pointer-svg {
    width: 34px;
    height: 34px;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.65));
}

.cursor-ripple {
    position: fixed;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 3px solid var(--accent-red);
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    animation: rippleExpand 0.65s ease-out forwards;
}

@keyframes rippleExpand {
    0% {
        width: 14px;
        height: 14px;
        opacity: 1;
    }

    100% {
        width: 72px;
        height: 72px;
        opacity: 0;
    }
}

.demo-target-pulse {
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.85) !important;
    transition: box-shadow 0.3s ease;
}

.director-hud {
    position: fixed;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.94);
    border: 1px solid rgba(250, 204, 21, 0.45);
    border-radius: 999px;
    padding: 7px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 9500;
    box-shadow: 0 10px 30px rgba(0,0,0,0.55);
    max-width: 94vw;
}

.director-caption {
    font-size: 0.82rem;
    color: #F8FAFC;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 520px;
}

.director-btn {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 0.76rem;
    cursor: pointer;
}

    .director-btn:hover {
        background: var(--accent-gold);
        color: #1E2945;
        font-weight: 700;
    }

footer.sk-footer {
    text-align: center;
    padding: 10px 14px 78px 14px;
    font-size: 0.78rem;
    color: #DFE2EB;
    border-top: 1px solid rgba(255,255,255,0.08);
    margin-top: auto;
}

/* Mobile Responsiveness Polish (Phones & Tablets) */
@media (max-width: 600px) {
    .sim-ribbon {
        font-size: 0.7rem;
        padding: 6px 10px;
        text-align: center;
        justify-content: center;
    }

    .sk-container {
        padding: 10px 12px;
    }

    .sk-unified-card, .sk-card, .welcome-frame {
        padding: 14px;
        border-radius: 14px;
    }

    .portrait-box {
        width: 165px;
        height: 165px;
    }

    .dialogue-slate-box {
        min-height: 150px;
        padding: 12px;
        font-size: 0.88rem;
    }

    .menu-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .module-tile {
        padding: 12px 8px;
    }
}