        @import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Roboto:wght@300;400;500;700&display=swap');
        
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Roboto', sans-serif;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            min-height: 100vh;
            overflow-x: auto;
            position: relative;
        }

        /* Partículas de fondo */
        .particles {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            pointer-events: none;
            z-index: 1;
        }

        .particle {
            position: absolute;
            width: 4px;
            height: 4px;
            background: rgba(255, 255, 255, 0.5);
            border-radius: 50%;
            animation: float 6s ease-in-out infinite;
        }

        @keyframes float {
            0%, 100% { transform: translateY(0px) rotate(0deg); }
            50% { transform: translateY(-20px) rotate(180deg); }
        }

        .container {
            max-width: 1400px;
            margin: 0 auto;
            padding: 20px;
            position: relative;
            z-index: 2;
        }

        .header {
            text-align: center;
            margin-bottom: 30px;
            color: white;
        }

        .title {
            font-family: 'Orbitron', monospace;
            font-size: 2.5em;
            font-weight: 900;
            margin-bottom: 10px;
            text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
            background: linear-gradient(45deg, #FFD700, #FFA500, #FF6347);
            -webkit-background-clip: text;
            background-clip: text;
            -webkit-text-fill-color: transparent;
            color: transparent;
            animation: glow 2s ease-in-out infinite alternate;
        }

        @keyframes glow {
            from { text-shadow: 0 0 20px rgba(255, 215, 0, 0.5); }
            to { text-shadow: 0 0 40px rgba(255, 215, 0, 0.8); }
        }

        .subtitle {
            font-size: 1.2em;
            opacity: 0.9;
            margin-bottom: 20px;
        }

        .game-info {
            display: flex;
            justify-content: space-between;
            align-items: center;
            background: rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(10px);
            border-radius: 15px;
            padding: 20px;
            margin-bottom: 30px;
            border: 1px solid rgba(255, 255, 255, 0.2);
        }

        .score-section {
            display: flex;
            gap: 30px;
            align-items: center;
        }

        .score-item {
            text-align: center;
            color: white;
            padding: 15px 20px;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 10px;
            backdrop-filter: blur(5px);
            transition: all 0.3s ease;
        }

        .score-item:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
        }

        .score-label {
            font-size: 0.9em;
            opacity: 0.8;
            margin-bottom: 5px;
        }

        .score-value {
            font-family: 'Orbitron', monospace;
            font-size: 1.5em;
            font-weight: 700;
        }

        /* Botón de reinicio */
        .reset-game-btn {
            background: linear-gradient(45deg, #E74C3C, #C0392B);
            color: white;
            border: none;
            padding: 12px 20px;
            border-radius: 10px;
            font-size: 1em;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            margin-left: 20px;
        }

        .reset-game-btn:hover {
            background: linear-gradient(45deg, #C0392B, #A93226);
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(231, 76, 60, 0.4);
        }

        /* Sistema de Insignias */
        .badges-container {
            display: flex;
            gap: 10px;
            align-items: center;
        }

        .badge {
            width: 50px;
            height: 50px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.5em;
            position: relative;
            transition: all 0.3s ease;
            cursor: pointer;
            border: 2px solid rgba(255, 255, 255, 0.3);
        }

        .badge.locked {
            background: rgba(0, 0, 0, 0.3);
            color: rgba(255, 255, 255, 0.3);
        }

        .badge.unlocked {
            background: linear-gradient(45deg, #FFD700, #FFA500);
            color: white;
            box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
            animation: badgeGlow 2s ease-in-out infinite alternate;
        }

        @keyframes badgeGlow {
            from { box-shadow: 0 0 20px rgba(255, 215, 0, 0.5); }
            to { box-shadow: 0 0 30px rgba(255, 215, 0, 0.8); }
        }

        .badge:hover {
            transform: scale(1.1);
        }

        .badge-tooltip {
            position: absolute;
            bottom: -40px;
            left: 50%;
            transform: translateX(-50%);
            background: rgba(0, 0, 0, 0.8);
            color: white;
            padding: 5px 10px;
            border-radius: 5px;
            font-size: 0.8em;
            white-space: nowrap;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.3s ease;
            z-index: 1000;
        }

        .badge:hover .badge-tooltip {
            opacity: 1;
        }

        /* Game status */
        .game-status {
            text-align: center;
            color: white;
            font-size: 1.1em;
            margin-bottom: 20px;
            padding: 10px;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 10px;
            backdrop-filter: blur(5px);
        }

        /* Tabla Periódica */
        #board {
            display: grid;
            grid-template-columns: repeat(18, 1fr);
            gap: 3px;
            background: rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(10px);
            border-radius: 15px;
            padding: 20px;
            margin-bottom: 30px;
            border: 1px solid rgba(255, 255, 255, 0.2);
        }

        .cell {
            aspect-ratio: 1;
            border: 2px solid rgba(255, 255, 255, 0.3);
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 600;
            font-size: 0.9em;
            cursor: pointer;
            transition: all 0.3s ease;
            background: rgba(255, 255, 255, 0.1);
            color: white;
            position: relative;
            overflow: hidden;
        }

        .cell::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
            transition: left 0.5s ease;
        }

        .cell:hover::before {
            left: 100%;
        }

        .cell:hover {
            transform: scale(1.05);
            border-color: rgba(255, 255, 255, 0.6);
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
        }

        .cell.selected-player {
            background: linear-gradient(45deg, #FFD700, #FFA500) !important;
            border-color: #FFD700;
            box-shadow: 0 0 15px rgba(255, 215, 0, 0.6);
            animation: pulse 2s ease-in-out infinite;
        }

        @keyframes pulse {
            0%, 100% { transform: scale(1); }
            50% { transform: scale(1.05); }
        }

        .cell.hit {
            background: linear-gradient(45deg, #FF6B6B, #FF4757) !important;
            border-color: #FF6B6B;
            box-shadow: 0 0 20px rgba(255, 107, 107, 0.8);
            animation: explode 0.6s ease-out;
        }

        @keyframes explode {
            0% { transform: scale(1); }
            50% { transform: scale(1.3); background: #FFD700; }
            100% { transform: scale(1); }
        }

        .cell.miss {
            background: linear-gradient(45deg, #6C7B7F, #34495E) !important;
            border-color: #6C7B7F;
            opacity: 0.7;
        }

        /* Efectos de explosión mejorados */
        .ship_explote {
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 300px;
            height: 300px;
            border-radius: 50%;
            background: radial-gradient(circle, #FFD700 0%, #FF6B6B 50%, transparent 100%);
            animation: explosion 2s ease-out;
            pointer-events: none;
            z-index: 1000;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .explosion-image {
            width: 150px;
            height: 150px;
            font-size: 100px;
            animation: explodeImage 2s ease-out;
        }

        @keyframes explosion {
            0% { 
                transform: translate(-50%, -50%) scale(0);
                opacity: 1;
            }
            50% { 
                transform: translate(-50%, -50%) scale(1);
                opacity: 0.8;
            }
            100% { 
                transform: translate(-50%, -50%) scale(2);
                opacity: 0;
            }
        }

        @keyframes explodeImage {
            0% { 
                transform: scale(0) rotate(0deg);
                opacity: 0;
            }
            25% { 
                transform: scale(1.2) rotate(90deg);
                opacity: 1;
            }
            75% { 
                transform: scale(1.1) rotate(270deg);
                opacity: 0.8;
            }
            100% { 
                transform: scale(0) rotate(360deg);
                opacity: 0;
            }
        }

        /* Modales */
        .modal {
            display: none;
            position: fixed;
            z-index: 1000;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.8);
            backdrop-filter: blur(5px);
        }

    .modal-content {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        margin: 5% auto;
        padding: 30px;
        border-radius: 20px;
        width: 90%;
        max-width: 600px;
        border: 1px solid rgba(255, 255, 255, 0.2);
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
        color: white;
        position: relative;
        animation: modalSlideIn 0.5s ease-out;

        /* —— Añadido para scroll —— */
        max-height: 80vh;       /* o el valor que necesites */
        overflow-y: auto;       /* solo scroll vertical */
        /* overflow: auto;      para scroll en ambas direcciones */
    }

        @keyframes modalSlideIn {
            from { 
                opacity: 0;
                transform: translateY(-50px);
            }
            to { 
                opacity: 1;
                transform: translateY(0);
            }
        }

        .close {
            color: rgba(255, 255, 255, 0.7);
            float: right;
            font-size: 28px;
            font-weight: bold;
            cursor: pointer;
            transition: color 0.3s ease;
            position: absolute;
            top: 15px;
            right: 20px;
        }

        .close:hover {
            color: white;
        }

        .question-header {
            text-align: center;
            margin-bottom: 25px;
        }

        .question-image {
            max-width: 80px;
            height: auto;
            margin-bottom: 15px;
        }

        .timer {
            font-family: 'Orbitron', monospace;
            font-size: 1.5em;
            color: #FFD700;
            text-align: center;
            margin-bottom: 20px;
            text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
        }

        .question-text {
            font-size: 1.1em;
            line-height: 1.6;
            margin-bottom: 25px;
            text-align: center;
        }

        .options-container {
            display: flex;
            flex-direction: column;
            gap: 15px;
        }

        .option-button {
            padding: 15px 20px;
            border: 2px solid rgba(255, 255, 255, 0.3);
            border-radius: 10px;
            background: rgba(255, 255, 255, 0.1);
            color: white;
            font-size: 1em;
            cursor: pointer;
            transition: all 0.3s ease;
            text-align: left;
            backdrop-filter: blur(5px);
        }

        .option-button:hover:not(:disabled) {
            background: rgba(255, 255, 255, 0.2);
            border-color: rgba(255, 255, 255, 0.5);
            transform: translateX(10px);
        }

        .option-button.correct {
            background: linear-gradient(45deg, #2ECC71, #27AE60);
            border-color: #2ECC71;
            box-shadow: 0 0 15px rgba(46, 204, 113, 0.5);
        }

        .option-button.incorrect {
            background: linear-gradient(45deg, #E74C3C, #C0392B);
            border-color: #E74C3C;
            box-shadow: 0 0 15px rgba(231, 76, 60, 0.5);
        }

        .restart-button {
            background: linear-gradient(45deg, #3498DB, #2980B9);
            color: white;
            border: none;
            padding: 15px 30px;
            border-radius: 10px;
            font-size: 1.1em;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            margin-top: 20px;
        }

        .restart-button:hover {
            background: linear-gradient(45deg, #2980B9, #1F618D);
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
        }

        /* Notificaciones */
        .notification {
            position: fixed;
            top: 20px;
            right: 20px;
            background: linear-gradient(45deg, #2ECC71, #27AE60);
            color: white;
            padding: 15px 25px;
            border-radius: 10px;
            font-weight: 600;
            z-index: 1001;
            animation: slideInRight 0.5s ease-out;
            box-shadow: 0 5px 15px rgba(46, 204, 113, 0.3);
        }

        .notification.error {
            background: linear-gradient(45deg, #E74C3C, #C0392B);
            box-shadow: 0 5px 15px rgba(231, 76, 60, 0.3);
        }

        @keyframes slideInRight {
            from { 
                opacity: 0;
                transform: translateX(100px);
            }
            to { 
                opacity: 1;
                transform: translateX(0);
            }
        }

        /* Responsive */
        @media (max-width: 768px) {
            .container {
                padding: 10px;
            }

            .title {
                font-size: 2em;
            }

            #board {
                grid-template-columns: repeat(18, 1fr);
                gap: 2px;
                padding: 15px;
            }

            .cell {
                font-size: 0.7em;
            }

            .game-info {
                flex-direction: column;
                gap: 20px;
            }

            .score-section {
                flex-wrap: wrap;
                justify-content: center;
            }

            .reset-game-btn {
                margin: 10px 0;
            }
        }