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

        :root {
            --primary: #00ff88;
            --secondary: #ff00ff;
            --accent: #00ffff;
            --dark: #0a0a0f;
            --darker: #050508;
            --light: #ffffff;
            --gray: #888;
            --danger: #ff3366;
            --warning: #ffaa00;
            --success: #00ff88;
            --red: #dc143c;
            --green: #228b22;
            --cream: #f5deb3;
        }

        body {
            font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
            background: linear-gradient(135deg, var(--darker) 0%, var(--dark) 100%);
            color: var(--light);
            min-height: 100vh;
            overflow-x: hidden;
        }

        .container {
            max-width: 1400px;
            margin: 0 auto;
            padding: 20px;
        }

        header {
            text-align: center;
            padding: 30px 0;
            position: relative;
        }

        h1 {
            font-size: 3em;
            font-weight: 300;
            letter-spacing: 3px;
            background: linear-gradient(45deg, var(--primary), var(--accent));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            text-transform: uppercase;
            margin-bottom: 10px;
            animation: glow 2s ease-in-out infinite alternate;
        }

        @keyframes glow {
            from { filter: drop-shadow(0 0 20px rgba(0, 255, 136, 0.5)); }
            to { filter: drop-shadow(0 0 30px rgba(0, 255, 255, 0.8)); }
        }

        .game-setup {
            background: rgba(255, 255, 255, 0.05);
            backdrop-filter: blur(10px);
            border-radius: 20px;
            padding: 30px;
            margin-bottom: 30px;
            border: 1px solid rgba(255, 255, 255, 0.1);
            transition: all 0.3s ease;
        }

        .game-setup.hidden {
            display: none;
        }

        .setup-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 20px;
            margin-bottom: 20px;
        }

        .input-group {
            display: flex;
            flex-direction: column;
        }

        label {
            color: var(--accent);
            margin-bottom: 8px;
            font-size: 0.9em;
            text-transform: uppercase;
            letter-spacing: 1px;
        }

        input, select {
            background: rgba(255, 255, 255, 0.1);
            border: 2px solid rgba(255, 255, 255, 0.2);
            border-radius: 10px;
            padding: 12px;
            color: var(--light);
            font-size: 1em;
            transition: all 0.3s ease;
            cursor: pointer;
            appearance: none;
            -webkit-appearance: none;
            -moz-appearance: none;
        }

        /* Custom dropdown arrow */
        select {
            background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
            background-repeat: no-repeat;
            background-position: right 12px center;
            background-size: 20px;
            padding-right: 40px;
        }

        select option {
            background: var(--dark);
            color: var(--light);
            padding: 10px;
            border: none;
        }

        input:focus, select:focus {
            outline: none;
            border-color: var(--primary);
            background: rgba(255, 255, 255, 0.15);
            box-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
        }

        button {
            background: linear-gradient(45deg, var(--primary), var(--accent));
            border: none;
            border-radius: 10px;
            padding: 12px 30px;
            color: var(--dark);
            font-weight: 600;
            font-size: 1em;
            cursor: pointer;
            transition: all 0.3s ease;
            text-transform: uppercase;
            letter-spacing: 1px;
            position: relative;
            overflow: hidden;
        }

        button::before {
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            width: 0;
            height: 0;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.5);
            transform: translate(-50%, -50%);
            transition: width 0.6s, height 0.6s;
        }

        button:hover::before {
            width: 300px;
            height: 300px;
        }

        button:hover {
            transform: translateY(-2px);
            box-shadow: 0 10px 30px rgba(0, 255, 136, 0.4);
        }

        .game-area {
            display: grid;
            grid-template-columns: 1fr 2fr 1fr;
            gap: 30px;
            opacity: 0;
            transform: translateY(20px);
            transition: all 0.5s ease;
        }

        .game-area.active {
            opacity: 1;
            transform: translateY(0);
        }

        .players-panel, .score-input-panel, .history-panel {
            background: rgba(255, 255, 255, 0.05);
            backdrop-filter: blur(10px);
            border-radius: 20px;
            padding: 20px;
            border: 1px solid rgba(255, 255, 255, 0.1);
        }

        .player-card {
            background: rgba(255, 255, 255, 0.03);
            border-radius: 15px;
            padding: 20px;
            margin-bottom: 15px;
            border: 2px solid transparent;
            transition: all 0.3s ease;
            position: relative;
            overflow: hidden;
        }

        .player-card.active {
            border-color: var(--primary);
            background: rgba(0, 255, 136, 0.1);
            box-shadow: 0 0 30px rgba(0, 255, 136, 0.3);
        }

        .player-card.winner {
            background: linear-gradient(45deg, rgba(255, 215, 0, 0.2), rgba(255, 255, 0, 0.1));
            border-color: gold;
            animation: pulse 1s infinite;
        }

        @keyframes pulse {
            0%, 100% { transform: scale(1); }
            50% { transform: scale(1.02); }
        }

        .player-name {
            font-size: 1.3em;
            font-weight: 600;
            margin-bottom: 10px;
            color: var(--accent);
        }

        .player-score {
            font-size: 3em;
            font-weight: 300;
            margin: 10px 0;
            background: linear-gradient(45deg, var(--light), var(--gray));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }

        .player-stats {
            display: flex;
            justify-content: space-between;
            margin-top: 15px;
            padding-top: 15px;
            border-top: 1px solid rgba(255, 255, 255, 0.1);
        }

        .stat {
            text-align: center;
        }

        .stat-label {
            font-size: 0.8em;
            color: var(--gray);
            text-transform: uppercase;
            letter-spacing: 1px;
        }

        .stat-value {
            font-size: 1.2em;
            font-weight: 600;
            color: var(--primary);
            margin-top: 5px;
        }

        .dart-board-container {
            display: flex;
            flex-direction: column;
            align-items: center;
            margin-bottom: 30px;
        }

        .dart-board {
            width: 100%;
            max-width: 380px;
            height: 380px;
            position: relative;
            filter: drop-shadow(0 0 30px rgba(0, 255, 136, 0.3));
        }

        .dart-board svg {
            width: 100%;
            height: 100%;
        }

        .board-section {
            transition: all 0.2s ease;
            cursor: pointer;
        }

        .board-section:hover {
            filter: brightness(1.2);
            transform: scale(1.02);
        }

        .board-text {
            pointer-events: none;
            user-select: none;
            font-weight: bold;
            font-size: 14px;
            fill: white;
            text-shadow: 0 0 8px rgba(0, 0, 0, 0.9);
            filter: drop-shadow(0 0 2px rgba(0, 0, 0, 1));
        }

        .quick-scores {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 10px;
            margin-bottom: 20px;
        }

        .quick-btn {
            background: rgba(255, 255, 255, 0.1);
            border: 2px solid rgba(255, 255, 255, 0.2);
            border-radius: 10px;
            padding: 12px;
            color: var(--light);
            font-size: 0.95em;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .quick-btn:hover {
            background: rgba(0, 255, 136, 0.2);
            border-color: var(--primary);
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(0, 255, 136, 0.3);
        }

        .quick-btn.special {
            background: linear-gradient(45deg, rgba(255, 0, 255, 0.2), rgba(0, 255, 255, 0.2));
            border-color: var(--secondary);
        }

        .quick-btn.special:hover {
            background: linear-gradient(45deg, rgba(255, 0, 255, 0.4), rgba(0, 255, 255, 0.4));
        }

        .current-throw {
            background: rgba(255, 255, 255, 0.03);
            border-radius: 15px;
            padding: 20px;
            margin-bottom: 20px;
            text-align: center;
        }

        .throw-darts {
            display: flex;
            justify-content: center;
            gap: 15px;
            margin: 20px 0;
        }

        .dart-indicator {
            width: 50px;
            height: 50px;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.1);
            border: 2px solid rgba(255, 255, 255, 0.2);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.2em;
            transition: all 0.3s ease;
        }

        .dart-indicator.thrown {
            background: linear-gradient(45deg, var(--primary), var(--accent));
            border-color: var(--primary);
            animation: dartThrow 0.5s ease;
        }

        @keyframes dartThrow {
            0% { transform: scale(0) rotate(0deg); }
            50% { transform: scale(1.2) rotate(180deg); }
            100% { transform: scale(1) rotate(360deg); }
        }

        .action-buttons {
            display: flex;
            gap: 10px;
            justify-content: center;
            margin-top: 20px;
        }

        .btn-secondary {
            background: rgba(255, 255, 255, 0.1);
            border: 2px solid rgba(255, 255, 255, 0.2);
            color: var(--light);
        }

        .btn-secondary:hover {
            background: rgba(255, 255, 255, 0.2);
            border-color: var(--primary);
        }

        .history-list {
            max-height: 400px;
            overflow-y: auto;
            padding-right: 10px;
        }

        .history-list::-webkit-scrollbar {
            width: 8px;
        }

        .history-list::-webkit-scrollbar-track {
            background: rgba(255, 255, 255, 0.05);
            border-radius: 10px;
        }

        .history-list::-webkit-scrollbar-thumb {
            background: var(--primary);
            border-radius: 10px;
        }

        .history-item {
            background: rgba(255, 255, 255, 0.03);
            border-radius: 10px;
            padding: 15px;
            margin-bottom: 10px;
            border-left: 3px solid var(--primary);
            transition: all 0.3s ease;
        }

        .history-item:hover {
            background: rgba(255, 255, 255, 0.05);
            transform: translateX(5px);
        }

        .history-player {
            color: var(--accent);
            font-weight: 600;
            margin-bottom: 5px;
        }

        .history-throw {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .throw-scores {
            display: flex;
            gap: 10px;
        }

        .throw-score {
            background: rgba(0, 255, 136, 0.2);
            padding: 5px 10px;
            border-radius: 5px;
            font-weight: 600;
        }

        .modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.8);
            backdrop-filter: blur(5px);
            z-index: 1000;
            align-items: center;
            justify-content: center;
        }

        .modal.active {
            display: flex;
            animation: fadeIn 0.3s ease;
        }

        @keyframes fadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }

        .modal-content {
            background: linear-gradient(135deg, var(--dark), var(--darker));
            border-radius: 20px;
            padding: 40px;
            max-width: 500px;
            text-align: center;
            border: 2px solid var(--primary);
            box-shadow: 0 0 50px rgba(0, 255, 136, 0.5);
        }

        .winner-text {
            font-size: 2.5em;
            margin-bottom: 20px;
            background: linear-gradient(45deg, gold, var(--warning));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }

        @media (max-width: 1024px) {
            .game-area {
                grid-template-columns: 1fr;
            }
            
            h1 {
                font-size: 2em;
            }
        }

        .notification {
            position: fixed;
            top: 20px;
            right: 20px;
            padding: 15px 25px;
            border-radius: 10px;
            background: rgba(255, 255, 255, 0.95);
            color: var(--dark);
            font-weight: 600;
            transform: translateX(400px);
            transition: transform 0.3s ease;
            z-index: 2000;
        }

        .notification.show {
            transform: translateX(0);
        }

        .notification.bust {
            background: var(--danger);
            color: white;
        }

        .notification.success {
            background: var(--success);
            color: white;
        }

        .legend {
            display: flex;
            justify-content: center;
            gap: 15px;
            margin-top: 15px;
            font-size: 0.85em;
            flex-wrap: wrap;
        }

        .legend-item {
            display: flex;
            align-items: center;
            gap: 5px;
        }

        .legend-color {
            width: 15px;
            height: 15px;
            border-radius: 3px;
        }

        .debug-info {
            position: fixed;
            bottom: 10px;
            left: 10px;
            background: rgba(0, 0, 0, 0.8);
            color: white;
            padding: 10px;
            border-radius: 5px;
            font-size: 12px;
            font-family: monospace;
        }

        .checkout-helper {
            background: linear-gradient(45deg, rgba(255, 215, 0, 0.1), rgba(255, 140, 0, 0.1));
            border: 2px solid rgba(255, 215, 0, 0.3);
            border-radius: 15px;
            padding: 20px;
            margin-bottom: 20px;
            text-align: center;
        }

        .checkout-title {
            color: gold;
            font-size: 1.2em;
            font-weight: 600;
            margin-bottom: 15px;
            text-transform: uppercase;
            letter-spacing: 1px;
        }

        .checkout-options {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .checkout-option {
            background: rgba(255, 255, 255, 0.05);
            border-radius: 10px;
            padding: 12px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            transition: all 0.3s ease;
            cursor: pointer;
        }

        .checkout-option:hover {
            background: rgba(255, 215, 0, 0.2);
            transform: translateX(5px);
        }

        .checkout-darts {
            display: flex;
            gap: 8px;
        }

        .checkout-dart {
            background: rgba(255, 255, 255, 0.1);
            padding: 4px 8px;
            border-radius: 5px;
            font-weight: 600;
            font-size: 0.9em;
        }

        .checkout-total {
            color: var(--primary);
            font-weight: 600;
        }

        .no-checkout {
            color: var(--gray);
            font-style: italic;
            padding: 10px;
        }