* {
    margin: 0;
    padding: 0;
    font-family: 'Inter', 'Roboto', 'Open Sans', Arial, sans-serif;
    box-sizing: border-box;
}

/* ===== Page Background ===== */
body, html {
    height: 100%;
    background: #0c0e1a;
    overflow: hidden;
}

.container {
    display: flex;
    width: 100%;
    height: 100%;
}

/* ===== Main Game Area ===== */
.main {
    height: 100vh;
    position: relative;
    flex: 3;
    overflow: hidden;
    background:
        radial-gradient(ellipse at 20% 80%, rgba(120, 40, 200, 0.18) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(40, 120, 220, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(15, 18, 35, 1) 0%, #0c0e1a 100%);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
}
/* Subtle grid overlay for depth */
.main::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: 0;
}

/* ===== Cards ===== */
.card {
    position: absolute;
    width: 200px;
    height: 200px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    text-align: center;
    cursor: pointer;
    transition: all .5s cubic-bezier(.4, 0, .2, 1);
    z-index: 1;
    overflow: visible;
}
/* Glassmorphism inner shine */
.card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(255,255,255,0.12) 0%, transparent 50%, rgba(255,255,255,0.04) 100%);
    pointer-events: none;
    z-index: 1;
}
.card:hover {
    transform: translate(-50%, -50%) scale(1.06);
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

/* ===== Card Colors (rich gradients) ===== */
#left {
    background: linear-gradient(145deg, #e53935, #b71c1c);
    box-shadow: 0 4px 20px rgba(229, 57, 53, 0.25);
}
#up {
    background: linear-gradient(145deg, #43a047, #1b5e20);
    box-shadow: 0 4px 20px rgba(67, 160, 71, 0.25);
}
#down {
    background: linear-gradient(145deg, #fdd835, #f9a825);
    box-shadow: 0 4px 20px rgba(253, 216, 53, 0.2);
}
#right {
    background: linear-gradient(145deg, #1e88e5, #0d47a1);
    box-shadow: 0 4px 20px rgba(30, 136, 229, 0.25);
}

/* ===== Card Inner Elements ===== */
.card h3 {
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(6px);
    border-radius: 8px;
    display: none;
    padding: 6px 16px;
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    letter-spacing: 0.5px;
    -webkit-user-select: none;
    user-select: none;
    z-index: 2;
    text-shadow: 0 1px 4px rgba(0,0,0,0.4);
}
.card img {
    width: 90px;
    height: 90px;
    position: absolute;
    margin: auto;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    -webkit-user-select: none;
    user-select: none;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.3));
    z-index: 2;
}
.card .watermark {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 13px;
    color: rgba(255, 255, 255, 0.55);
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    pointer-events: none;
    -webkit-user-select: none;
    user-select: none;
    z-index: 2;
}

/* ===== Points Badge ===== */
.points-badge {
    position: absolute;
    top: -12px;
    right: -12px;
    background: rgba(10, 12, 25, 0.9);
    border: 1px solid rgba(255, 215, 0, 0.35);
    color: #ffd700;
    padding: 3px 14px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 14px;
    display: none;
    white-space: nowrap;
    letter-spacing: 1px;
    box-shadow: 0 2px 12px rgba(255, 215, 0, 0.15);
    z-index: 10;
}
.points-badge.show {
    display: block;
    animation: badgePop 0.4s ease;
}
@keyframes badgePop {
    0% { transform: scale(0); }
    60% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

/* ===== Sidebar ===== */
.aside {
    width: 100px;
    max-height: 100vh;
    background: linear-gradient(180deg, #111425 0%, #0a0c18 100%);
    color: rgba(255, 255, 255, 0.85);
    flex: 1;
    border-left: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    flex-direction: column;
}
.aside-title {
    text-align: center;
    padding: 14px 0 12px;
    font-size: 14px;
    font-weight: 800;
    color: #ffd700;
    border-bottom: 1px solid rgba(255, 215, 0, 0.15);
    letter-spacing: 2px;
    text-transform: uppercase;
    background: rgba(255, 215, 0, 0.03);
}
.aside-scroll {
    flex: 1;
    overflow-y: auto;
}
/* Custom scrollbar */
.aside-scroll::-webkit-scrollbar { width: 4px; }
.aside-scroll::-webkit-scrollbar-track { background: transparent; }
.aside-scroll::-webkit-scrollbar-thumb { background: rgba(255,215,0,0.2); border-radius: 4px; }

.asideTable {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    text-align: center;
}
.asideTable thead th {
    background: rgba(255, 215, 0, 0.08);
    color: rgba(255, 215, 0, 0.8);
    padding: 8px 3px;
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 0.5px;
    position: sticky;
    top: 0;
    z-index: 2;
    border-bottom: 1px solid rgba(255, 215, 0, 0.15);
}
.asideTable tbody td {
    padding: 7px 3px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    font-variant-numeric: tabular-nums;
    font-weight: 500;
}
.asideTable tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.02);
}
.asideTable tbody tr:last-child {
    background: rgba(255, 215, 0, 0.04);
}
.asideTable tfoot td {
    padding: 10px 3px;
    font-weight: 800;
    font-size: 13px;
    color: #ffd700;
    border-top: 1px solid rgba(255, 215, 0, 0.2);
    background: rgba(255, 215, 0, 0.06);
    letter-spacing: 0.5px;
}

/* ===== Default card positions ===== */
.c1 { top: 50%; left: 12%; transform: translate(-50%, -50%); }
.c2 { top: 50%; left: 37%; transform: translate(-50%, -50%); }
.c3 { top: 50%; left: 62%; transform: translate(-50%, -50%); }
.c4 { top: 50%; left: 87%; transform: translate(-50%, -50%); }

/* ===== Positioned after card pick ===== */
.center-bottom {
    top: calc(100% - 220px);
    left: 50%;
    transform: translate(-50%, 0);
    border: 2px solid rgba(255, 255, 255, 0.2);
}
.center-bottom:hover {
    transform: translate(-50%, 0) scale(1.04);
}
.left-center { top: 50%; left: 12%; transform: translate(-50%, -50%); }
.right-center { top: 50%; left: 87%; transform: translate(-50%, -50%); }
.up-center { top: 12px; left: 50%; transform: translate(-50%, 0); }

.unclick {
    pointer-events: none;
}

/* ===== Selectable Glow (user guessing) ===== */
.selectable {
    cursor: pointer !important;
    pointer-events: auto !important;
    animation: selectableGlow 1.2s ease-in-out infinite !important;
    z-index: 10;
}
@keyframes selectableGlow {
    0%, 100% {
        box-shadow: 0 0 12px rgba(255, 215, 0, 0.4), 0 0 28px rgba(255, 215, 0, 0.2);
        filter: brightness(1);
    }
    50% {
        box-shadow: 0 0 24px rgba(255, 215, 0, 0.8), 0 0 50px rgba(255, 215, 0, 0.4), 0 0 80px rgba(255, 215, 0, 0.15);
        filter: brightness(1.12);
    }
}

/* ===== Candidate Highlight (bot bouncing) ===== */
.candidate-highlight {
    box-shadow: 0 0 18px rgba(0, 200, 255, 0.7), 0 0 36px rgba(0, 200, 255, 0.3) !important;
    filter: brightness(1.15);
    transition: box-shadow 0.15s ease, filter 0.15s ease;
}

/* ===== Bot Selected ===== */
.bot-selected {
    box-shadow: 0 0 20px rgba(255, 60, 60, 0.7), 0 0 40px rgba(255, 60, 60, 0.35) !important;
    border: 2px solid #ff4444 !important;
    z-index: 10;
}

/* ===== Announcement Icon (on Raja card) ===== */
.announcement-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 52px;
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 5;
    animation: announcePulse 0.8s ease-in-out infinite;
    filter: drop-shadow(0 0 12px rgba(255, 215, 0, 0.7));
}
@keyframes announcePulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.25); }
}

/* ===== Game Message Overlay ===== */
.game-message {
    position: absolute;
    top: 45%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 60;
    text-align: center;
    pointer-events: none;
    background: rgba(10, 14, 28, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 215, 0, 0.25);
    border-radius: 20px;
    padding: 28px 44px;
    min-width: 320px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.6), 0 0 60px rgba(255, 215, 0, 0.06);
    animation: msgAppear 0.45s cubic-bezier(.4, 0, .2, 1);
}
.game-message-icon {
    font-size: 48px;
    margin-bottom: 10px;
    animation: announcePulse2 1s ease-in-out infinite;
}
@keyframes announcePulse2 {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}
.game-message-text {
    font-size: 22px;
    font-weight: 800;
    color: #ffd700;
    letter-spacing: 1px;
    line-height: 1.4;
    text-shadow: 0 0 12px rgba(255, 215, 0, 0.25);
}
.game-countdown {
    font-size: 72px;
    font-weight: 900;
    color: white;
    margin-top: 12px;
    text-shadow: 0 0 20px rgba(255,255,255,0.4), 0 0 40px rgba(0, 200, 255, 0.25);
    animation: countPulse 1s ease-in-out infinite;
    line-height: 1;
}
@keyframes countPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.12); opacity: 0.85; }
}
@keyframes msgAppear {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.7); }
    100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* ===== Result Box ===== */
.result-box {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 100;
    background: rgba(12, 15, 30, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 22px;
    padding: 24px 32px;
    text-align: center;
    color: white;
    min-width: 320px;
    max-width: 400px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.6), 0 0 80px rgba(255, 215, 0, 0.06);
    animation: resultFadeIn 0.5s cubic-bezier(.4, 0, .2, 1);
}
.result-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
    color: rgba(255, 255, 255, 0.75);
}
.result-verdict {
    font-size: 24px;
    font-weight: 900;
    margin-bottom: 12px;
    letter-spacing: 1px;
}
.result-verdict.correct { color: #00e676; text-shadow: 0 0 16px rgba(0, 230, 118, 0.3); }
.result-verdict.wrong { color: #ff5252; text-shadow: 0 0 16px rgba(255, 82, 82, 0.3); }

.result-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 16px;
    font-size: 13px;
}
.result-table thead th {
    color: rgba(255, 215, 0, 0.8);
    padding: 7px 6px;
    border-bottom: 1px solid rgba(255, 215, 0, 0.2);
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.result-table tbody td {
    padding: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.result-table tbody tr.highlight-row {
    background: rgba(255, 215, 0, 0.06);
}
@keyframes resultFadeIn {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.85); }
    100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* ===== Next Round Button ===== */
.next-round-btn {
    padding: 11px 30px;
    font-size: 15px;
    font-weight: 700;
    color: #0c0e1a;
    background: linear-gradient(135deg, #ffd700, #f0a500);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    letter-spacing: 0.5px;
}
.next-round-btn:hover {
    transform: scale(1.06);
    box-shadow: 0 4px 24px rgba(255, 215, 0, 0.35);
}
.next-round-btn:active {
    transform: scale(0.97);
}

/* ===== Utilities ===== */
.hidden {
    display: none !important;
}

/* ===== Card Reveal Animation ===== */
.card-revealing .role {
    animation: roleReveal 0.4s ease;
}
@keyframes roleReveal {
    0% { opacity: 0; transform: translateX(-50%) scale(0.5); }
    100% { opacity: 1; transform: translateX(-50%) scale(1); }
}
