/* ==========================================================================
   UNO CARD BATTLE — MASTER DESIGN SYSTEM
   Diselaraskan 100% Persis dengan 13 Layar Referensi Visual Mockup
   ========================================================================== */

:root {
    /* --- UNO Signature Colors --- */
    --red: #ff2a3a;
    --red-dark: #b81020;
    --red-glow: rgba(255, 42, 58, 0.45);

    --yellow: #ffbb00;
    --yellow-dark: #d99b00;
    --yellow-glow: rgba(255, 187, 0, 0.45);

    --green: #00c853;
    --green-dark: #008f3a;
    --green-glow: rgba(0, 200, 83, 0.45);

    --blue: #0088ff;
    --blue-dark: #005fba;
    --blue-glow: rgba(0, 136, 255, 0.45);

    --purple: #9c27b0;
    --purple-glow: rgba(156, 39, 176, 0.45);

    /* --- Theme Palettes (Gelap / Terang) --- */
    --bg-dark: #080a1a;
    --bg-arena-felt: radial-gradient(ellipse at center, #0a4d3c 0%, #052b21 60%, #02140f 100%);
    --bg-felt-glow: 0 0 60px rgba(0, 230, 118, 0.25);
    
    --bg-glass-card: rgba(16, 22, 46, 0.82);
    --border-glass: rgba(255, 255, 255, 0.16);
    --border-glass-cyan: rgba(0, 229, 255, 0.5);

    --text-primary: #ffffff;
    --text-secondary: #9ea8c7;
    --text-muted: #5e6784;

    /* --- Card Metrics --- */
    --card-width: 66px;
    --card-height: 94px;
    --card-radius: 10px;

    /* --- Fonts --- */
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;

    --transition-snappy: 0.18s cubic-bezier(0.2, 0.8, 0.2, 1);
    --transition-smooth: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light Theme overrides */
body.theme-terang {
    --bg-dark: #eef3fc;
    --text-primary: #121829;
    --text-secondary: #566488;
    --bg-glass-card: rgba(255, 255, 255, 0.9);
    --border-glass: rgba(0, 0, 0, 0.1);
}

/* --- Base & Reset --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    width: 100%;
    min-height: 100vh;
    font-family: var(--font-main);
    background: var(--bg-dark);
    color: var(--text-primary);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
    color: inherit;
}

h1, h2, h3, h4, .btn-play-hero, .arena-title, .uno-logo-text {
    font-family: var(--font-display);
}

/* ==========================================================================
   BUTTONS (Sesuai Desain Tombol Kuning Tebal & Pill Modern)
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
    transition: all var(--transition-snappy);
    position: relative;
    user-select: none;
}

.btn:active {
    transform: scale(0.96);
}

/* Big Gold/Yellow Hero Button (Screen 1 & 2) */
.btn-gold-hero {
    background: linear-gradient(180deg, #ffe033 0%, #ffaa00 100%);
    color: #3b2800;
    font-size: 1.2rem;
    font-weight: 900;
    letter-spacing: 0.8px;
    padding: 16px 36px;
    border-radius: 32px;
    border: 3px solid #fff59d;
    box-shadow: 0 8px 0 #b37400, 0 12px 25px rgba(255, 170, 0, 0.45);
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
    transition: all var(--transition-snappy);
}

.btn-gold-hero:hover {
    transform: translateY(-3px);
    box-shadow: 0 11px 0 #b37400, 0 16px 32px rgba(255, 170, 0, 0.6);
    background: linear-gradient(180deg, #ffea66 0%, #ffb71a 100%);
}

.btn-gold-hero:active {
    transform: translateY(4px);
    box-shadow: 0 4px 0 #b37400, 0 6px 15px rgba(255, 170, 0, 0.4);
}

/* Blue Glass Pill Button */
.btn-pill-blue {
    background: linear-gradient(180deg, #0088ff 0%, #0066cc 100%);
    color: #ffffff;
    font-weight: 700;
    border-radius: 24px;
    padding: 10px 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 14px rgba(0, 136, 255, 0.4);
}

.btn-pill-blue:hover {
    background: linear-gradient(180deg, #1a94ff 0%, #0077e6 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 136, 255, 0.6);
}

/* Spectacular Glowing UNO Button (Screen 3 & 9) */
.btn-uno-dramatic {
    background: linear-gradient(180deg, #ff6600 0%, #ff2200 100%);
    color: #ffffff;
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 900;
    letter-spacing: 2px;
    padding: 12px 28px;
    border-radius: 28px;
    border: 3px solid #ffcc80;
    box-shadow: 0 6px 0 #991100, 0 8px 30px rgba(255, 68, 0, 0.7);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    animation: unoPulseAnim 1.2s infinite alternate ease-in-out;
}

@keyframes unoPulseAnim {
    0% { transform: scale(1); box-shadow: 0 6px 0 #991100, 0 8px 30px rgba(255, 68, 0, 0.7); }
    100% { transform: scale(1.06); box-shadow: 0 6px 0 #991100, 0 12px 45px rgba(255, 100, 0, 0.95); }
}

/* Secondary & Glass Buttons */
.btn-glass-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(18, 24, 48, 0.75);
    border: 1px solid var(--border-glass);
    border-radius: 18px;
    padding: 14px 18px;
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 700;
    backdrop-filter: blur(14px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
    transition: all var(--transition-snappy);
}

.btn-glass-icon .icon-wrap {
    font-size: 1.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
}

.btn-glass-icon:hover {
    background: rgba(30, 40, 78, 0.85);
    border-color: rgba(0, 229, 255, 0.4);
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5);
}

/* ==========================================================================
   SCREEN 1: MENU UTAMA (Sunny Sky + Floating Cards + 3D Logo)
   ========================================================================== */
.menu-screen {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: linear-gradient(180deg, #388bf2 0%, #76b6ff 45%, #bce0fd 75%, #e1f3ff 100%);
    position: relative;
    overflow: hidden;
    padding: 16px 20px 24px;
}

/* Sunny Clouds & Landscape Illustration Background */
.menu-sky-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.sky-hill {
    position: absolute;
    bottom: -80px;
    left: -10%;
    right: -10%;
    height: 240px;
    background: radial-gradient(ellipse at 50% 0%, #68b832 0%, #438f18 100%);
    border-radius: 50%;
    opacity: 0.6;
}

.floating-menu-card {
    position: absolute;
    width: 72px;
    height: 104px;
    border-radius: 10px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.3);
    opacity: 0.85;
    animation: floatCardSlow 8s ease-in-out infinite;
}

.card-float-top-left { top: 12%; left: 6%; transform: rotate(-22deg); animation-delay: 0s; }
.card-float-top-right { top: 14%; right: 6%; transform: rotate(24deg); animation-delay: 2s; }
.card-float-mid-left { top: 48%; left: -10px; transform: rotate(18deg); animation-delay: 4s; }
.card-float-mid-right { top: 52%; right: -10px; transform: rotate(-26deg); animation-delay: 6s; }

@keyframes floatCardSlow {
    0%, 100% { transform: translateY(0) rotate(var(--rot, 0deg)); }
    50% { transform: translateY(-20px) rotate(calc(var(--rot, 0deg) + 6deg)); }
}

/* Header Top Bar (Profile, Coins, Settings) */
.menu-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 20;
}

.player-profile-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(14, 20, 42, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 28px;
    padding: 4px 14px 4px 6px;
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.player-avatar-circle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff80ab, #c2185b);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.player-meta-box {
    display: flex;
    flex-direction: column;
}

.player-meta-name {
    font-size: 0.88rem;
    font-weight: 800;
    color: #ffffff;
}

.player-level-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    color: var(--yellow);
    font-weight: 700;
}

.xp-progress-bar {
    width: 48px;
    height: 5px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    overflow: hidden;
}

.xp-progress-fill {
    width: 65%;
    height: 100%;
    background: #ffcc00;
    border-radius: 4px;
}

/* Coins Pill Badge */
.header-right-badges {
    display: flex;
    align-items: center;
    gap: 10px;
}

.coin-pill-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(14, 20, 42, 0.78);
    border: 1px solid rgba(255, 204, 0, 0.4);
    border-radius: 24px;
    padding: 5px 8px 5px 12px;
    backdrop-filter: blur(12px);
    font-weight: 800;
    font-size: 0.88rem;
    color: #ffcc00;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.btn-coin-add {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #00c853;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 900;
    cursor: pointer;
}

.btn-gear-round {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(14, 20, 42, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

/* Center Logo & Play Section */
.menu-center-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    margin: auto 0;
}

/* 3D Iconic UNO Logo */
.uno-logo-3d-wrap {
    text-align: center;
    margin-bottom: 28px;
    position: relative;
}

.uno-logo-text {
    font-size: 6.2rem;
    font-weight: 900;
    letter-spacing: -2px;
    background: linear-gradient(180deg, #ffea00 0%, #ff2a3a 50%, #b80012 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 4px 0 #ffffff) drop-shadow(0 10px 0 #000000) drop-shadow(0 20px 25px rgba(0, 0, 0, 0.5));
    transform: rotate(-6deg);
    display: inline-block;
    line-height: 0.85;
}

.uno-logo-subtitle {
    font-family: 'Brush Script MT', 'Outfit', cursive, sans-serif;
    font-size: 2.2rem;
    font-weight: 800;
    color: #ffffff;
    text-shadow: 0 3px 8px rgba(0, 0, 0, 0.7), 0 0 15px rgba(0, 0, 0, 0.5);
    margin-top: -12px;
    letter-spacing: 1px;
    transform: rotate(-3deg);
}

/* Bottom 3 Glass Actions Row */
.menu-bottom-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    max-width: 440px;
    width: 100%;
    margin: 0 auto;
    z-index: 20;
}

/* ==========================================================================
   SCREEN 2 & 8: PILIH MODE PERMAINAN & TINGKAT KESULITAN
   ========================================================================== */
.select-screen {
    min-height: 100vh;
    background: radial-gradient(circle at 50% 30%, #151c3b 0%, #0a0d1f 100%);
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.select-title-header {
    text-align: center;
    font-size: 1.8rem;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 24px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.mode-select-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 20px;
    max-width: 680px;
    width: 100%;
    margin: 0 auto 20px;
}

/* Mode VS Komputer Card */
.mode-big-card {
    background: linear-gradient(180deg, rgba(16, 26, 60, 0.9) 0%, rgba(8, 12, 32, 0.95) 100%);
    border: 2px solid #00e5ff;
    box-shadow: 0 0 25px rgba(0, 229, 255, 0.35), inset 0 0 20px rgba(0, 229, 255, 0.15);
    border-radius: 24px;
    padding: 24px 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.mode-robot-avatar {
    width: 110px;
    height: 110px;
    border-radius: 24px;
    background: radial-gradient(circle at 35% 35%, #00e5ff 0%, #0055ff 70%, #002288 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    box-shadow: 0 10px 25px rgba(0, 229, 255, 0.4);
    margin-bottom: 16px;
}

.mode-card-title {
    font-size: 1.3rem;
    font-weight: 900;
    color: #ffffff;
    margin-bottom: 4px;
}

.mode-card-desc {
    font-size: 0.82rem;
    color: var(--text-secondary);
}

/* Tingkat Kesulitan Box */
.difficulty-options-card {
    background: rgba(14, 20, 42, 0.8);
    border: 1px solid var(--border-glass);
    border-radius: 24px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.difficulty-box-title {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.diff-radio-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-glass);
    cursor: pointer;
    font-weight: 700;
    font-size: 0.92rem;
    color: var(--text-secondary);
    transition: all var(--transition-snappy);
}

.diff-radio-pill.active {
    background: rgba(0, 136, 255, 0.15);
    border: 2px solid #0088ff;
    color: #ffffff;
    box-shadow: 0 0 16px rgba(0, 136, 255, 0.4);
}

.diff-radio-pill .radio-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid var(--text-muted);
}

.diff-radio-pill.active .radio-dot {
    background: #0088ff;
    border-color: #ffffff;
}

/* Screen 8: Pilih Jumlah Pemain Cards */
.player-count-section {
    max-width: 680px;
    width: 100%;
    margin: 0 auto 20px;
}

.player-count-title {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--text-secondary);
    text-transform: uppercase;
    text-align: center;
    margin-bottom: 12px;
}

.player-count-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.player-count-card {
    background: rgba(14, 20, 42, 0.8);
    border: 1px solid var(--border-glass);
    border-radius: 18px;
    padding: 18px 12px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-snappy);
}

.player-count-card.active, .player-count-card:hover {
    border-color: #00e5ff;
    background: rgba(0, 229, 255, 0.1);
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.25);
    transform: translateY(-2px);
}

.player-count-card .icon {
    font-size: 1.8rem;
    margin-bottom: 6px;
}

.player-count-card .label {
    font-weight: 800;
    font-size: 0.9rem;
}

/* Select Footer (Back arrow & Start button) */
.select-footer-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 680px;
    width: 100%;
    margin: 0 auto;
}

/* ==========================================================================
   SCREEN 3: TAMPILAN PERMAINAN (Green Felt Arena + Rotating Arrows Aura)
   ========================================================================== */
.arena-screen {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: radial-gradient(circle at 50% 40%, #0a1128 0%, #050814 100%);
    position: relative;
    overflow: hidden;
    padding: 8px 16px 12px;
}

/* Header Bar In Game (Bot info left, Timer & Gear right) */
.arena-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 20;
}

.bot-profile-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(14, 22, 48, 0.85);
    border: 1px solid var(--border-glass);
    border-radius: 24px;
    padding: 4px 14px 4px 6px;
    backdrop-filter: blur(10px);
}

.bot-avatar-circle {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #00e5ff, #0044cc);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    border: 2px solid rgba(255, 255, 255, 0.4);
}

.card-count-badge {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 0.78rem;
    font-weight: 800;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #555;
}

.status-dot.active {
    background: #00e676;
    box-shadow: 0 0 10px #00e676;
}

/* Orange Timer Pill (Screen 3: ⏱ 01:23) */
.arena-timer-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(180deg, #ff8800 0%, #d95500 100%);
    border: 2px solid #ffcc80;
    color: #ffffff;
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 0.95rem;
    padding: 6px 14px;
    border-radius: 20px;
    box-shadow: 0 0 15px rgba(255, 136, 0, 0.5);
}

/* Green Felt Oval Arena Table */
.arena-table-felt {
    position: relative;
    width: 92%;
    max-width: 640px;
    height: 270px;
    margin: auto auto;
    border-radius: 140px;
    background: var(--bg-arena-felt);
    border: 4px solid #00c853;
    box-shadow: 0 0 45px rgba(0, 200, 83, 0.35), inset 0 0 50px rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Computer Fanned Cards (Top of table) */
.computer-cards-fan {
    position: absolute;
    top: -24px;
    display: flex;
    justify-content: center;
    z-index: 10;
}

.computer-cards-fan .card-back {
    width: 38px;
    height: 54px;
    margin-left: -14px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.computer-cards-fan .card-back:first-child {
    margin-left: 0;
}

/* Turn Status Banner Pill */
.table-turn-banner {
    position: absolute;
    top: 24px;
    background: rgba(8, 14, 30, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 4px 16px;
    font-size: 0.82rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0.3px;
    backdrop-filter: blur(8px);
}

/* Active Color Badge (Right of table) */
.table-active-color-badge {
    position: absolute;
    right: 20px;
    top: 24px;
    background: rgba(8, 14, 30, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 4px 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    font-weight: 800;
    color: #ffffff;
}

.color-dot-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    box-shadow: 0 0 8px currentColor;
}

/* Center Battlefield (Draw Pile & Discard Pile) */
.table-center-battlefield {
    display: flex;
    align-items: center;
    gap: 40px;
    margin-top: 20px;
}

/* Draw Pile with 3D Deck stack */
.draw-pile-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}

.deck-count-text {
    font-size: 0.72rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.75);
}

/* Discard Pile with Glowing Rotating Arrows Aura (Screen 3: ⟳ ⟲) */
.discard-pile-group {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rotating-arrows-aura {
    position: absolute;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 2px dashed rgba(255, 255, 255, 0.35);
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.2);
    pointer-events: none;
    animation: rotateAura 12s linear infinite;
}

.rotating-arrows-aura::before, .rotating-arrows-aura::after {
    content: '⟳';
    position: absolute;
    font-size: 1.4rem;
    color: #ffff00;
    text-shadow: 0 0 10px #ffff00;
}

.rotating-arrows-aura::before { top: -10px; left: 45%; }
.rotating-arrows-aura::after { bottom: -10px; right: 45%; }

@keyframes rotateAura {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Bottom Player Section */
.arena-player-section {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 680px;
    margin: 0 auto;
    z-index: 20;
}

.player-hud-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    padding: 0 4px 6px;
}

.player-action-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Player Hand Fanning */
.arena-player-hand {
    display: flex;
    justify-content: center;
    gap: 0;
    padding: 16px 10px 4px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.arena-player-hand::-webkit-scrollbar {
    display: none;
}

.arena-player-hand .card-front {
    margin-left: -16px;
    transition: transform var(--transition-snappy), box-shadow var(--transition-snappy), filter var(--transition-snappy);
    cursor: pointer;
}

.arena-player-hand .card-front:first-child {
    margin-left: 0;
}

.arena-player-hand .card-front:hover {
    transform: translateY(-24px) scale(1.1);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.7);
    z-index: 30;
}

.arena-player-hand .card-front.card-valid {
    border-color: #ffffff;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.6);
}

.arena-player-hand .card-front.card-invalid {
    opacity: 0.5;
    filter: grayscale(0.5) brightness(0.7);
    cursor: not-allowed;
}

/* ==========================================================================
   SCREEN 4: DESAIN KARTU OTENTIK (Thick White Border + Inner Oval)
   ========================================================================== */
.card {
    width: var(--card-width);
    height: var(--card-height);
    border-radius: var(--card-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
    user-select: none;
    border: 3.5px solid #ffffff;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
    overflow: hidden;
}

/* Inner Oval */
.card-front::before {
    content: '';
    position: absolute;
    width: 84%;
    height: 76%;
    border-radius: 50%;
    transform: rotate(-25deg);
    background: rgba(255, 255, 255, 0.22);
    pointer-events: none;
}

.card-center-symbol {
    font-family: var(--font-display);
    font-size: 2.1rem;
    font-weight: 900;
    line-height: 1;
    color: #ffffff;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
    z-index: 2;
}

.card-corner-index {
    position: absolute;
    font-family: var(--font-display);
    font-size: 0.68rem;
    font-weight: 900;
    color: #ffffff;
    z-index: 2;
    line-height: 1;
}

.corner-tl { top: 4px; left: 5px; }
.corner-br { bottom: 4px; right: 5px; transform: rotate(180deg); }

/* Colors */
.card-red { background: linear-gradient(135deg, #ff4d5a 0%, #d61329 100%); }
.card-yellow { background: linear-gradient(135deg, #ffea00 0%, #e6a800 100%); }
.card-yellow .card-center-symbol,
.card-yellow .card-corner-index {
    color: #1a1a1a;
    text-shadow: none;
}

.card-green { background: linear-gradient(135deg, #00e676 0%, #009624 100%); }
.card-blue { background: linear-gradient(135deg, #00a0ff 0%, #005fba 100%); }

/* Wild Card (4 Quadrants Wheel) */
.card-wild {
    background: #111118;
    border-color: #ffffff;
}

.wild-wheel-oval {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: conic-gradient(
        #ff2a3a 0deg 90deg,
        #0088ff 90deg 180deg,
        #ffbb00 180deg 270deg,
        #00c853 270deg 360deg
    );
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    transform: rotate(-25deg);
}

.wild-wheel-oval.plus-four::after {
    content: '+4';
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 900;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    transform: rotate(25deg);
}

/* Card Back Design */
.card-back {
    background: radial-gradient(circle at center, #1b2144 0%, #0c0f24 100%);
    border: 3.5px solid #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-back-uno-oval {
    width: 82%;
    height: 55%;
    border-radius: 50%;
    background: #ff2a3a;
    border: 2px solid #ffcc00;
    transform: rotate(-25deg);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.4);
}

.card-back-uno-oval span {
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 900;
    color: #ffcc00;
    letter-spacing: 1px;
}

/* ==========================================================================
   SCREEN 5: MODAL PILIH WARNA (WILD)
   ========================================================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(4, 7, 20, 0.82);
    backdrop-filter: blur(16px);
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeInModal 0.25s ease;
}

@keyframes fadeInModal {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-box-wild {
    background: rgba(14, 20, 44, 0.95);
    border: 1px solid var(--border-glass);
    border-radius: 26px;
    padding: 28px;
    max-width: 520px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    position: relative;
}

.modal-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.modal-header-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: #ffffff;
}

.btn-close-modal {
    font-size: 1.3rem;
    color: var(--text-secondary);
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
}

.wild-picker-layout {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 24px;
    align-items: center;
}

.wild-card-big-preview {
    width: 120px;
    height: 170px;
    border-radius: 14px;
    border: 4px solid #ffffff;
    background: #111;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.wild-card-big-preview .wild-wheel-oval {
    width: 80px;
    height: 80px;
}

.color-buttons-2x2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.btn-pick-color {
    padding: 18px 12px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 1rem;
    font-weight: 800;
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
    transition: all var(--transition-snappy);
}

.btn-pick-color:hover {
    transform: scale(1.05);
}

.btn-pick-red { background: linear-gradient(135deg, #ff4d5a, #d61329); }
.btn-pick-yellow { background: linear-gradient(135deg, #ffea00, #e6a800); color: #222; }
.btn-pick-green { background: linear-gradient(135deg, #00e676, #009624); }
.btn-pick-blue { background: linear-gradient(135deg, #00a0ff, #005fba); }

/* ==========================================================================
   SCREENS 6, 7, 8, 9: ACTION EFFECT POP-UP OVERLAYS
   ========================================================================== */
.action-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(4, 7, 20, 0.75);
    backdrop-filter: blur(12px);
    z-index: 600;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.action-popup-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

.action-popup-card {
    background: radial-gradient(circle at center, rgba(30, 42, 90, 0.95) 0%, rgba(10, 14, 35, 0.98) 100%);
    border: 2px solid var(--border-glass-cyan);
    border-radius: 32px;
    padding: 36px 48px;
    text-align: center;
    box-shadow: 0 0 50px rgba(0, 229, 255, 0.3);
    transform: scale(0.8);
    transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.action-popup-overlay.show .action-popup-card {
    transform: scale(1);
}

.action-3d-title {
    font-size: 4rem;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 12px;
}

.action-banner-pill {
    display: inline-block;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 6px 20px;
    font-size: 0.95rem;
    font-weight: 700;
    color: #ffffff;
}

/* Specific Effect Visuals */
.effect-plus4-glow {
    color: #ffea00;
    text-shadow: 0 0 30px #ffaa00, 0 0 60px #ff2200;
}

.effect-skip-glow {
    color: #ff3344;
    text-shadow: 0 0 30px #ff3344;
}

.effect-reverse-glow {
    color: #ba68c8;
    text-shadow: 0 0 30px #9c27b0;
}

/* ==========================================================================
   SCREEN 10: LAYAR MENANG (VICTORY SCREEN)
   ========================================================================== */
.victory-card-box {
    background: radial-gradient(circle at center, rgba(22, 32, 72, 0.96) 0%, rgba(8, 12, 30, 0.98) 100%);
    border: 2px solid #ffd700;
    border-radius: 32px;
    padding: 40px 32px;
    text-align: center;
    max-width: 440px;
    width: 100%;
    box-shadow: 0 0 60px rgba(255, 215, 0, 0.35);
}

.victory-trophy-icon {
    font-size: 4.5rem;
    filter: drop-shadow(0 6px 16px rgba(255, 215, 0, 0.5));
    margin-bottom: 12px;
}

.victory-main-title {
    font-size: 2.2rem;
    font-weight: 900;
    color: #ffea00;
    text-shadow: 0 2px 10px rgba(255, 215, 0, 0.6);
    margin-bottom: 4px;
}

.victory-subtitle {
    font-size: 0.92rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

/* 4 Metrics Row */
.victory-stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-glass);
    border-radius: 18px;
    padding: 12px 8px;
    margin-bottom: 24px;
}

.v-stat-box {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.v-stat-val {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 900;
    color: #ffffff;
}

.v-stat-lbl {
    font-size: 0.68rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ==========================================================================
   SCREEN 11: PENGATURAN (MODAL WITH THEME PICKER)
   ========================================================================== */
.settings-box-layout {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 20px;
    text-align: left;
}

.toggle-switch-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toggle-switch-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 12px;
}

.toggle-switch-lbl {
    font-size: 0.88rem;
    font-weight: 700;
}

/* iOS Toggle Switch */
.ios-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.ios-switch input { opacity: 0; width: 0; height: 0; }

.ios-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    transition: 0.25s;
}

.ios-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: 0.25s;
}

input:checked + .ios-slider { background: #00c853; }
input:checked + .ios-slider:before { transform: translateX(20px); }

/* Theme Selector Cards */
.theme-select-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.theme-card-thumb {
    border: 2px solid var(--border-glass);
    border-radius: 14px;
    padding: 10px;
    cursor: pointer;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 700;
    transition: all var(--transition-snappy);
}

.theme-card-thumb.active {
    border-color: #00e5ff;
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.4);
    background: rgba(0, 229, 255, 0.1);
}

/* ==========================================================================
   SCREEN 12: STATISTIK PEMAIN
   ========================================================================== */
.stats-header-profile {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}

.stats-grid-7 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.stat-metric-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    border-radius: 14px;
    padding: 12px 8px;
    text-align: center;
}

.stat-metric-val {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 900;
    color: #ffffff;
}

.stat-metric-lbl {
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* ==========================================================================
   SCREEN 13: MENU PAUSE (4 Colored Pill Buttons)
   ========================================================================== */
.pause-menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-pause-green {
    background: linear-gradient(180deg, #00e676 0%, #009624 100%);
    color: #ffffff;
    font-weight: 800;
    border-radius: 20px;
    padding: 14px;
    box-shadow: 0 4px 14px rgba(0, 200, 83, 0.4);
}

.btn-pause-blue {
    background: linear-gradient(180deg, #0088ff 0%, #005fba 100%);
    color: #ffffff;
    font-weight: 800;
    border-radius: 20px;
    padding: 14px;
    box-shadow: 0 4px 14px rgba(0, 136, 255, 0.4);
}

.btn-pause-dark {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-weight: 800;
    border-radius: 20px;
    padding: 14px;
    border: 1px solid var(--border-glass);
}

.btn-pause-red {
    background: linear-gradient(180deg, #ff3344 0%, #cc1122 100%);
    color: #ffffff;
    font-weight: 800;
    border-radius: 20px;
    padding: 14px;
    box-shadow: 0 4px 14px rgba(255, 51, 68, 0.4);
}

/* ==========================================================================
   SCREEN 15: HALAMAN ATURAN (2 Kolom)
   ========================================================================== */
.rules-two-columns {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 24px;
    text-align: left;
    max-height: 65vh;
    overflow-y: auto;
    padding-right: 8px;
}

.rules-two-columns::-webkit-scrollbar {
    width: 6px;
}

.rules-two-columns::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.rule-block {
    margin-bottom: 16px;
}

.rule-block h3 {
    font-size: 0.95rem;
    font-weight: 800;
    color: #ffcc00;
    margin-bottom: 4px;
}

.rule-block p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Right column visual badges */
.rule-visual-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 14px;
    padding: 10px;
}

.rule-visual-item .desc {
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.rule-visual-item strong {
    color: #ffffff;
    display: block;
}

/* Responsive Adjustments */
@media (max-width: 600px) {
    .mode-select-grid, .settings-box-layout, .rules-two-columns, .wild-picker-layout {
        grid-template-columns: 1fr;
    }
    
    .stats-grid-7 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .arena-table-felt {
        width: 96%;
        height: 240px;
    }
    
    .uno-logo-text {
        font-size: 4.5rem;
    }
}

/* ==========================================================================
   MULTIPLAYER ONLINE STYLES (2-4 PEMAIN)
   ========================================================================== */
.btn-mp-hero-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 14px;
    padding: 12px 28px;
    background: rgba(14, 165, 233, 0.2);
    border: 1.5px solid #38bdf8;
    border-radius: 28px;
    color: #e0f2fe;
    font-weight: 700;
    font-size: 0.95rem;
    box-shadow: 0 0 16px rgba(56, 189, 248, 0.3);
    transition: var(--transition-snappy);
    text-decoration: none;
}
.btn-mp-hero-pill:hover {
    background: rgba(14, 165, 233, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 0 24px rgba(56, 189, 248, 0.5);
}

.mp-setup-screen {
    max-width: 540px;
    margin: 0 auto;
    padding: 16px 16px 36px;
    min-height: 100vh;
}

.mp-profile-card {
    background: var(--bg-glass-card);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    padding: 14px 18px;
    margin-bottom: 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.mp-profile-header {
    font-size: 0.95rem;
    font-weight: 700;
    color: #e2e8f0;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mp-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mp-form-label {
    font-size: 0.82rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.mp-input-text, .mp-input-code {
    width: 100%;
    background: rgba(0, 0, 0, 0.45);
    border: 1.5px solid rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    padding: 12px 16px;
    color: #ffffff;
    font-family: var(--font-main);
    font-size: 1rem;
    font-weight: 600;
    outline: none;
    transition: var(--transition-snappy);
}

.mp-input-text:focus, .mp-input-code:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 16px rgba(56, 189, 248, 0.35);
}

.mp-input-code {
    text-align: center;
    font-size: 1.6rem;
    letter-spacing: 4px;
    font-family: var(--font-display);
    text-transform: uppercase;
}

.mp-avatar-picker {
    display: flex;
    gap: 10px;
    justify-content: space-between;
    margin-top: 4px;
}

.mp-avatar-opt {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition-snappy);
}

.mp-avatar-opt:hover {
    transform: scale(1.08);
    background: rgba(255, 255, 255, 0.16);
}

.mp-avatar-opt.active {
    border-color: #f59e0b;
    background: rgba(245, 158, 11, 0.2);
    box-shadow: 0 0 14px rgba(245, 158, 11, 0.5);
    transform: scale(1.12);
}

/* Tabs */
.mp-tab-container {
    display: flex;
    background: rgba(0, 0, 0, 0.35);
    border-radius: 16px;
    padding: 4px;
    margin-bottom: 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

#panel-create .player-count-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

#panel-create .player-count-card {
    padding: 10px 4px;
}

#panel-create .player-count-card .icon {
    font-size: 1.5rem;
    margin-bottom: 4px;
}

#panel-create .player-count-card .label {
    font-size: 0.85rem;
}

#panel-create .player-count-card .sub {
    font-size: 0.72rem;
}

.mp-tab-btn {
    flex: 1;
    padding: 12px;
    text-align: center;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-secondary);
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition-snappy);
}

.mp-tab-btn.active {
    background: linear-gradient(135deg, #0284c7, #0369a1);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.4);
}

.mp-join-box {
    background: var(--bg-glass-card);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    padding: 24px 20px;
    text-align: center;
}

.mp-info-banner {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: rgba(56, 189, 248, 0.08);
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: 14px;
    padding: 14px 16px;
    margin-top: 24px;
    font-size: 0.8rem;
    line-height: 1.5;
    color: #bae6fd;
}

/* --- Multiplayer Lobby Screen --- */
.mp-lobby-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
}

.mp-lobby-card {
    width: 100%;
    max-width: 520px;
    background: var(--bg-glass-card);
    border: 1px solid var(--border-glass);
    border-radius: 24px;
    padding: 24px 22px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.mp-lobby-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.mp-room-code-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.5);
    border: 1.5px solid #f59e0b;
    padding: 8px 18px;
    border-radius: 14px;
    font-family: var(--font-display);
    font-size: 1.7rem;
    font-weight: 800;
    color: #fef08a;
    letter-spacing: 2px;
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.25);
    margin-top: 4px;
}

.btn-copy-code {
    font-size: 1.1rem;
    padding: 4px 8px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    cursor: pointer;
    transition: var(--transition-snappy);
}

.btn-copy-code:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.1);
}

.mp-share-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 8px 14px;
    margin-bottom: 16px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.btn-share-pill {
    background: #0284c7;
    color: #fff;
    font-weight: 700;
    font-size: 0.75rem;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition-snappy);
}

.btn-share-pill:hover {
    background: #0369a1;
}

.mp-lobby-capacity {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.88rem;
    font-weight: 700;
    color: #cbd5e1;
    margin-bottom: 16px;
}

.mp-pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 10px #22c55e;
    animation: pulseDot 1.5s infinite;
}

@keyframes pulseDot {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.4); opacity: 0.6; }
}

/* Slots Grid */
.mp-slots-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 22px;
}

.mp-slot-card {
    background: rgba(0, 0, 0, 0.35);
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    transition: var(--transition-snappy);
}

.mp-slot-card.filled {
    border-color: rgba(56, 189, 248, 0.4);
    background: rgba(56, 189, 248, 0.06);
}

.mp-slot-card.filled.self {
    border-color: #f59e0b;
    background: rgba(245, 158, 11, 0.08);
}

.mp-slot-card.empty {
    border-style: dashed;
    opacity: 0.55;
}

.mp-slot-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.mp-slot-avatar-placeholder {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 8px;
}

.mp-slot-name {
    font-size: 0.88rem;
    font-weight: 700;
    color: #f1f5f9;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 4px;
}

.mp-slot-name.muted {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 500;
}

.mp-slot-role {
    font-size: 0.7rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mp-slot-role.host {
    background: #f59e0b;
    color: #1e1b4b;
}

.mp-slot-role.guest {
    background: #22c55e;
    color: #052e16;
}

.mp-min-players-hint {
    text-align: center;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 8px;
}

.mp-guest-waiting-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 16px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
}

.spinner-mini {
    width: 20px;
    height: 20px;
    border: 2.5px solid rgba(255, 255, 255, 0.2);
    border-top-color: #38bdf8;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* --- Multiplayer Arena Layout --- */
.mp-arena {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    min-height: 100vh;
    padding-bottom: 110px;
}

.mp-arena-info-pill {
    display: flex;
    align-items: center;
    gap: 6px;
}

.mp-code-pill {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 4px 10px;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 0.82rem;
    color: #fef08a;
}

.mp-direction-badge {
    background: rgba(14, 165, 233, 0.2);
    border: 1px solid #38bdf8;
    border-radius: 20px;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #7dd3fc;
}

.reverse-rot svg {
    transform: scaleX(-1);
}

/* Surrounding Opponents Layout (2, 3, 4 players) */
.mp-opponents-container {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 8px 16px;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    z-index: 10;
}

.mp-opponent-pod {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    transition: var(--transition-snappy);
}

.mp-opponent-pod .opponent-profile-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(16, 22, 46, 0.85);
    border: 1.5px solid rgba(255, 255, 255, 0.16);
    border-radius: 28px;
    padding: 4px 12px 4px 4px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
    transition: var(--transition-snappy);
}

.mp-opponent-pod.active-turn .opponent-profile-pill {
    border-color: #f59e0b;
    background: rgba(245, 158, 11, 0.25);
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.6);
    transform: scale(1.05);
}

.btn-catch-uno {
    margin-top: 6px;
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    color: #fff;
    font-weight: 800;
    font-size: 0.7rem;
    padding: 4px 10px;
    border-radius: 12px;
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.7);
    animation: pulseCatch 1s infinite alternate;
    cursor: pointer;
}

@keyframes pulseCatch {
    from { transform: scale(1); }
    to { transform: scale(1.1); }
}

.uno-shout-tag {
    position: absolute;
    top: -14px;
    background: #ff2a3a;
    color: #fff;
    font-weight: 900;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(255, 42, 58, 0.8);
    animation: bounce 0.6s infinite alternate;
}

@keyframes bounce {
    from { transform: translateY(0); }
    to { transform: translateY(-4px); }
}

.opponent-hand-preview {
    display: flex;
    justify-content: center;
    margin-top: 4px;
}

.opp-mini-card {
    width: 14px;
    height: 20px;
    background: #1e293b;
    border: 1px solid #ffffff;
    border-radius: 3px;
    margin-left: -7px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.opp-mini-card:first-child {
    margin-left: 0;
}

/* ==========================================================================
   PASS & PLAY (1 HP MULTIPLAYER TANPA ROOM)
   ========================================================================== */
.pass-opponents-bar {
    display: flex;
    gap: 8px;
    align-items: center;
    max-width: 60%;
    overflow-x: auto;
    padding-bottom: 2px;
}

.pass-opp-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(16, 22, 46, 0.85);
    border: 1.5px solid var(--border-glass);
    border-radius: 20px;
    padding: 4px 10px 4px 6px;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
    transition: var(--transition-snappy);
}

.pass-opp-pill.active-turn {
    border-color: #00e5ff;
    background: rgba(0, 229, 255, 0.18);
    box-shadow: 0 0 12px rgba(0, 229, 255, 0.4);
}

.pass-opp-pill .avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
}

.pass-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(4, 7, 20, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.pass-modal-card {
    background: linear-gradient(145deg, rgba(20, 28, 58, 0.95), rgba(10, 14, 32, 0.98));
    border: 2px solid #38bdf8;
    box-shadow: 0 0 40px rgba(56, 189, 248, 0.35);
    border-radius: 28px;
    padding: 32px 24px;
    max-width: 440px;
    width: 100%;
    text-align: center;
    animation: modalPop 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.pass-phone-icon {
    font-size: 3rem;
    margin-bottom: 12px;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.4));
}

.pass-modal-title {
    font-size: 1.1rem;
    color: var(--text-secondary);
    letter-spacing: 2px;
    margin-bottom: 12px;
}

.pass-next-player-badge {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid #f59e0b;
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.35);
    border-radius: 30px;
    padding: 10px 24px;
    margin-bottom: 16px;
}

.pass-next-avatar {
    font-size: 2rem;
}

.pass-next-name {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 900;
    color: #ffffff;
}

.pass-modal-sub {
    color: #94a3b8;
    font-size: 0.88rem;
    line-height: 1.5;
    margin-bottom: 8px;
}


