/* =========================================================
   lingoparty.css - LingoParty Interactive Board Game
   ========================================================= */

:root {
    --color-taboo: #a855f7;
    --color-speed: #06b6d4;
    --color-grammar: #f59e0b;
    --color-roleplay: #ec4899;
    --color-shop: #eab308;
    --color-chance: #6366f1;
}

/* Screen Management */
.screen {
    display: none;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem;
    animation: fadeIn 0.4s ease;
}

.screen.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Setup Card */
.setup-card {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.setup-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 2rem;
}

@media (max-width: 900px) {
    .setup-grid {
        grid-template-columns: 1fr;
    }
}

.setup-section h3 {
    font-size: 1.3rem;
    margin-bottom: 1.2rem;
    color: var(--text-primary, #fff);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Teams Setup List */
.teams-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-bottom: 1.2rem;
}

.team-setup-row {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    background: rgba(255, 255, 255, 0.04);
    padding: 0.5rem 0.8rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.team-pawn {
    font-size: 1.5rem;
}

.team-name-input {
    flex: 1;
    margin: 0;
}

.team-count-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.5rem;
}

.small-select {
    width: auto;
    padding: 0.4rem 1rem;
}

/* Input Groups */
.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.2rem;
}

.input-group label {
    font-size: 0.95rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
}

.button-row {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.btn-ai {
    background: linear-gradient(135deg, #a855f7, #ec4899);
    border: none;
    box-shadow: 0 4px 15px rgba(168, 85, 247, 0.3);
}

.btn-ai:hover {
    box-shadow: 0 6px 20px rgba(168, 85, 247, 0.5);
    transform: translateY(-2px);
}

/* Tile Guide */
.tile-guide-box {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1.2rem 1.5rem;
}

.tile-guide-box h4 {
    margin-bottom: 0.8rem;
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.9);
}

.guide-items {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.guide-tag {
    padding: 0.4rem 0.9rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.riddle-tag { background: #a855f7; }
.scramble-tag { background: #14b8a6; }
.pronunciation-tag { background: #3b82f6; }
.association-tag { background: #8b5cf6; }
.speed-tag { background: var(--color-speed); }
.grammar-tag { background: var(--color-grammar); }
.roleplay-tag { background: var(--color-roleplay); }
.shop-tag { background: var(--color-shop); color: #000; }
.chance-tag { background: var(--color-chance); }

/* =========================================================
   Active Game Stage (16:9 Widescreen Optimized UI)
   ========================================================= */

#game-screen.screen.active {
    display: flex;
    flex-direction: column;
    max-width: 1920px;
    width: 97vw;
    height: calc(100vh - 24px);
    margin: 0 auto;
    padding: 0.25rem 0.5rem;
    gap: 0.85rem;
    overflow: hidden;
}

.board-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 1.5rem;
    margin-bottom: 0;
    flex-shrink: 0;
    border-radius: 16px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.board-title {
    font-size: 1.6rem;
    font-weight: 800;
    margin: 0;
}

.turn-banner {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.55rem 1.6rem;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    animation: pulseTurn 2s infinite;
}

@keyframes pulseTurn {
    0% { border-color: rgba(255, 255, 255, 0.2); box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2); }
    50% { border-color: rgba(168, 85, 247, 0.6); box-shadow: 0 4px 22px rgba(168, 85, 247, 0.35); }
    100% { border-color: rgba(255, 255, 255, 0.2); box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2); }
}

.turn-team-pawn {
    font-size: 1.6rem;
}

.turn-team-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
}

.round-counter {
    font-size: 1.1rem;
    font-weight: 700;
    background: rgba(168, 85, 247, 0.2);
    border: 1px solid rgba(168, 85, 247, 0.4);
    padding: 0.5rem 1rem;
    border-radius: 12px;
}

/* Game Stage Layout Grid (16:9 Widescreen) */
.game-stage {
    display: grid;
    grid-template-columns: 310px minmax(0, 1fr) 310px;
    gap: 1rem;
    flex: 1;
    min-height: 0;
    width: 100%;
    align-items: stretch;
}

.leaderboard-panel {
    grid-column: 1;
    min-width: 0;
    min-height: 0;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
}

.board-track-container {
    grid-column: 2;
    min-width: 0;
    min-height: 0;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 0 !important;
    border-radius: 24px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
}

.controls-panel {
    grid-column: 3;
    min-width: 0;
    min-height: 0;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
}

@media (max-width: 1200px) {
    .game-stage {
        grid-template-columns: 260px minmax(0, 1fr) 260px;
    }
}

@media (max-width: 900px) {
    #game-screen.screen.active {
        height: auto;
        overflow: visible;
    }
    .game-stage {
        grid-template-columns: 1fr;
    }
    .leaderboard-panel { grid-column: 1; }
    .board-track-container { grid-column: 1; min-height: 650px; }
    .controls-panel { grid-column: 1; }
}

/* Side Panels */
.leaderboard-panel, .controls-panel {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    height: 100%;
    overflow-y: auto;
    background: rgba(15, 23, 42, 0.75);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.leaderboard-panel h3, .controls-panel h4 {
    font-size: 1.2rem;
    margin: 0;
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.6rem;
}

.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.leaderboard-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.8rem 1rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.2s ease;
}

.leaderboard-card.active-turn {
    background: rgba(168, 85, 247, 0.15);
    border-color: rgba(168, 85, 247, 0.5);
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.3);
}

.team-info-left {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.team-score-right {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.score-badge {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-weight: 700;
    font-size: 0.95rem;
}

.trophies-badge { color: #f59e0b; }
.coins-badge { color: #38bdf8; }

.shop-preview {
    background: rgba(234, 179, 8, 0.1);
    border: 1px solid rgba(234, 179, 8, 0.3);
    padding: 1rem;
    border-radius: 12px;
    margin-top: auto;
}

.shop-preview h4 {
    font-size: 1rem;
    color: #f59e0b;
    border: none;
    padding: 0;
    margin-bottom: 0.5rem;
}

.shop-preview p {
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.shop-cost {
    font-size: 0.9rem;
    font-weight: 700;
    color: #fff;
}

.shop-cost span { color: #f59e0b; }

/* =========================================================
   Center: Winding Adventure Map (16:9 Widescreen Stage)
   ========================================================= */

.board-map-container {
    flex: 1;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    height: 100%;
    min-height: 0;
    position: relative;
    border-radius: 24px;
    background: radial-gradient(circle at 50% 50%, #1e293b 0%, #0f172a 100%);
    border: none;
    box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.85);
    overflow: hidden;
}

.board-map-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.map-path-glow {
    fill: none;
    stroke: rgba(168, 85, 247, 0.22);
    stroke-width: 18px;
    stroke-linecap: round;
}

.map-path-main {
    fill: none;
    stroke: rgba(255, 255, 255, 0.45);
    stroke-width: 7px;
    stroke-dasharray: 14 12;
    stroke-linecap: round;
}

.board-map-nodes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

.map-node {
    position: absolute;
    width: 112px;
    height: 104px;
    border-radius: 20px;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    cursor: pointer;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
    border: 3px solid rgba(255, 255, 255, 0.45);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.75), inset 0 2px 10px rgba(255, 255, 255, 0.2);
    user-select: none;
    padding: 4px;
}

.map-node:hover {
    transform: translate(-50%, -50%) scale(1.15) translateY(-6px);
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.9), 0 0 24px rgba(255, 255, 255, 0.5);
    z-index: 5;
}

.map-node.riddle { background: linear-gradient(135deg, #a855f7, #7c3aed); }
.map-node.scramble { background: linear-gradient(135deg, #14b8a6, #0d9488); }
.map-node.pronunciation { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.map-node.association { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }
.map-node.speed { background: linear-gradient(135deg, #06b6d4, #0284c7); }
.map-node.grammar { background: linear-gradient(135deg, #f59e0b, #d97706); }
.map-node.roleplay { background: linear-gradient(135deg, #ec4899, #be185d); }
.map-node.shop { background: linear-gradient(135deg, #eab308, #ca8a04); color: #000; font-weight: 800; border-color: #fef08a; }
.map-node.chance { background: linear-gradient(135deg, #6366f1, #4f46e5); }
.map-node.start { background: linear-gradient(135deg, #10b981, #059669); border-color: #a7f3d0; }
.map-node.finish { background: linear-gradient(135deg, #f43f5e, #e11d48); border-color: #fecdd3; }
.map-node.blackhole { background: linear-gradient(135deg, #1e1b2e, #4c1d95); border-color: #a78bfa; box-shadow: 0 0 20px rgba(139, 92, 246, 0.8), inset 0 2px 10px rgba(255, 255, 255, 0.2); }

.node-number {
    position: absolute;
    top: 6px;
    left: 8px;
    font-size: 0.72rem;
    font-weight: 800;
    opacity: 0.9;
}

.node-icon {
    font-size: 2.1rem;
    margin-top: 0.1rem;
}

.node-label {
    font-size: 0.63rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2px;
    text-align: center;
    margin-top: 0.15rem;
    padding: 0 2px;
    line-height: 1.15;
    width: 100%;
    word-break: break-word;
    overflow-wrap: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Floating Pawns Layer */
.board-pawn-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

.pawn-cluster {
    position: absolute;
    transform: translate(-50%, -50%);
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: flex-end;
    gap: 10px;
    transition: left 0.55s cubic-bezier(0.34, 1.56, 0.64, 1), top 0.55s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 25;
}

.pawn-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    animation: pawnFloat 2.4s infinite ease-in-out;
    will-change: transform;
}

.pawn-title-pill {
    background: rgba(15, 23, 42, 0.94);
    border: 1.5px solid #a855f7;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.9), 0 0 12px rgba(168, 85, 247, 0.5);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 20px;
    white-space: nowrap;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
    letter-spacing: 0.3px;
    pointer-events: none;
}

.pawn-emoji-standee {
    font-size: 2.6rem;
    filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.95)) drop-shadow(0 0 12px rgba(255, 255, 255, 0.35));
    transition: transform 0.2s ease;
}

@keyframes pawnFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-7px); }
}

/* =========================================================
   Controls Panel & Dice Roller
   ========================================================= */

.dice-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    background: rgba(0, 0, 0, 0.2);
    padding: 1.5rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.dice-display {
    font-size: 4.5rem;
    width: 106px;
    height: 106px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: inset 0 0 25px rgba(0, 0, 0, 0.6), 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: transform 0.1s ease;
}

.dice-display.rolling {
    animation: rollAnim 0.6s infinite linear;
}

@keyframes rollAnim {
    0% { transform: rotate(0deg) scale(1); }
    25% { transform: rotate(90deg) scale(1.1); }
    50% { transform: rotate(180deg) scale(0.9); }
    75% { transform: rotate(270deg) scale(1.1); }
    100% { transform: rotate(360deg) scale(1); }
}

.dice-btn {
    width: 100%;
    font-size: 1.25rem;
    padding: 1rem;
    border-radius: 16px;
}

.dice-hint {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
    margin: 0;
}

.team-inventory {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.inventory-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.no-items {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
}

/* =========================================================
   Challenge & Shop Modals
   ========================================================= */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 1.5rem;
    animation: fadeIn 0.25s ease;
}

.hidden,
.modal-overlay.hidden,
.grammar-answer-box.hidden,
#challenge-secret-answer.hidden,
#grammar-secret-answer.hidden {
    display: none !important;
}

.challenge-card, .shop-card {
    width: 100%;
    max-width: 600px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
}

.challenge-header, .shop-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 1rem;
}

.challenge-badge {
    font-size: 1.1rem;
    font-weight: 800;
    padding: 0.5rem 1.2rem;
    border-radius: 30px;
    background: var(--color-taboo);
    color: #fff;
}

.challenge-coins {
    font-size: 1.2rem;
    font-weight: 800;
    color: #f87171;
}

.challenge-body {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    align-items: center;
    text-align: center;
    padding: 1rem 0;
}

.challenge-word-title {
    font-size: 2.2rem;
    font-weight: 900;
    margin: 0;
    color: #fff;
    line-height: 1.2;
}

.challenge-subcontent {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    align-items: center;
}

.badge-riddle { background: #a855f7; }
.badge-scramble { background: #14b8a6; }
.badge-pronunciation { background: #3b82f6; }
.badge-association { background: #8b5cf6; }

.scramble-box {
    font-size: 2.6rem;
    font-weight: 900;
    letter-spacing: 6px;
    color: #5eead4;
    background: rgba(20, 184, 166, 0.15);
    border: 2px dashed #14b8a6;
    padding: 1rem 2rem;
    border-radius: 16px;
    margin: 0.5rem 0;
}

.clue-box {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.08);
    padding: 0.8rem 1.4rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    width: 100%;
}

.grammar-prompt-text {
    font-size: 1.25rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
}

.grammar-answer-box {
    margin-top: 0.8rem;
    font-size: 1.1rem;
    color: #4ade80;
    font-weight: 700;
    background: rgba(74, 222, 128, 0.1);
    padding: 0.6rem 1rem;
    border-radius: 8px;
    width: 100%;
}

.challenge-timer-wrap {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.5rem;
}

.challenge-timer-bar {
    flex: 1;
    height: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    overflow: hidden;
}

.challenge-timer-fill {
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, #4ade80, #facc15, #f87171);
    transition: width 1s linear;
}

.challenge-time-text {
    font-size: 1.1rem;
    font-weight: 800;
    width: 45px;
    text-align: right;
}

.challenge-actions, .shop-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 0.5rem;
}

.btn-correct { background: linear-gradient(135deg, #10b981, #059669); border: none; flex: 1.2; }
.btn-wrong { flex: 1; }
.btn-pass { flex: 1; }

/* Shop Items Grid */
.shop-items-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 600px) {
    .shop-items-grid {
        grid-template-columns: 1fr;
    }
}

.shop-item-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 1.2rem;
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.6rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.shop-item-card:hover {
    background: rgba(234, 179, 8, 0.15);
    border-color: rgba(234, 179, 8, 0.5);
    transform: translateY(-4px);
}

.shop-item-card.disabled {
    opacity: 0.45;
    pointer-events: none;
}

.shop-item-icon {
    font-size: 2.5rem;
}

.shop-item-name {
    font-weight: 800;
    font-size: 1.1rem;
    color: #fff;
}

.shop-item-desc {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.3;
}

.shop-item-btn {
    margin-top: 0.5rem;
    width: 100%;
    padding: 0.6rem;
    font-size: 0.9rem;
    font-weight: 700;
}

/* =========================================================
   Mystery Box of Fate Modal (Chance Tiles)
   ========================================================= */
.mystery-card-box {
    border-color: #ec4899;
    box-shadow: 0 0 50px rgba(236, 72, 153, 0.4), 0 25px 60px rgba(0, 0, 0, 0.85);
}

.mystery-reveal-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1.5rem;
    background: radial-gradient(circle at center, rgba(236, 72, 153, 0.15) 0%, rgba(15, 23, 42, 0.6) 80%);
    border: 2px dashed rgba(236, 72, 153, 0.5);
    border-radius: 20px;
    margin: 1.5rem 0;
    min-height: 220px;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.mystery-reveal-area.revealed {
    border-style: solid;
    border-color: #f59e0b;
    background: radial-gradient(circle at center, rgba(245, 158, 11, 0.25) 0%, rgba(15, 23, 42, 0.8) 80%);
    transform: scale(1.03);
}

.mystery-gift-icon {
    font-size: 4.5rem;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.9));
    margin-bottom: 1rem;
    animation: floatAvatar 2s infinite ease-in-out;
}

.mystery-reveal-area.revealed .mystery-gift-icon {
    animation: bouncePop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.mystery-event-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.mystery-event-desc {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.85);
    max-width: 420px;
    line-height: 1.5;
}

/* ── Top Flashing Tile Category Banner ── */
.category-flash-banner {
    position: absolute;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 40;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    background: rgba(10, 8, 26, 0.94);
    border: 2px solid #a855f7;
    border-radius: 30px;
    padding: 0.6rem 1.8rem;
    box-shadow: 0 0 30px rgba(168, 85, 247, 0.7), inset 0 0 15px rgba(168, 85, 247, 0.3);
    animation: flashEntrance 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), pulseGlow 1.2s infinite alternate;
    pointer-events: none;
}

.banner-sparkle {
    font-size: 1.3rem;
    animation: spinSparkle 1.5s linear infinite;
}

.banner-text {
    font-size: 1.1rem;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: 1.2px;
    text-shadow: 0 0 12px rgba(168, 85, 247, 0.9);
    white-space: nowrap;
}

/* ── Show Question Glowing Button ── */
.show-question-btn {
    width: 100%;
    padding: 1.1rem;
    font-size: 1.15rem;
    font-weight: 900;
    color: #ffffff;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    background: linear-gradient(135deg, #a855f7 0%, #ec4899 50%, #f59e0b 100%) !important;
    box-shadow: 0 0 30px rgba(168, 85, 247, 0.8), 0 0 18px rgba(236, 72, 153, 0.6) !important;
    animation: questionPulse 1s ease-in-out infinite alternate !important;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.show-question-btn:hover {
    transform: scale(1.05);
    filter: brightness(1.25);
    box-shadow: 0 0 45px rgba(236, 72, 153, 1), 0 0 20px rgba(245, 158, 11, 0.8) !important;
}

/* ── Planet Hover Information Bar ── */
.planet-hover-info-bar {
    margin-top: 0.6rem;
    background: rgba(8, 6, 26, 0.85);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 14px;
    padding: 0.5rem 1.2rem;
    backdrop-filter: blur(12px);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.12);
    height: 52px;
    max-height: 52px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    text-align: center;
    color: rgba(148, 163, 184, 0.9);
    font-size: 0.9rem;
    font-weight: 600;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* ── AI Debug Log Console Box ── */
.ai-debug-box {
    background: rgba(6, 4, 16, 0.95);
    border: 1px solid rgba(139, 92, 246, 0.35);
    border-radius: 12px;
    padding: 0.8rem 1rem;
    margin-top: 0.8rem;
    font-family: monospace;
    font-size: 0.82rem;
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.6);
}

.ai-debug-box .debug-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #c4b5fd;
    font-weight: 700;
    margin-bottom: 0.5rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px dashed rgba(139, 92, 246, 0.25);
}

.btn-debug-clear {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #94a3b8;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.75rem;
}

.btn-debug-clear:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.debug-log-list {
    max-height: 140px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.debug-line {
    line-height: 1.4;
    word-break: break-word;
}

.debug-time {
    color: #64748b;
    margin-right: 0.3rem;
}

.debug-line.info { color: #a78bfa; }
.debug-line.success { color: #34d399; font-weight: 600; }
.debug-line.warn { color: #fbbf24; }
.debug-line.error { color: #f87171; font-weight: 700; }

