:root {
    --bg: #070607;
    --card: rgba(18, 18, 22, 0.88);
    --card-soft: rgba(29, 24, 28, 0.88);
    --text: #f4efe7;
    --muted: #a79d94;
    --line: rgba(255, 255, 255, 0.12);

    --primary: #b91c1c;
    --primary-dark: #7f1d1d;
    --accent: #f97316;
    --green: #22c55e;
    --red: #ef4444;

    --shadow: 0 28px 80px rgba(0, 0, 0, 0.55);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at 18% 12%, rgba(185, 28, 28, 0.28), transparent 32%),
        radial-gradient(circle at 82% 75%, rgba(249, 115, 22, 0.18), transparent 30%),
        radial-gradient(circle at 50% 120%, rgba(127, 29, 29, 0.35), transparent 38%),
        linear-gradient(135deg, #050505, #111015 48%, #1a0909);
    color: var(--text);
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
    background-size: 46px 46px;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,0.75), transparent 85%);
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at center, transparent 35%, rgba(0,0,0,0.62) 100%),
        linear-gradient(rgba(255,255,255,0.018) 50%, rgba(0,0,0,0.025) 50%);
    background-size: auto, 100% 4px;
    opacity: 0.75;
}

.app {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 28px 0 42px;
    position: relative;
    z-index: 1;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    margin-bottom: 26px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.logo {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: linear-gradient(135deg, #dc2626, #7f1d1d);
    color: #fff7ed;
    font-weight: 950;
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.12),
        0 18px 40px rgba(185, 28, 28, 0.32),
        0 0 35px rgba(220, 38, 38, 0.26);
}

.brand h1 {
    margin: 0;
    font-size: clamp(1.2rem, 3vw, 1.75rem);
    letter-spacing: -0.04em;
    color: #fff7ed;
    text-shadow: 0 0 24px rgba(220, 38, 38, 0.22);
}

.brand span {
    display: block;
    color: var(--muted);
    font-size: 0.9rem;
    margin-top: 2px;
}

.pill {
    border: 1px solid rgba(248, 113, 113, 0.22);
    background: rgba(20, 12, 12, 0.72);
    color: #fca5a5;
    border-radius: 999px;
    padding: 9px 14px;
    font-size: 0.86rem;
    white-space: nowrap;
    box-shadow: inset 0 0 22px rgba(185, 28, 28, 0.06);
}

.screen {
    display: none;
    animation: enter 0.35s ease both;
}

.screen.active {
    display: block;
}

@keyframes enter {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.99);
        filter: blur(3px);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

.hero {
    min-height: 70vh;
    display: grid;
    align-items: center;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 24px;
}

.hero-card,
.panel,
.score-card,
.result-card {
    background:
        linear-gradient(180deg, rgba(31, 24, 27, 0.92), rgba(12, 12, 15, 0.88));
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.hero-card {
    padding: clamp(24px, 4vw, 44px);
}

.eyebrow {
    color: #fb7185;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.78rem;
    font-weight: 900;
    margin: 0 0 12px;
}

.hero-title {
    font-size: clamp(2.6rem, 8vw, 6rem);
    line-height: 0.9;
    letter-spacing: -0.08em;
    margin: 0;
    color: #fff7ed;
}

.hero-title strong {
    display: block;
    color: #ef4444;
    text-shadow:
        0 0 28px rgba(239, 68, 68, 0.34),
        0 0 64px rgba(127, 29, 29, 0.30);
}

.lead {
    color: #c9bdb4;
    font-size: clamp(1rem, 2vw, 1.18rem);
    line-height: 1.7;
    max-width: 760px;
}

.actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 24px;
}

button {
    border: none;
    cursor: pointer;
    font: inherit;
}

.btn {
    border-radius: 14px;
    padding: 13px 18px;
    color: #fff7ed;
    background: linear-gradient(135deg, #dc2626, #7f1d1d);
    font-weight: 900;
    box-shadow:
        0 16px 34px rgba(127, 29, 29, 0.35),
        0 0 28px rgba(220, 38, 38, 0.18);
    transition: transform 0.18s ease, filter 0.18s ease, box-shadow 0.18s ease;
}

.btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.08);
    box-shadow:
        0 20px 42px rgba(127, 29, 29, 0.46),
        0 0 38px rgba(220, 38, 38, 0.28);
}

.btn.secondary {
    color: #f4efe7;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.13);
    box-shadow: none;
}

.btn.ghost {
    color: #d6ccc2;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.13);
    box-shadow: none;
}

.visual {
    padding: 24px;
    min-height: 440px;
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 20%, rgba(220,38,38,0.18), transparent 32%),
        linear-gradient(135deg, rgba(18,18,22,0.92), rgba(8,8,10,0.96));
}

.network {
    position: absolute;
    inset: 0;
    opacity: 0.45;
    background:
        radial-gradient(circle at 25% 20%, rgba(239,68,68,0.55) 0 3px, transparent 5px),
        radial-gradient(circle at 75% 30%, rgba(249,115,22,0.40) 0 4px, transparent 6px),
        radial-gradient(circle at 52% 62%, rgba(185,28,28,0.58) 0 4px, transparent 6px),
        radial-gradient(circle at 30% 78%, rgba(252,165,165,0.34) 0 3px, transparent 5px);
    filter: blur(0.2px);
}

.phone {
    position: relative;
    margin: 26px auto;
    width: min(300px, 78vw);
    border-radius: 38px;
    padding: 16px;
    border: 1px solid rgba(255,255,255,0.14);
    background: #09090b;
    box-shadow:
        0 28px 70px rgba(0, 0, 0, 0.62),
        inset 0 0 0 7px rgba(255,255,255,0.035),
        0 0 45px rgba(127,29,29,0.18);
}

.feed-item {
    background:
        linear-gradient(135deg, rgba(127,29,29,0.28), rgba(24,24,27,0.94));
    border: 1px solid rgba(248, 113, 113, 0.18);
    border-radius: 19px;
    padding: 14px;
    margin-bottom: 12px;
}

.feed-item b {
    color: #fff1f2;
}

.feed-line {
    height: 9px;
    border-radius: 99px;
    background: rgba(248, 113, 113, 0.20);
    margin: 8px 0;
}

.main-grid {
    display: grid;
    grid-template-columns: 1.35fr 0.65fr;
    gap: 18px;
}

.panel {
    padding: clamp(18px, 3vw, 30px);
}

.round-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.round-kicker {
    color: #fb7185;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: 0.8rem;
}

.round-title {
    font-size: clamp(1.8rem, 4vw, 3rem);
    line-height: 1;
    letter-spacing: -0.05em;
    margin: 0 0 14px;
    color: #fff7ed;
}

.scenario {
    color: #d6ccc2;
    line-height: 1.75;
    font-size: 1.05rem;
    margin-bottom: 18px;
}

.concept-box {
    border: 1px solid rgba(248, 113, 113, 0.22);
    background:
        linear-gradient(135deg, rgba(127, 29, 29, 0.28), rgba(20, 12, 12, 0.62));
    border-radius: 18px;
    padding: 14px;
    color: #fecaca;
    line-height: 1.55;
    margin: 18px 0;
}

.players {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.player-box {
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(10, 10, 12, 0.62);
    border-radius: 20px;
    padding: 16px;
}

.player-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #fff7ed;
    font-weight: 900;
    margin-bottom: 12px;
}

.player-title span {
    color: var(--muted);
    font-weight: 600;
    font-size: 0.85rem;
}

.option {
    width: 100%;
    text-align: left;
    margin: 8px 0;
    padding: 13px;
    border-radius: 15px;
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(255,255,255,0.045);
    color: #f4efe7;
    transition: 0.16s ease;
}

.option:hover {
    border-color: rgba(248, 113, 113, 0.48);
    transform: translateY(-1px);
    background: rgba(127, 29, 29, 0.20);
    box-shadow: 0 12px 28px rgba(0,0,0,0.22);
}

.option.selected {
    border-color: #ef4444;
    background: rgba(127, 29, 29, 0.34);
    box-shadow:
        0 0 0 3px rgba(239, 68, 68, 0.12),
        inset 0 0 22px rgba(239, 68, 68, 0.08);
}

.option strong {
    display: block;
    margin-bottom: 4px;
    color: #fff7ed;
}

.option span {
    color: #b9afa7;
    font-size: 0.9rem;
    line-height: 1.35;
    display: block;
}

.score-card {
    padding: 18px;
}

.score-card h3 {
    margin: 0 0 14px;
    font-size: 1rem;
    color: #fff7ed;
}

.metric {
    margin-bottom: 16px;
}

.metric-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.88rem;
    color: #d6ccc2;
    margin-bottom: 7px;
}

.bar {
    height: 11px;
    background: rgba(255,255,255,0.10);
    border-radius: 999px;
    overflow: hidden;
}

.fill {
    height: 100%;
    border-radius: inherit;
    width: 50%;
    transition: width 0.45s ease;
    background: linear-gradient(90deg, #ef4444, #f97316);
    box-shadow: 0 0 18px rgba(239, 68, 68, 0.32);
}

.mini-score {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 16px;
}

.mini {
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(255,255,255,0.045);
    border-radius: 16px;
    padding: 12px;
    text-align: center;
}

.mini b {
    display: block;
    font-size: 1.8rem;
    color: #fb7185;
}

.mini span {
    color: var(--muted);
    font-size: 0.82rem;
}

.feedback {
    display: none;
    margin-top: 18px;
    border: 1px solid rgba(251, 113, 133, 0.30);
    background:
        linear-gradient(135deg, rgba(76, 5, 25, 0.36), rgba(12,12,15,0.78));
    border-radius: 18px;
    padding: 16px;
    line-height: 1.6;
    color: #ffe4e6;
}

.feedback.active {
    display: block;
}

.feedback h3 {
    margin: 0 0 8px;
    color: #fecaca;
}

.feedback p {
    margin: 8px 0;
    color: #f5d0d0;
}

.result-layout {
    display: grid;
    grid-template-columns: 0.95fr 1.05fr;
    gap: 18px;
    align-items: stretch;
}

.result-card {
    padding: clamp(22px, 4vw, 40px);
}

.result-card h2 {
    font-size: clamp(2.2rem, 6vw, 4.5rem);
    line-height: 0.9;
    letter-spacing: -0.07em;
    margin: 0 0 14px;
    color: #ef4444;
    text-shadow: 0 0 34px rgba(239, 68, 68, 0.30);
}

.result-card p {
    color: #d6ccc2;
    line-height: 1.75;
}

.log {
    max-height: 430px;
    overflow: auto;
    padding-right: 8px;
}

.log-item {
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(10, 10, 12, 0.58);
    border-radius: 16px;
    padding: 13px;
    margin-bottom: 10px;
    color: #c9bdb4;
    line-height: 1.55;
}

.log-item strong {
    color: #fff7ed;
}

.hidden {
    display: none !important;
}

@media (max-width: 900px) {
    .hero,
    .main-grid,
    .result-layout {
        grid-template-columns: 1fr;
    }

    .visual {
        min-height: 360px;
    }
}

@media (max-width: 680px) {
    .topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .players {
        grid-template-columns: 1fr;
    }

    .round-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .app {
        width: min(100% - 22px, 1180px);
        padding-top: 16px;
    }

    .pill {
        white-space: normal;
    }
}