/* EduArcade WordPress Styles - Scoped & Guaranteed Visible */
.eduarcade-hub-wrapper,
.eduarcade-dino-mount,
.eduarcade-hangman-mount,
.eduarcade-tetris-mount,
.eduarcade-pacman-mount,
.eduarcade-leaderboard-box {
    box-sizing: border-box;
    max-width: 860px;
    margin: 24px auto;
    background: #0f172a !important;
    border-radius: 20px;
    padding: 24px;
    color: #f8fafc !important;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    border: 1px solid #334155 !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4) !important;
}

.eduarcade-hub-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}
.eduarcade-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}
.eduarcade-brand-icon {
    font-size: 32px;
}
.eduarcade-brand-title {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
    color: #60a5fa !important;
}
.eduarcade-brand-sub {
    margin: 0;
    font-size: 12px;
    color: #94a3b8 !important;
}
.eduarcade-xp-pill {
    background: #ffde57;
    color: #0f172a !important;
    font-weight: 800;
    padding: 6px 14px;
    border-radius: 9999px;
    font-size: 13px;
    border: 1px solid #f0cc30;
}

.eduarcade-nav-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    border-bottom: 1px solid #1e293b;
    padding-bottom: 14px;
}
.eduarcade-tab-btn {
    background: #1e293b !important;
    color: #94a3b8 !important;
    border: 1px solid #334155 !important;
    padding: 10px 18px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}
.eduarcade-tab-btn:hover {
    color: #fff !important;
    background: #334155 !important;
}
.eduarcade-tab-btn.active {
    background: #4584b6 !important;
    color: #fff !important;
    border-color: #60a5fa !important;
}

.eduarcade-game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #1e293b;
}
.eduarcade-title {
    font-weight: 800;
    font-size: 16px;
    color: #60a5fa !important;
}
.eduarcade-stats {
    display: flex;
    gap: 16px;
    font-size: 13px;
    font-family: monospace;
}

.eduarcade-canvas-wrap {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    background: #000;
    border: 2px solid #334155;
    margin: 0 auto;
    display: flex;
    justify-content: center;
}
.eduarcade-canvas-wrap canvas {
    display: block !important;
    max-width: 100% !important;
    height: auto !important;
}

.eduarcade-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(4px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    text-align: center;
    color: #fff;
    z-index: 10;
}
.eduarcade-overlay h3 {
    margin: 0 0 8px 0;
    font-size: 20px;
    color: #ffde57 !important;
}
.eduarcade-overlay p {
    margin: 0 0 16px 0;
    font-size: 13px;
    color: #cbd5e1 !important;
}
.eduarcade-btn-primary {
    background: #ffde57 !important;
    color: #0f172a !important;
    font-weight: 800;
    font-size: 14px;
    padding: 12px 26px;
    border-radius: 14px;
    border: 1px solid #f0cc30 !important;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(255, 222, 87, 0.3);
    transition: transform 0.15s, background 0.15s;
}
.eduarcade-btn-primary:hover {
    background: #fcd232 !important;
    transform: scale(1.04);
}
.eduarcade-hint {
    margin-top: 12px;
    font-size: 11px;
    color: #94a3b8 !important;
}

/* Modal Popup */
.eduarcade-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    z-index: 20;
}
.eduarcade-quiz-card {
    background: #1e293b;
    border: 1px solid #475569;
    border-radius: 16px;
    padding: 20px;
    max-width: 480px;
    width: 100%;
}
.eduarcade-quiz-tag {
    background: #ffde57;
    color: #0f172a;
    font-size: 11px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 6px;
    display: inline-block;
    margin-bottom: 10px;
}
.eduarcade-quiz-question {
    font-size: 15px;
    font-weight: 700;
    margin: 0 0 16px 0;
    color: #f8fafc !important;
}
.eduarcade-quiz-options {
    display: grid;
    gap: 8px;
}
.eduarcade-opt-btn {
    background: #0f172a !important;
    color: #e2e8f0 !important;
    border: 1px solid #334155 !important;
    padding: 10px 14px;
    border-radius: 10px;
    text-align: left;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.15s;
}
.eduarcade-opt-btn:hover {
    background: #1e293b !important;
    border-color: #60a5fa !important;
}
.eduarcade-opt-btn.correct {
    background: #065f46 !important;
    border-color: #10b981 !important;
    color: #fff !important;
}
.eduarcade-opt-btn.wrong {
    background: #881337 !important;
    border-color: #f43f5e !important;
    color: #fff !important;
}

/* Hangman Layout */
.eduarcade-hangman-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}
@media (min-width: 640px) {
    .eduarcade-hangman-layout {
        grid-template-columns: 180px 1fr;
    }
}
.eduarcade-lives-row {
    font-size: 14px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 8px;
}
.eduarcade-vocab-meta {
    font-size: 12px;
    color: #60a5fa;
    font-weight: bold;
    display: flex;
    gap: 8px;
    align-items: center;
}
.eduarcade-clue-text {
    font-size: 18px;
    font-weight: 800;
    color: #f8fafc !important;
    margin: 8px 0 16px 0;
}
.eduarcade-word-tiles {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 16px;
}
.eduarcade-letter-box {
    width: 38px;
    height: 46px;
    border-radius: 8px;
    border: 2px solid #334155;
    background: #1e293b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: monospace;
    font-size: 22px;
    font-weight: 900;
    color: transparent;
}
.eduarcade-letter-box.revealed {
    color: #22c55e;
    border-color: #22c55e;
    background: rgba(34, 197, 94, 0.1);
}
.eduarcade-actions-row {
    display: flex;
    gap: 10px;
    justify-content: space-between;
    margin-bottom: 12px;
}
.eduarcade-btn-hint, .eduarcade-btn-skip {
    background: #1e293b !important;
    color: #cbd5e1 !important;
    border: 1px solid #334155 !important;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 12px;
    cursor: pointer;
}
.eduarcade-hint-box {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid #f59e0b;
    border-radius: 10px;
    padding: 10px;
    font-size: 12px;
    color: #fde68a;
    margin-bottom: 12px;
}
.eduarcade-win-box {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid #22c55e;
    border-radius: 10px;
    padding: 12px;
    text-align: center;
    color: #86efac;
    margin-bottom: 12px;
}
.eduarcade-lose-box {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid #ef4444;
    border-radius: 10px;
    padding: 12px;
    text-align: center;
    color: #fca5a5;
    margin-bottom: 12px;
}
.eduarcade-keyboard {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: center;
    margin-top: 10px;
}
.eduarcade-kb-row {
    display: flex;
    gap: 5px;
}
.eduarcade-kb-key {
    width: 32px;
    height: 38px;
    border-radius: 6px;
    background: #1e293b !important;
    color: #f1f5f9 !important;
    border: 1px solid #334155 !important;
    font-family: monospace;
    font-weight: 800;
    font-size: 13px;
    cursor: pointer;
    padding: 0;
}
.eduarcade-kb-key.kb-hit {
    background: #10b981 !important;
    border-color: #059669 !important;
    color: #fff !important;
}
.eduarcade-kb-key.kb-miss {
    background: #1e293b !important;
    opacity: 0.3;
    text-decoration: line-through;
    cursor: not-allowed;
}

/* Touch controls for Tetris & Pacman */
.eduarcade-touch-bar, .eduarcade-dpad {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 14px;
}
.eduarcade-touch-bar button, .eduarcade-dpad button {
    background: #1e293b !important;
    color: #fff !important;
    border: 1px solid #475569 !important;
    padding: 10px 14px;
    border-radius: 10px;
    font-weight: bold;
    cursor: pointer;
}
.eduarcade-dpad {
    flex-direction: column;
    align-items: center;
}
.eduarcade-dpad-row {
    display: flex;
    gap: 8px;
}

/* Leaderboard */
.eduarcade-leaderboard-box table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 14px;
}
.eduarcade-leaderboard-box th {
    background: #1e293b;
    padding: 10px;
    color: #60a5fa;
    text-align: left;
    font-size: 13px;
}
.eduarcade-leaderboard-box td {
    padding: 10px;
    border-bottom: 1px solid #1e293b;
    font-size: 13px;
}
