/* =============================================================================
   FILE: css/games/echoLingo.css
   VERSION: 6.0 (Vertical Velocity)
   DESCRIPTION: Giao diện bắn súng dọc, tối ưu cho cả PC và Mobile.
   ============================================================================= */

:root {
    --el-bg-dark: #050014;
    --el-primary: #00FFFF; /* Cyan */
    --el-secondary: #FF00FF; /* Magenta */
    --el-danger: #FF4444;
    --el-text: #FFFFFF;
    --el-hud-bg: rgba(0, 0, 0, 0.8);
}

/* 1. CONTAINER CHÍNH (Full màn hình trình duyệt) */
#echolingo-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    background-color: #000; /* Màu nền cho phần thừa của PC */
    background-image: radial-gradient(circle, #1a0b2e 0%, #000 100%);
    overflow: hidden;
    font-family: 'Orbitron', sans-serif;
    display: flex;
    justify-content: center; /* Căn giữa cho PC */
}

/* 2. GAME CONTAINER (Khung chơi game thực tế) */
/* PC: Giới hạn chiều rộng giống điện thoại. Mobile: Full màn hình */
#echolingo-game-container {
    position: relative;
    width: 100%;
    max-width: 500px; /* [YÊU CẦU 4] Giới hạn chiều rộng cho PC */
    height: 100%;
    background-color: var(--el-bg-dark);
    box-shadow: 0 0 50px rgba(0, 255, 255, 0.1); /* Glow nhẹ viền */
    overflow: hidden;
}

/* 3. CANVAS (Layer dưới cùng) */
#el-canvas {
    display: block;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* 4. UI LAYER (Layer trên cùng - Overlay) */
#el-ui-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    pointer-events: none; /* Cho phép bấm xuyên qua xuống Canvas */
    display: flex;
    flex-direction: column;
}

/* Header: HUD + Câu hỏi */
.el-header {
    background: linear-gradient(180deg, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0) 100%);
    padding: 15px;
    text-align: center;
    pointer-events: auto; /* Để có thể bấm nút pause nếu cần */
}

.el-hud-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #aaa;
    margin-bottom: 8px;
    font-weight: 700;
}
.el-hud-row span b { color: var(--el-primary); font-size: 1.1rem; }
.text-danger { color: var(--el-danger) !important; }

/* Khu vực câu hỏi */
#el-question-box {
    margin-top: 5px;
    margin-bottom: 10px;
}
#el-question-text {
    font-size: 1.1rem;
    color: #fff;
    text-shadow: 0 0 5px var(--el-primary);
    line-height: 1.4;
    margin: 0;
}

/* Thanh Timer (8 giây) */
#el-timer-container {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    margin-top: 10px;
    overflow: hidden;
}
#el-timer-bar {
    width: 100%;
    height: 100%;
    background: var(--el-secondary);
    box-shadow: 0 0 10px var(--el-secondary);
    transition: width 0.1s linear;
}

/* Gợi ý đáp án text (nhỏ) */
#el-options-hint {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 8px;
    font-size: 0.75rem;
    color: #ccc;
    opacity: 0.8;
}
.hint-item span { color: var(--el-primary); font-weight: bold; }

/* 5. OVERLAYS (Thông báo Warp, Miss, Level Up) */
.el-overlay-msg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}
.el-overlay-msg.active { opacity: 1; }
.el-overlay-msg h2 {
    font-size: 2.5rem;
    color: var(--el-primary);
    text-shadow: 0 0 20px var(--el-primary);
    margin: 0;
    text-transform: uppercase;
}
.el-overlay-msg p {
    font-size: 1.2rem;
    color: #fff;
    letter-spacing: 2px;
}

/* 6. NÚT SKILL (Góc dưới phải) */
#el-skill-btn {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid var(--el-primary);
    color: var(--el-primary);
    font-size: 1.5rem;
    display: grid;
    place-items: center;
    cursor: pointer;
    pointer-events: auto;
    z-index: 20;
    transition: all 0.2s;
}
#el-skill-btn:active { transform: scale(0.95); background: var(--el-primary); color: #000; }
#el-skill-btn.disabled { opacity: 0.5; filter: grayscale(1); cursor: not-allowed; }
/* =============================================================================
   PHẦN BỔ SUNG: STAR MAP MENU (BẢN ĐỒ SAO)
   ============================================================================= */

#el-menu-container {
    width: 100%;
    max-width: 600px; /* Menu rộng hơn game một chút cho đẹp */
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 20px;
    box-sizing: border-box;
    z-index: 50;
    overflow-y: auto;
}

.el-menu-header {
    text-align: center;
    margin-bottom: 30px;
    animation: fadeInDown 0.8s ease;
}

.el-menu-header h1 {
    color: var(--el-primary);
    font-size: 2rem;
    text-shadow: 0 0 15px var(--el-primary);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.el-menu-header p {
    color: #ccc;
    margin-top: 5px;
}

/* Danh sách Node */
#el-star-map {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding-bottom: 20px;
}

.loading-map {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--el-primary);
    height: 200px;
}

.el-star-node {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 12px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
}

.el-star-node:hover {
    background: rgba(0, 255, 255, 0.1);
    border-color: var(--el-primary);
    transform: translateX(10px);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.15);
}

.el-star-node .node-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #2a0055, #000);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--el-secondary);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.el-star-node .node-info {
    flex: 1;
}

.node-title {
    font-size: 1.1rem;
    color: #fff;
    font-weight: bold;
}

.node-mastery {
    font-size: 0.85rem;
    color: #aaa;
    margin-top: 2px;
}

.arrow-icon {
    color: var(--el-primary);
    opacity: 0.5;
    transition: opacity 0.3s;
}
.el-star-node:hover .arrow-icon { opacity: 1; }

/* Nút Back */
.el-btn-secondary {
    background: transparent;
    border: 1px solid #555;
    color: #aaa;
    padding: 12px 24px;
    border-radius: 30px;
    cursor: pointer;
    font-family: 'Orbitron', sans-serif;
    transition: all 0.2s;
    align-self: center;
    margin-top: 10px;
}
.el-btn-secondary:hover {
    border-color: #fff;
    color: #fff;
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}
/* css/games/echoLingo.css */
#echolingo-wrapper {
    position: relative; width: 100%; height: 100%;
    background: #000; overflow: hidden;
    font-family: 'Orbitron', sans-serif;
    display: flex; justify-content: center;
}
#echolingo-game-container {
    position: relative; width: 100%; max-width: 500px; height: 100%;
    background: radial-gradient(circle at bottom, #1a0b2e 0%, #050014 100%);
    box-shadow: 0 0 50px rgba(0, 255, 255, 0.1);
}
#el-canvas { display: block; width: 100%; height: 100%; z-index: 1; }
#el-ui-layer {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 10;
    pointer-events: none; display: flex; flex-direction: column;
}
.el-header {
    background: linear-gradient(180deg, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0) 100%);
    padding: 15px; text-align: center; pointer-events: auto;
}
.el-hud-row { display: flex; justify-content: space-between; font-size: 0.9rem; color: #aaa; font-weight: 700; margin-bottom: 8px; }
#el-question-text { font-size: 1.1rem; color: #fff; text-shadow: 0 0 5px #0ff; margin: 0; }
#el-timer-container { width: 100%; height: 4px; background: rgba(255,255,255,0.2); margin-top: 10px; }
#el-timer-bar { width: 100%; height: 100%; background: #f0f; transition: width 0.1s linear; }
#el-options-hint { display: flex; justify-content: center; gap: 15px; margin-top: 8px; font-size: 0.75rem; color: #ccc; }
.hint-item span { color: #0ff; font-weight: bold; }
.el-overlay-msg {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    text-align: center; opacity: 0; transition: opacity 0.3s;
}
.el-overlay-msg.active { opacity: 1; }
.el-overlay-msg h2 { font-size: 2.5rem; color: #0ff; text-shadow: 0 0 20px #0ff; margin: 0; }

/* MENU CSS */
#el-menu-container {
    width: 100%; max-width: 600px; height: 100%; padding: 20px;
    display: flex; flex-direction: column; overflow-y: auto; z-index: 50;
}
.el-menu-header { text-align: center; margin-bottom: 30px; }
.el-menu-header h1 { color: #0ff; font-size: 2rem; margin: 0; }
.el-menu-header p { color: #ccc; margin-top: 5px; }
#el-star-map { flex: 1; display: flex; flex-direction: column; gap: 15px; }
.el-star-node {
    background: rgba(255,255,255,0.05); border: 1px solid rgba(0,255,255,0.2);
    border-radius: 12px; padding: 15px; display: flex; align-items: center; gap: 15px;
    cursor: pointer; transition: all 0.3s;
}
.el-star-node:hover { background: rgba(0,255,255,0.1); border-color: #0ff; transform: translateX(10px); }
.node-icon { width: 50px; height: 50px; background: #000; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #f0f; border: 1px solid #333; }
.node-info { flex: 1; }
.node-title { color: #fff; font-weight: bold; }
.node-mastery { font-size: 0.85rem; color: #aaa; }
.el-btn-secondary {
    background: transparent; border: 1px solid #555; color: #aaa;
    padding: 12px 24px; border-radius: 30px; cursor: pointer; align-self: center; margin-top: 20px;
}
.el-btn-secondary:hover { border-color: #fff; color: #fff; }