        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Arial', sans-serif;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            min-height: 100vh;
            color: white;
        }

        .container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 20px;
        }

        .header {
            text-align: center;
            margin-bottom: 30px;
            background: rgba(255, 255, 255, 0.1);
            padding: 20px;
            border-radius: 15px;
            backdrop-filter: blur(10px);
        }

        .header h1 {
            font-size: 2.5em;
            margin-bottom: 10px;
            text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
        }

        .setup-section {
            background: rgba(255, 255, 255, 0.1);
            padding: 20px;
            border-radius: 15px;
            margin-bottom: 20px;
            backdrop-filter: blur(10px);
        }

        .setup-section h2 {
            margin-bottom: 15px;
            color: #ffeb3b;
        }

        .group-setup {
            display: flex;
            gap: 10px;
            margin-bottom: 15px;
            align-items: center;
            flex-direction: column;
        }

        .group-setup input {
            padding: 10px;
            border: none;
            border-radius: 8px;
            background: rgba(255, 255, 255, 0.9);
            color: #333;
        }

        .group-setup button {
            padding: 10px 15px;
            background: #4caf50;
            color: white;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            transition: background 0.3s;
        }

        .group-setup button:hover {
            background: #45a049;
        }

        .groups-container {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 20px;
            margin-bottom: 20px;
        }

        .group {
            background: rgba(255, 255, 255, 0.15);
            padding: 20px;
            border-radius: 15px;
            backdrop-filter: blur(10px);
            border: 2px solid transparent;
            transition: all 0.3s;
        }

        .group.highlight {
            border-color: #ffeb3b;
            transform: scale(1.05);
            box-shadow: 0 0 20px rgba(255, 235, 59, 0.5);
        }

        .group h3 {
            margin-bottom: 15px;
            color: #ffeb3b;
            text-align: center;
        }

        .group .score {
            text-align: center;
            font-size: 1.5em;
            font-weight: bold;
            margin-bottom: 15px;
            color: #4caf50;
        }

        .group .badges {
            display: flex;
            justify-content: center;
            gap: 5px;
            margin-bottom: 15px;
        }

        .badge {
            width: 25px;
            height: 25px;
            border-radius: 50%;
            display: inline-block;
            font-size: 12px;
            text-align: center;
            line-height: 25px;
        }

        .badge.gold { background: #ffd700; color: #333; }
        .badge.silver { background: #c0c0c0; color: #333; }
        .badge.bronze { background: #cd7f32; color: white; }
        .badge.fire { background: #ff4444; }
        .badge.star { background: #ffeb3b; color: #333; }

        .players-list {
            list-style: none;
        }

        .players-list li {
            background: rgba(255, 255, 255, 0.2);
            padding: 8px;
            margin: 5px 0;
            border-radius: 8px;
            transition: all 0.3s;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .players-list li.selected {
            background: #ff4444;
            transform: scale(1.05);
            animation: pulse 1s infinite;
        }

        .player-name {
            flex: 1;
        }

        .player-stats {
            display: flex;
            gap: 8px;
            align-items: center;
            font-size: 0.9em;
        }

        .correct-count {
            background: #4caf50;
            color: white;
            padding: 2px 6px;
            border-radius: 10px;
            font-size: 0.8em;
            font-weight: bold;
            min-width: 20px;
            text-align: center;
        }

        .accuracy-badge {
            background: #2196f3;
            color: white;
            padding: 2px 6px;
            border-radius: 10px;
            font-size: 0.7em;
            font-weight: bold;
        }

        .top-player {
            position: relative;
        }

        .top-player::after {
            content: "🏆";
            position: absolute;
            right: -5px;
            top: -5px;
            font-size: 0.8em;
        }

        .player-stats .streak {
            background: #ff9800;
            color: white;
            padding: 2px 4px;
            border-radius: 8px;
            font-size: 0.7em;
            font-weight: bold;
        }

        .team-stats {
            text-align: center;
            margin: 10px 0;
            padding: 8px;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 8px;
            font-size: 0.9em;
        }

        .team-stats .stat-item {
            margin: 2px 0;
        }

        @keyframes pulse {
            0% { transform: scale(1.05); }
            50% { transform: scale(1.1); }
            100% { transform: scale(1.05); }
        }

        .player-input {
            display: flex;
            gap: 10px;
            margin-top: 10px;
        }

        .player-input input {
            flex: 1;
            padding: 8px;
            border: none;
            border-radius: 8px;
            background: rgba(255, 255, 255, 0.9);
            color: #333;
        }

        .player-input button {
            padding: 8px 12px;
            background: #2196f3;
            color: white;
            border: none;
            border-radius: 8px;
            cursor: pointer;
        }

        .delete-button {
            background: #f44336 !important;
            padding: 4px 8px !important;
            font-size: 0.8em;
            margin-left: 5px;
            transition: all 0.3s;
        }

        .delete-button:hover {
            background: #d32f2f !important;
            transform: scale(1.1);
        }

        .group-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 15px;
        }

        .group-header h3 {
            margin: 0;
        }

        .delete-group-button {
            background: #f44336;
            color: white;
            border: none;
            border-radius: 8px;
            padding: 6px 12px;
            cursor: pointer;
            font-size: 0.9em;
            transition: all 0.3s;
        }

        .delete-group-button:hover {
            background: #d32f2f;
            transform: scale(1.05);
        }

        .game-controls {
            text-align: center;
            margin: 30px 0;
        }

        .game-controls button {
            padding: 15px 30px;
            font-size: 1.2em;
            background: #ff4444;
            color: white;
            border: none;
            border-radius: 15px;
            cursor: pointer;
            margin: 10px 10px;
            transition: all 0.3s;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
        }
        .game-controls button:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(0,0,0,0.3);
        }

        .game-controls button:disabled {
            background: #666;
            cursor: not-allowed;
            transform: none;
        }

        .round-info {
            background: rgba(255, 255, 255, 0.1);
            padding: 15px;
            border-radius: 10px;
            margin: 20px 0;
            text-align: center;
            backdrop-filter: blur(10px);
            display: none;
        }

        .round-info.show {
            display: block;
            animation: fadeIn 0.5s;
        }

        .round-info h3 {
            color: #ffeb3b;
            margin-bottom: 10px;
        }

        .round-progress {
            background: rgba(255, 255, 255, 0.2);
            border-radius: 10px;
            height: 10px;
            margin: 10px 0;
            overflow: hidden;
        }

        .round-progress-bar {
            background: linear-gradient(45deg, #4caf50, #8bc34a);
            height: 100%;
            transition: width 0.3s ease;
        }

        .question-section {
            background: rgba(255, 255, 255, 0.1);
            padding: 30px;
            border-radius: 15px;
            margin: 20px 0;
            backdrop-filter: blur(10px);
            display: none;
        }

        .question-section.show {
            display: block;
            animation: fadeIn 0.5s;
        }

        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(20px); }
            to { opacity: 1; transform: translateY(0); }
        }

        .question-image {
            text-align: center;
            margin-bottom: 20px;
        }

        .question-image img {
            max-width: 500px;
            max-height: 300px;
            border-radius: 10px;
            box-shadow: 0 4px 15px rgba(0,0,0,0.3);
            margin: auto;
        }

        .question-text {
            font-size: 1.3em;
            text-align: center;
            margin-bottom: 25px;
            color: #ffeb3b;
            line-height: 1.5;
            max-width: 800px;
            margin-left: auto;
            margin-right: auto;
            word-wrap: break-word;
            overflow-wrap: break-word;
        }

        @media (max-width: 768px) {
            .question-text {
                font-size: 1.1em;
                line-height: 1.4;
                margin-bottom: 20px;
            }
        }

        .options {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
            gap: 15px;
            margin-bottom: 20px;
            align-items: stretch;
        }

        .options_ABCD {
            display: grid;
            /* 2 columnas de 280px cada una */
            grid-template-columns: repeat(2, 280px);
            /* 2 filas de alto automático */
            grid-template-rows: repeat(2, auto);
            gap: 15px;
            /* centra el conjunto de celdas en el contenedor */
            justify-content: center;
            margin: 0 auto 20px;
            }

            /* Asegura que cada tarjeta tenga ese ancho fijo */
            .options_ABCD > div {
            width: 280px;
            }


        .option {
            padding: 20px;
            background: rgba(255, 255, 255, 0.2);
            border: 2px solid transparent;
            border-radius: 10px;
            cursor: pointer;
            transition: all 0.3s;
            text-align: center;
            display: flex;
            align-items: center;
            justify-content: center;
            min-height: 80px;
            word-wrap: break-word;
            overflow-wrap: break-word;
            hyphens: auto;
            line-height: 1.4;
        }

        @media (max-width: 768px) {
            .options {
                grid-template-columns: 1fr;
                gap: 12px;
            }
            
            .option {
                min-height: 60px;
                padding: 15px;
                font-size: 0.9em;
            }
        }

        .option:hover {
            background: rgba(255, 255, 255, 0.3);
            transform: translateY(-2px);
        }

        .option.correct {
            background: #4caf50;
            border-color: #4caf50;
        }

        .option.incorrect {
            background: #f44336;
            border-color: #f44336;
        }

        .modal {
            display: none;
            position: fixed;
            z-index: 1000;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0,0,0,0.7);
            backdrop-filter: blur(5px);
        }

        .modal.show {
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .modal-content {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            padding: 30px;
            border-radius: 15px;
            text-align: center;
            max-width: 500px;
            width: 90%;
            box-shadow: 0 10px 30px rgba(0,0,0,0.5);
        }

        .modal-content h2 {
            color: #ffeb3b;
            margin-bottom: 20px;
        }

        .modal-content p {
            margin-bottom: 20px;
            font-size: 1.1em;
        }

        .modal-content button {
            padding: 12px 25px;
            background: #4caf50;
            color: white;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            font-size: 1.1em;
        }

        .leaderboard {
            background: rgba(255, 255, 255, 0.1);
            padding: 20px;
            border-radius: 15px;
            backdrop-filter: blur(10px);
        }

        .leaderboard h2 {
            text-align: center;
            color: #ffeb3b;
            margin-bottom: 20px;
        }

        .leaderboard-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 10px;
            margin: 5px 0;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 8px;
        }

        .leaderboard-item.first {
            background: linear-gradient(45deg, #ffd700, #ffed4a);
            color: #333;
        }

        .leaderboard-item.second {
            background: linear-gradient(45deg, #c0c0c0, #e2e8f0);
            color: #333;
        }

        .leaderboard-item.third {
            background: linear-gradient(45deg, #cd7f32, #d69e2e);
            color: white;
        }

        .individual-stat-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 12px;
            margin: 5px 0;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 8px;
            border-left: 4px solid transparent;
        }

        .individual-stat-item.top-performer {
            border-left-color: #ffd700;
            background: linear-gradient(45deg, rgba(255, 215, 0, 0.2), rgba(255, 237, 74, 0.2));
        }

        .individual-stat-item.good-performer {
            border-left-color: #4caf50;
            background: linear-gradient(45deg, rgba(76, 175, 80, 0.2), rgba(139, 195, 74, 0.2));
        }

        .individual-stat-item.needs-improvement {
            border-left-color: #ff9800;
            background: linear-gradient(45deg, rgba(255, 152, 0, 0.2), rgba(255, 193, 7, 0.2));
        }

        .player-info {
            display: flex;
            flex-direction: column;
        }

        .player-info .name {
            font-weight: bold;
            margin-bottom: 2px;
        }

        .player-info .team {
            font-size: 0.8em;
            opacity: 0.8;
        }

        .stats-details {
            text-align: right;
            display: flex;
            flex-direction: column;
            gap: 2px;
        }

        .stats-details .main-stat {
            font-size: 1.1em;
            font-weight: bold;
        }

        .stats-details .sub-stat {
            font-size: 0.8em;
            opacity: 0.8;
        }

        .performance-icon {
            margin-right: 8px;
            font-size: 1.2em;
        }

        .spinner {
            font-size: 1.2em;
            text-align: center;
            margin: 20px 0;
            color: #ffeb3b;
        }

        .current-player {
            text-align: center;
            font-size: 1.5em;
            margin: 20px 0;
            padding: 15px;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 10px;
            backdrop-filter: blur(10px);
        }

        .current-player.show {
            animation: slideIn 0.5s;
        }
.current-player.show {
            animation: slideIn 0.5s;
        }

        @keyframes slideIn {
            from { transform: translateX(-100%); opacity: 0; }
            to { transform: translateX(0); opacity: 1; }
        }

        /* Estilos para Game Over Modal */
        .game-over-modal {
            overflow-y: auto;
            padding: 20px;
        }

        .game-over-container {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            padding: 40px;
            border-radius: 20px;
            max-width: 900px;
            margin: 0 auto;
            box-shadow: 0 15px 40px rgba(0,0,0,0.5);
            animation: zoomIn 0.5s;
        }

        @keyframes zoomIn {
            from {
                transform: scale(0.8);
                opacity: 0;
            }
            to {
                transform: scale(1);
                opacity: 1;
            }
        }

        .game-over-title {
            text-align: center;
            font-size: 3em;
            margin-bottom: 10px;
            color: #ffeb3b;
            text-shadow: 3px 3px 6px rgba(0,0,0,0.5);
            animation: pulse 2s infinite;
        }

        .game-over-subtitle {
            text-align: center;
            font-size: 1.3em;
            margin-bottom: 30px;
            opacity: 0.9;
        }

        .final-stats-section {
            background: rgba(255, 255, 255, 0.1);
            padding: 20px;
            border-radius: 15px;
            margin-bottom: 20px;
            backdrop-filter: blur(10px);
        }

        .final-stats-section h2 {
            color: #ffeb3b;
            text-align: center;
            margin-bottom: 15px;
            font-size: 1.5em;
        }

        .winner-team {
            text-align: center;
            padding: 20px;
            background: linear-gradient(45deg, #ffd700, #ffed4a);
            color: #333;
            border-radius: 15px;
            box-shadow: 0 5px 20px rgba(255, 215, 0, 0.5);
        }

        .winner-team h3 {
            font-size: 2em;
            margin-bottom: 10px;
        }

        .winner-score {
            font-size: 2.5em;
            font-weight: bold;
            margin-bottom: 10px;
        }

        .winner-badges {
            font-size: 1.5em;
        }

        .mvp-player {
            text-align: center;
            padding: 20px;
            background: linear-gradient(45deg, #ff6b6b, #ff8e53);
            border-radius: 15px;
            color: white;
            box-shadow: 0 5px 20px rgba(255, 107, 107, 0.5);
        }

        .mvp-player h3 {
            font-size: 1.8em;
            margin-bottom: 10px;
        }

        .mvp-stats {
            font-size: 1.3em;
            font-weight: bold;
            margin: 10px 0;
        }

        .global-stats {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 15px;
            text-align: center;
        }

        .global-stats p {
            background: rgba(255, 255, 255, 0.1);
            padding: 15px;
            border-radius: 10px;
            font-size: 1.1em;
        }

        .final-team-ranking {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .final-team-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 15px;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 10px;
            transition: all 0.3s;
        }

        .final-team-item.winner {
            background: linear-gradient(45deg, rgba(255, 215, 0, 0.3), rgba(255, 237, 74, 0.3));
            border: 2px solid #ffd700;
        }

        .final-team-item:hover {
            transform: translateX(5px);
            background: rgba(255, 255, 255, 0.2);
        }

        .position {
            font-size: 1.5em;
            font-weight: bold;
            min-width: 40px;
        }

        .team-name {
            flex: 1;
            font-size: 1.2em;
            font-weight: bold;
            margin: 0 10px;
        }

        .team-final-score {
            font-size: 1.3em;
            font-weight: bold;
            color: #4caf50;
        }

        .team-accuracy {
            font-size: 0.9em;
            opacity: 0.8;
            margin-left: 10px;
        }

        .final-player-ranking {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .final-player-item {
            display: flex;
            align-items: center;
            padding: 12px;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 10px;
            gap: 10px;
        }

        .player-position {
            font-size: 1.2em;
            font-weight: bold;
            min-width: 50px;
        }

        .player-team {
            font-size: 0.9em;
            opacity: 0.8;
            margin-left: 5px;
        }

        .player-final-stats {
            margin-left: auto;
            font-weight: bold;
            color: #4caf50;
        }

        .game-over-actions {
            display: flex;
            justify-content: center;
            gap: 20px;
            margin-top: 30px;
        }

        .download-stats-btn,
        .new-game-btn {
            padding: 15px 30px;
            font-size: 1.2em;
            border: none;
            border-radius: 15px;
            cursor: pointer;
            transition: all 0.3s;
            font-weight: bold;
            box-shadow: 0 4px 15px rgba(0,0,0,0.3);
        }

        .download-stats-btn {
            background: #2196f3;
            color: white;
        }

        .download-stats-btn:hover {
            background: #1976d2;
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(0,0,0,0.4);
        }

        .new-game-btn {
            background: #4caf50;
            color: white;
        }

        .new-game-btn:hover {
            background: #45a049;
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(0,0,0,0.4);
        }

        @media (max-width: 768px) {
            .game-over-container {
                padding: 20px;
            }
            
            .game-over-title {
                font-size: 2em;
            }
            
            .global-stats {
                grid-template-columns: 1fr;
            }
            
            .game-over-actions {
                flex-direction: column;
            }
            
            .download-stats-btn,
            .new-game-btn {
                width: 100%;
            }
        }
        @keyframes slideIn {
            from { transform: translateX(-100%); opacity: 0; }
            to { transform: translateX(0); opacity: 1; }
        }