        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        
        body {
            font-family: 'Courier New', monospace;
            background: #000;
            color: #0f0;
            overflow: hidden;
            cursor: crosshair;
        }
        
        #bgCanvas {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: 0;
        }
        
        .container {
            position: relative;
            z-index: 1;
            max-width: 800px;
            margin: 20px auto;
            padding: 0 20px;
            height: calc(100vh - 40px);
            overflow-y: auto;
        }
        
        .container::-webkit-scrollbar {
            width: 8px;
        }
        .container::-webkit-scrollbar-track {
            background: rgba(0, 255, 0, 0.1);
        }
        .container::-webkit-scrollbar-thumb {
            background: #0f0;
            border-radius: 4px;
        }
        
        h1 {
            text-align: center;
            color: #ff0;
            font-size: 28px;
            margin: 20px 0;
            text-shadow: 0 0 20px #ff0, 0 0 30px #ff0;
            animation: glow 2s ease-in-out infinite;
        }
        
        @keyframes glow {
            0%, 100% { text-shadow: 0 0 20px #ff0, 0 0 30px #ff0; }
            50% { text-shadow: 0 0 30px #ff0, 0 0 50px #ff0, 0 0 70px #ff0; }
        }
        
        .info-box {
            background: rgba(0, 20, 0, 0.9);
            border: 2px solid #0f0;
            border-radius: 10px;
            padding: 20px;
            margin: 15px 0;
            backdrop-filter: blur(10px);
            box-shadow: 0 0 20px rgba(0, 255, 0, 0.3);
            transition: all 0.3s;
        }
        
        .info-box:hover {
            transform: translateY(-5px);
            box-shadow: 0 5px 30px rgba(0, 255, 0, 0.5);
            border-color: #0ff;
        }
        
        .info-row {
            display: flex;
            justify-content: space-between;
            padding: 8px 0;
            border-bottom: 1px solid rgba(0, 255, 0, 0.2);
        }
        
        .info-row:last-child {
            border-bottom: none;
        }
        
        .info-label {
            color: #0ff;
            font-weight: bold;
        }
        
        .info-value {
            color: #0f0;
            text-align: right;
            word-break: break-all;
        }
        
        .suspicious-yes {
            color: #f00 !important;
            font-weight: bold;
            animation: blink 1s infinite;
        }
        
        @keyframes blink {
            0%, 50%, 100% { opacity: 1; }
            25%, 75% { opacity: 0.3; }
        }
        
		#snakeGame {
			position: fixed;
			top: 0;
			left: 0;
			width: 100dvw;
			height: 100dvh;
			background: rgba(0, 0, 0, 0.98);
			display: none;
			z-index: 9999;
			overflow: hidden;
		}

        
        #snakeCanvas {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;z-index: 2;
        }

        #fireworksCanvas {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            pointer-events: none;
            z-index: 4;
        }
 
.game-hud {
    position: absolute;
    bottom: 10px;          /* ⬇️ xuống dưới */
    left: 50%;
    transform: translateX(-50%);
    pointer-events: none;
    z-index: 3;
    width: 90%;
}  width:90%;
}
.hud-bg {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 10px;
    z-index: 1;
}
.hud-text {
    position: relative;
    z-index: 3;
    color: #0f0;
    padding: 10px 25px;
    font-size: 18px;
    text-align: center;
    text-shadow: 0 0 6px #0f0;
}

.snake-status {
    display: inline-block;      /* ⭐ quan trọng nhất */
    width: auto;                /* không chiếm full */
    max-width: 100%;
    margin: 8px auto 0;
    padding: 6px 14px;
    border-radius: 999px;       /* badge bo tròn đẹp */
    white-space: nowrap;        /* không xuống dòng lung tung */
    text-align: center;
    white-space: normal;
    max-width: 90%;
    font-weight: 600;
}   

        .status-neutral {
            color: #fff;
        }

        .status-searching {
            color: #0f0;
            animation: pulse 2s infinite;
        }

        @keyframes pulse {
            0%, 800% { opacity: 0.7; }
            50% { opacity: 0.6; }
        }
        
.game-controls {
    position: absolute;
    top: 0px;
    left: 50%;
    width: 100%;
    transform: translateX(-50%) scale(0.85);
    z-index: 10000;
    text-align: center;
}


.game-btn {
    background: transparent;
    color: #0f0;
    border: 1.5px solid rgba(0,255,0,0.5);
    padding: 10px 18px;
    margin: 2px;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    font-weight: bold;
    font-size: 14px;
    transition: all 0.25s ease;
}

.game-btn:hover {
    background: rgba(0,255,0,0.15);
    color: #0ff;
    border-color: #0ff;
    box-shadow: 0 0 12px rgba(0,255,255,0.6);
    transform: translateY(-1px) scale(1.05);
}


        .game-info {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            text-align: center;
            color: #0f0;
            font-size: 20px;
            display: none;
            background: rgba(0, 0, 0, 0.95);
            padding: 40px;
            border: 3px solid #0f0;
            border-radius: 15px;
			width:90%;
        }
        
        .game-info h2 {
            font-size: 42px;
            color: #ff0;
            margin-bottom: 20px;
            text-shadow: 0 0 20px #ff0;
        }

        .game-rules {
            text-align: left;
            margin: 20px 0;
            padding: 15px;
            background: rgba(0, 255, 0, 0.1);
            border-radius: 8px;
            font-size: 16px;
            line-height: 1.8;
        }
        
        .particle {
            position: fixed;
            width: 5px;
            height: 5px;
            background: #0f0;
            border-radius: 50%;
            pointer-events: none;
            animation: particle-fade 1s forwards;
            z-index: 999;
        }
        
        @keyframes particle-fade {
            to {
                opacity: 0;
                transform: translateY(-50px) scale(0);
            }
        }
        
        #customContext {
            position: fixed;
            background: rgba(0, 20, 0, 0.95);
            border: 2px solid #0f0;
            border-radius: 8px;
            padding: 10px;
            display: none;
            z-index: 9999;
            box-shadow: 0 0 30px rgba(0, 255, 0, 0.5);
        }
        
        .context-item {
            padding: 10px 20px;
            cursor: pointer;
            color: #0f0;
            transition: all 0.2s;
            border-radius: 5px;
        }
        
        .context-item:hover {
            background: rgba(0, 255, 0, 0.2);
            color: #0ff;
        }
        
        .footer {
            text-align: center;
            color: #888;
            font-size: 12px;
            margin: 20px 0;
        }

        .pause-overlay {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            font-size: 48px;
            color: #ff0;
            text-shadow: 0 0 20px #ff0;
            display: none;
            z-index: 10001;
        }


        @keyframes popupShow {
            to {
                transform: translate(-50%, -50%) scale(1);
            }
        }

        .popup-word {
            font-size: 48px;
            color: #0ff;
            font-weight: bold;
            margin-bottom: 15px;
            text-shadow: 0 0 20px #0ff;
        }

        .popup-correct {
            font-size: 36px;
            color: #0f0;
            margin: 20px 0;
        }

        .popup-wrong {
            font-size: 36px;
            color: #f00;
            margin: 20px 0;
        }
		
@media (max-width: 768px) {
    .game-controls {
       
        transform: translateX(-50%) scale(0.75);
        gap: 6px;
    }

    .game-btn {
        font-size: 12px;
        padding: 8px 12px;
        border-width: 1px;
    }

    .hud-text {
        font-size: 13px;
        padding: 6px 10px;
    }

    .snake-status {
        font-size: 12px;
    }
    .game-rules {
        font-size: 14px;
        line-height: 1.6;
    }
	.game-info h2 {
            font-size: 20px;
            color: #ff0;
            margin-bottom: 20px;
            text-shadow: 0 0 20px #ff0;
        }
	
}

.vocab-popup-card {
    position: absolute;
    z-index: 10000;
    background: rgba(0,0,0,0.85);
    border-radius: 12px;
    padding: 12px 16px;
    text-align: center;
    font-size: 22px;
    font-weight: bold;
    color: #fff;
    box-shadow: 0 0 18px rgba(0,0,0,0.6);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.card-correct {
    border: 3px solid #00ff00;
}

.card-wrong {
    border: 3px solid #ff3333;
}

.card-divider {
    margin: 4px 0;
    font-size: 18px;
    opacity: 0.7;
}

.vocab-popup-card.hide {
    opacity: 0;
    transform: translate(-50%, -160%);
}
.popup-single {
    font-size: 32px;              /* RẤT TO */
    padding: 18px 26px;
    border: 3px solid #ffe600;
    color: #ffe600;
    box-shadow: 0 0 30px rgba(255,230,0,0.8);
}
.popup-pair-correct {
    font-size: 26px;
    border: 3px solid #00ff00;
    box-shadow: 0 0 26px rgba(0,255,0,0.7);
}

.popup-pair-correct .card-word {
    color: #00ff00;
}
.popup-pair-wrong {
    opacity: 0.75;
    border: 2px dashed #ff3333;
    color: #ff3333;
    transform: translate(-50%, -160%) scale(0.92);
}
.popup-pair-fix {
    margin-top: 8px;
    border: 3px solid #00ff00;
    color: #00ff00;
    box-shadow: 0 0 28px rgba(0,255,0,0.9);
}

/* vào */
@keyframes flashcardIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* ra – KHÔNG dịch Y thêm → không rung */
@keyframes flashcardOut {
    to {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.85);
    }
}
.popup-en {
    font-size: 32px;
    font-weight: 800;
    color: #ffe600;
    margin-bottom: 6px;
}

.popup-arrow {
    font-size: 22px;
    line-height: 1;
    margin: 2px 0;
    color: #aaa;
    transition: opacity 0.2s ease;
}

.popup-vi {
    font-size: 22px;
    font-weight: 600;
    color: #00ffff;
    transition: opacity 0.2s ease;
}
/* ===== POPUP TEXT: KHÔNG XUỐNG DÒNG ===== */
.vocab-popup-card,
.card-word,
.popup-en,
.popup-vi {
    white-space: nowrap;      /* ❗ KHÔNG xuống dòng */
    word-break: keep-all;     /* ❗ không bẻ chữ */
}
