 :root {
            --bg: #1a1a2e;
            --text: #ffffff;
            --card-bg: #1e2235;
            --primary: #4ecdc4;
            --danger: #ff6b6b;
            --success: #10b981;
            --result-bg: #2a2f45;
            --highlight: #ffd700;
        }

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

        body {
            background: var(--bg);
            font-family: 'Inter', sans-serif;
            color: var(--text);
            display: flex;
            flex-direction: column;
            height: 100vh;
            overflow: hidden;
        }

        /* === ЭТАП 1: НАСТРОЙКА === */
        #setupScreen {
            flex: 1;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 20px;
        }

        .setup-card {
            background: var(--card-bg);
            padding: 40px;
            border-radius: 20px;
            text-align: center;
            box-shadow: 0 10px 30px rgba(0,0,0,0.5);
            width: 100%;
            max-width: 400px;
        }

        .setup-card h1 {
            margin-bottom: 10px;
            font-size: 28px;
        }

        .player-row {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-bottom: 15px;
            padding: 10px;
            background: #2a2f45;
            border-radius: 12px;
        }

        .player-row input {
            flex: 1;
            padding: 10px;
            border: none;
            border-radius: 8px;
            font-size: 16px;
        }

        .counter {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 20px;
            margin: 30px 0;
        }

        .counter-btn {
            width: 50px;
            height: 50px;
            border-radius: 50%;
            border: none;
            font-size: 24px;
            font-weight: bold;
            cursor: pointer;
            background: var(--primary);
            color: #111;
        }

        .counter-btn:hover {
            background: #45c7b9;
        }

        .start-btn {
            width: 100%;
            padding: 15px;
            background: var(--primary);
            color: #111;
            border: none;
            border-radius: 12px;
            font-size: 18px;
            font-weight: bold;
            cursor: pointer;
        }

        .start-btn:hover {
            background: #45c7b9;
        }

        /* === ЭТАП 2: ИГРА === */
        #gameScreen {
            flex: 1;
            display: none;
            flex-direction: column;
            position: relative;
        }

        .players-panel {
            padding: 15px;
            display: flex;
            gap: 15px;
            flex-wrap: wrap;
            justify-content: center;
            background: var(--card-bg);
            border-bottom: 1px solid #333;
        }

        .player {
            padding: 8px 16px;
            background: #2a2f45;
            border-radius: 25px;
            font-weight: 600;
        }

        .player.active {
            background: var(--primary);
            color: #111;
            animation: pulsePlayer 1.5s infinite;
        }

        @keyframes pulsePlayer {
            0% { box-shadow: 0 0 0 0 var(--highlight); }
            70% { box-shadow: 0 0 0 10px rgba(255, 215, 0, 0); }
            100% { box-shadow: 0 0 0 0 rgba(255, 215, 0, 0); }
        }

        .wheel-container {
            flex: 1;
            display: flex;
            align-items: center;
            justify-content: center;
            position: relative;
        }

        #wheelCanvas {
            border-radius: 50%;
            box-shadow: 0 0 30px rgba(255, 255, 255, 0.3);
            cursor: pointer;
            transition: transform 4s cubic-bezier(0.25, 0.1, 0.25, 1);
        }

        #spinBtn {
            position: absolute;
            bottom: 40px;
            left: 50%;
            transform: translateX(-50%);
            padding: 15px 40px;
            background: var(--primary);
            color: #111;
            border: none;
            border-radius: 50px;
            font-size: 18px;
            font-weight: bold;
            cursor: pointer;
            box-shadow: 0 5px 15px rgba(78, 205, 196, 0.4);
        }

        #spinBtn:disabled {
            background: #555;
            cursor: not-allowed;
            box-shadow: none;
        }

        /* СТРЕЛКА */
        .arrow {
            position: absolute;
            top: -30px;
            left: 50%;
            transform: translateX(-50%);
            width: 0;
            height: 0;
            border-left: 20px solid transparent;
            border-right: 20px solid transparent;
            border-bottom: 30px solid var(--primary);
            z-index: 20;
        }

        /* БЛОК РЕЗУЛЬТАТА */
        #resultBox {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            background: var(--result-bg);
            padding: 30px 40px;
            border-radius: 20px;
            text-align: center;
            box-shadow: 0 10px 30px rgba(0,0,0,0.5);
            z-index: 10;
            display: none;
            max-width: 400px;
            border: 2px solid var(--primary);
        }

        #resultBox h2 {
            margin-top: 0;
            color: var(--primary);
            font-size: 22px;
        }

        #resultBox p {
            font-size: 18px;
            color: #ccc;
            margin-bottom: 20px;
        }

        #resultBox.correct {
            border-color: var(--success);
        }

        #resultBox.wrong {
            border-color: var(--danger);
        }

        /* Блок вопроса */
        #questionBox {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(10px);
            padding: 30px;
            border-radius: 20px;
            text-align: center;
            box-shadow: 0 10px 30px rgba(0,0,0,0.5);
            z-index: 11;
            display: none;
            max-width: 500px;
        }

        #questionBox h2 {
            margin-top: 0;
            color: #111;
        }

        #questionBox .topic-label {
            display: inline-block;
            padding: 5px 12px;
            background: var(--primary);
            color: #111;
            border-radius: 15px;
            font-size: 14px;
            font-weight: 600;
            margin-bottom: 15px;
        }

        #questionBox p {
            font-size: 18px;
            color: #333;
            margin-bottom: 20px;
        }

        .answer-btn {
            display: block;
            width: 100%;
            padding: 12px;
            margin: 8px 0;
            background: #e5e7eb;
            border: none;
            border-radius: 10px;
            font-size: 16px;
            font-weight: 500;
            color: #111;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .answer-btn:hover {
            background: #d1d5db;
        }

        .answer-btn.correct {
            background: var(--success);
            color: white;
        }

        .answer-btn.wrong {
            background: var(--danger);
            color: white;
        }