/* ============================================
   RUBIS CASINO - Flat Design
   Primary: #c93840 | Dark BG: #090909
   ============================================ */

/* ---- Toast Notifications ---- */
.rc-toast-container {
    position: fixed;
    top: 1.2rem;
    right: 1.2rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
}
.rc-toast {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 1.1rem;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    backdrop-filter: blur(12px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    pointer-events: all;
    cursor: pointer;
    transform: translateX(120%);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(.22,.68,0,1.1), opacity 0.3s;
    max-width: 360px;
}
.rc-toast.show { transform: translateX(0); opacity: 1; }
.rc-toast.hide { transform: translateX(120%); opacity: 0; }
.rc-toast i { font-size: 1.15rem; flex-shrink: 0; }
.rc-toast span { line-height: 1.35; }

.rc-toast-error   { background: rgba(220,38,38,0.92); }
.rc-toast-success { background: rgba(22,163,74,0.92); }
.rc-toast-warning { background: rgba(217,119,6,0.92); }
.rc-toast-info    { background: rgba(59,130,246,0.92); }

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Lexend:wght@100..900&display=swap');
:root {
    --primary: #c93840;
    --primary-hover: #a82d34;
    --primary-light: rgba(201, 56, 64, 0.12);
    --primary-glow: rgba(201, 56, 64, 0.25);
    --accent: #f59e0b;
    --accent-hover: #d97706;
    --success: #00e701;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #06b6d4;
    --navbar-height: 60px;
    --subnav-height: 46px;
}

/* ---- DARK THEME ---- */
[data-bs-theme="dark"] {
    --bg-body: #090909;
    --bg-navbar: #111111;
    --bg-subnav: #111111;
    --bg-card: #181818;
    --bg-card-hover: #222222;
    --bg-input: #111111;
    --bg-elevated: #151515;
    --text-primary: #ffffff;
    --text-secondary: #b1bad3;
    --text-muted: #5a6a7a;
    --border-color: #1e2a35;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.5);
}

/* ---- LIGHT THEME ---- */
[data-bs-theme="light"] {
    --bg-body: #f0f2f5;
    --bg-navbar: #ffffff;
    --bg-subnav: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f8f9fa;
    --bg-input: #e8edf1;
    --bg-elevated: #ffffff;
    --text-primary: #1a2c38;
    --text-secondary: #557086;
    --text-muted: #8a9cb5;
    --border-color: #e0e4e8;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
}

/* ============================================
   BASE
   ============================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'DM Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-primary);
    transition: background-color 0.3s, color 0.3s;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a { text-decoration: none; color: inherit; }
button { cursor: pointer; }

::selection { background: var(--primary); color: #fff; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 3px; }

.text-accent { color: var(--accent) !important; }
.text-muted { color: var(--text-muted) !important; }

/* ============================================
   NAVBAR (horizontal)
   ============================================ */
.navbar-main {
    height: var(--navbar-height);
    background: var(--bg-navbar);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 1050;
}

.navbar-logo {
    font-family: 'Lexend', sans-serif;
    font-weight: 800;
    font-size: 1.35rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-right: 2rem;
    flex-shrink: 0;
}

.navbar-logo i { color: var(--primary); font-size: 1.5rem; }
.navbar-logo-icon { height: 1.2rem; width: auto; }
.navbar-logo-img { height: 1.5rem; width: auto; }
@media (max-width: 576px) { .navbar-logo-text { display: none; } }
[data-bs-theme="dark"] .navbar-logo-img { filter: brightness(0) invert(1); }
[data-bs-theme="light"] .navbar-logo-img { filter: brightness(0); }

/* Search in navbar */
.navbar-search {
    position: relative;
    flex: 1;
    max-width: 380px;
    margin-right: auto;
}

.navbar-search input {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.45rem 1rem 0.45rem 2.4rem;
    border-radius: 8px;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.navbar-search input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.navbar-search input::placeholder { color: var(--text-muted); }

.navbar-search i {
    position: absolute;
    left: 0.8rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1rem;
}

/* Right side */
.navbar-right {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-shrink: 0;
    margin-left: 1rem;
}

.navbar-points {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--bg-card);
    color: var(--text-primary);
    padding: 0.4rem 0.9rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.85rem;
    border: 1px solid var(--border-color);
}

.navbar-points i { color: var(--accent); font-size: 1.05rem; }

.btn-wallet {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 0.4rem 1.1rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.82rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    transition: all 0.2s;
}

.btn-wallet:hover {
    background: var(--primary-hover);
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-connect {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    padding: 0.4rem 1.1rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.82rem;
    transition: all 0.15s;
}

.btn-connect:hover {
    color: var(--text-primary);
    border-color: var(--text-muted);
}

.btn-register-nav {
    background: var(--success);
    color: #000;
    border: none;
    padding: 0.4rem 1.1rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.82rem;
    transition: all 0.2s;
}

.btn-register-nav:hover { opacity: 0.9; }

.navbar-toggle {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all 0.2s;
}

.navbar-toggle:hover { color: var(--primary); border-color: var(--primary); }

.navbar-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 0.78rem;
    position: relative;
    cursor: pointer;
    transition: transform 0.2s;
}

.navbar-avatar:hover { transform: scale(1.06); }

.navbar-avatar .level-badge {
    position: absolute;
    bottom: -4px;
    right: -4px;
    background: var(--accent);
    color: #fff;
    font-size: 0.52rem;
    font-weight: 800;
    padding: 1px 4px;
    border-radius: 4px;
    border: 2px solid var(--bg-navbar);
}

.navbar-burger {
    display: none;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.4rem;
}

/* ---- SUB NAVIGATION ---- */
.subnav {
    height: var(--subnav-height);
    background: var(--bg-subnav);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 1.5rem;
}

.subnav-burger {
    display: none;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.3rem;
    padding: 0.3rem 0.5rem;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.15s;
}

.subnav-burger:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

.subnav-links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    overflow-x: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.subnav-links::-webkit-scrollbar { display: none; }

.subnav-link {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.85rem;
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 500;
    transition: all 0.15s;
    white-space: nowrap;
    flex-shrink: 0;
    cursor: pointer;
}

.subnav-link:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

.subnav-link.active {
    color: #fff;
    background: var(--primary);
}

.subnav-link i { font-size: 1.05rem; }

.subnav-link .badge-new {
    background: var(--danger);
    color: #fff;
    font-size: 0.55rem;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 50px;
}

.subnav-link .badge-count {
    background: var(--bg-input);
    color: var(--text-muted);
    font-size: 0.62rem;
    font-weight: 600;
    padding: 1px 5px;
    border-radius: 50px;
}

.subnav-sep {
    width: 1px;
    height: 20px;
    background: var(--border-color);
    margin: 0 0.3rem;
    flex-shrink: 0;
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem;
    flex: 1;
    width: 100%;
}

/* ============================================
   PAGE SECTIONS (SPA-like navigation)
   ============================================ */
.page-section { animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.section-header { margin-bottom: 2rem; }
.section-title {
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.3rem;
}
.section-title i { color: var(--primary); }
.section-subtitle { color: var(--text-muted); font-size: 0.88rem; }

/* ============================================
   HERO BANNER
   ============================================ */
.hero-banner {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.hero-banner-main {
    flex: 1;
    background: linear-gradient(135deg, #090909 0%, var(--primary) 100%);
    border-radius: 14px;
    padding: 2.5rem 3rem;
    position: relative;
    overflow: hidden;
    min-height: 260px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-banner-main::after {
    content: '';
    position: absolute;
    top: -30%;
    right: -10%;
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-banner-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.3;
    margin-bottom: 1rem;
    max-width: 420px;
    position: relative;
    z-index: 2;
}

.hero-banner-subtitle {
    color: rgba(255,255,255,0.6);
    font-size: 0.92rem;
    margin-bottom: 1.5rem;
    max-width: 360px;
    position: relative;
    z-index: 2;
}

.hero-banner-cta {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-banner-cta .btn-register {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 0.65rem 1.8rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.hero-banner-cta .btn-register:hover {
    background: var(--primary-hover);
    box-shadow: 0 6px 20px var(--primary-glow);
    transform: translateY(-1px);
}

.hero-banner-cta .btn-social {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 0.55rem 1.2rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.82rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.2s;
}

.hero-banner-cta .btn-social:hover {
    border-color: var(--text-muted);
    background: var(--bg-card-hover);
}

.hero-banner-cards {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 320px;
    flex-shrink: 0;
}

.hero-category-card {
    flex: 1;
    border-radius: 14px;
    padding: 1.5rem;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    min-height: 120px;
    cursor: pointer;
    transition: transform 0.2s;
}

.hero-category-card:hover { transform: scale(1.02); }
.hero-category-card.casino-card { background: linear-gradient(135deg, #0d0d30, #1a1a6e); }
.hero-category-card.vip-card { background: linear-gradient(135deg, #3d1a00, #b45309); }

.hero-category-card-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    z-index: 2;
}

.hero-category-card-info i { font-size: 1.2rem; }
.hero-category-card-info span { font-weight: 700; color: #fff; font-size: 0.95rem; }

.hero-category-card .online-count {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    color: rgba(255,255,255,0.7);
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 2;
}

.hero-category-card .online-count::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--success);
    border-radius: 50%;
}

.hero-category-card .card-emoji {
    position: absolute;
    top: 50%;
    right: 15%;
    transform: translateY(-50%);
    font-size: 4rem;
    opacity: 0.25;
}

/* ============================================
   FILTER BAR
   ============================================ */
.filter-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    background: var(--bg-card);
    padding: 0.6rem 1rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    flex-wrap: wrap;
}
.search-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1.2rem;
    margin-bottom: 2rem;
}
.search-no-results {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--text-muted);
    padding: 2rem;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.filter-select {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.45rem 0.8rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    padding-right: 1.8rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235a6a7a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.6rem center;
}

.filter-search {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 0.88rem;
    padding: 0.3rem 0.5rem;
}

.filter-search:focus { outline: none; }
.filter-search::placeholder { color: var(--text-muted); }

/* ============================================
   GAME ROW (Horizontal scroll)
   ============================================ */
.game-row { margin-bottom: 2rem; }

.game-row-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.game-row-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text-primary);
}

.game-row-title i { font-size: 1.2rem; color: var(--primary); }

.game-row-arrows { display: flex; gap: 0.4rem; }

.game-row-arrow {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.game-row-arrow:hover {
    color: var(--text-primary);
    border-color: var(--text-muted);
    background: var(--bg-card-hover);
}

.game-row-scroll {
    display: flex;
    gap: 0.8rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding-bottom: 0.5rem;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.game-row-scroll::-webkit-scrollbar { display: none; }

/* ---- Game Tile ---- */
.game-tile {
    flex-shrink: 0;
    width: 165px;
    cursor: pointer;
    transition: transform 0.2s;
}

.game-tile:hover { transform: translateY(-4px); }

.game-tile-img {
    width: 165px;
    height: 220px;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    margin-bottom: 0.5rem;
}

.game-tile-img .tile-bg {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

/* Tile avec image de fond personnalisée */
.game-tile-img .tile-bg.tile-bg-img {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Icon inside tile (Tabler icons) */
.game-tile-img .tile-bg .tile-icon {
    font-size: 34px;
    line-height: 1;
    color: var(--tile-icon-color, #fff);
    display: inline-block;
}

.game-tile-img .tile-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    border-radius: 12px;
}

.game-tile:hover .tile-overlay { background: rgba(0,0,0,0.5); }
.game-tile:hover .tile-play-btn { opacity: 1; transform: scale(1); }

.tile-play-btn {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 0.6rem 1.4rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.82rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.2s;
}

.game-tile-provider {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    color: rgba(255,255,255,0.8);
    font-size: 0.62rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.game-tile-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.6rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.game-tile-badge.hot { background: var(--danger); color: #fff; }
.game-tile-badge.new { background: var(--success); color: #000; }
.game-tile-badge.excl { background: var(--accent); color: #000; }

.game-tile-name {
    font-weight: 600;
    font-size: 0.82rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.15rem;
}

.game-tile-meta {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--text-muted);
    font-size: 0.72rem;
}

.game-tile-meta .dot-online {
    width: 5px;
    height: 5px;
    background: var(--success);
    border-radius: 50%;
    display: inline-block;
}

/* Disabled / Maintenance game tiles */
.game-tile-disabled { opacity: 0.45; pointer-events: none; filter: grayscale(0.7); }
.game-tile-maintenance { opacity: 0.6; pointer-events: none; }
.tile-overlay-maintenance,
.tile-overlay-disabled {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,0.65); border-radius: 1rem; z-index: 3;
}
.tile-maintenance-label,
.tile-disabled-label {
    display: flex; align-items: center; gap: 0.4rem;
    font-size: 0.78rem; font-weight: 600; color: #fff;
    padding: 0.35rem 0.75rem; border-radius: 0.5rem;
}
.tile-maintenance-label { background: rgba(234,179,8,0.25); color: #facc15; }
.tile-disabled-label { background: rgba(239,68,68,0.25); color: #f87171; }

/* ---- Tile gradient backgrounds ---- */
.tile-slot1 { background: linear-gradient(145deg, #ff6b9d, #c44dff); }
.tile-slot2 { background: linear-gradient(145deg, #f97316, #ef4444); }
.tile-slot3 { background: linear-gradient(145deg, #3b82f6, #8b5cf6); }
.tile-slot4 { background: linear-gradient(145deg, #10b981, #06b6d4); }
.tile-slot5 { background: linear-gradient(145deg, #f59e0b, #ef4444); }
.tile-slot6 { background: linear-gradient(145deg, #8b5cf6, #ec4899); }
.tile-slot7 { background: linear-gradient(145deg, #06b6d4, #3b82f6); }
.tile-slot8 { background: linear-gradient(145deg, #ef4444, #f97316); }
.tile-roulette { background: linear-gradient(145deg, #059669, #10b981); }
.tile-blackjack { background: linear-gradient(145deg, #1e293b, #334155); }
.tile-poker { background: linear-gradient(145deg, #b91c1c, #dc2626); }
.tile-dice { background: linear-gradient(145deg, var(--primary), #60a5fa); }
.tile-crash { background: linear-gradient(145deg, #7c3aed, #a855f7); }
.tile-mines { background: linear-gradient(145deg, #d97706, #fbbf24); }
.tile-plinko { background: linear-gradient(145deg, #0891b2, #22d3ee); }
.tile-fire-blaze { background: linear-gradient(145deg, #f97316, #ef4444); }
.tile-lucky-clover { background: linear-gradient(145deg, #16a34a, #22c55e); }
.tile-thunder-strike { background: linear-gradient(145deg, #ca8a04, #f59e0b); }
.tile-moonlight-spin { background: linear-gradient(145deg, #4f46e5, #8b5cf6); }
.tile-dragons-gold { background: linear-gradient(145deg, #dc2626, #d97706); }
.tile-mystic-gems { background: linear-gradient(145deg, #7c3aed, #a855f7); }
.tile-bingo { background: linear-gradient(145deg, #0d9488, #06b6d4); }
.tile-belote { background: linear-gradient(145deg, #4338ca, #6366f1); }

/* ---- Full games grid ---- */
.games-full-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
    gap: 1rem;
}

.games-full-grid .game-tile { width: 100%; }
.games-full-grid .game-tile-img { width: 100%; }

/* ============================================
   SLOT MACHINE
   ============================================ */
.slot-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.slot-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.slot-section-title {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.slot-section-title i { color: var(--primary); }
.slot-machine { text-align: center; }

/* Slot container layout */
.slot-container {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 1.2rem;
    align-items: start;
}

.slot-display {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    margin: 1.5rem 0;
}

.slot-reel {
    width: 100px;
    height: 110px;
    background: var(--bg-input);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all 0.3s;
}

.slot-reel .reel-value {
    display: flex;
    align-items: center;
    justify-content: center;
}

.slot-reel .reel-value i {
    font-size: 2.8rem;
    color: var(--slot-accent, var(--primary));
    display: block;
    line-height: 1;
}

.slot-reel.spinning {
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
}

.slot-reel.spinning .reel-value {
    animation: reelSpin 0.12s linear infinite;
}

.slot-reel.win-pulse {
    animation: winPulse 0.5s ease-in-out 2;
    border-color: var(--accent);
    box-shadow: 0 0 25px var(--accent);
}

@keyframes reelSpin {
    0% { transform: translateY(-60%); opacity: 0.3; }
    50% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(60%); opacity: 0.3; }
}

@keyframes winPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

.slot-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 1rem 0;
}

.slot-bet-label { color: var(--text-secondary); font-weight: 600; font-size: 0.85rem; }

.slot-bet-input {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    text-align: center;
    width: 110px;
}

.slot-bet-input:focus { outline: none; border-color: var(--primary); }

.slot-spin-btn {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 0.7rem 2.5rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.slot-spin-btn:hover {
    background: var(--primary-hover);
    box-shadow: 0 6px 20px var(--primary-glow);
    transform: translateY(-1px);
}

.slot-spin-btn:active { transform: translateY(1px); }

.slot-win-display { font-size: 1.2rem; font-weight: 700; min-height: 1.8rem; color: var(--accent); }

.slot-info {
    display: flex;
    justify-content: center;
    gap: 2rem;
    color: var(--text-muted);
    font-size: 0.78rem;
    margin-top: 0.5rem;
}

/* ============================================
   UNIVERSAL TRADES CARD
   ============================================ */
.trades-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    overflow: hidden;
}
.trades-card-header {
    padding: 0.85rem 1.1rem;
    border-bottom: 1px solid var(--border-color);
}
.trades-card-header h4 {
    font-size: 0.85rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0;
    color: var(--text-primary);
}
.trades-card-list {
    max-height: 460px;
    overflow-y: auto;
}
.trades-card-empty {
    padding: 2rem 1rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.82rem;
}
.trades-card-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 1.1rem;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    font-size: 0.82rem;
    transition: background 0.15s;
}
.trades-card-row:last-child { border-bottom: none; }
.trades-card-row:hover { background: rgba(255,255,255,0.02); }
.trades-card-user {
    font-weight: 600;
    color: var(--text-primary);
    min-width: 80px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.trades-card-date {
    color: var(--text-muted);
    font-size: 0.72rem;
    flex: 1;
    text-align: center;
}
.trades-card-amount {
    font-weight: 700;
    min-width: 65px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}
.trades-card-amount.won { color: #22c55e; }
.trades-card-amount.lost { color: #ef4444; }
.trades-card-amount.push { color: #facc15; }

/* Slot Sidebar */
.slot-sidebar {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    overflow: hidden;
}
.slot-sidebar .trades-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.slot-sidebar .trades-card-list {
    flex: 1;
    max-height: none;
    overflow-y: auto;
}
.slot-sidebar-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    overflow: hidden;
}
.slot-sidebar-header {
    padding: 0.8rem 1rem;
    border-bottom: 1px solid var(--border-color);
}
.slot-sidebar-header h4 {
    font-size: 0.82rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0;
}
.slot-trades-list {
    max-height: 450px;
    overflow-y: auto;
}
.slot-no-trades {
    padding: 2rem 1rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.82rem;
}
.slot-trade-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.55rem 1rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.8rem;
}
.slot-trade-row:last-child { border-bottom: none; }
.slot-trade-user { font-weight: 600; color: var(--text-primary); min-width: 70px; }
.slot-trade-date { color: var(--text-muted); font-size: 0.72rem; }
.slot-trade-amount { font-weight: 700; min-width: 60px; text-align: right; }
.slot-trade-amount.won { color: #22c55e; }
.slot-trade-amount.lost { color: #ef4444; }
.slot-trade-row.won { background: rgba(34, 197, 94, 0.03); }
.slot-trade-row.lost { background: rgba(239, 68, 68, 0.03); }

/* Slot responsive */
@media (max-width: 767px) {
    .slot-container { grid-template-columns: 1fr; }
    .slot-auto-row { flex-wrap: wrap; }
}

/* ---- Slot auto-play ---- */
.slot-auto-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    margin: 0.5rem 0 0.8rem;
}
.slot-toggle-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.slot-toggle-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
.slot-toggle-track {
    display: block;
    width: 34px;
    height: 18px;
    border-radius: 10px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    position: relative;
    transition: background 0.25s, border-color 0.25s;
}
.slot-toggle-thumb {
    display: block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--text-muted);
    position: absolute;
    top: 1px;
    left: 1px;
    transition: transform 0.25s, background 0.25s;
}
.slot-toggle-btn.active .slot-toggle-track {
    background: var(--primary);
    border-color: var(--primary);
}
.slot-toggle-btn.active .slot-toggle-thumb {
    background: #fff;
    transform: translateX(16px);
}
.slot-input-sm {
    width: 65px !important;
    padding: 0.35rem 0.5rem !important;
    font-size: 0.82rem !important;
}
.slot-autoplay-info {
    font-size: 0.68rem;
    color: var(--primary);
    font-weight: 600;
    white-space: nowrap;
}

/* ============================================
   PROMOTIONS
   ============================================ */
.promo-featured {
    background: linear-gradient(135deg, #090909, var(--primary));
    border-radius: 14px;
    padding: 2.5rem 3rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.promo-featured-content { max-width: 520px; position: relative; z-index: 2; }
.promo-featured-content h3 { font-weight: 800; color: #fff; font-size: 1.5rem; margin-bottom: 0.6rem; }
.promo-featured-content p { color: rgba(255,255,255,0.6); font-size: 0.9rem; margin-bottom: 1.2rem; }
.promo-featured-content .btn-register { background: #fff; color: var(--primary); border: none; padding: 0.6rem 1.6rem; border-radius: 8px; font-weight: 700; font-size: 0.88rem; display: inline-flex; align-items: center; gap: 0.4rem; transition: all 0.2s; }
.promo-featured-content .btn-register:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.3); }

.promo-tag {
    background: var(--danger);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin-bottom: 0.8rem;
}

.promo-featured-visual {
    font-size: 6rem;
    opacity: 0.2;
    position: absolute;
    right: 5%;
    top: 50%;
    transform: translateY(-50%);
}

.promo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.promo-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1.5rem;
    transition: all 0.25s;
}

.promo-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.promo-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.promo-card-tag {
    display: inline-block;
    background: var(--bg-input);
    color: var(--text-muted);
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.6rem;
}

.promo-card-tag.hot-tag { background: rgba(239,68,68,0.15); color: var(--danger); }
.promo-card-tag.vip-tag { background: rgba(245,158,11,0.15); color: var(--accent); }

.promo-card h4 { font-weight: 700; font-size: 1rem; color: var(--text-primary); margin-bottom: 0.4rem; }
.promo-card p { color: var(--text-muted); font-size: 0.8rem; line-height: 1.5; margin-bottom: 0.8rem; }

.promo-card-reward {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--accent);
    font-weight: 700;
    font-size: 0.82rem;
    margin-bottom: 1rem;
}

.promo-card-progress { margin-bottom: 1rem; }
.promo-progress-bar { width: 100%; height: 6px; background: var(--bg-input); border-radius: 50px; margin-bottom: 0.3rem; overflow: hidden; }
.promo-progress-fill { height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent)); border-radius: 50px; }
.promo-card-progress span { font-size: 0.72rem; color: var(--text-muted); }

.btn-promo {
    background: var(--bg-input);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 0.5rem 0;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.82rem;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    transition: all 0.2s;
}

.btn-promo:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ============================================
   PACKS DE POINTS
   ============================================ */
@keyframes packParticleFloat {
    0%   { transform: translateY(0) translateX(0) scale(1); opacity: 0.6; }
    50%  { transform: translateY(-18px) translateX(6px) scale(1.4); opacity: 1; }
    100% { transform: translateY(0) translateX(0) scale(1); opacity: 0.6; }
}

.pack-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.2rem;
}

.pack-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid rgba(201, 56, 64, 0.4);
    border-radius: 18px;
    padding: 2rem 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    overflow: hidden;
    transition: transform 0.25s, box-shadow 0.25s;
    box-shadow: 0 0 30px rgba(201, 56, 64, 0.07);
}
.pack-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 40px rgba(201, 56, 64, 0.2);
    border-color: rgba(201, 56, 64, 0.7);
}

/* Particles */
.pack-particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    background: #c93840;
    animation: packParticleFloat 3s ease-in-out infinite;
}
.pack-particle:nth-child(1) { width:4px; height:4px; top:12%; left:10%;  animation-delay:0s;    animation-duration:2.8s; }
.pack-particle:nth-child(2) { width:3px; height:3px; top:20%; right:12%; animation-delay:0.5s;  animation-duration:3.2s; }
.pack-particle:nth-child(3) { width:5px; height:5px; top:60%; left:8%;   animation-delay:1s;    animation-duration:2.5s; }
.pack-particle:nth-child(4) { width:3px; height:3px; top:75%; right:14%; animation-delay:1.5s;  animation-duration:3.5s; }
.pack-particle:nth-child(5) { width:4px; height:4px; top:40%; right:6%;  animation-delay:0.8s;  animation-duration:4s;   }
.pack-particle:nth-child(6) { width:3px; height:3px; top:85%; left:20%;  animation-delay:2s;    animation-duration:3s;   }

/* Rarity badge */
.pack-rarity-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    margin-bottom: 1.2rem;
    position: relative;
    z-index: 1;
    background: rgba(201, 56, 64, 0.15);
    color: #e05a62;
    border: 1px solid rgba(201, 56, 64, 0.35);
}

/* Icon */
.pack-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 1.2rem;
    position: relative;
    z-index: 1;
    background: rgba(201, 56, 64, 0.12);
    color: #e05a62;
}

/* Points */
.pack-points {
    font-size: 2.4rem;
    font-weight: 900;
    color: var(--text-primary);
    line-height: 1;
    position: relative;
    z-index: 1;
}
.pack-points-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.8rem;
    position: relative;
    z-index: 1;
}

/* Bonus */
.pack-bonus {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    color: #22c55e;
    font-weight: 700;
    font-size: 0.82rem;
    margin-bottom: 1.1rem;
    position: relative;
    z-index: 1;
}

/* Pricing */
.pack-pricing {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
    margin-bottom: 1.2rem;
    position: relative;
    z-index: 1;
}
.pack-price-old {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-decoration: line-through;
}
.pack-price-new {
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--text-primary);
}

/* Buy button */
.pack-buy-btn {
    width: 100%;
    padding: 0.75rem;
    border-radius: 10px;
    border: none;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    transition: opacity 0.2s, transform 0.15s;
    position: relative;
    z-index: 1;
    color: #fff;
    margin-bottom: 0.8rem;
    background: linear-gradient(135deg, #c93840, #e05a62);
}
.pack-buy-btn:hover { opacity: 0.88; transform: scale(0.98); }

/* Expire */
.pack-expire {
    font-size: 0.72rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.3rem;
    position: relative;
    z-index: 1;
}
.pack-expire strong { color: #e05a62; font-weight: 700; }

/* Legal notice */
.shop-legal-notice {
    margin-top: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-left: 4px solid #c93840;
    border-radius: 14px;
    padding: 1.5rem 2rem;
    display: flex;
    gap: 1.2rem;
    align-items: flex-start;
}
.shop-legal-icon {
    font-size: 1.6rem;
    color: #c93840;
    flex-shrink: 0;
    margin-top: 0.1rem;
}
.shop-legal-content { flex: 1; }
.shop-legal-items { display: flex; flex-direction: column; gap: 0; }
.shop-legal-item {
    display: flex;
    gap: 0.9rem;
    align-items: flex-start;
    padding: 0.75rem 0;
}
.shop-legal-item > i {
    font-size: 1.1rem;
    color: #c93840;
    flex-shrink: 0;
    margin-top: 0.15rem;
}
.shop-legal-item div { display: flex; flex-direction: column; gap: 0.15rem; }
.shop-legal-item strong {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
}
.shop-legal-item span {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.5;
}
.shop-legal-divider {
    height: 1px;
    background: var(--border-color);
}

}

/* ============================================
   DARTS GAME — Flat Design
   ============================================ */

/* -- Solo CTA -- */
.darts-solo-cta { display: flex; justify-content: center; margin-bottom: 1.5rem; }
.darts-solo-btn {
    background: var(--primary); color: #fff; border: none;
    border-radius: 14px; padding: 1.25rem 2rem; cursor: pointer;
    display: flex; flex-direction: column; align-items: center; gap: 0.25rem;
    transition: background 0.2s, transform 0.15s, box-shadow 0.15s;
    width: 100%; max-width: 400px;
}
.darts-solo-btn i { font-size: 2rem; }
.darts-solo-btn span { font-size: 1.1rem; font-weight: 700; }
.darts-solo-btn small { font-size: 0.78rem; opacity: 0.7; }
.darts-solo-btn:hover { background: var(--primary-hover); transform: translateY(-2px); box-shadow: 0 4px 16px var(--primary-glow); }

.darts-separator {
    display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem;
    color: var(--text-muted); font-size: 0.8rem;
}
.darts-separator::before, .darts-separator::after {
    content: ''; flex: 1; height: 1px; background: var(--border-color);
}

/* -- Lobby -- */
.darts-lobby-container { width: 100%; }
.darts-lobby-tabs {
    display: flex; gap: 0.25rem; margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color); flex-wrap: wrap;
}
.darts-tab {
    background: none; border: none; color: var(--text-muted); font-size: 0.9rem;
    font-weight: 600; padding: 0.75rem 1.25rem; cursor: pointer;
    border-bottom: 2px solid transparent; transition: all 0.2s;
    display: flex; align-items: center; gap: 0.4rem;
}
.darts-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.darts-tab:hover { color: var(--text-primary); }
.darts-tab-content { display: none; }
.darts-tab-content.active { display: block; }

.darts-lobby-filters { display: flex; gap: 0.75rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.darts-filter-select, .darts-filter-search {
    background: var(--bg-card); border: 1px solid var(--border-color); color: var(--text-primary);
    border-radius: 10px; padding: 0.6rem 1rem; font-size: 0.875rem;
    transition: border-color 0.2s; outline: none;
}
.darts-filter-select:focus, .darts-filter-search:focus { border-color: var(--primary); }
.darts-filter-search { flex: 1; min-width: 200px; }

.darts-input, .darts-select {
    width: 100%; background: var(--bg-input); border: 1px solid var(--border-color);
    color: var(--text-primary); border-radius: 10px; padding: 0.65rem 0.85rem;
    font-size: 0.9rem; transition: border-color 0.2s, box-shadow 0.2s; outline: none;
}
.darts-input:focus, .darts-select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }

/* -- Room Cards -- */
.darts-rooms-list { display: flex; flex-direction: column; gap: 0.75rem; }
.darts-rooms-empty {
    text-align: center; padding: 4rem 1rem; color: var(--text-muted); font-size: 1rem;
    background: var(--bg-card); border: 1px dashed var(--border-color); border-radius: 14px;
}
.darts-rooms-empty i { font-size: 2.5rem; display: block; margin-bottom: 0.75rem; opacity: 0.5; }

@keyframes dartsFadeIn { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:none; } }

.darts-room-card {
    background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 14px;
    padding: 1rem 1.25rem; display: flex; flex-direction: column; gap: 0.65rem;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
    animation: dartsFadeIn 0.3s ease both;
}
.darts-room-card:hover { border-color: var(--primary); box-shadow: 0 0 12px var(--primary-glow); transform: translateY(-2px); }

.darts-room-card-top { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.darts-room-mode-tag {
    display: inline-flex; align-items: center; gap: 0.3rem;
    font-size: 0.78rem; font-weight: 700; color: var(--primary);
    background: var(--primary-light); padding: 0.25rem 0.65rem; border-radius: 20px;
}
.darts-room-status {
    font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
    padding: 0.25rem 0.65rem; border-radius: 20px; white-space: nowrap; letter-spacing: 0.03em;
}
.darts-room-status.waiting { background: var(--primary-light); color: var(--primary); }
.darts-room-status.playing { background: rgba(40,200,120,0.12); color: #28c878; }

.darts-room-card-name { font-weight: 700; font-size: 1rem; color: var(--text-primary); margin: 0; }
.darts-room-card-host { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.1rem; }
.darts-room-stats { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.darts-stat-chip {
    display: inline-flex; align-items: center; gap: 0.25rem; font-size: 0.78rem;
    color: var(--text-muted); background: var(--bg-input); padding: 0.3rem 0.65rem; border-radius: 8px;
}
.darts-stat-chip i { font-size: 0.85rem; }
.darts-room-card-bottom {
    display: flex; align-items: center; justify-content: flex-end; gap: 0.5rem;
    padding-top: 0.5rem; border-top: 1px solid var(--border-color);
}
.darts-room-private {
    font-size: 0.75rem; color: var(--text-muted); display: inline-flex; align-items: center;
    gap: 0.25rem; margin-right: auto;
}
.darts-join-btn {
    background: var(--primary); color: #fff; border: none; border-radius: 8px;
    padding: 0.45rem 1rem; font-weight: 600; cursor: pointer; font-size: 0.82rem;
    display: inline-flex; align-items: center; gap: 0.3rem;
    transition: background 0.2s, transform 0.15s, box-shadow 0.15s;
}
.darts-join-btn:hover { background: var(--primary-hover); transform: scale(1.04); box-shadow: 0 3px 10px var(--primary-glow); }

/* -- Create / Invite Form -- */
.darts-create-form, .darts-invite-form {
    background: var(--bg-card); border: 1px solid var(--border-color);
    border-radius: 16px; padding: 2rem;
}
.darts-create-form h3, .darts-invite-form h3 {
    font-size: 1.1rem; font-weight: 700; margin: 0 0 1.5rem;
    display: flex; align-items: center; gap: 0.5rem; color: var(--text-primary);
}
.darts-create-form h3 i, .darts-invite-form h3 i { color: var(--primary); }
.darts-form-group { margin-bottom: 1.15rem; }
.darts-form-group label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 0.45rem; color: var(--text-secondary); }
.darts-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 0.15rem; }

.darts-mode-selector { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.darts-mode-btn {
    flex: 1; min-width: 120px; background: var(--bg-input); border: 2px solid var(--border-color);
    border-radius: 12px; padding: 0.9rem 0.7rem; cursor: pointer; text-align: center;
    transition: all 0.2s; display: flex; flex-direction: column; align-items: center; gap: 0.2rem;
}
.darts-mode-btn i { font-size: 1.5rem; color: var(--text-muted); }
.darts-mode-btn span { font-size: 0.88rem; font-weight: 700; color: var(--text-primary); }
.darts-mode-btn small { font-size: 0.72rem; color: var(--text-muted); }
.darts-mode-btn.active { border-color: var(--primary); background: var(--primary-light); }
.darts-mode-btn.active i { color: var(--primary); }
.darts-mode-btn:hover:not(.active) { border-color: rgba(201,56,64,0.3); }

.darts-input-group { display: flex; gap: 0.5rem; }
.darts-input-group .darts-input { flex: 1; }
.darts-gen-code-btn {
    background: var(--border-color); border: none; color: var(--text-primary);
    border-radius: 8px; padding: 0 0.75rem; cursor: pointer; transition: color 0.2s;
}
.darts-gen-code-btn:hover { color: var(--primary); }

.darts-create-btn {
    background: var(--primary); color: #fff; border: none;
    border-radius: 10px; padding: 0.75rem 2rem; font-size: 0.95rem; font-weight: 600;
    cursor: pointer; display: flex; align-items: center; gap: 0.5rem; margin-top: 0.5rem;
    justify-content: center; width: 100%; transition: background 0.2s, box-shadow 0.2s;
}
.darts-create-btn:hover { background: var(--primary-hover); box-shadow: 0 4px 12px var(--primary-glow); }

/* ============================================
   SOLO GAME VIEW
   ============================================ */
.darts-solo-layout { position: relative; max-width: 700px; margin: 0 auto; }

.darts-solo-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0.8rem 0; margin-bottom: 0.6rem;
}
.darts-solo-score-box { display: flex; align-items: baseline; gap: 0.5rem; }
.darts-solo-score-label { font-size: 0.82rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; }
.darts-solo-score-value { font-size: 2rem; font-weight: 800; color: #fff; }

.darts-solo-info {
    display: flex; gap: 0.5rem; font-size: 0.88rem; color: var(--text-muted); align-items: center;
}
.darts-solo-info strong { color: var(--text-primary); }
.darts-solo-sep { opacity: 0.4; }

.darts-solo-center { display: flex; flex-direction: column; align-items: center; gap: 0.6rem; }

.darts-solo-board-wrap {
    border-radius: 50%; padding: 8px; background: #0d0d1a;
    border: 2px solid rgba(255,255,255,0.06);
}
.darts-solo-board-wrap canvas,
.darts-multi-board-wrap canvas { display: block; border-radius: 50%; cursor: crosshair; }

.darts-solo-hint {
    font-size: 0.88rem; color: var(--text-muted); display: flex; align-items: center; gap: 0.4rem;
    animation: dartsHintPulse 1.4s ease infinite;
}
@keyframes dartsHintPulse { 0%,100%{opacity:0.4} 50%{opacity:1} }

/* Solo history (horizontal strip below board) */
.darts-solo-history {
    display: flex; gap: 0.4rem; flex-wrap: wrap; justify-content: center;
    margin-top: 0.6rem; min-height: 28px;
}
.darts-solo-hist-item {
    display: flex; align-items: center; gap: 0.3rem;
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px; padding: 0.25rem 0.6rem; font-size: 0.78rem;
}
.darts-solo-hist-item.big { border-color: rgba(34,197,94,0.3); }
.darts-solo-hist-item.miss { opacity: 0.5; }
.darts-solo-hist-label { color: var(--text-muted); }
.darts-solo-hist-pts { font-weight: 700; color: #c93840; }
.darts-solo-hist-item.big .darts-solo-hist-pts { color: #22c55e; }

/* Solo game over */
.darts-solo-gameover {
    position: absolute; inset: 0; background: rgba(10,10,20,0.85);
    display: flex; align-items: center; justify-content: center;
    border-radius: 14px; z-index: 50;
}
.darts-solo-gameover-card {
    background: var(--bg-card); border: 2px solid rgba(201,56,64,0.4);
    border-radius: 20px; padding: 2.5rem 3rem; text-align: center;
    animation: dartsFadeIn 0.35s ease;
}
.darts-solo-gameover-icon { font-size: 2.5rem; color: #eab308; margin-bottom: 0.3rem; }
.darts-solo-gameover-card h2 { font-size: 1.3rem; font-weight: 800; color: var(--text-primary); margin: 0 0 0.8rem; }
.darts-solo-final-score { font-size: 3rem; font-weight: 900; color: #c93840; line-height: 1; }
.darts-solo-final-label { font-size: 0.82rem; color: var(--text-muted); display: block; margin-bottom: 1rem; }
.darts-solo-breakdown { margin-bottom: 1.5rem; }
.darts-solo-round-line {
    display: flex; justify-content: space-between; padding: 0.3rem 0;
    font-size: 0.85rem; color: var(--text-muted);
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.darts-solo-gameover-actions { display: flex; gap: 0.6rem; justify-content: center; }
.darts-solo-replay-btn {
    background: #c93840; color: #fff; border: none; border-radius: 12px;
    padding: 0.7rem 2rem; font-size: 0.95rem; font-weight: 700; cursor: pointer;
    display: flex; align-items: center; gap: 0.4rem; transition: opacity 0.2s;
}
.darts-solo-replay-btn:hover { opacity: 0.85; }

/* ============================================
   MULTI GAME VIEW
   ============================================ */
.darts-game-layout { position: relative; }

.darts-game-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0.8rem 0; border-bottom: 1px solid var(--border-color); margin-bottom: 1rem;
}
.darts-game-header-left h3 { margin: 0; font-size: 1.15rem; font-weight: 800; color: var(--text-primary); }
.darts-game-meta { display: flex; gap: 0.5rem; margin-top: 0.3rem; }
.darts-badge {
    background: rgba(201,56,64,0.12); color: #c93840; font-size: 0.72rem; font-weight: 700;
    padding: 0.15rem 0.55rem; border-radius: 6px; text-transform: uppercase;
}
.darts-badge-score { background: rgba(59,130,246,0.12); color: #3b82f6; }
.darts-badge-bet { background: rgba(234,179,8,0.12); color: #eab308; display: flex; align-items: center; gap: 0.2rem; }

.darts-game-header-right { display: flex; align-items: center; gap: 0.8rem; }
.darts-turn-timer {
    display: flex; align-items: center; gap: 0.3rem; font-size: 0.85rem; font-weight: 700;
    color: var(--text-primary); background: var(--bg-card); padding: 0.4rem 0.8rem;
    border-radius: 10px; border: 1px solid var(--border-color);
}
.darts-leave-btn {
    background: rgba(239,68,68,0.12); border: 1px solid rgba(239,68,68,0.25); color: #ef4444;
    border-radius: 10px; padding: 0.4rem 0.9rem; font-size: 0.82rem; font-weight: 600;
    cursor: pointer; display: flex; align-items: center; gap: 0.3rem; transition: background 0.2s;
}
.darts-leave-btn:hover { background: rgba(239,68,68,0.2); }
.darts-delete-btn {
    background: rgba(239,68,68,0.18); border: 1px solid rgba(239,68,68,0.45); color: #ef4444;
    border-radius: 10px; padding: 0.4rem 0.9rem; font-size: 0.82rem; font-weight: 700;
    cursor: pointer; display: flex; align-items: center; gap: 0.3rem; transition: background 0.2s;
}
.darts-delete-btn:hover { background: rgba(239,68,68,0.32); }

/* -- Game Main Grid -- */
.darts-game-main {
    display: grid; grid-template-columns: 220px 1fr 220px; gap: 1.2rem; align-items: start;
}

.darts-scoreboard, .darts-history {
    background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 14px; padding: 1rem;
}
.darts-scoreboard h4, .darts-history h4 {
    font-size: 0.88rem; font-weight: 700; color: var(--text-primary); margin: 0 0 0.7rem;
    display: flex; align-items: center; gap: 0.35rem;
}
.darts-scoreboard-list { display: flex; flex-direction: column; gap: 0.4rem; }
.darts-score-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0.5rem 0.7rem; border-radius: 10px;
}
.darts-score-row.active-turn { background: rgba(201,56,64,0.12); }
.darts-score-row.is-me .darts-score-name { font-weight: 700; }
.darts-score-player { display: flex; align-items: center; gap: 0.4rem; }
.darts-score-name { font-size: 0.85rem; color: var(--text-primary); }
.darts-score-name small { color: var(--text-muted); font-weight: 400; }
.darts-score-value { font-size: 1.1rem; font-weight: 800; color: #c93840; }
.darts-team-tag {
    font-size: 0.65rem; font-weight: 700; padding: 0.1rem 0.4rem; border-radius: 4px;
    text-transform: uppercase;
}
.darts-team-tag.team-1 { background: rgba(59,130,246,0.2); color: #3b82f6; }
.darts-team-tag.team-2 { background: rgba(239,68,68,0.2); color: #ef4444; }

/* Board Area */
.darts-board-area { display: flex; flex-direction: column; align-items: center; gap: 0.8rem; }
.darts-current-turn { display: flex; align-items: center; gap: 0.6rem; font-size: 0.88rem; color: var(--text-muted); }
.darts-turn-label { font-weight: 500; }
.darts-turn-name { font-weight: 800; color: var(--text-primary); font-size: 1rem; }
.darts-throw-count { font-size: 0.82rem; color: var(--text-muted); }

.darts-multi-board-wrap {
    border-radius: 50%; padding: 8px; background: #0d0d1a;
    border: 2px solid rgba(255,255,255,0.06);
}

.darts-last-throw {
    display: flex; align-items: center; gap: 0.6rem;
    background: rgba(201,56,64,0.1); border: 1px solid rgba(201,56,64,0.25);
    border-radius: 12px; padding: 0.6rem 1.2rem; animation: dartsFadeIn 0.3s ease;
}
.darts-last-throw.bust { background: rgba(239,68,68,0.12); border-color: rgba(239,68,68,0.3); }
.darts-last-throw.big-hit { background: rgba(34,197,94,0.12); border-color: rgba(34,197,94,0.3); }
.darts-throw-points { font-size: 1.4rem; font-weight: 800; color: #c93840; }
.darts-last-throw.bust .darts-throw-points { color: #ef4444; }
.darts-last-throw.big-hit .darts-throw-points { color: #22c55e; }
.darts-throw-detail { font-size: 0.85rem; color: var(--text-muted); }

/* Actions */
.darts-actions { display: flex; justify-content: center; gap: 0.8rem; min-height: 48px; align-items: center; }
.darts-waiting-msg { font-size: 0.9rem; color: var(--text-muted); display: flex; align-items: center; gap: 0.4rem; }
.darts-multi-hint {
    font-size: 0.88rem; color: var(--text-muted); display: flex; align-items: center; gap: 0.4rem;
    animation: dartsHintPulse 1.4s ease infinite;
}
.darts-start-btn {
    background: #22c55e; color: #fff; border: none;
    border-radius: 12px; padding: 0.7rem 2.2rem; font-size: 1rem; font-weight: 700;
    cursor: pointer; display: flex; align-items: center; gap: 0.5rem; transition: opacity 0.2s;
}
.darts-start-btn:hover { opacity: 0.9; }

/* History */
.darts-history-list { display: flex; flex-direction: column; gap: 0.25rem; max-height: 400px; overflow-y: auto; }
.darts-history-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0.35rem 0.5rem; border-radius: 8px; font-size: 0.8rem;
}
.darts-history-item:nth-child(odd) { background: rgba(255,255,255,0.02); }
.darts-hist-name { color: var(--text-primary); font-weight: 600; flex: 1; }
.darts-hist-desc { color: var(--text-muted); text-align: center; flex: 1; }
.darts-hist-pts { color: #c93840; font-weight: 700; text-align: right; min-width: 40px; }
.darts-hist-pts.big { color: #22c55e; }

/* Winner overlay */
.darts-winner-overlay {
    position: absolute; inset: 0; background: rgba(10,10,20,0.85); z-index: 50;
    display: flex; align-items: center; justify-content: center; border-radius: 14px;
}
.darts-winner-card {
    background: var(--bg-card); border: 2px solid rgba(201,56,64,0.4); border-radius: 22px;
    padding: 2.5rem 3rem; text-align: center; animation: dartsFadeIn 0.4s ease;
}
.darts-winner-icon { font-size: 3rem; color: #eab308; margin-bottom: 0.5rem; }
.darts-winner-card h2 { font-size: 1.5rem; font-weight: 800; color: var(--text-primary); margin: 0 0 0.3rem; }
.darts-winner-card p { font-size: 0.9rem; color: var(--text-muted); margin: 0 0 1rem; }
.darts-winner-prize { font-size: 1.3rem; font-weight: 800; color: #c93840; margin-bottom: 1.2rem; }

/* Responsive */
@media (max-width: 900px) {
    .darts-game-main { grid-template-columns: 1fr; }
    .darts-scoreboard, .darts-history { order: 2; }
    .darts-board-area { order: 1; }
}
@media (max-width: 600px) {
    .darts-form-row { flex-direction: column; gap: 0; }
    .darts-mode-selector { flex-direction: column; }
    #dartsSoloCanvas, #dartsCanvas { width: 320px!important; height: 320px!important; }
    .darts-lobby-tabs { flex-wrap: wrap; }
    .darts-solo-gameover-card { padding: 1.5rem; }
}

/* ============================================
   WHEEL OF FORTUNE MODAL
   ============================================ */
.wheel-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    backdrop-filter: blur(4px);
}
.wheel-modal {
    background: var(--bg-card);
    border: 1px solid rgba(201,56,64,0.4);
    border-radius: 22px;
    padding: 2.2rem 2rem 2rem;
    max-width: 420px;
    width: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 8px 48px rgba(0,0,0,0.5);
}
.wheel-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(201,56,64,0.15);
    border: 1px solid rgba(201,56,64,0.35);
    border-radius: 8px;
    color: var(--text-primary);
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.2s;
}
.wheel-modal-close:hover { background: rgba(201,56,64,0.3); }
.wheel-modal-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.wheel-modal-title i { color: #c93840; }
.wheel-modal-subtitle {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin: -0.5rem 0 0;
}
.wheel-status-msg {
    background: rgba(201,56,64,0.12);
    border: 1px solid rgba(201,56,64,0.3);
    border-radius: 10px;
    padding: 0.6rem 1.1rem;
    font-size: 0.83rem;
    color: #e05a62;
    text-align: center;
    width: 100%;
}
.wheel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.wheel-pointer {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-top: 22px solid #c93840;
    z-index: 2;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}
#wheelCanvas { border-radius: 50%; display: block; }
.wheel-spin-btn {
    background: linear-gradient(135deg, #c93840, #e05a62);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 0.75rem 2.5rem;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: opacity 0.2s, transform 0.1s;
    box-shadow: 0 4px 18px rgba(201,56,64,0.35);
}
.wheel-spin-btn:hover:not(:disabled) { opacity: 0.9; transform: translateY(-1px); }
.wheel-spin-btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.wheel-result {
    background: rgba(201,56,64,0.12);
    border: 1px solid rgba(201,56,64,0.35);
    border-radius: 14px;
    padding: 0.9rem 1.4rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    animation: wheelResultIn 0.4s ease;
}
@keyframes wheelResultIn {
    from { opacity: 0; transform: scale(0.9); }
    to   { opacity: 1; transform: scale(1); }
}
.wheel-result-icon { font-size: 1.5rem; color: #c93840; }
.wheel-result-text { font-size: 0.9rem; color: var(--text-primary); }
.wheel-result-text strong { color: #e05a62; font-size: 1rem; }
@media (max-width: 460px) {
    .wheel-modal { padding: 1.5rem 1rem 1.2rem; }
    #wheelCanvas { width: 290px; height: 290px; }
}

/* ============================================
   AFFILIATE
   ============================================ */
.affiliate-hero {
    background: linear-gradient(135deg, #090909, #1a1a6e);
    border-radius: 14px;
    padding: 2.5rem 3rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.affiliate-hero-content { max-width: 520px; position: relative; z-index: 2; }
.affiliate-hero-content h3 { font-weight: 800; color: #fff; font-size: 1.4rem; margin-bottom: 0.6rem; }
.affiliate-hero-content p { color: rgba(255,255,255,0.6); font-size: 0.88rem; margin-bottom: 1.2rem; line-height: 1.6; }
.affiliate-hero-visual { font-size: 6rem; opacity: 0.2; position: absolute; right: 5%; top: 50%; transform: translateY(-50%); }

.affiliate-code-box { margin-top: 0.5rem; }
.affiliate-label { color: rgba(255,255,255,0.5); font-size: 0.78rem; font-weight: 600; margin-bottom: 0.4rem; display: block; }
.affiliate-code-input { display: flex; gap: 0.5rem; }
.affiliate-code-input input {
    flex: 1;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
    color: #fff;
    padding: 0.5rem 0.8rem;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
}
.btn-copy {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 0.5rem 1.2rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.82rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    transition: all 0.2s;
}
.btn-copy:hover { background: var(--primary-hover); }

.affiliate-stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.aff-stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1.3rem;
    text-align: center;
}

.aff-stat-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    margin: 0 auto 0.7rem;
}

.aff-stat-value { font-weight: 800; font-size: 1.4rem; color: var(--text-primary); }
.aff-stat-label { font-size: 0.72rem; color: var(--text-muted); margin-top: 0.2rem; }

.tiers-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.tier-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1.5rem;
    text-align: center;
    position: relative;
    transition: all 0.2s;
}

.tier-card.active { border-color: var(--primary); box-shadow: 0 0 20px var(--primary-glow); }

.tier-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.3rem;
    margin: 0 auto 0.8rem;
}

.tier-icon.bronze { background: linear-gradient(135deg, #92400e, #d97706); }
.tier-icon.silver { background: linear-gradient(135deg, #4b5563, #9ca3af); }
.tier-icon.gold { background: linear-gradient(135deg, var(--accent), #f97316); }
.tier-icon.diamond { background: linear-gradient(135deg, var(--primary), #06b6d4); }

.tier-name { font-weight: 700; font-size: 0.95rem; color: var(--text-primary); margin-bottom: 0.2rem; }
.tier-rate { font-weight: 800; font-size: 1.5rem; color: var(--primary); margin-bottom: 0.2rem; }
.tier-req { font-size: 0.72rem; color: var(--text-muted); }

.tier-current {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--primary);
    color: #fff;
    font-size: 0.55rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
}

/* ============================================
   DATA TABLE (shared)
   ============================================ */
.table-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    overflow: hidden;
}

.data-table { width: 100%; border-collapse: collapse; }
.data-table thead { background: var(--bg-input); }
.data-table th {
    padding: 0.8rem 1rem;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: left;
}
.data-table td {
    padding: 0.8rem 1rem;
    font-size: 0.82rem;
    color: var(--text-secondary);
    border-top: 1px solid var(--border-color);
}

.table-user {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.table-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.58rem;
    font-weight: 700;
    flex-shrink: 0;
}

.status-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.68rem;
    font-weight: 700;
}
.status-badge.active { background: rgba(0,231,1,0.12); color: var(--success); }
.status-badge.inactive { background: rgba(90,106,122,0.12); color: var(--text-muted); }

/* ============================================
   GAME PAGES (Crash, Roulette, Blackjack, Mines)
   ============================================ */
.game-page-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 2rem;
}

.game-page-display {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.game-page-controls {
    min-width: 220px;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.game-control-group label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.3rem;
}

.game-page-history { border-top: 1px solid var(--border-color); padding-top: 1.2rem; }
.game-page-history h4 { font-weight: 700; font-size: 0.88rem; color: var(--text-primary); margin-bottom: 0.8rem; }

/* Crash */
.crash-display { flex: 1; text-align: center; }
.crash-multiplier {
    font-size: 3.5rem;
    font-weight: 900;
    color: var(--success);
    margin-bottom: 0.5rem;
}
.crash-graph {
    height: 180px;
    background: var(--bg-input);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}
.crash-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60%;
    height: 70%;
    background: linear-gradient(135deg, transparent, rgba(0,231,1,0.15));
    border-top: 2px solid var(--success);
    border-radius: 0 12px 0 0;
}

.crash-history { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.crash-result {
    padding: 0.3rem 0.7rem;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.78rem;
}
.crash-result.win { background: rgba(0,231,1,0.12); color: var(--success); }
.crash-result.lose { background: rgba(239,68,68,0.12); color: var(--danger); }

/* Roulette */
.roulette-display { flex: 1; text-align: center; }
.roulette-wheel {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: var(--bg-input);
    border: 3px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    position: relative;
}
.roulette-number { font-size: 3rem; font-weight: 900; color: var(--text-primary); }
.roulette-ring {
    position: absolute;
    inset: 6px;
    border-radius: 50%;
    border: 2px dashed var(--border-color);
}

.roulette-bets { flex: 1; }
.roulette-bet-row { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.roulette-bet-btn {
    flex: 1;
    padding: 0.6rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.82rem;
    border: 2px solid transparent;
    transition: all 0.2s;
    cursor: pointer;
    min-width: 100px;
}
.roulette-bet-btn.red { background: rgba(239,68,68,0.15); color: #ef4444; border-color: rgba(239,68,68,0.3); }
.roulette-bet-btn.red:hover, .roulette-bet-btn.red.selected { background: #ef4444; color: #fff; }
.roulette-bet-btn.black { background: rgba(100,116,139,0.15); color: #94a3b8; border-color: rgba(100,116,139,0.3); }
.roulette-bet-btn.black:hover, .roulette-bet-btn.black.selected { background: #334155; color: #fff; }
.roulette-bet-btn.green { background: rgba(0,231,1,0.12); color: var(--success); border-color: rgba(0,231,1,0.2); }
.roulette-bet-btn.green:hover, .roulette-bet-btn.green.selected { background: #059669; color: #fff; }

.roulette-history { display: flex; gap: 0.3rem; flex-wrap: wrap; }
.rh-num {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.72rem;
    color: #fff;
}
.rh-num.red { background: #ef4444; }
.rh-num.black { background: #334155; }
.rh-num.green { background: #059669; }

/* ============================================
   BLACKJACK
   ============================================ */
.bj-container {
    display: grid;
    grid-template-columns: 280px 1fr 300px;
    gap: 1.2rem;
    align-items: start;
}

/* Panel gauche */
.bj-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    overflow: hidden;
}
.bj-panel-inner { padding: 1.2rem; }
.bj-panel-title { font-size: 1.1rem; font-weight: 800; margin-bottom: 0.3rem; }
.bj-panel-desc { font-size: 0.78rem; color: var(--text-muted); margin-bottom: 0.8rem; }
.bj-panel-min { color: var(--text-muted); font-weight: 400; }

.bj-bet-row { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 0.8rem; }
.bj-bet-input-wrap {
    display: flex;
    align-items: center;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}
.bj-bet-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    padding: 0.55rem 0.8rem;
    font-size: 0.9rem;
    font-weight: 700;
    outline: none;
}
.bj-bet-input::-webkit-inner-spin-button { -webkit-appearance: none; }
.bj-bet-clear {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.5rem;
    cursor: pointer;
}
.bj-bet-clear:hover { color: var(--text-primary); }

.bj-bet-shortcuts { display: flex; gap: 0.3rem; }
.bj-shortcut {
    flex: 1;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: 6px;
    padding: 0.35rem;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
}
.bj-shortcut:hover { border-color: var(--primary); color: var(--primary); }

.bj-deal-btn {
    width: 100%;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    font-weight: 800;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 0.6rem;
}
.bj-deal-btn:hover { background: var(--primary-hover); box-shadow: 0 4px 20px var(--primary-glow); }
.bj-deal-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.bj-action-buttons { display: flex; flex-direction: column; gap: 0.4rem; }
.bj-action-row { display: flex; gap: 0.4rem; }
.bj-action-btn {
    flex: 1;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 10px;
    padding: 0.7rem 0.8rem;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    transition: all 0.2s;
}
.bj-action-btn:hover { border-color: var(--primary); color: var(--primary); }
.bj-action-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.bj-action-btn.bj-action-secondary { font-size: 0.8rem; }
.bj-action-btn i { font-size: 1.1rem; }

.bj-result-msg {
    margin-top: 0.8rem;
    padding: 0.6rem 0.8rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.82rem;
    text-align: center;
}
.bj-result-win { background: rgba(34, 197, 94, 0.1); color: #22c55e; border: 1px solid rgba(34, 197, 94, 0.2); }
.bj-result-lose { background: rgba(239, 68, 68, 0.1); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.2); }
.bj-result-push { background: rgba(250, 204, 21, 0.1); color: #facc15; border: 1px solid rgba(250, 204, 21, 0.2); }

/* ============================================
   BLACKJACK LIVE — TABLE DEMI-CERCLE
   ============================================ */
.bjl-table-wrap {
    background: none;
    border: none;
    min-height: 420px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 0;
}
.bjl-felt {
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    background: radial-gradient(ellipse at 50% 0%, #3e2020 0%, #2a1414 60%, #1a0c0c 100%);
    border-radius: 0 0 360px 360px;
    border: 6px solid #bfa16c;
    border-top: none;
    padding: 1rem 1.5rem 2.2rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.6rem;
    position: relative;
    box-shadow: 0 4px 40px rgba(0,0,0,0.4), inset 0 -2px 30px rgba(0,0,0,0.3);
    min-height: 380px;
}
.bjl-felt-logo {
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    opacity: 0.12;
    pointer-events: none;
    user-select: none;
}
.bjl-felt::before {
    content: '';
    position: absolute;
    bottom: 6px; left: 6px; right: 6px;
    height: calc(100% - 6px);
    border-radius: 0 0 354px 354px;
    border: 2px solid rgba(255,255,255,0.06);
    border-top: none;
    pointer-events: none;
}

/* Dealer */
.bjl-dealer-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    z-index: 2;
}
.bjl-dealer-tag {
    font-size: 0.85rem;
    font-weight: 700;
    color: #e8d5b0;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    text-shadow: 0 2px 6px #000a;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.bjl-dealer-cards {
    display: flex;
    gap: 0.25rem;
    justify-content: center;
}

/* Player spots — arc layout */
.bjl-player-spots {
    position: relative;
    width: 100%;
    height: 200px;
    z-index: 2;
}
.bjl-spot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    position: absolute;
    transform: translateX(-50%);
    white-space: nowrap;
}
.bjl-spot-name {
    font-size: 0.78rem;
    font-weight: 700;
    color: #e8d5b0;
    text-shadow: 0 1px 4px #000a;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    justify-content: center;
}
.bjl-spot-cards {
    display: flex;
    gap: 0;
    justify-content: center;
}
.bjl-spot-cards .bj-card + .bj-card {
    margin-left: -10px;
}
.bjl-spot-meta {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.72rem;
    color: #c9a86c;
}
.bjl-spot-empty {
    opacity: 0.3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60px;
    color: #fff5;
    font-size: 0.75rem;
}
.bjl-spot-active { }
.bjl-spot-active .bjl-spot-name { color: #fff; }
.bjl-spot-me .bjl-spot-name { color: var(--accent); }
.bjl-spot-bust .bjl-spot-cards { opacity: 0.5; }
.bjl-spot-win .bjl-spot-name { color: #22c55e; }
.bjl-spot-lose .bjl-spot-name { color: #ef4444; }

.bjl-result-badge {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.1rem 0.45rem;
    border-radius: 6px;
    white-space: nowrap;
}
.bjl-rb-win { background: rgba(34,197,94,0.2); color: #22c55e; }
.bjl-rb-bj { background: rgba(245,158,11,0.2); color: #f59e0b; }
.bjl-rb-lose { background: rgba(239,68,68,0.2); color: #ef4444; }
.bjl-rb-push { background: rgba(148,163,184,0.2); color: #94a3b8; }

.bjl-bj-badge {
    background: var(--accent);
    color: #fff;
    border-radius: 6px;
    font-size: 0.65rem;
    padding: 0.05rem 0.4rem;
    font-weight: 800;
}
.bjl-bet-display {
    display: flex;
    align-items: center;
    gap: 0.15rem;
}

/* Score badge on table */
.bj-score {
    background: rgba(0,0,0,0.5);
    color: #fff;
    font-weight: 800;
    font-size: 0.75rem;
    padding: 0.15rem 0.5rem;
    border-radius: 6px;
    min-width: 24px;
    text-align: center;
}
.bj-score-bust { background: rgba(239,68,68,0.3); color: #ef4444; }
.bj-score-bj { background: rgba(245,158,11,0.3); color: #f59e0b; }

/* Cards */
.bj-cards { display: flex; gap: 0.35rem; justify-content: center; flex-wrap: nowrap; }
.bj-card {
    width: 42px;
    height: 60px;
    border-radius: 6px;
    position: relative;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
    transition: transform 0.15s;
    flex-shrink: 0;
}
.bj-card:hover { transform: translateY(-2px); }
.bj-card-red { background: #fff; color: #dc2626; }
.bj-card-black { background: #fff; color: #1a1a2e; }
.bj-card-hidden {
    background: linear-gradient(135deg, var(--primary), #6366f1);
    border: 2px solid rgba(255,255,255,0.1);
}
.bj-card-back {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: rgba(255,255,255,0.5);
}
.bj-card-corner {
    position: absolute;
    font-size: 0.65rem;
    font-weight: 800;
    line-height: 1.1;
}
.bj-card-top { top: 4px; left: 5px; }
.bj-card-bottom { bottom: 4px; right: 5px; transform: rotate(180deg); }
.bj-card-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.8rem;
}

/* Live BJ — smaller cards */
.bjl-felt .bj-card {
    width: 34px;
    height: 48px;
    border-radius: 5px;
}
.bjl-felt .bj-card-corner { font-size: 0.55rem; }
.bjl-felt .bj-card-top { top: 3px; left: 4px; }
.bjl-felt .bj-card-bottom { bottom: 3px; right: 4px; }
.bjl-felt .bj-card-center { font-size: 1.4rem; }

/* Card deal animation */
.bj-card-deal {
    animation: bjCardDeal 0.3s ease-out both;
}
@keyframes bjCardDeal {
    from { opacity: 0; transform: translateY(-30px) scale(0.8); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.bj-vs {
    font-weight: 900;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.5);
    padding: 0.25rem 1rem;
    background: rgba(0,0,0,0.2);
    border-radius: 6px;
    letter-spacing: 2px;
}

/* Solo BJ Table */
.bj-table {
    display: flex;
    align-items: center;
    justify-content: center;
}
.bj-table-inner {
    width: 100%;
    background: radial-gradient(ellipse at 50% 50%, #3e2020 0%, #2a1414 50%, #1a0c0c 100%);
    border: 5px solid #bfa16c;
    border-radius: 18px;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    position: relative;
    box-shadow: 0 4px 30px rgba(0,0,0,0.35), inset 0 0 60px rgba(0,0,0,0.25);
    min-height: 260px;
}
.bj-table-inner::before {
    content: '';
    position: absolute;
    inset: 4px;
    border-radius: 14px;
    border: 2px solid rgba(255,255,255,0.06);
    pointer-events: none;
}
.bj-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}
.bj-zone-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 700;
    color: #e8d5b0;
    text-shadow: 0 1px 4px rgba(0,0,0,0.6);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Sidebar */
.bj-sidebar {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    overflow: hidden;
}
.bj-sidebar .trades-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.bj-sidebar .trades-card-list {
    flex: 1;
    max-height: none;
    overflow-y: auto;
}
.bj-sidebar-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    overflow: hidden;
}
.bj-sidebar-header {
    padding: 0.8rem 1rem;
    border-bottom: 1px solid var(--border-color);
}
.bj-sidebar-header h4 {
    font-size: 0.82rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0;
}
.bj-trades-list {
    max-height: 450px;
    overflow-y: auto;
}
.bj-no-trades {
    padding: 2rem 1rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.82rem;
}
.bj-trade-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.55rem 1rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.8rem;
}
.bj-trade-row:last-child { border-bottom: none; }
.bj-trade-user { font-weight: 600; color: var(--text-primary); min-width: 70px; }
.bj-trade-date { color: var(--text-muted); font-size: 0.72rem; }
.bj-trade-amount { font-weight: 700; min-width: 60px; text-align: right; }
.bj-trade-amount.won { color: #22c55e; }
.bj-trade-amount.lost { color: #ef4444; }
.bj-trade-amount.push { color: #facc15; }
.bj-trade-row.won { background: rgba(34, 197, 94, 0.03); }
.bj-trade-row.lost { background: rgba(239, 68, 68, 0.03); }

/* Sidebar — Joueurs + Règles */
.bjl-sidebar-players,
.bjl-sidebar-rules {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1rem 1.1rem;
    box-shadow: var(--shadow-sm);
}
.bjl-sidebar-players h4,
.bjl-sidebar-rules h4 {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.6rem 0;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.bjl-sidebar-players ul,
.bjl-sidebar-rules ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.bjl-sidebar-players li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.5rem;
    border-radius: 8px;
    font-size: 0.82rem;
    color: var(--text-secondary);
    font-weight: 600;
}
.bjl-sidebar-players li:nth-child(odd) {
    background: var(--bg-input);
}
.bjl-sidebar-players .badge {
    font-size: 0.68rem;
    padding: 0.05rem 0.4rem;
    border-radius: 6px;
    font-weight: 700;
}
.bjl-sidebar-rules li {
    padding: 0.25rem 0;
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
}
.bjl-sidebar-rules li i {
    color: var(--primary);
    margin-top: 0.15rem;
    flex-shrink: 0;
}

/* Navbar Rubis */
.navbar-points {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
.navbar-coin-icon {
    height: 1.2em;
    width: auto;
    vertical-align: middle;
}
.navbar-coin-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* ---- Responsive Blackjack ---- */
@media (max-width: 1199px) {
    .bj-container { grid-template-columns: 260px 1fr; }
    .bj-sidebar { grid-column: 1 / -1; }
}
@media (max-width: 767px) {
    .bj-container { grid-template-columns: 1fr; }
    .bjl-felt { min-height: 280px; padding: 1.5rem 0.8rem 0.8rem; }
    .bj-card { width: 36px; height: 52px; }
    .bj-card-center { font-size: 1.2rem; }
    .bj-card-corner { font-size: 0.55rem; }
    .bjl-felt .bj-card { width: 30px; height: 42px; }
    .bjl-felt .bj-card-center { font-size: 1rem; }
    .bjl-felt .bj-card-corner { font-size: 0.5rem; }
    .bjl-player-spots { height: 110px; }
}
@media (max-width: 575px) {
    .bj-card { width: 32px; height: 46px; }
    .bj-card-center { font-size: 1rem; }
    .bjl-felt .bj-card { width: 26px; height: 38px; }
    .bjl-felt .bj-card-center { font-size: 0.85rem; }
    .bjl-spot-name { font-size: 0.68rem; }
    .bjl-player-spots { height: 100px; }
}

/* Mines */
.mines-page-row { display: flex; gap: 1.2rem; align-items: flex-start; }
.mines-trades-aside { width: 300px; min-width: 280px; flex-shrink: 0; display: flex; flex-direction: column; overflow: hidden; }
.mines-trades-aside .trades-card-list { max-height: none; flex: 1; overflow-y: auto; }
.mines-layout { display: flex; gap: 1.5rem; align-items: flex-start; }
.mines-sidebar { min-width: 200px; max-width: 220px; display: flex; flex-direction: column; gap: 0.8rem; }
.mines-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.5rem;
    flex: 1;
    max-width: 400px;
}
.mine-cell {
    aspect-ratio: 1;
    background: var(--bg-input);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.2s;
}
.mine-cell:hover { border-color: var(--primary); background: var(--bg-card-hover); }
.mine-cell.revealed-gem { background: rgba(0,231,1,0.12); border-color: var(--success); cursor: default; }
.mine-cell.revealed-mine { background: rgba(239,68,68,0.15); border-color: var(--danger); cursor: default; }
.mine-cell.mine-fade { opacity: 0.5; }
.mine-cell.mine-revealing { animation: minePulse 0.5s infinite; }
@keyframes minePulse { 0%,100%{opacity:1} 50%{opacity:0.5} }

.mines-multi { text-align: center; padding: 1rem; background: var(--bg-input); border-radius: 10px; }
.mines-multi-label { font-size: 0.72rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; }
.mines-multi-value { font-size: 2rem; font-weight: 900; color: var(--accent); }

.mines-cashout-btn {
    width: 100%;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(34,197,94,0.3);
}
.mines-cashout-btn:hover {
    background: linear-gradient(135deg, #16a34a, #15803d);
    box-shadow: 0 6px 20px rgba(34,197,94,0.45);
    transform: translateY(-1px);
}

/* Dice Master */
.dice-page-row { display: flex; gap: 1.2rem; align-items: flex-start; }
.dice-trades-aside { width: 300px; min-width: 280px; flex-shrink: 0; display: flex; flex-direction: column; overflow: hidden; }
.dice-trades-aside .trades-card-list { max-height: none; flex: 1; overflow-y: auto; }
.dice-layout { display: flex; gap: 1.5rem; align-items: flex-start; }
.dice-sidebar { min-width: 220px; max-width: 240px; display: flex; flex-direction: column; gap: 0.8rem; }

.dice-direction-toggle { display: flex; gap: 0.4rem; }
.dice-dir-btn {
    flex: 1; padding: 0.5rem; border: 2px solid var(--border-color); border-radius: 8px;
    background: var(--bg-input); color: var(--text-muted); font-size: 0.78rem; font-weight: 600;
    cursor: pointer; transition: all 0.2s; display: flex; align-items: center; justify-content: center; gap: 0.3rem;
}
.dice-dir-btn.active { border-color: var(--primary); color: #fff; background: rgba(139,92,246,0.15); }
.dice-dir-btn:hover { border-color: var(--primary); }

.dice-slider {
    width: 100%; -webkit-appearance: none; appearance: none; height: 6px;
    border-radius: 3px; background: var(--bg-input); outline: none;
}
.dice-slider::-webkit-slider-thumb {
    -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%;
    background: var(--primary); cursor: pointer; border: 2px solid #fff;
}

.dice-stats-row { display: flex; gap: 0.6rem; }
.dice-stat {
    flex: 1; text-align: center; padding: 0.6rem; background: var(--bg-input); border-radius: 8px;
}
.dice-stat-label { display: block; font-size: 0.65rem; color: var(--text-muted); text-transform: uppercase; font-weight: 600; }
.dice-stat-value { display: block; font-size: 1.1rem; font-weight: 800; color: var(--accent); margin-top: 0.2rem; }

.dice-display { flex: 1; display: flex; flex-direction: column; gap: 1rem; }

.dice-roll-zone {
    background: var(--bg-input); border-radius: 16px; padding: 2rem;
    display: flex; flex-direction: column; align-items: center; gap: 1.5rem;
}

.dice-progress-bar {
    width: 100%; height: 12px; background: rgba(255,255,255,0.05); border-radius: 6px;
    position: relative; overflow: visible;
}
.dice-progress-fill {
    position: absolute; top: 0; height: 100%; border-radius: 6px; transition: all 0.3s;
}
.dice-fill-right { background: linear-gradient(90deg, transparent, rgba(0,231,1,0.3)); right: 0; }
.dice-fill-left { background: linear-gradient(270deg, transparent, rgba(0,231,1,0.3)); left: 0; }

.dice-progress-target {
    position: absolute; top: -4px; width: 3px; height: 20px;
    background: var(--accent); border-radius: 2px; transform: translateX(-50%); transition: left 0.2s;
}
.dice-progress-marker {
    position: absolute; top: -6px; width: 14px; height: 24px;
    background: var(--primary); border-radius: 4px; transform: translateX(-50%);
    transition: left 0.05s; z-index: 2; border: 2px solid #fff;
    left: 50%;
}

.dice-result-container { text-align: center; }
.dice-result-value {
    font-size: 3.5rem; font-weight: 900; color: var(--text-muted);
    font-variant-numeric: tabular-nums; transition: color 0.3s;
}
.dice-result-value.dice-rolling { animation: diceFlicker 0.1s infinite; }
.dice-result-value.dice-win { color: var(--success); }
.dice-result-value.dice-loss { color: var(--danger); }
@keyframes diceFlicker { 0%,100%{opacity:1} 50%{opacity:0.6} }

.dice-result-label { font-size: 0.85rem; color: var(--text-muted); margin-top: 0.3rem; }
.dice-win-label { color: var(--success); font-weight: 700; }
.dice-loss-label { color: var(--danger); font-weight: 700; }

.dice-history-strip {
    display: flex; gap: 0.4rem; flex-wrap: wrap; padding: 0.5rem;
    background: var(--bg-card); border-radius: 10px; min-height: 34px;
}
.dice-strip-item {
    padding: 0.25rem 0.5rem; border-radius: 6px; font-size: 0.72rem; font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.dice-strip-item.strip-win { background: rgba(0,231,1,0.12); color: var(--success); }
.dice-strip-item.strip-loss { background: rgba(239,68,68,0.12); color: var(--danger); }

/* ============================================
   SHOP — Fortnite-inspired
   ============================================ */

/* ---- Daily Bonus Card ---- */
.daily-bonus-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem 2rem;
    position: relative;
    overflow: hidden;
}

.daily-bonus-glow {
    position: absolute;
    top: -50%;
    right: -10%;
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
    pointer-events: none;
    animation: dailyGlowPulse 4s ease-in-out infinite;
}

@keyframes dailyGlowPulse {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.15); }
}

.daily-bonus-card .daily-rewards {
    display: flex;
    gap: 0.6rem;
    position: relative;
    z-index: 1;
    justify-content: center;
}

.daily-reward {
    flex: 1;
    max-width: 110px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.8rem 0.5rem;
    text-align: center;
    position: relative;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: default;
}

.daily-reward:hover {
    transform: translateY(-4px) scale(1.04);
}

.daily-reward-day {
    font-size: 0.62rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.4rem;
}

.daily-reward-icon {
    font-size: 1.4rem;
    color: var(--accent);
    margin-bottom: 0.3rem;
}

.daily-reward-amount {
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--text-primary);
}

.daily-reward.claimed {
    opacity: 0.55;
    border-color: var(--success);
    background: rgba(16, 185, 129, 0.06);
}

.daily-reward.claimed .daily-check {
    position: absolute;
    top: 4px;
    right: 4px;
    font-size: 0.7rem;
    color: var(--success);
}

.daily-reward.missed {
    opacity: 0.45;
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.06);
}

.daily-reward.missed .daily-missed-x {
    position: absolute;
    top: 4px;
    right: 5px;
    font-size: 0.72rem;
    color: #ef4444;
    font-weight: 700;
}

.daily-reward.missed .daily-reward-icon img,
.daily-reward.missed .daily-reward-amount {
    opacity: 0.5;
}

.daily-reward.today {
    border-color: var(--primary);
    background: var(--primary-light);
    box-shadow: 0 0 20px var(--primary-glow);
    animation: todayPulse 2s ease-in-out infinite, todayBounce 4s ease-in-out infinite;
}

@keyframes todayPulse {
    0%, 100% { box-shadow: 0 0 15px var(--primary-glow); }
    50% { box-shadow: 0 0 35px var(--primary-glow), 0 0 60px rgba(11, 94, 215, 0.15); }
}

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

.daily-claim-btn {
    margin-top: 0.3rem;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    animation: claimBtnPop 1.5s ease-in-out infinite;
}

@keyframes claimBtnPop {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

.daily-claim-btn:hover {
    background: var(--primary-hover);
    box-shadow: 0 4px 15px var(--primary-glow);
}

.daily-reward.jackpot {
    border-color: var(--accent);
    background: rgba(245, 158, 11, 0.08);
    animation: jackpotGlow 3s ease-in-out infinite;
}

@keyframes jackpotGlow {
    0%, 100% { box-shadow: 0 0 0 transparent; }
    50% { box-shadow: 0 0 20px rgba(245, 158, 11, 0.2), 0 0 40px rgba(245, 158, 11, 0.08); }
}

.daily-reward.jackpot .daily-reward-icon {
    color: var(--accent);
    animation: jackpotSpin 6s linear infinite;
}

@keyframes jackpotSpin {
    0% { transform: rotateY(0deg); }
    100% { transform: rotateY(360deg); }
}

.daily-jackpot-label {
    font-size: 0.5rem;
    font-weight: 800;
    color: var(--accent);
    letter-spacing: 0.1em;
    margin-top: 0.15rem;
    display: block;
}

.daily-bonus-timer {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.78rem;
    margin-top: 1rem;
    padding-top: 0.8rem;
    border-top: 1px solid var(--border-color);
    position: relative;
    z-index: 1;
}

.daily-bonus-timer strong {
    color: var(--primary);
}

/* ---- Featured Offers ---- */
.shop-featured-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.shop-featured-card {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 1.8rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.shop-featured-card:hover {
    transform: translateY(-6px) scale(1.01);
}

.shop-card-shimmer {
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.06), transparent);
    animation: shimmer 2.5s ease-in-out infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 200%; }
}

.shop-featured-card.legendary {
    border-color: var(--accent);
    background: linear-gradient(180deg, rgba(245,158,11,0.08) 0%, var(--bg-card) 50%);
    animation: legendaryBorder 4s ease-in-out infinite;
}

@keyframes legendaryBorder {
    0%, 100% { border-color: var(--accent); }
    50% { border-color: #f97316; }
}

.shop-featured-card.legendary:hover {
    box-shadow: 0 8px 50px rgba(245, 158, 11, 0.25), 0 0 80px rgba(245, 158, 11, 0.08);
}

.shop-featured-card.epic {
    border-color: #a855f7;
    background: linear-gradient(180deg, rgba(168,85,247,0.08) 0%, var(--bg-card) 50%);
    animation: epicBorder 4s ease-in-out infinite;
}

@keyframes epicBorder {
    0%, 100% { border-color: #a855f7; }
    50% { border-color: #6366f1; }
}

.shop-featured-card.epic:hover {
    box-shadow: 0 8px 50px rgba(168, 85, 247, 0.25), 0 0 80px rgba(168, 85, 247, 0.08);
}

.shop-featured-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    margin-bottom: 1.2rem;
}

.shop-featured-card.legendary .shop-featured-tag {
    background: linear-gradient(135deg, var(--accent), #f97316);
    color: #fff;
}

.shop-featured-card.epic .shop-featured-tag {
    background: linear-gradient(135deg, #a855f7, #6366f1);
    color: #fff;
}

.shop-featured-visual {
    position: relative;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.shop-featured-coins {
    font-size: 3.5rem;
    animation: coinFloat 3s ease-in-out infinite, coinGlow 2s ease-in-out infinite;
}

.shop-featured-card.legendary .shop-featured-coins {
    color: var(--accent);
    filter: drop-shadow(0 0 25px rgba(245, 158, 11, 0.6));
}

.shop-featured-card.epic .shop-featured-coins {
    color: #a855f7;
    filter: drop-shadow(0 0 25px rgba(168, 85, 247, 0.6));
}

@keyframes coinFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-10px) rotate(-3deg); }
    75% { transform: translateY(-4px) rotate(3deg); }
}

@keyframes coinGlow {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.4); }
}

.shop-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.shop-particles span {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    animation: particleFloat 3s ease-in-out infinite, particlePulse 2s ease-in-out infinite;
}

.shop-featured-card.legendary .shop-particles span {
    background: var(--accent);
    box-shadow: 0 0 6px rgba(245, 158, 11, 0.8), 0 0 12px rgba(245, 158, 11, 0.4);
}

.shop-featured-card.epic .shop-particles span {
    background: #a855f7;
    box-shadow: 0 0 6px rgba(168, 85, 247, 0.8), 0 0 12px rgba(168, 85, 247, 0.4);
}

.shop-particles span:nth-child(1) { left: 20%; top: 30%; width: 3px; height: 3px; animation-delay: 0s; animation-duration: 2.5s; }
.shop-particles span:nth-child(2) { left: 70%; top: 20%; width: 5px; height: 5px; animation-delay: 0.5s; animation-duration: 3.5s; }
.shop-particles span:nth-child(3) { left: 40%; top: 70%; width: 3px; height: 3px; animation-delay: 1s; animation-duration: 2.8s; }
.shop-particles span:nth-child(4) { left: 80%; top: 60%; width: 6px; height: 6px; animation-delay: 1.5s; animation-duration: 4s; }
.shop-particles span:nth-child(5) { left: 15%; top: 65%; width: 4px; height: 4px; animation-delay: 0.8s; animation-duration: 3.2s; }
.shop-particles span:nth-child(6) { left: 60%; top: 45%; width: 5px; height: 5px; animation-delay: 2s; animation-duration: 2.6s; }

.shop-featured-card:hover .shop-particles span {
    animation-duration: 1.5s;
}

@keyframes particleFloat {
    0% { opacity: 0; transform: translateY(0) scale(0.3) rotate(0deg); }
    30% { opacity: 1; }
    50% { transform: translateY(-20px) scale(1.2) rotate(180deg); }
    70% { opacity: 0.8; }
    100% { opacity: 0; transform: translateY(-35px) scale(0.3) rotate(360deg); }
}

@keyframes particlePulse {
    0%, 100% { box-shadow: 0 0 4px currentColor; }
    50% { box-shadow: 0 0 12px currentColor, 0 0 20px currentColor; }
}

.shop-featured-amount {
    font-size: 2rem;
    font-weight: 900;
    color: var(--text-primary);
    line-height: 1;
}

.shop-featured-label {
    color: var(--text-muted);
    font-size: 0.82rem;
    margin-bottom: 0.4rem;
}

.shop-featured-bonus {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--success);
    margin-bottom: 0.8rem;
}

.shop-featured-prices {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    margin-bottom: 1rem;
}

.shop-old-price {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-decoration: line-through;
}

.shop-new-price {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--text-primary);
}

.btn-shop-featured {
    width: 100%;
    padding: 0.7rem 1.2rem;
    border: none;
    border-radius: 10px;
    font-weight: 800;
    font-size: 0.9rem;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.btn-shop-featured::after {
    content: '';
    position: absolute;
    top: -50%; left: -60%;
    width: 40%; height: 200%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transform: skewX(-20deg);
    transition: left 0.5s;
}

.btn-shop-featured:hover::after {
    left: 120%;
}

.btn-shop-featured.legendary {
    background: linear-gradient(135deg, var(--accent), #f97316);
}

.btn-shop-featured.legendary:hover {
    box-shadow: 0 4px 25px rgba(245, 158, 11, 0.5), 0 0 60px rgba(245, 158, 11, 0.15);
    transform: translateY(-2px) scale(1.02);
}

.btn-shop-featured.legendary:active {
    transform: translateY(0) scale(0.97);
    box-shadow: 0 2px 10px rgba(245, 158, 11, 0.3);
}

.btn-shop-featured.epic {
    background: linear-gradient(135deg, #a855f7, #6366f1);
}

.btn-shop-featured.epic:hover {
    box-shadow: 0 4px 25px rgba(168, 85, 247, 0.5), 0 0 60px rgba(168, 85, 247, 0.15);
    transform: translateY(-2px) scale(1.02);
}

.btn-shop-featured.epic:active {
    transform: translateY(0) scale(0.97);
    box-shadow: 0 2px 10px rgba(168, 85, 247, 0.3);
}

.shop-featured-countdown {
    margin-top: 0.8rem;
    font-size: 0.72rem;
    color: var(--text-muted);
}

.shop-featured-countdown strong {
    color: var(--danger);
}

/* ---- Regular Packs Grid ---- */
.shop-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.shop-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1.5rem 1.2rem;
    text-align: center;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
    animation: cardEntrance 0.5s ease-out backwards;
}

.shop-card:nth-child(1) { animation-delay: 0.05s; }
.shop-card:nth-child(2) { animation-delay: 0.1s; }
.shop-card:nth-child(3) { animation-delay: 0.15s; }
.shop-card:nth-child(4) { animation-delay: 0.2s; }

@keyframes cardEntrance {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.shop-card-glow {
    position: absolute;
    top: -40%;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 120px;
    border-radius: 50%;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.shop-card:hover .shop-card-glow { opacity: 1; }

.shop-card[data-rarity="common"]:hover { border-color: #6b7280; }
.shop-card[data-rarity="common"] .shop-card-glow { background: radial-gradient(circle, rgba(107,114,128,0.15), transparent 70%); }

.shop-card[data-rarity="uncommon"]:hover { border-color: #10b981; }
.shop-card[data-rarity="uncommon"] .shop-card-glow { background: radial-gradient(circle, rgba(16,185,129,0.12), transparent 70%); }

.shop-card[data-rarity="rare"]:hover { border-color: #3b82f6; }
.shop-card[data-rarity="rare"] .shop-card-glow { background: radial-gradient(circle, rgba(59,130,246,0.15), transparent 70%); }

.shop-card[data-rarity="epic"]:hover { border-color: #a855f7; }
.shop-card[data-rarity="epic"] .shop-card-glow { background: radial-gradient(circle, rgba(168,85,247,0.15), transparent 70%); }

.shop-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: var(--shadow-lg);
}

.shop-card[data-rarity="uncommon"]:hover { box-shadow: 0 8px 30px rgba(16,185,129,0.15); }
.shop-card[data-rarity="rare"]:hover { box-shadow: 0 8px 30px rgba(59,130,246,0.2); }
.shop-card[data-rarity="epic"]:hover { box-shadow: 0 8px 30px rgba(168,85,247,0.2); }

.shop-card-rarity {
    font-size: 0.55rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    padding: 0.2rem 0.6rem;
    border-radius: 50px;
    display: inline-block;
    margin-bottom: 0.8rem;
}

.shop-card-rarity.common { background: rgba(107,114,128,0.15); color: #9ca3af; }
.shop-card-rarity.uncommon { background: rgba(16,185,129,0.12); color: #10b981; }
.shop-card-rarity.rare { background: rgba(59,130,246,0.12); color: #3b82f6; }
.shop-card-rarity.epic { background: rgba(168,85,247,0.12); color: #a855f7; }

.shop-card-visual {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.8rem;
}

.shop-coin-stack {
    display: flex;
    align-items: center;
    font-size: 1.8rem;
    color: var(--accent);
}

.shop-coin-stack i {
    margin: 0 -0.15rem;
    filter: drop-shadow(0 2px 4px rgba(245,158,11,0.3));
}

.shop-card[data-rarity="epic"] .shop-coin-stack .ti-diamond {
    color: #a855f7;
    filter: drop-shadow(0 2px 4px rgba(168,85,247,0.3));
}

.shop-card-amount { font-size: 1.5rem; font-weight: 900; color: var(--text-primary); }
.shop-card-label { color: var(--text-muted); font-size: 0.78rem; margin-bottom: 0.3rem; }
.shop-card-bonus {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    color: var(--success);
    font-weight: 700;
    font-size: 0.72rem;
    min-height: 1.1rem;
}
.shop-card-price { font-size: 1.2rem; font-weight: 900; color: var(--text-primary); margin: 0.5rem 0; }

.shop-card-best {
    border-color: #3b82f6;
}

.shop-best-badge {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #3b82f6, #06b6d4);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 800;
    padding: 0.3rem;
    letter-spacing: 0.08em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
}

.btn-shop {
    background: var(--bg-input);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 0.55rem 0;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.82rem;
    width: 100%;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    position: relative;
    overflow: hidden;
}

.btn-shop::after {
    content: '';
    position: absolute;
    top: -50%; left: -60%;
    width: 40%; height: 200%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transform: skewX(-20deg);
    transition: left 0.5s;
}

.btn-shop:hover::after {
    left: 120%;
}

.btn-shop:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 4px 15px var(--primary-glow);
    transform: translateY(-1px);
}

.btn-shop:active {
    transform: translateY(0) scale(0.96);
}

.btn-shop-rare {
    background: #3b82f6;
    border-color: #3b82f6;
    color: #fff;
}

.btn-shop-rare:hover {
    background: #2563eb;
    box-shadow: 0 4px 20px rgba(59,130,246,0.4);
}

.btn-shop-epic {
    background: linear-gradient(135deg, #a855f7, #6366f1);
    border-color: #a855f7;
    color: #fff;
}

.btn-shop-epic:hover {
    box-shadow: 0 4px 20px rgba(168, 85, 247, 0.4);
}

/* ============================================
   COSMETIC SHOP — Rotating Store
   ============================================ */

/* Rotation timer bar */
.cosm-rotation-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.75rem 1.25rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}
.cosm-rotation-timer {
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
}
.cosm-rotation-timer i { color: var(--primary); font-size: 1.1rem; }
.cosm-rotation-timer strong { color: var(--primary); font-variant-numeric: tabular-nums; }

/* Filter tabs */
.cosm-tabs {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
}
.cosm-tab {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.35rem 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}
.cosm-tab:hover { border-color: var(--primary); color: var(--text-primary); }
.cosm-tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Items grid */
.cosm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

/* Item card */
.cosm-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.cosm-card:hover { transform: translateY(-4px); }
.cosm-card[data-rarity="legendary"]:hover { border-color: var(--accent); box-shadow: 0 8px 30px rgba(245, 158, 11, 0.2); }
.cosm-card[data-rarity="epic"]:hover { border-color: #a855f7; box-shadow: 0 8px 30px rgba(168, 85, 247, 0.2); }
.cosm-card[data-rarity="rare"]:hover { border-color: #3b82f6; box-shadow: 0 8px 30px rgba(59, 130, 246, 0.2); }
.cosm-card[data-rarity="uncommon"]:hover { border-color: #10b981; box-shadow: 0 8px 30px rgba(16, 185, 129, 0.2); }

.cosm-card-shimmer {
    position: absolute;
    top: 0; left: -100%;
    width: 60%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.06), transparent);
    animation: shimmer 2.5s ease-in-out infinite;
    z-index: 2;
    pointer-events: none;
}

/* Rarity badges */
.cosm-card-rarity {
    position: absolute;
    top: 10px; left: 10px;
    font-size: 0.55rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    z-index: 3;
}
.cosm-card-rarity.legendary { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.cosm-card-rarity.epic { background: rgba(168, 85, 247, 0.15); color: #a855f7; }
.cosm-card-rarity.rare { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }
.cosm-card-rarity.uncommon { background: rgba(16, 185, 129, 0.15); color: #10b981; }
.cosm-card-rarity.common { background: rgba(148, 163, 184, 0.15); color: #94a3b8; }

/* Visual preview area */
.cosm-card-visual {
    height: 130px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-input);
    position: relative;
}

/* Username color preview */
.cosm-name-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cosm-name-glow {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 12px;
    filter: blur(18px);
    opacity: 0.45;
    animation: cosmGlowPulse 2.5s ease-in-out infinite;
    z-index: 0;
}
.cosm-preview-name {
    position: relative;
    z-index: 1;
    font-size: 1.5rem;
    font-weight: 800;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.02em;
}
@keyframes cosmGlowPulse {
    0%, 100% { opacity: 0.35; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.08); }
}

/* Profile border preview */
.cosm-border-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cosm-border-glow {
    position: absolute;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    filter: blur(16px);
    opacity: 0.5;
    animation: cosmGlowPulse 2.5s ease-in-out infinite;
    z-index: 0;
}
.cosm-preview-border {
    position: relative;
    z-index: 1;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    padding: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cosm-preview-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--text-primary);
}

@keyframes cosmBorderRotate {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

/* ---- Legendary animated effects ---- */

/* Animated gradient text for legendary pseudos */
.cosm-preview-name.legendary-anim {
    background-size: 200% 100%;
    animation: cosmNameShift 3s ease-in-out infinite;
}
@keyframes cosmNameShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}
@keyframes cosmUsernameGlowPulse {
    0%, 100% { filter: drop-shadow(0 0 5px var(--uname-glow-color, #ff6eb4)) drop-shadow(0 2px 10px var(--uname-glow-color, #ff6eb4)); }
    50% { filter: drop-shadow(0 0 12px var(--uname-glow-color, #ff6eb4)) drop-shadow(0 3px 20px var(--uname-glow-color, #ff6eb4)); }
}

/* Animated rotating border for legendary borders */
.cosm-preview-border.legendary-anim {
    background-size: 300% 300%;
    animation: cosmBorderShift 3s ease-in-out infinite, cosmBorderRotate 6s linear infinite;
}
@keyframes cosmBorderShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Animated glow pulse for legendary name pins */
.cosm-pin-badge.legendary-anim {
    background-size: 200% 100%;
    animation: cosmPinShift 2.5s ease-in-out infinite;
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.4);
}
@keyframes cosmPinShift {
    0%, 100% { background-position: 0% 50%; box-shadow: 0 0 12px rgba(245, 158, 11, 0.4); }
    50% { background-position: 100% 50%; box-shadow: 0 0 22px rgba(245, 158, 11, 0.7); }
}

/* Animated cursor for legendary */
.cosm-preview-cursor.legendary-anim .cosm-cursor-svg {
    animation: cosmCursorFloat 2s ease-in-out infinite;
    filter: drop-shadow(0 0 8px rgba(245, 158, 11, 0.6));
}
.cosm-preview-cursor.legendary-anim .cosm-cursor-trail {
    animation: cosmTrailPulse 1.5s ease-in-out infinite;
}
@keyframes cosmCursorFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-6px) rotate(-5deg); }
}
@keyframes cosmTrailPulse {
    0%, 100% { opacity: 0.4; height: 20px; }
    50% { opacity: 0.8; height: 30px; }
}

/* Animated click effect icon for legendary */
.cosm-click-demo.legendary-anim i {
    animation: cosmClickIcon 2s ease-in-out infinite;
    filter: drop-shadow(0 0 10px currentColor);
}
@keyframes cosmClickIcon {
    0%, 100% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.2) rotate(-10deg); }
    50% { transform: scale(1) rotate(0deg); }
    75% { transform: scale(1.15) rotate(10deg); }
}

/* Legendary card glow on the card itself */
.cosm-card[data-rarity="legendary"] .cosm-card-visual::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 50%, rgba(245, 158, 11, 0.08) 0%, transparent 70%);
    animation: cosmLegendaryGlow 3s ease-in-out infinite;
    pointer-events: none;
}
@keyframes cosmLegendaryGlow {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* Name pin preview */
.cosm-preview-pin {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}
.cosm-pin-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    letter-spacing: 0.05em;
    box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

/* Click effect preview */
.cosm-preview-click {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}
.cosm-click-demo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 2px dashed var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
}
.cosm-click-demo:hover { border-color: var(--primary); color: var(--primary); transform: scale(1.1); }
.cosm-click-label { font-size: 0.65rem; color: var(--text-muted); }

/* Cursor preview */
.cosm-preview-cursor {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
}
.cosm-cursor-svg { filter: drop-shadow(0 2px 6px rgba(0,0,0,0.3)); }
.cosm-cursor-trail {
    width: 3px;
    height: 24px;
    border-radius: 2px;
    opacity: 0.6;
    animation: cosmTrailPulse 1.2s ease-in-out infinite;
}
@keyframes cosmTrailPulse {
    0%, 100% { opacity: 0.3; height: 16px; }
    50% { opacity: 0.7; height: 28px; }
}

/* Card info */
.cosm-card-info {
    padding: 0.75rem 1rem 0.5rem;
}
.cosm-card-name {
    font-weight: 700;
    font-size: 0.92rem;
    color: var(--text-primary);
    margin-bottom: 0.15rem;
}
.cosm-card-type {
    font-size: 0.72rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}
.cosm-card-type i { font-size: 0.8rem; }

/* Card footer */
.cosm-card-footer {
    padding: 0.5rem 1rem 0.85rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}
.cosm-card-price {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-weight: 800;
    font-size: 0.88rem;
    color: var(--accent);
}
.cosm-card-price i { font-size: 1rem; }
.cosm-buy-btn {
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0.4rem 0.9rem;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}
.cosm-buy-btn:hover { background: var(--primary-hover); transform: scale(1.05); box-shadow: 0 3px 12px var(--primary-glow); }

/* Upcoming items */
.cosm-upcoming {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1.25rem;
    margin-bottom: 2rem;
}
.cosm-upcoming-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.cosm-upcoming-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-primary);
}
.cosm-upcoming-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-style: italic;
}
.cosm-upcoming-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.75rem;
}
.cosm-upcoming-card {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.cosm-upcoming-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 1rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    cursor: default;
}
.cosm-upcoming-blur {
    position: absolute;
    inset: 0;
    backdrop-filter: blur(2px);
    background: rgba(0,0,0,0.05);
    z-index: 1;
    pointer-events: none;
}
.cosm-upcoming-card .cosm-card-rarity {
    position: relative;
    top: auto; left: auto;
    display: inline-block;
    margin-bottom: 0.5rem;
    z-index: 2;
}
.cosm-upcoming-icon {
    font-size: 2rem;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
    opacity: 0.5;
    position: relative;
    z-index: 2;
}
.cosm-upcoming-name {
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--text-muted);
    letter-spacing: 2px;
    position: relative;
    z-index: 2;
}
.cosm-upcoming-type {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    position: relative;
    z-index: 2;
}

/* Responsive */
@media (max-width: 768px) {
    .cosm-rotation-bar { flex-direction: column; align-items: stretch; }
    .cosm-tabs { justify-content: center; }
    .cosm-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
    .cosm-upcoming-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .cosm-grid { grid-template-columns: 1fr 1fr; gap: 0.6rem; }
    .cosm-card-visual { height: 100px; }
    .cosm-upcoming-grid { grid-template-columns: 1fr 1fr; }
}

/* ============================================
   PROFILE
   ============================================ */
.profile-layout {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 1.5rem;
    align-items: start;
}

.profile-left { display: flex; flex-direction: column; gap: 1rem; }
.profile-right { display: flex; flex-direction: column; gap: 0; }

.profile-id {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-family: monospace;
    margin-bottom: 0.3rem;
}

.profile-member-since {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
}

/* Game stats card */
.profile-game-stats-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1.5rem;
}

.profile-game-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.7rem;
}

.profile-game-stat-item {
    background: var(--bg-input);
    border-radius: 10px;
    padding: 0.8rem 1rem;
}

.pgs-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.4rem;
}

.pgs-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    color: var(--text-primary);
    flex-shrink: 0;
}

.pgs-name {
    font-weight: 700;
    font-size: 0.82rem;
    color: var(--text-primary);
    flex: 1;
}

.pgs-profit {
    font-weight: 800;
    font-size: 0.82rem;
}
.pgs-profit.profit-positive { color: var(--success); }
.pgs-profit.profit-negative { color: var(--danger); }

.pgs-details {
    display: flex;
    gap: 0.8rem;
    font-size: 0.68rem;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
    font-weight: 600;
}

.pgs-bar {
    height: 4px;
    background: var(--bg-card);
    border-radius: 50px;
    overflow: hidden;
}

.pgs-bar-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 50px;
    transition: width 0.5s;
}

@media (max-width: 992px) {
    .profile-layout {
        grid-template-columns: 1fr;
    }
    .profile-overview-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .profile-game-stats-grid {
        grid-template-columns: 1fr;
    }
}

/* ---- Profile link (clickable usernames) ---- */
.profile-link {
    color: inherit;
    text-decoration: none;
    transition: color 0.15s, text-decoration 0.15s;
    cursor: pointer;
}
.profile-link:hover {
    color: var(--accent);
    text-decoration: underline;
}
.trades-card-user .profile-link,
.chat-msg-name .profile-link,
.podium-name .profile-link,
.ranking-my-name .profile-link { font-weight: inherit; }
.poker-seat-name .profile-link,
.belote-seat-name .profile-link,
.bjl-spot-name .profile-link { color: inherit; }

.profile-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1.5rem;
    text-align: center;
    margin-bottom: 1rem;
}

.profile-avatar-lg {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0 auto 0.8rem;
    position: relative;
}

.profile-level {
    position: absolute;
    bottom: -5px;
    right: -5px;
    background: var(--accent);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    border: 2px solid var(--bg-card);
}

.profile-name { font-weight: 700; font-size: 1rem; color: var(--text-primary); margin-bottom: 0.2rem; }
.profile-rank { color: var(--primary); font-weight: 600; font-size: 0.78rem; margin-bottom: 0.8rem; }

.profile-xp-bar {
    background: var(--bg-input);
    border-radius: 50px;
    height: 6px;
    width: 100%;
    margin-bottom: 0.35rem;
    overflow: hidden;
}

.profile-xp-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 50px;
    transition: width 0.5s;
}

.profile-xp-text { font-size: 0.7rem; color: var(--text-muted); margin-bottom: 1rem; }

.profile-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.profile-stat {
    background: var(--bg-input);
    padding: 0.6rem 0.5rem;
    border-radius: 8px;
}

.profile-stat-value { font-weight: 800; font-size: 1rem; color: var(--text-primary); }
.profile-stat-label { font-size: 0.65rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }

/* Badges */
.profile-badges-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1.5rem;
}

.badges-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}

.badge-item {
    text-align: center;
    padding: 0.6rem 0.3rem;
    border-radius: 8px;
    background: var(--bg-input);
    opacity: 0.35;
    transition: all 0.2s;
}
.badge-item.earned { opacity: 1; }
.badge-item span { font-size: 1.5rem; display: block; margin-bottom: 0.2rem; }
.badge-item small { font-size: 0.6rem; color: var(--text-muted); font-weight: 600; }

/* Profile Overview */
.profile-overview-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.overview-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1.3rem;
    text-align: center;
}

.overview-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.1rem;
    margin: 0 auto 0.7rem;
}

.overview-value { font-weight: 800; font-size: 1.2rem; color: var(--text-primary); }
.overview-label { font-size: 0.68rem; color: var(--text-muted); margin-top: 0.2rem; }

/* Fav games */
.profile-fav-games {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1.5rem;
}

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

.fav-game-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.6rem;
    border-radius: 10px;
    background: var(--bg-input);
    transition: background 0.15s;
}
.fav-game-item:hover { background: var(--bg-card-hover); }

.fav-game-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.fav-game-info { flex: 1; }
.fav-game-name { font-weight: 600; font-size: 0.85rem; color: var(--text-primary); }
.fav-game-plays { font-size: 0.7rem; color: var(--text-muted); }
.fav-game-stat { font-weight: 800; font-size: 0.88rem; }
.fav-game-stat.win { color: var(--success); }
.fav-game-stat.lose { color: var(--danger); }

/* ============================================
   RANKING
   ============================================ */
.ranking-tabs {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 2rem;
}

.rank-tab {
    padding: 0.5rem 1.2rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.82rem;
    transition: all 0.15s;
}
.rank-tab:hover { border-color: var(--text-muted); color: var(--text-primary); }
.rank-tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Podium */
.podium {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.podium-item {
    text-align: center;
    width: 180px;
}

.podium-crown { font-size: 1.5rem; margin-bottom: 0.3rem; }

.podium-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1rem;
    font-weight: 800;
    margin: 0 auto 0.5rem;
}

.podium-name { font-weight: 700; font-size: 0.9rem; color: var(--text-primary); margin-bottom: 0.2rem; }
.podium-score { font-size: 0.78rem; color: var(--accent); font-weight: 700; margin-bottom: 0.5rem; }

.podium-block {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px 10px 0 0;
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--text-muted);
    padding: 1rem;
}

.podium-item.first .podium-block { height: 110px; display: flex; align-items: center; justify-content: center; background: linear-gradient(180deg, rgba(245,158,11,0.1), var(--bg-card)); border-color: var(--accent); color: var(--accent); }
.podium-item.second .podium-block { height: 80px; display: flex; align-items: center; justify-content: center; }
.podium-item.third .podium-block { height: 60px; display: flex; align-items: center; justify-content: center; }

.podium-item.first .podium-avatar { width: 64px; height: 64px; font-size: 1.2rem; }

.ranking-table .rank-num { font-weight: 800; color: var(--text-muted); }
.ranking-table .rank-highlight { background: var(--primary-light); }
.rank-you {
    background: var(--primary);
    color: #fff;
    font-size: 0.52rem;
    font-weight: 800;
    padding: 1px 5px;
    border-radius: 3px;
    margin-left: 0.3rem;
}

/* Ranking — Game Filter Buttons */
.ranking-game-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1rem;
}

.rank-game-btn {
    padding: 0.45rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.78rem;
    transition: all 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
}

.rank-game-btn i { font-size: 0.9rem; }
.rank-game-btn:hover { border-color: var(--text-muted); color: var(--text-primary); }
.rank-game-btn.active { background: var(--accent); color: #000; border-color: var(--accent); font-weight: 700; }

/* Ranking — Empty State */
.ranking-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}
.ranking-empty i { font-size: 2.5rem; margin-bottom: 0.5rem; display: block; }
.ranking-empty p { font-size: 0.9rem; }

/* Ranking — Loading */
.ranking-loading {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    width: 100%;
}

/* Ranking — Podium tweaks */
.podium-score.profit-positive { color: var(--success); }
.podium-score.profit-negative { color: var(--danger); }

.rubis-icon-sm {
    width: 14px;
    height: 14px;
    vertical-align: middle;
    margin-left: 2px;
}

/* Ranking — My Position Bar */
.ranking-my-position {
    background: var(--bg-card);
    border: 1px solid var(--primary);
    border-radius: 10px;
    padding: 0.75rem 1.2rem;
    margin-bottom: 1.5rem;
}

.ranking-my-inner {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.ranking-my-rank {
    font-weight: 900;
    font-size: 1.1rem;
    color: var(--primary);
    min-width: 40px;
}

.ranking-my-name {
    font-weight: 700;
    color: var(--text-primary);
    flex: 1;
    min-width: 100px;
}

.ranking-my-stat {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 600;
}

.ranking-my-profit {
    font-weight: 800;
    font-size: 0.9rem;
    margin-left: auto;
}

.ranking-my-profit.profit-positive { color: var(--success); }
.ranking-my-profit.profit-negative { color: var(--danger); }

/* Ranking table profit colors */
.ranking-table .text-success { color: var(--success); }
.ranking-table .text-danger { color: var(--danger); }

/* Responsive ranking */
@media (max-width: 768px) {
    .ranking-game-filters { gap: 0.3rem; }
    .rank-game-btn { padding: 0.35rem 0.7rem; font-size: 0.72rem; }
    .rank-game-btn span { display: none; }
    .podium { gap: 0.5rem; }
    .podium-item { width: 110px; }
    .podium-name { font-size: 0.78rem; }
    .podium-score { font-size: 0.7rem; }
    .ranking-my-inner { font-size: 0.82rem; gap: 0.6rem; }
}

/* ============================================
   CTA BANNER
   ============================================ */
.cta-banner {
    background: linear-gradient(135deg, var(--primary), #1a1a6e);
    border-radius: 14px;
    padding: 2.5rem 3rem;
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.cta-banner::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -15%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(245,158,11,0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.cta-banner h3 { font-weight: 800; color: #fff; font-size: 1.5rem; margin-bottom: 0.6rem; position: relative; z-index: 2; }
.cta-banner p { color: rgba(255,255,255,0.6); font-size: 0.92rem; margin-bottom: 1.3rem; position: relative; z-index: 2; }

.cta-banner .btn-cta {
    background: #fff;
    color: var(--primary);
    border: none;
    padding: 0.65rem 2rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    transition: all 0.2s;
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.cta-banner .btn-cta:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,0.3); }

/* ============================================
   CHATBOX
   ============================================ */
.chatbox-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 14px;
    background: var(--primary);
    color: #fff;
    border: none;
    font-size: 1.3rem;
    z-index: 1060;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px var(--primary-glow);
    transition: all 0.2s;
}

.chatbox-toggle:hover { transform: scale(1.08); box-shadow: 0 6px 25px var(--primary-glow); }

.chatbox-toggle .badge-dot {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 10px;
    height: 10px;
    background: var(--danger);
    border-radius: 50%;
    border: 2px solid var(--bg-body);
    display: none;
    animation: badgePulse 1.5s ease-in-out infinite;
}

.chatbox-toggle.has-unread .badge-dot {
    display: block;
}

@keyframes badgePulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.7; }
}

.chatbox {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 360px;
    height: 480px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    z-index: 1060;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transform: scale(0) translateY(20px);
    transform-origin: bottom right;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
}

.chatbox.open { transform: scale(1) translateY(0); opacity: 1; pointer-events: all; }

.chatbox-header {
    background: var(--primary);
    color: #fff;
    padding: 0.9rem 1.2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.chatbox-header h6 { font-weight: 700; margin: 0; font-size: 0.9rem; display: flex; align-items: center; gap: 0.5rem; }
.chatbox-header .online-dot { width: 7px; height: 7px; background: var(--success); border-radius: 50%; }
.chatbox-header-actions { display: flex; gap: 0.4rem; align-items: center; }

.chatbox-sound {
    background: rgba(255,255,255,0.15);
    border: none;
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    cursor: pointer;
    font-size: 0.85rem;
}
.chatbox-sound:hover { background: rgba(255,255,255,0.25); }
.chatbox-sound.muted { color: rgba(255,255,255,0.4); }

.chatbox-close {
    background: rgba(255,255,255,0.15);
    border: none;
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.chatbox-close:hover { background: rgba(255,255,255,0.25); }

.chatbox-messages { flex: 1; overflow-y: auto; padding: 0.8rem; display: flex; flex-direction: column; gap: 0.7rem; }

.chat-msg { display: flex; gap: 0.5rem; align-items: flex-start; }
.chat-msg-avatar { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 0.65rem; font-weight: 700; flex-shrink: 0; background: var(--primary); }
.chat-msg-name { font-weight: 700; font-size: 0.72rem; color: var(--text-primary); margin-bottom: 0.1rem; }
.chat-msg-text { background: var(--bg-input); padding: 0.45rem 0.75rem; border-radius: 0 10px 10px 10px; font-size: 0.8rem; color: var(--text-secondary); line-height: 1.4; display: inline-block; }
.chat-msg-time { font-size: 0.6rem; color: var(--text-muted); margin-top: 0.15rem; }

.chatbox-typing {
    padding: 0 0.8rem;
    min-height: 0;
    font-size: 0.7rem;
    color: var(--text-muted);
    font-style: italic;
    transition: all 0.2s;
    overflow: hidden;
}
.chatbox-typing:not(:empty) {
    padding: 0.3rem 0.8rem;
}
.chatbox-typing .typing-dots {
    display: inline-block;
    animation: typingDots 1.2s steps(4, end) infinite;
}
@keyframes typingDots {
    0% { content: ''; }
    25% { content: '.'; }
    50% { content: '..'; }
    75% { content: '...'; }
}

.chatbox-input { padding: 0.7rem 0.8rem; border-top: 1px solid var(--border-color); display: flex; gap: 0.5rem; flex-shrink: 0; }
.chatbox-input input { flex: 1; background: var(--bg-input); border: 1px solid var(--border-color); color: var(--text-primary); padding: 0.5rem 0.8rem; border-radius: 8px; font-size: 1rem; }
.chatbox-input input:focus { outline: none; border-color: var(--primary); }
.chatbox-input input::placeholder { color: var(--text-muted); }
.chatbox-input button { background: var(--primary); color: #fff; border: none; width: 36px; height: 36px; border-radius: 8px; display: flex; align-items: center; justify-content: center; transition: all 0.2s; flex-shrink: 0; }
.chatbox-input button:hover { background: var(--primary-hover); }

/* ============================================
   COOKIE BANNER
   ============================================ */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
    z-index: 1070;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.cookie-banner.show { transform: translateY(0); }
.cookie-banner-text { flex: 1; font-size: 0.82rem; color: var(--text-secondary); line-height: 1.5; }
.cookie-banner-text a { color: var(--primary); font-weight: 600; }
.cookie-banner-actions { display: flex; gap: 0.5rem; flex-shrink: 0; }
.cookie-btn-accept { background: var(--primary); color: #fff; border: none; padding: 0.5rem 1.3rem; border-radius: 8px; font-weight: 600; font-size: 0.82rem; transition: all 0.2s; }
.cookie-btn-accept:hover { background: var(--primary-hover); }
.cookie-btn-decline { background: transparent; color: var(--text-secondary); border: 1px solid var(--border-color); padding: 0.5rem 1.3rem; border-radius: 8px; font-weight: 600; font-size: 0.82rem; transition: all 0.2s; }
.cookie-btn-decline:hover { background: var(--bg-input); }

/* ============================================
   FOOTER
   ============================================ */
.footer-casino { background: var(--bg-elevated); border-top: 1px solid var(--border-color); padding: 3rem 0 0; }
.footer-brand { font-size: 1.2rem; font-weight: 800; color: var(--text-primary); display: flex; align-items: center; gap: 0.4rem; margin-bottom: 0.8rem; }
.footer-brand i { color: var(--primary); font-size: 1.4rem; }
.footer-logo-icon { height: 1.4rem; width: auto; }
.footer-desc { color: var(--text-muted); font-size: 0.82rem; line-height: 1.7; max-width: 280px; }
.footer-title { font-weight: 700; font-size: 0.78rem; color: var(--text-primary); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 1rem; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 0.5rem; }
.footer-links a { color: var(--text-muted); font-size: 0.82rem; transition: all 0.15s; }
.footer-links a:hover { color: var(--primary); padding-left: 4px; }
.footer-social { display: flex; gap: 0.5rem; margin-top: 1rem; }
.footer-social a { width: 36px; height: 36px; border-radius: 8px; background: var(--bg-card); border: 1px solid var(--border-color); color: var(--text-muted); display: flex; align-items: center; justify-content: center; font-size: 1rem; transition: all 0.2s; }
.footer-social a:hover { background: var(--primary); border-color: var(--primary); color: #fff; transform: translateY(-2px); }
.footer-bottom { border-top: 1px solid var(--border-color); padding: 1.2rem 0; margin-top: 2.5rem; }
.footer-bottom p { color: var(--text-muted); font-size: 0.75rem; margin: 0; }
.footer-bottom-links { list-style: none; padding: 0; margin: 0; display: flex; gap: 1.2rem; justify-content: flex-end; }
.footer-bottom-links a { color: var(--text-muted); font-size: 0.75rem; transition: color 0.2s; }
.footer-bottom-links a:hover { color: var(--primary); }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1199px) {
    .hero-banner-cards { width: 260px; }
    .shop-grid { grid-template-columns: repeat(2, 1fr); }
    .shop-featured-row { grid-template-columns: 1fr 1fr; }
    .shop-daily-content { flex-direction: column; }
    .shop-daily-left { flex: auto; }
    .promo-grid { grid-template-columns: repeat(2, 1fr); }
    .pack-grid  { grid-template-columns: repeat(2, 1fr); }
    .affiliate-stats-row { grid-template-columns: repeat(2, 1fr); }
    .tiers-grid { grid-template-columns: repeat(2, 1fr); }
    .profile-overview-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================
   MOBILE BURGER & MENU
   ============================================ */
.navbar-burger-mobile {
    display: none;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    padding: 0;
    margin-right: 0.8rem;
    cursor: pointer;
    transition: color 0.2s;
}

.navbar-burger-mobile:hover {
    color: var(--text-primary);
}

.mobile-menu-overlay {
    display: none;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 991px) {
    .hero-banner { flex-direction: column; }
    .hero-banner-cards { width: 100%; flex-direction: row; }
    .hero-category-card { min-height: 90px; }
    .navbar-search { max-width: 240px; }
    .game-page-display { flex-direction: column; }
    .mines-layout { flex-direction: column; }
    .mines-grid { max-width: 100%; }
    .mines-sidebar { max-width: 100%; min-width: auto; }
    .mines-page-row { flex-direction: column; }
    .mines-trades-aside { width: 100%; min-width: auto; }
    .dice-page-row { flex-direction: column; }
    .dice-trades-aside { width: 100%; min-width: auto; }
    .dice-layout { flex-direction: column; }
    .dice-sidebar { max-width: 100%; min-width: auto; }
    .podium-item { width: 140px; }
}

@media (max-width: 767px) {
    .navbar-search { display: none; }
    .navbar-burger { display: none; }
    .navbar-burger-mobile { display: flex !important; }
    .btn-wallet { display: none; }
    .theme-toggle { display: none; }
    .navbar-right { margin-left: auto; }
    .btn-connect {
        font-size: 0.75rem;
        padding: 0.3rem 0.7rem;
    }
    .navbar-points {
        display: flex;
        font-size: 0.72rem;
        padding: 0.3rem 0.55rem;
        gap: 0.25rem;
    }
    .navbar-points i { font-size: 0.85rem; }
    .navbar-user-info { display: none !important; }
    .navbar-chevron { display: none !important; }
    .navbar-avatar-wrapper {
        padding: 0;
        border: none;
    }
    .navbar-avatar-wrapper:hover {
        background: transparent;
        border-color: transparent;
    }
    
    /* Filter bar responsive */
    .filter-bar {
        gap: 0.5rem;
        padding: 0.5rem 0.75rem;
    }
    .filter-bar > i { display: none; }
    .filter-select {
        flex: 1 1 auto;
        min-width: 0;
        font-size: 0.78rem;
        padding: 0.4rem 1.6rem 0.4rem 0.5rem;
    }
    .filter-search { display: none; }
    
    /* Cache complètement la subnav sur mobile */
    .subnav { 
        display: none; 
    }
    
    /* Menu mobile overlay */
    .mobile-menu-overlay {
        display: block;
        position: fixed;
        top: var(--navbar-height);
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--bg-body);
        z-index: 1040;
        overflow-y: auto;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .mobile-menu-overlay.open {
        transform: translateX(0);
    }
    
    .mobile-menu-links {
        padding: 1rem;
        display: flex;
        flex-direction: column;
        gap: 0.3rem;
    }
    
    .mobile-menu-link {
        display: flex;
        align-items: center;
        gap: 0.6rem;
        padding: 0.8rem 1rem;
        border-radius: 10px;
        color: var(--text-secondary);
        font-size: 0.9rem;
        font-weight: 500;
        transition: all 0.15s;
        background: var(--bg-card);
    }
    
    .mobile-menu-link:hover,
    .mobile-menu-link.active {
        background: var(--primary);
        color: #fff;
    }
    
    .mobile-menu-link i {
        font-size: 1.2rem;
    }
    
    .mobile-menu-link .badge-new {
        background: var(--danger);
        color: #fff;
        font-size: 0.6rem;
        font-weight: 700;
        padding: 2px 6px;
        border-radius: 50px;
        margin-left: auto;
    }
    
    .mobile-menu-link .badge-count {
        background: var(--bg-input);
        color: var(--text-muted);
        font-size: 0.65rem;
        font-weight: 600;
        padding: 2px 6px;
        border-radius: 50px;
        margin-left: auto;
    }
    
    .mobile-menu-sep {
        height: 1px;
        background: var(--border-color);
        margin: 0.5rem 0;
    }
    .hero-banner-main { padding: 1.8rem; }
    .hero-banner-title { font-size: 1.4rem; }
    .hero-banner-cards { flex-direction: column; }
    .hero-category-card { min-height: 80px; }
    .shop-grid { grid-template-columns: 1fr 1fr; }
    .shop-featured-row { grid-template-columns: 1fr; }
    .shop-daily-banner, .daily-bonus-card { padding: 1.2rem; }
    .daily-bonus-card .daily-rewards { flex-wrap: wrap; justify-content: center; }
    .promo-grid { grid-template-columns: 1fr; }
    .pack-grid  { grid-template-columns: 1fr; }
    .affiliate-stats-row { grid-template-columns: 1fr 1fr; }
    .tiers-grid { grid-template-columns: 1fr 1fr; }
    .profile-overview-grid { grid-template-columns: 1fr 1fr; }
    .chatbox { width: calc(100% - 40px); right: 20px; bottom: 80px; height: 380px; }
    .cookie-banner { flex-direction: column; text-align: center; }
    .game-tile { width: 140px; }
    .game-tile-img { width: 140px; height: 185px; }
    .footer-bottom-links { justify-content: center; }
    .promo-featured { padding: 1.8rem; }
    .promo-featured-content h3 { font-size: 1.2rem; }
    .affiliate-hero { padding: 1.8rem; flex-direction: column; }
    .podium { flex-direction: column; align-items: center; }
    .podium-item .podium-block { border-radius: 10px; height: auto !important; padding: 0.6rem 1rem; }
}

@media (max-width: 575px) {
    .btn-wallet span { display: none; }
    .main-content { padding: 1rem; }
    .game-tile { width: 120px; }
    .game-tile-img { width: 120px; height: 160px; }
    .slot-reel { width: 75px; height: 85px; font-size: 2rem; }
    .badges-grid { grid-template-columns: repeat(4, 1fr); }
    .affiliate-stats-row { grid-template-columns: 1fr; }
    .tiers-grid { grid-template-columns: 1fr; }
    .profile-overview-grid { grid-template-columns: 1fr; }
}

/* ============================================
   AVATAR DROPDOWN
   ============================================ */
.navbar-avatar-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.35rem 0.8rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.navbar-avatar-wrapper:hover {
    background: var(--bg-card);
    border-color: var(--border-color);
}

.navbar-user-info {
    display: flex;
    flex-direction: column;
    gap: 0.05rem;
}

.navbar-username {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.navbar-level {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-muted);
    line-height: 1.2;
}

.navbar-chevron {
    font-size: 1rem;
    color: var(--text-muted);
    transition: transform 0.2s, color 0.2s;
}

.navbar-avatar-wrapper:hover .navbar-chevron {
    color: var(--text-secondary);
}

/* ============================================
   ANIMATION CHANGEMENT DE CRÉDITS
   ============================================ */
.navbar-points {
    position: relative;
    transition: transform 0.1s ease;
}

.credits-change-badge {
    display: inline-flex;
    align-items: center;
    margin-left: 0.5rem;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    font-weight: 800;
    font-size: 0.75rem;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.credits-change-badge.show {
    opacity: 1;
    transform: scale(1);
}

.credits-change-badge.gain {
    background: linear-gradient(135deg, #00e701, #059669);
    color: #fff;
    animation: gainPulse 0.6s ease-out;
}

.credits-change-badge.loss {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
    animation: lossPulse 0.6s ease-out;
}

@keyframes gainPulse {
    0%, 100% { 
        transform: scale(1); 
        box-shadow: 0 2px 8px rgba(0, 231, 1, 0.3);
    }
    50% { 
        transform: scale(1.1); 
        box-shadow: 0 4px 15px rgba(0, 231, 1, 0.5);
    }
}

@keyframes lossPulse {
    0%, 100% { 
        transform: scale(1); 
        box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
    }
    50% { 
        transform: scale(1.1); 
        box-shadow: 0 4px 15px rgba(239, 68, 68, 0.5);
    }
}

/* Styles déplacés avant les media queries */

.avatar-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 200px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.4rem;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: all 0.2s ease;
    z-index: 1100;
}

.avatar-dropdown.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.avatar-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.8rem;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.15s;
    cursor: pointer;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
}


.avatar-dropdown-item:hover {
    background: var(--bg-input);
    color: var(--text-primary);
}

.avatar-dropdown-item i {
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

.avatar-dropdown-item.logout {
    color: var(--danger);
}

.avatar-dropdown-item.logout:hover {
    background: rgba(239, 68, 68, 0.1);
}

.avatar-dropdown-sep {
    height: 1px;
    background: var(--border-color);
    margin: 0.3rem 0;
}

/* ============================================
   MODALS (Login)
   ============================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.modal-overlay.open {
    opacity: 1;
    pointer-events: all;
}

.modal-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2.2rem 2rem;
    width: 100%;
    max-width: 420px;
    position: relative;
    transform: scale(0.95) translateY(10px);
    transition: transform 0.25s ease;
    text-align: center;
}

.modal-overlay.open .modal-box {
    transform: scale(1) translateY(0);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all 0.15s;
    cursor: pointer;
}

.modal-close:hover {
    color: var(--text-primary);
    background: var(--bg-input);
}

.modal-title {
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 0.6rem;
    text-align: left;
}

.modal-subtitle {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 1.8rem;
    text-align: left;
    line-height: 1.5;
}

.modal-social-btns {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.btn-social-login {
    width: 100%;
    padding: 0.75rem 1.2rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: 1px solid var(--border-color);
    background: var(--bg-input);
    color: var(--text-primary);
    transition: all 0.2s;
    cursor: pointer;
}

.btn-social-login i {
    font-size: 1.2rem;
}

.btn-social-login.discord {
    background: #5865f2;
    border-color: #5865f2;
    color: #fff;
}

.btn-social-login.discord:hover {
    background: #4752c4;
    border-color: #4752c4;
}

.btn-social-login.google {
    background: var(--bg-input);
    border-color: var(--border-color);
    color: var(--text-primary);
}

.btn-social-login.google:hover {
    border-color: var(--text-muted);
    background: var(--bg-card-hover);
}

.modal-divider {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin: 1.3rem 0;
}

.modal-divider::before,
.modal-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.modal-divider span {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 600;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.modal-info-box {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.9rem 1.2rem;
}

.modal-info-box p {
    margin: 0;
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.modal-form {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.input-icon-wrapper {
    position: relative;
}

.input-icon-wrapper i {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1rem;
}

.input-icon-wrapper input {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.7rem 1rem 0.7rem 2.5rem;
    border-radius: 10px;
    font-size: 0.88rem;
    transition: all 0.2s;
}

.input-icon-wrapper input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.input-icon-wrapper input::placeholder {
    color: var(--text-muted);
}

.btn-modal-primary {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 0.7rem 1.5rem;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    transition: all 0.2s;
    cursor: pointer;
    width: 100%;
    margin-top: 0.2rem;
}

.btn-modal-primary:hover {
    background: var(--primary-hover);
    box-shadow: 0 4px 15px var(--primary-glow);
}

.modal-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.2rem;
    margin-top: 1rem;
}

.modal-links a {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 500;
    transition: color 0.15s;
}

.modal-links a:hover {
    color: var(--primary);
}

.modal-footer-text {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 1.4rem;
    margin-bottom: 0;
    line-height: 1.5;
}

.modal-footer-text a {
    color: var(--primary);
    font-weight: 600;
    cursor: pointer;
}

.modal-footer-text a:hover {
    text-decoration: underline;
}

/* ============================================
   ROULETTE — LIVE MULTIPLAYER
   ============================================ */

.rl-container {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

/* ---- Panel gauche ---- */
.rl-panel {
    width: 280px;
    flex-shrink: 0;
    position: sticky;
    top: 80px;
}

.rl-panel-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1.5rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.rl-panel-title {
    font-size: 1.3rem;
    font-weight: 900;
    color: var(--text-primary);
    margin: 0;
}

.rl-panel-subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0;
    margin-top: -0.6rem;
}

.rl-panel-card label, .rl-chips-section label, .rl-total-section label, .rl-history-section label {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: 0.4rem;
}

/* History compact */
.rl-history-bar {
    display: flex;
    gap: 0.35rem;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 0.2rem 0;
}
.rl-history-bar::-webkit-scrollbar { display: none; }

.rl-history-num {
    flex-shrink: 0;
    width: 30px; height: 30px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 800;
    color: #fff;
}
.rl-history-num.red { background: var(--primary); }
.rl-history-num.black { background: #374151; }
.rl-history-num.green { background: #15803d; }

/* Chips */
.rl-chips {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.rl-chip {
    width: 40px; height: 40px;
    border-radius: 50%;
    border: 3px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--bg-input);
}

.rl-chip span {
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--text-primary);
}

.rl-chip:nth-child(1) { border-color: #6b7280; }
.rl-chip:nth-child(2) { border-color: #ef4444; background: rgba(239,68,68,0.15); }
.rl-chip:nth-child(3) { border-color: #3b82f6; background: rgba(59,130,246,0.15); }
.rl-chip:nth-child(4) { border-color: #ec4899; background: rgba(236,72,153,0.15); }
.rl-chip:nth-child(5) { border-color: #8b5cf6; background: rgba(139,92,246,0.15); }
.rl-chip:nth-child(6) { border-color: #f59e0b; background: rgba(245,158,11,0.15); }

.rl-chip.active {
    transform: scale(1.15);
    box-shadow: 0 0 12px rgba(99,102,241,0.4);
    border-color: var(--primary);
}

.rl-chip:hover { transform: scale(1.1); }

/* Total */
.rl-total-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.55rem 0.8rem;
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-primary);
}

.rl-total-display span { flex: 1; }

.rl-total-clear {
    background: none; border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
    padding: 0;
    transition: color 0.2s;
}
.rl-total-clear:hover { color: var(--danger); }

/* Actions */
.rl-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: auto;
}

.rl-validate-btn {
    width: 100%;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    font-weight: 800;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}
.rl-validate-btn:hover { background: var(--primary-hover); box-shadow: 0 4px 20px var(--primary-glow); }
.rl-validate-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.rl-validate-btn.rl-cancel-mode {
    background: transparent;
    border: 1px solid var(--danger);
    color: var(--danger);
}
.rl-validate-btn.rl-cancel-mode:hover { background: var(--danger); color: #fff; }

.rl-actions-secondary {
    display: flex;
    gap: 0.4rem;
}

.rl-secondary-btn {
    flex: 1;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    border-radius: 8px;
    padding: 0.45rem 0.6rem;
    font-weight: 600;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
}
.rl-secondary-btn:hover { border-color: var(--primary); color: var(--primary); }
.rl-secondary-btn.active { border-color: var(--primary); color: var(--primary); background: rgba(79, 70, 229, 0.1); }
.rl-secondary-btn.rl-secondary-danger:hover { border-color: var(--danger); color: var(--danger); }

.rl-undo-btn {
    width: 42px; height: 42px;
    border-radius: 10px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.rl-undo-btn:hover { border-color: var(--primary); color: var(--primary); }

/* ---- Zone centrale ---- */
.rl-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-width: 0;
}

.rl-timer-bar {
    text-align: right;
}

.rl-timer-text {
    display: inline-block;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.4rem 1rem;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-primary);
}

.rl-timer-text.active { color: var(--accent); }
.rl-timer-text.spinning { color: var(--primary); animation: timerPulse 1s ease infinite; }

@keyframes timerPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Wheel area */
.rl-wheel-area {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1rem 0;
}

.rl-nav-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    transition: all 0.2s;
    white-space: nowrap;
}
.rl-nav-btn:hover { border-color: var(--primary); color: var(--text-primary); }

.rl-wheel-wrapper {
    position: relative;
    width: 500px;
    height: 180px;
    flex-shrink: 0;
    overflow: hidden;
}

.rl-wheel-wrapper canvas {
    width: 100%;
    height: 100%;
}

.rl-wheel-pointer {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0; height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 18px solid #c9a84c;
    z-index: 5;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.rl-wheel-center {
    position: absolute;
    bottom: 8px; left: 50%;
    transform: translateX(-50%);
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--text-muted);
    z-index: 5;
    pointer-events: none;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}
.rl-wheel-center.red { color: var(--primary); }
.rl-wheel-center.black { color: #e2e8f0; }
.rl-wheel-center.green { color: #22c55e; }

/* ---- Table de paris ---- */
.rl-table {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 0.6rem;
    overflow-x: auto;
}

.rl-table-locked {
    opacity: 0.5;
    pointer-events: none;
}

.rl-table-grid {
    display: grid;
    grid-template-columns: 40px repeat(12, 1fr) 40px;
    grid-template-rows: repeat(3, 1fr);
    gap: 3px;
}

.rl-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 0.2rem;
    border-radius: 4px;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
    color: #fff;
    position: relative;
    user-select: none;
    min-height: 36px;
}

.rl-cell:hover { filter: brightness(1.3); transform: scale(1.05); z-index: 2; }

.rl-cell.rl-red { background: var(--primary); }
.rl-cell.rl-black { background: #374151; }
.rl-cell.rl-zero { background: #15803d; grid-row: 1 / 4; }
.rl-cell.rl-side { background: var(--bg-input); color: var(--text-muted); font-size: 0.65rem; }

.rl-cell-active { outline: 2px solid #c9a84c; outline-offset: -2px; }

.rl-chip-indicator {
    position: absolute;
    top: -4px; right: -4px;
    background: #c9a84c;
    color: #000;
    font-size: 0.55rem;
    font-weight: 900;
    min-width: 18px; height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    box-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

.rl-table-bottom {
    display: flex;
    gap: 3px;
    margin-top: 3px;
}

.rl-cell.rl-dozen {
    flex: 1;
    background: var(--bg-input);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    font-size: 0.75rem;
    min-height: 34px;
}

.rl-cell.rl-simple {
    flex: 1;
    background: var(--bg-input);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    font-size: 0.75rem;
    min-height: 34px;
}

.rl-color-swatch {
    display: block;
    width: 22px; height: 14px;
    border-radius: 3px;
}
.rl-color-swatch.red { background: var(--primary); }
.rl-color-swatch.black { background: #374151; }

/* ---- Sidebar droite ---- */
.rl-sidebar {
    width: 280px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    overflow: hidden;
}
.rl-sidebar .trades-card {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.rl-sidebar .trades-card-list {
    flex: 1;
    max-height: none;
    overflow-y: auto;
}

.rl-sidebar-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    overflow: hidden;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}
.rl-sidebar-card .rl-bets-list {
    flex: 1;
    overflow-y: auto;
}

.rl-sidebar-header {
    padding: 0.8rem 1rem;
    background: var(--bg-input);
    border-bottom: 1px solid var(--border-color);
}

.rl-sidebar-header h4 {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0;
}

.rl-bets-list, .rl-trades-list {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem;
}

.rl-no-bets {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.82rem;
    padding: 2rem 1rem;
}

.rl-bet-row, .rl-trade-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.45rem 0.6rem;
    border-radius: 8px;
    margin-bottom: 0.25rem;
    background: var(--bg-input);
    font-size: 0.76rem;
    gap: 0.5rem;
}

.rl-bet-row.won, .rl-trade-row.won { background: rgba(0,231,1,0.06); }
.rl-bet-row.lost, .rl-trade-row.lost { background: rgba(239,68,68,0.06); }

.rl-bet-player {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

.rl-bet-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.58rem;
    font-weight: 700;
    flex-shrink: 0;
}

.rl-bet-user, .rl-trade-user {
    font-weight: 700;
    color: var(--text-primary);
    min-width: 55px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rl-bet-label {
    flex: 1;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.72rem;
}

.rl-bet-amount, .rl-trade-amount {
    font-weight: 800;
    text-align: right;
    min-width: 50px;
    white-space: nowrap;
}

.rl-bet-amount.won, .rl-trade-amount.won { color: var(--success); }
.rl-bet-amount.lost, .rl-trade-amount.lost { color: var(--danger); }

.rl-trade-date {
    color: var(--text-muted);
    font-size: 0.68rem;
    white-space: nowrap;
    flex: 1;
    text-align: center;
}

/* ---- Responsive Roulette ---- */
@media (max-width: 1199px) {
    .rl-container { flex-wrap: wrap; }
    .rl-panel { width: 100%; order: 2; }
    .rl-main { width: 100%; order: 1; flex: 1 1 100%; }
    .rl-sidebar { width: 100%; order: 3; flex-direction: row; }
    .rl-sidebar-card { max-height: 280px; }
    .rl-panel-card {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 1rem;
        align-items: flex-start;
    }
    .rl-panel-title, .rl-panel-subtitle { width: 100%; }
    .rl-history-section, .rl-chips-section, .rl-total-section { flex: 1; min-width: 180px; }
    .rl-actions { width: 100%; }
}

@media (max-width: 767px) {
    .rl-wheel-wrapper { width: 400px; height: 150px; }
    .rl-wheel-area { gap: 0.5rem; }
    .rl-nav-btn { padding: 0.4rem 0.6rem; font-size: 0.72rem; }
    .rl-table-grid { grid-template-columns: 30px repeat(12, 1fr) 30px; }
    .rl-cell { font-size: 0.68rem; min-height: 30px; padding: 0.3rem 0.1rem; }
    .rl-sidebar { flex-direction: column; }
    .rl-sidebar-card { max-height: 220px; }
    .rl-chip { width: 34px; height: 34px; }
    .rl-chip span { font-size: 0.65rem; }
}

@media (max-width: 575px) {
    .rl-wheel-wrapper { width: 300px; height: 120px; }
    .rl-wheel-center { font-size: 1.3rem; }
    .rl-panel-card { padding: 1rem; gap: 0.8rem; }
    .rl-table { padding: 0.3rem; }
    .rl-table-grid { grid-template-columns: 25px repeat(12, 1fr) 25px; gap: 2px; }
    .rl-cell { font-size: 0.6rem; min-height: 26px; }
}

/* ============================================
   CRASH GAME — LIVE MULTIPLAYER
   ============================================ */
.crash-container {
    display: flex;
    gap: 1rem;
    align-items: stretch;
}

.crash-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* ---- Game Card ---- */
.crash-game-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    overflow: hidden;
}

.crash-status-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.7rem 1.2rem;
    background: var(--bg-input);
    border-bottom: 1px solid var(--border-color);
    font-size: 0.78rem;
    color: var(--text-muted);
}

.crash-game-id { font-weight: 600; }

.crash-timer {
    font-weight: 700;
    color: var(--accent);
    opacity: 0;
    transition: opacity 0.3s;
}

.crash-timer.visible { opacity: 1; }

.crash-players-count {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-weight: 600;
}

.crash-display-area {
    position: relative;
    height: 320px;
    padding: 0;
}

.crash-display-area canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.crash-multiplier-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    pointer-events: none;
    z-index: 5;
    transition: all 0.3s;
}

.crash-multi-value {
    font-size: 4rem;
    font-weight: 900;
    color: #e2e8f0;
    text-shadow: 0 0 30px rgba(0,0,0,0.5);
    transition: color 0.3s;
}

.crash-multi-x {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-muted);
}

.crash-multiplier-overlay.running .crash-multi-value {
    animation: multiPulse 0.5s ease-in-out infinite alternate;
}

.crash-multiplier-overlay.crashed .crash-multi-value {
    color: #ef4444 !important;
    animation: crashShake 0.4s ease-in-out;
}

@keyframes multiPulse {
    from { transform: scale(1); }
    to { transform: scale(1.02); }
}

@keyframes crashShake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-8px); }
    40% { transform: translateX(8px); }
    60% { transform: translateX(-5px); }
    80% { transform: translateX(5px); }
}

/* ---- History bar ---- */
.crash-history-bar {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1.2rem;
    overflow-x: auto;
    border-top: 1px solid var(--border-color);
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.crash-history-bar::-webkit-scrollbar { display: none; }

.crash-history-item {
    flex-shrink: 0;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 700;
}

.crash-history-item.high {
    background: rgba(0, 231, 1, 0.12);
    color: var(--success);
}

.crash-history-item.low {
    background: rgba(239, 68, 68, 0.12);
    color: var(--danger);
}

/* ---- Controls Card ---- */
.crash-controls-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1.2rem;
}

.crash-controls-row {
    display: flex;
    align-items: flex-end;
    gap: 1rem;
}

.crash-bet-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.crash-bet-group label {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.crash-bet-input-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0 0.8rem;
    transition: border-color 0.2s;
}

.crash-bet-input-wrap:focus-within {
    border-color: var(--primary);
}

.crash-bet-input-wrap i {
    color: var(--accent);
    font-size: 1rem;
}

.crash-bet-input-wrap input {
    background: transparent;
    border: none;
    color: var(--text-primary);
    padding: 0.55rem 0;
    font-size: 0.95rem;
    font-weight: 700;
    width: 100px;
}

.crash-bet-input-wrap input:focus { outline: none; }
.crash-bet-input-wrap input:disabled { opacity: 0.4; cursor: not-allowed; }

.crash-bet-presets {
    display: flex;
    gap: 0.3rem;
}

.crash-preset-btn {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 0.25rem 0.55rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
}

.crash-preset-btn:hover,
.crash-preset-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.crash-btn-group {
    flex: 1;
}

.crash-action-btn {
    width: 100%;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 10px;
    font-weight: 800;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    color: #fff;
}

.crash-action-btn.bet {
    background: var(--primary);
}

.crash-action-btn.bet:hover {
    background: var(--primary-hover);
    box-shadow: 0 4px 20px var(--primary-glow);
    transform: translateY(-1px);
}

.crash-action-btn.cashout {
    background: linear-gradient(135deg, #00e701, #059669);
    animation: cashoutPulse 1s ease-in-out infinite;
}

@keyframes cashoutPulse {
    0%, 100% { box-shadow: 0 0 0 transparent; }
    50% { box-shadow: 0 0 25px rgba(0, 231, 1, 0.4); }
}

.crash-action-btn.cashout:hover {
    transform: translateY(-1px);
}

.crash-action-btn.cashed {
    background: linear-gradient(135deg, #059669, #047857);
    cursor: default;
}

.crash-action-btn.disabled {
    background: var(--bg-input);
    color: var(--text-muted);
    cursor: not-allowed;
}

/* ---- Sidebar ---- */
.crash-sidebar {
    width: 300px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    overflow: hidden;
}
.crash-sidebar .trades-card {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.crash-sidebar .trades-card-list {
    flex: 1;
    max-height: none;
    overflow-y: auto;
}

.crash-sidebar-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    overflow: hidden;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}
.crash-sidebar-card .crash-players-list {
    flex: 1;
    overflow-y: auto;
}

.crash-sidebar-header {
    padding: 0.8rem 1rem;
    background: var(--bg-input);
    border-bottom: 1px solid var(--border-color);
}

.crash-sidebar-header h4 {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0;
}

.crash-players-list {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem;
}

.crash-no-players {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.82rem;
    padding: 2rem 1rem;
}

.crash-player-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.7rem;
    border-radius: 8px;
    margin-bottom: 0.3rem;
    transition: background 0.2s;
    background: var(--bg-input);
}

.crash-player-row.won {
    background: rgba(0, 231, 1, 0.08);
}

.crash-player-row.lost {
    background: rgba(239, 68, 68, 0.08);
}

.crash-player-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

.crash-player-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.58rem;
    font-weight: 700;
    flex-shrink: 0;
}

.crash-player-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.crash-player-bet {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.crash-player-status {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-size: 0.7rem;
    font-weight: 700;
    flex-shrink: 0;
}

.crash-player-status.pending { color: var(--text-muted); }
.crash-player-status.won { color: var(--success); }
.crash-player-status.lost { color: var(--danger); }

.crash-player-win {
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--success);
}

/* ---- Toggle switch ---- */
.crash-toggle-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.crash-toggle-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.crash-toggle-track {
    display: block;
    width: 34px;
    height: 18px;
    border-radius: 10px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    position: relative;
    transition: background 0.25s, border-color 0.25s;
}

.crash-toggle-thumb {
    display: block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--text-muted);
    position: absolute;
    top: 1px;
    left: 1px;
    transition: transform 0.25s, background 0.25s;
}

.crash-toggle-btn.active .crash-toggle-track {
    background: var(--primary);
    border-color: var(--primary);
}

.crash-toggle-btn.active .crash-toggle-thumb {
    background: #fff;
    transform: translateX(16px);
}

/* ---- Controls layout ---- */
.crash-options-col {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 0;
}

.crash-option-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.crash-option-row label {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
    min-width: 75px;
}

.crash-input-sm {
    max-width: 90px;
    padding: 0 0.5rem;
}

.crash-input-sm input {
    width: 50px;
    padding: 0.4rem 0;
    font-size: 0.85rem;
}

.crash-input-suffix {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
}

/* ---- Auto-play info ---- */
.crash-autoplay-info {
    font-size: 0.68rem;
    color: var(--primary);
    font-weight: 600;
    white-space: nowrap;
}

/* ---- Cancel button ---- */
.crash-action-btn.cancel {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.crash-action-btn.cancel:hover {
    background: rgba(239, 68, 68, 0.25);
    transform: translateY(-1px);
}

/* ---- Trade history ---- */
.crash-trades-card {
    margin-top: 0;
}

.crash-trades-list {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem;
    max-height: 280px;
}

.crash-trade-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.45rem 0.6rem;
    border-radius: 8px;
    margin-bottom: 0.25rem;
    background: var(--bg-input);
    font-size: 0.76rem;
    gap: 0.5rem;
}

.crash-trade-row.won {
    background: rgba(0, 231, 1, 0.06);
}

.crash-trade-row.lost {
    background: rgba(239, 68, 68, 0.06);
}

.crash-trade-user {
    font-weight: 700;
    color: var(--text-primary);
    min-width: 60px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.crash-trade-date {
    color: var(--text-muted);
    font-size: 0.68rem;
    white-space: nowrap;
    flex: 1;
    text-align: center;
}

.crash-trade-result {
    font-weight: 800;
    text-align: right;
    min-width: 60px;
    white-space: nowrap;
}

.crash-trade-result.won { color: var(--success); }
.crash-trade-result.lost { color: var(--danger); }

/* ---- Responsive ---- */
@media (max-width: 991px) {
    .crash-container { flex-direction: column; }
    .crash-sidebar {
        width: 100%;
        flex-direction: row;
    }
    .crash-sidebar-card {
        max-height: 300px;
        flex: 1;
        min-width: 0;
    }
    .crash-trades-card { margin-top: 0; }
}

@media (max-width: 767px) {
    .crash-display-area { height: 220px; }
    .crash-multi-value { font-size: 2.5rem; }
    .crash-multi-x { font-size: 1.2rem; }

    .crash-controls-card { padding: 0.8rem; }
    .crash-controls-row {
        flex-direction: column;
        align-items: stretch;
        gap: 0.7rem;
    }
    .crash-bet-main { width: 100%; }
    .crash-bet-input-wrap input { width: 100%; }
    .crash-options-col { width: 100%; }
    .crash-btn-group { width: 100%; }

    .crash-status-bar {
        padding: 0.5rem 0.8rem;
        font-size: 0.7rem;
    }
    .crash-history-bar {
        padding: 0.5rem 0.8rem;
        gap: 0.3rem;
    }
    .crash-history-item {
        padding: 0.2rem 0.45rem;
        font-size: 0.65rem;
    }
}

@media (max-width: 575px) {
    .crash-sidebar {
        flex-direction: column;
        gap: 0.6rem;
    }
    .crash-sidebar-card {
        flex: 1;
        max-height: 250px;
        min-height: 200px;
    }

    .crash-display-area { height: 180px; }
    .crash-multi-value { font-size: 2rem; }
    .crash-multi-x { font-size: 1rem; }

    .crash-option-row label {
        min-width: 60px;
        font-size: 0.65rem;
    }
    .crash-option-row { gap: 0.4rem; }

    .crash-preset-btn {
        padding: 0.2rem 0.45rem;
        font-size: 0.65rem;
    }

    .crash-action-btn {
        padding: 0.65rem 1rem;
        font-size: 0.85rem;
    }

    .crash-player-row { padding: 0.4rem 0.5rem; }
    .crash-player-avatar { width: 24px; height: 24px; font-size: 0.5rem; }
    .crash-player-name { font-size: 0.72rem; }
    .crash-player-bet { font-size: 0.7rem; }

    .crash-trade-row {
        padding: 0.35rem 0.5rem;
        font-size: 0.7rem;
    }
    .crash-trade-user { min-width: 50px; }
    .crash-trade-result { min-width: 50px; }
}

/* ============================================
   DIAMOND RUSH
   ============================================ */
.dr-container {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 1.2rem;
    align-items: start;
}
.dr-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1.5rem;
    text-align: center;
}
.dr-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}
.dr-section-title {
    font-size: 1rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0;
    background: linear-gradient(135deg, #60a5fa, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.dr-display {
    display: flex;
    gap: 0.6rem;
    justify-content: center;
    margin: 1.5rem 0;
}
.dr-reel {
    width: 80px;
    height: 95px;
    background: linear-gradient(145deg, var(--bg-input), rgba(96, 165, 250, 0.08));
    border: 2px solid rgba(96, 165, 250, 0.3);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.4rem;
    transition: all 0.3s;
}
.dr-reel.spinning {
    border-color: #60a5fa;
    box-shadow: 0 0 18px rgba(96, 165, 250, 0.4);
}
.dr-reel.spinning .reel-value {
    animation: reelSpin 0.12s linear infinite;
}
.dr-reel.win-pulse {
    animation: winPulse 0.5s ease-in-out 2;
    border-color: #f59e0b;
    box-shadow: 0 0 25px rgba(245, 158, 11, 0.5);
}
.dr-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 1rem 0;
}
.dr-bet-label { color: var(--text-secondary); font-weight: 600; font-size: 0.85rem; }
.dr-spin-btn {
    background: linear-gradient(135deg, #60a5fa, #a78bfa);
    color: #fff;
    border: none;
    padding: 0.7rem 2.5rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s;
    cursor: pointer;
}
.dr-spin-btn:hover {
    box-shadow: 0 6px 20px rgba(96, 165, 250, 0.4);
    transform: translateY(-1px);
}
.dr-spin-btn:active { transform: translateY(1px); }
.dr-auto-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    margin: 0.5rem 0 0.8rem;
}
.dr-win-display { font-size: 1.2rem; font-weight: 700; min-height: 1.8rem; color: var(--accent); }
.dr-info {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    color: var(--text-muted);
    font-size: 0.75rem;
    margin-top: 0.5rem;
}
.dr-sidebar {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    overflow: hidden;
}
.dr-sidebar .trades-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.dr-sidebar .trades-card-list {
    flex: 1;
    max-height: none;
    overflow-y: auto;
}
@media (max-width: 767px) {
    .dr-container { grid-template-columns: 1fr; }
    .dr-reel { width: 56px; height: 70px; font-size: 1.6rem; }
    .dr-display { gap: 0.35rem; }
    .dr-info { flex-wrap: wrap; gap: 0.8rem; }
    .dr-auto-row { flex-wrap: wrap; }
}

/* ============================================
   PLINKO DROP
   ============================================ */
.pk-container {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 1.2rem;
    align-items: start;
}
.pk-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1.5rem;
    text-align: center;
}
.pk-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}
.pk-section-title {
    font-size: 1rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0;
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.pk-board {
    display: flex;
    justify-content: center;
    margin-bottom: 0.5rem;
}
.pk-board canvas {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border-color);
}
.pk-multipliers {
    display: flex;
    justify-content: center;
    gap: 0.3rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}
.pk-mult {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    border: 1px solid;
}
.pk-mult-high { color: #ef4444; border-color: rgba(239, 68, 68, 0.3); background: rgba(239, 68, 68, 0.1); }
.pk-mult-mid { color: #f87171; border-color: rgba(248, 113, 113, 0.3); background: rgba(248, 113, 113, 0.1); }
.pk-mult-ok { color: #fca5a5; border-color: rgba(252, 165, 165, 0.3); background: rgba(252, 165, 165, 0.1); }
.pk-mult-low { color: #6b7280; border-color: rgba(107, 114, 128, 0.3); background: rgba(107, 114, 128, 0.1); }
.pk-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin: 0.8rem 0;
    flex-wrap: wrap;
}
.pk-control-group {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
.pk-label { color: var(--text-secondary); font-weight: 600; font-size: 0.8rem; white-space: nowrap; }
.pk-controls .slot-bet-input {
    width: 80px;
    padding: 0.45rem 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 6px;
}
.pk-controls .slot-bet-input.slot-input-sm {
    width: 55px;
}
.pk-risk-select {
    width: 90px !important;
    padding: 0.45rem 0.5rem !important;
    font-size: 0.85rem !important;
}
.pk-drop-btn {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 0.55rem 1.8rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    transition: all 0.2s;
    cursor: pointer;
}
.pk-drop-btn:hover {
    background: var(--primary-hover);
    box-shadow: 0 4px 16px var(--primary-glow);
    transform: translateY(-1px);
}
.pk-drop-btn:active { transform: translateY(1px); }
.pk-auto-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    margin: 0.5rem 0 0.8rem;
}
.pk-result { font-size: 1.1rem; font-weight: 700; min-height: 1.6rem; margin-top: 0.5rem; }
.pk-sidebar {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}
@media (max-width: 767px) {
    .pk-container { grid-template-columns: 1fr; }
    .pk-board canvas { max-height: 350px; }
    .pk-controls { gap: 0.5rem; }
    .pk-controls .slot-bet-input { width: 70px; font-size: 0.8rem; }
    .pk-drop-btn { padding: 0.5rem 1.2rem; font-size: 0.82rem; }
    .pk-auto-row { flex-wrap: wrap; }
}

/* ============================================
   BINGO LIVE
   ============================================ */
.bg-hidden { display: none !important; }

/* ---- Rooms Grid ---- */
.bg-rooms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}
.bg-room-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem 1rem;
    text-align: center;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}
.bg-room-card:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.15); }
.bg-room-icon { font-size: 2.2rem; }
.bg-room-name { font-weight: 700; font-size: 1.1rem; color: var(--text-primary); }
.bg-room-buyin { font-size: 1.3rem; font-weight: 800; color: var(--primary); }
.bg-room-buyin small { font-size: 0.7rem; font-weight: 500; color: var(--text-secondary); display: block; }
.bg-room-info { display: flex; align-items: center; gap: 0.8rem; font-size: 0.78rem; color: var(--text-secondary); margin: 0.3rem 0; }
.bg-room-status { padding: 2px 8px; border-radius: 20px; font-size: 0.7rem; font-weight: 600; }
.bg-status-waiting { background: rgba(34,197,94,0.15); color: #22c55e; }
.bg-status-playing { background: var(--primary-light); color: var(--primary); }
.bg-status-finished { background: rgba(107,114,128,0.15); color: #6b7280; }
.bg-room-join-btn {
    margin-top: auto;
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 0.5rem 1.6rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
}
.bg-room-join-btn:hover { background: var(--primary-hover); }

/* ---- Lobby ---- */
.bg-lobby { width: 100%; }
.bg-back-btn {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.4rem 1rem;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    margin-bottom: 1rem;
    transition: all 0.2s;
}
.bg-back-btn:hover { border-color: var(--primary); color: var(--primary); }
.bg-lobby-header {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}
.bg-lobby-room h3 { font-size: 1.2rem; font-weight: 800; margin: 0; color: var(--text-primary); }
.bg-lobby-badge { background: var(--primary-light); color: var(--primary); padding: 3px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 600; }
.bg-lobby-stats { display: flex; gap: 1.2rem; }
.bg-lobby-stat { display: flex; align-items: center; gap: 0.4rem; color: var(--text-secondary); font-size: 0.85rem; }
.bg-lobby-stat i { color: var(--primary); }

/* ---- Countdown ---- */
.bg-countdown-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    margin-bottom: 1rem;
}
.bg-countdown-label { display: block; color: var(--text-secondary); font-size: 0.85rem; margin-bottom: 0.3rem; }
.bg-countdown-timer {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--primary);
    font-variant-numeric: tabular-nums;
}

/* ---- Buy Section ---- */
.bg-buy-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.2rem;
    margin-bottom: 1rem;
}
.bg-buy-section h4 { margin: 0 0 0.8rem; font-size: 0.95rem; font-weight: 700; color: var(--text-primary); }
.bg-buy-controls { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.bg-buy-group { display: flex; align-items: center; gap: 0.4rem; }
.bg-buy-label { font-size: 0.85rem; color: var(--text-secondary); font-weight: 600; }
.bg-buy-input {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.45rem 0.7rem;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 700;
    text-align: center;
    width: 70px;
}
.bg-buy-input:focus { outline: none; border-color: var(--primary); }
.bg-buy-total { font-size: 0.9rem; color: var(--text-secondary); }
.bg-buy-total strong { color: var(--primary); }
.bg-buy-btn {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    margin-left: auto;
}
.bg-buy-btn:hover { background: var(--primary-hover); }
.bg-autobuy-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.8rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
}
.bg-autobuy-toggle input[type="checkbox"] {
    accent-color: var(--primary);
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* ---- Tickets Preview ---- */
.bg-tickets-preview h4 { margin: 0 0 0.8rem; font-size: 0.95rem; font-weight: 700; color: var(--text-primary); }
.bg-tickets-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0.6rem; }
.bg-mini-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.5rem;
}
.bg-mini-card-title { font-size: 0.7rem; font-weight: 700; color: var(--text-secondary); text-align: center; margin-bottom: 0.3rem; }
.bg-mini-table { width: 100%; border-collapse: collapse; font-size: 0.65rem; text-align: center; }
.bg-mini-table th { color: var(--primary); font-weight: 700; padding: 2px; }
.bg-mini-table td { padding: 2px; color: var(--text-primary); }

/* ---- Game View ---- */
.bg-back-game { margin-bottom: 0.8rem; }
.bg-game-stat { font-size: 0.75rem; color: var(--text-secondary); display: flex; align-items: center; gap: 0.3rem; }
.bg-game-stat i { color: var(--primary); font-size: 0.8rem; }
.bg-game-stat strong { color: var(--text-primary); }

/* ---- Draw Section (tiers + stats + balls) ---- */
.bg-draw-section {
    display: flex;
    gap: 0.8rem;
    align-items: stretch;
    margin: 0.5rem 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}
.bg-tiers-panel {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    width: 170px;
}
.bg-tier {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.45rem 0.7rem;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s;
}
.bg-tier:last-child { border-bottom: none; }
.bg-tier-label { font-size: 0.7rem; font-weight: 700; }
.bg-tier-amount { font-size: 0.75rem; font-weight: 800; }
.bg-tier-amount i { font-size: 0.6rem; margin-left: 2px; }
.bg-tier-super { background: linear-gradient(135deg, #fbbf24, #f59e0b); }
.bg-tier-super .bg-tier-label { color: #78350f; font-size: 0.65rem; font-weight: 900; letter-spacing: 0.5px; }
.bg-tier-super .bg-tier-amount { color: #78350f; }
.bg-tier-bingo { background: rgba(239,68,68,0.12); }
.bg-tier-bingo .bg-tier-label { color: #ef4444; }
.bg-tier-bingo .bg-tier-amount { color: #ef4444; }
.bg-tier-double { background: rgba(59,130,246,0.1); }
.bg-tier-double .bg-tier-label { color: #3b82f6; }
.bg-tier-double .bg-tier-amount { color: #3b82f6; }
.bg-tier-quine { background: rgba(34,197,94,0.1); }
.bg-tier-quine .bg-tier-label { color: #22c55e; }
.bg-tier-quine .bg-tier-amount { color: #22c55e; }
.bg-tier.bg-tier-won { opacity: 0.5; }
.bg-tier.bg-tier-won .bg-tier-label::after { content: ' ✓'; }
.bg-tier.bg-tier-flash {
    opacity: 1;
    animation: bgTierFlash 2s ease;
}
@keyframes bgTierFlash {
    0%, 20%, 40%, 60%, 80% { opacity: 1; transform: scale(1.05); }
    10%, 30%, 50%, 70% { opacity: 0.6; transform: scale(1); }
    100% { opacity: 0.5; transform: scale(1); }
}

/* ---- Draw Right (stats + balls) ---- */
.bg-draw-right {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.bg-draw-stats {
    display: flex;
    gap: 1rem;
    padding: 0.35rem 0.8rem;
    border-bottom: 1px solid var(--border-color);
}
.bg-balls-track::-webkit-scrollbar { height: 4px; }
.bg-balls-track::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 4px; }
.bg-drawn-ball {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 800;
    color: #fff;
    background: var(--primary);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    transition: transform 0.3s;
}
.bg-drawn-ball.latest {
    width: 48px;
    height: 48px;
    font-size: 1.1rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    animation: bgBallPop 0.4s ease;
}

/* ---- Winner Banner ---- */
.bg-game-result { margin: 1rem 0; }
.bg-winner-banner {
    background: var(--bg-card);
    border: 2px solid var(--primary);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
.bg-winner-me { background: var(--primary-light); border-color: var(--primary); }
.bg-winner-icon { font-size: 1.5rem; }

/* ---- Balls Wrap + Toast ---- */
.bg-balls-wrap {
    position: relative;
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
}
.bg-balls-track {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0.5rem 0.8rem;
    overflow-x: auto;
    scrollbar-width: thin;
}
.bg-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 16px 48px rgba(0,0,0,0.3);
    animation: bgToastIn 0.3s ease;
    z-index: 1050;
    min-width: 460px;
}
.bg-toast.bg-hidden { display: none !important; }
@keyframes bgToastIn {
    from { opacity: 0; transform: translate(-50%, -50%) scale(0.9); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
.bg-toast-content {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0 1rem;
}
.bg-toast-icon { font-size: 1.2rem; line-height: 1; }
.bg-toast-tier {
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.bg-toast-name {
    font-size: 1rem;
    font-weight: 900;
    color: var(--text-primary);
}
.bg-toast-prize {
    font-size: 0.9rem;
    font-weight: 800;
    color: #f59e0b;
}
.bg-toast-sep {
    color: var(--text-secondary);
    opacity: 0.4;
    font-size: 0.8rem;
}
.bg-toast-tier.tier-quine, .bg-toast-prize.tier-quine { color: #22c55e; }
.bg-toast-tier.tier-double, .bg-toast-prize.tier-double { color: #3b82f6; }
.bg-toast-tier.tier-bingo, .bg-toast-prize.tier-bingo { color: #ef4444; }
.bg-toast-tier.tier-super, .bg-toast-prize.tier-super { color: #f59e0b; }

/* Toast end-game summary */
.bg-toast-summary {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding: 0.8rem 1rem;
}
.bg-toast-summary-title {
    font-size: 0.95rem;
    font-weight: 900;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 0.5rem;
}
.bg-toast-summary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    width: 100%;
}
.bg-toast-summary-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg-body);
    border-radius: 10px;
    padding: 0.6rem 0.8rem;
    gap: 0.15rem;
}
.bg-toast-summary-winner {
    font-weight: 900;
    color: var(--primary);
    font-size: 0.95rem;
    line-height: 1.3;
}
.bg-toast-summary-tier {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.65rem;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
    line-height: 1.2;
}
.bg-toast-summary-prize {
    font-weight: 800;
    color: #f59e0b;
    font-size: 0.9rem;
    line-height: 1.3;
}
.bg-toast-summary-nowinner {
    color: var(--text-secondary);
    opacity: 0.4;
    font-weight: 600;
    font-style: italic;
}

/* ---- Player Cards ---- */
.bg-cards-section { margin-top: 0; }
.bg-cards-section h4 { font-size: 0.85rem; font-weight: 700; color: var(--text-primary); margin-bottom: 0.5rem; }
.bg-cards-container { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0.5rem; }
.bg-no-tickets { display: none; }
.bg-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.4rem;
}
.bg-card-title { font-size: 0.65rem; font-weight: 700; color: var(--text-secondary); text-align: center; margin-bottom: 0.2rem; }
.bg-card-table { width: 100%; border-collapse: collapse; text-align: center; }
.bg-card-table th {
    color: var(--primary);
    font-weight: 800;
    font-size: 0.6rem;
    padding: 2px;
    border-bottom: 2px solid var(--primary);
}
.bg-card-table td {
    padding: 3px 2px;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    transition: all 0.3s;
}
.bg-card-table td.marked {
    background: var(--primary);
    color: #fff;
    font-weight: 800;
    border-color: var(--primary-hover);
}
.bg-card-table td.free {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 800;
}
.bg-card-table td.free.marked {
    background: var(--primary);
    color: #fff;
}

/* ---- Responsive ---- */
@media (max-width: 767px) {
    .bg-rooms-grid { grid-template-columns: repeat(2, 1fr); }
    .bg-draw-section { flex-direction: column; }
    .bg-tiers-panel { width: 100%; flex-direction: row; flex-wrap: wrap; }
    .bg-tier { flex: 1; min-width: 50%; border-bottom: none; border-right: 1px solid var(--border-color); }
    .bg-tier:nth-child(2n) { border-right: none; }
    .bg-balls-track { padding: 0.5rem; }
    .bg-drawn-ball { width: 28px; height: 28px; font-size: 0.6rem; border-radius: 8px; }
    .bg-drawn-ball.latest { width: 40px; height: 40px; font-size: 0.95rem; }
    .bg-cards-container { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 0.4rem; }
    .bg-tickets-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 0.4rem; }
    .bg-lobby-header { flex-direction: column; }
    .bg-buy-controls { flex-direction: column; align-items: stretch; }
    .bg-buy-btn { margin-left: 0; }
    .bg-overlay-prize { font-size: 1rem; }
    .bg-overlay-summary-row { padding: 0.4rem 0.7rem; }
    .bg-overlay-summary-tier { font-size: 0.65rem; }
    .bg-overlay-summary-winner { font-size: 0.75rem; }
    .bg-overlay-summary-prize { font-size: 0.7rem; }
    .bg-draw-stats { gap: 0.6rem; padding: 0.3rem 0.5rem; }
}

/* ============================================
   POKER — Texas Hold'em
   ============================================ */

/* ---- LOBBY ---- */
.poker-lobby-container {
    margin: 0 auto;
    width: 100%;
}
.poker-lobby-tabs {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
}
.poker-tab {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.75rem 1.25rem;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.poker-tab:hover { color: var(--text-primary); }
.poker-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.poker-tab-content { display: none; }
.poker-tab-content.active { display: block; }

/* Filters */
.poker-lobby-filters {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}
.poker-filter-select, .poker-filter-search {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 10px;
    padding: 0.6rem 1rem;
    font-size: 0.875rem;
    transition: border-color 0.2s;
}
.poker-filter-select:focus, .poker-filter-search:focus { border-color: var(--primary); outline: none; }
.poker-filter-search { flex: 1; min-width: 200px; }

/* Table cards in lobby */
.poker-tables-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
    gap: 0.75rem;
}
.poker-tables-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 1rem;
    color: var(--text-muted);
    font-size: 1rem;
    background: var(--bg-card);
    border: 1px dashed var(--border-color);
    border-radius: 14px;
}
.poker-tables-empty i { font-size: 2.5rem; display: block; margin-bottom: 0.75rem; opacity: 0.5; }
.poker-table-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1rem 1.25rem;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
    gap: 0.75rem;
}
.poker-table-card:hover { border-color: var(--primary); box-shadow: 0 0 12px var(--primary-glow); transform: translateY(-2px); }
.poker-table-card-top {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.poker-table-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: var(--primary);
    flex-shrink: 0;
}
.poker-table-card-info { min-width: 0; flex: 1; }
.poker-table-card-name { font-weight: 700; font-size: 0.95rem; display: flex; align-items: center; gap: 0.4rem; }
.poker-table-card-name i { color: var(--warning); font-size: 0.8rem; }
.poker-table-card-host { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.15rem; }
.poker-table-card-stats {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.poker-table-card-stats .poker-stat-chip {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.78rem;
    color: var(--text-muted);
    background: var(--bg-input);
    padding: 0.3rem 0.6rem;
    border-radius: 8px;
}
.poker-table-card-stats .poker-stat-chip i { font-size: 0.85rem; }
.poker-table-card-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-color);
}
.poker-table-status { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; padding: 0.25rem 0.6rem; border-radius: 20px; white-space: nowrap; letter-spacing: 0.03em; }
.poker-status-waiting { background: var(--primary-light); color: var(--primary); }
.poker-status-playing { background: rgba(40,200,120,0.12); color: #28c878; }
.poker-table-card-actions { display: flex; align-items: center; gap: 0.5rem; }
.poker-join-btn {
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0.45rem 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s, box-shadow 0.15s;
    font-size: 0.82rem;
}
.poker-join-btn:hover { background: var(--primary-hover); transform: scale(1.04); box-shadow: 0 3px 10px var(--primary-glow); }

/* ---- CREATE FORM ---- */
.poker-create-form, .poker-invite-form {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
}
.poker-create-form h3, .poker-invite-form h3 {
    margin: 0 0 1.5rem;
    font-size: 1.15rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.poker-create-form h3 i, .poker-invite-form h3 i { color: var(--primary); }
.poker-form-group { margin-bottom: 1.15rem; }
.poker-form-group label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 0.45rem; color: var(--text-secondary); }
.poker-form-group label small { color: var(--text-muted); font-weight: 400; }
.poker-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 0.15rem; }
.poker-input, .poker-select {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 10px;
    padding: 0.65rem 0.85rem;
    font-size: 0.9rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.poker-input:focus, .poker-select:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px var(--primary-light); }
.poker-input-lg { font-size: 1.3rem; text-align: center; letter-spacing: 4px; padding: 0.75rem; }
.poker-input-with-btn { display: flex; gap: 0.5rem; }
.poker-input-with-btn .poker-input { flex: 1; }
.poker-btn-small {
    background: var(--border-color);
    border: none;
    color: var(--text-primary);
    border-radius: 8px;
    padding: 0 0.75rem;
    cursor: pointer;
    transition: background 0.2s;
}
.poker-btn-small:hover { background: var(--primary); }

/* Mode selector */
.poker-mode-selector { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.poker-mode-btn {
    flex: 1;
    min-width: 140px;
    background: var(--bg-input);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 12px;
    padding: 1rem;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
}
.poker-mode-btn i { font-size: 1.5rem; }
.poker-mode-btn span { font-weight: 700; }
.poker-mode-btn small { font-size: 0.75rem; color: var(--text-muted); }
.poker-mode-btn:hover { border-color: var(--primary); }
.poker-mode-btn.active { border-color: var(--primary); background: var(--primary-light); box-shadow: 0 0 0 1px var(--primary); }

.poker-private-options { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border-color); }
.poker-private-options h4 { font-size: 0.95rem; margin: 0 0 1rem; display: flex; align-items: center; gap: 0.4rem; color: var(--warning); }

.poker-create-btn {
    width: 100%;
    margin-top: 1.25rem;
    padding: 0.85rem;
    background: linear-gradient(135deg, var(--primary), #e04550);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    letter-spacing: 0.02em;
}
.poker-create-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 24px var(--primary-glow); }
.poker-create-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ---- JOIN MODAL ---- */
.poker-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.65);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.poker-modal {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    width: 100%;
    max-width: 440px;
    overflow: hidden;
}
.poker-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
}
.poker-modal-header h3 { margin: 0; font-size: 1rem; display: flex; align-items: center; gap: 0.5rem; }
.poker-modal-close { background: none; border: none; color: var(--text-muted); font-size: 1.2rem; cursor: pointer; }
.poker-modal-body { padding: 1.25rem; }
.poker-modal-info { margin-bottom: 1rem; }
.poker-modal-info p { margin: 0.25rem 0; }
.poker-modal-footer { display: flex; gap: 0.75rem; padding: 0 1.25rem 1.25rem; }
.poker-modal-footer .poker-create-btn { margin-top: 0; }
.poker-btn-cancel {
    flex: 1;
    background: var(--border-color);
    color: var(--text-primary);
    border: none;
    border-radius: 10px;
    padding: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.poker-btn-cancel:hover { background: var(--bg-card-hover); }

/* ---- GAME TABLE ---- */
.poker-game-container { padding: 0.5rem; }
.poker-game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.poker-game-header-left, .poker-game-header-right { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.poker-back-btn {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 8px;
    padding: 0.4rem 0.75rem;
    cursor: pointer;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    transition: border-color 0.2s;
}
.poker-back-btn:hover { border-color: var(--primary); }
.poker-table-name { font-weight: 700; font-size: 1rem; }
.poker-table-blinds { font-size: 0.8rem; color: var(--text-muted); background: var(--bg-input); padding: 0.2rem 0.6rem; border-radius: 6px; }
.poker-pot-display { font-size: 0.9rem; display: flex; align-items: center; gap: 0.3rem; }
.poker-pot-display strong { color: var(--warning); }
.poker-leave-btn {
    background: rgba(220,53,69,0.12);
    color: #dc3545;
    border: 1px solid rgba(220,53,69,0.3);
    border-radius: 8px;
    padding: 0.4rem 0.8rem;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    transition: all 0.2s;
}
.poker-leave-btn:hover { background: rgba(220,53,69,0.25); }

.poker-game-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 1rem;
    align-items: start;
}

/* The felt / table */
.poker-table-area {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.poker-felt {
    position: relative;
    width: 100%;
    min-height: 480px;
    background: radial-gradient(ellipse at 50% 50%, #6e1a1a 0%, #501010 60%, #3a0a0a 100%);
    border: 4px solid #3a1a1a;
    box-shadow: inset 0 0 60px rgba(0,0,0,0.4), 0 8px 40px rgba(0,0,0,0.4);
    border-radius: 200px / 120px;
    overflow: visible;
}

/* Seats */
.poker-seats { position: absolute; inset: 0; }
.poker-seat {
    position: absolute;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    z-index: 10;
    min-width: 80px;
}
.poker-seat-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--text-primary);
    transition: all 0.3s;
}
.poker-seat-empty .poker-seat-avatar { opacity: 0.3; border-style: dashed; }
.poker-seat-name { font-size: 0.75rem; font-weight: 600; color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,0.8); max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center; }
.poker-seat-chips { font-size: 0.7rem; color: var(--warning); display: flex; align-items: center; gap: 0.2rem; text-shadow: 0 1px 3px rgba(0,0,0,0.6); background: rgba(0,0,0,0.35); padding: 1px 6px; border-radius: 8px; }

.poker-seat-me .poker-seat-avatar { border-color: var(--primary); box-shadow: 0 0 12px var(--primary-glow); }
.poker-seat-active .poker-seat-avatar { border-color: #28c878; box-shadow: 0 0 16px rgba(40, 200, 120, 0.5); animation: pokerPulse 1s ease-in-out infinite; }
.poker-seat-folded { opacity: 0.35; }
.poker-seat-winner .poker-seat-avatar { border-color: var(--warning); box-shadow: 0 0 20px rgba(255, 193, 7, 0.5); }
.poker-seat-allin .poker-seat-avatar { border-color: #dc3545; box-shadow: 0 0 12px rgba(220, 53, 69, 0.4); }

@keyframes pokerPulse {
    0%, 100% { box-shadow: 0 0 8px rgba(40, 200, 120, 0.3); }
    50% { box-shadow: 0 0 20px rgba(40, 200, 120, 0.6); }
}

/* Badges (D, SB, BB) */
.poker-badge {
    position: absolute;
    top: -6px;
    font-size: 0.55rem;
    font-weight: 800;
    padding: 1px 5px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 11;
}
.poker-badge-dealer { right: -10px; background: #ffc107; color: #000; }
.poker-badge-sb { left: -10px; background: #17a2b8; color: #fff; }
.poker-badge-bb { left: -10px; background: #6f42c1; color: #fff; }

/* Hole cards on seats */
.poker-hole-cards {
    display: flex;
    gap: 2px;
    margin-top: 2px;
}
.poker-mini-card {
    width: 30px;
    height: 40px;
    background: #fff;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 800;
    box-shadow: 0 2px 6px rgba(0,0,0,0.35);
    line-height: 1;
    border: 1px solid rgba(0,0,0,0.1);
}
.poker-mini-suit { font-size: 0.7rem; margin-left: 1px; }
.poker-card-red { color: #dc3545; }
.poker-card-black { color: #1a1a2e; }
.poker-card-back {
    background: linear-gradient(135deg, var(--primary) 0%, #e04550 100%);
    border: 1px solid rgba(255,255,255,0.15);
    color: transparent;
}

/* Seat bet display */
.poker-seat-bet {
    font-size: 0.65rem;
    color: #fff;
    background: rgba(0,0,0,0.6);
    padding: 1px 6px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 0.2rem;
    margin-top: 2px;
}
.poker-allin-badge {
    font-size: 0.55rem;
    font-weight: 800;
    color: #fff;
    background: #dc3545;
    padding: 1px 6px;
    border-radius: 6px;
    margin-top: 2px;
    letter-spacing: 0.5px;
}

/* Community cards */
.poker-community {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    z-index: 5;
}
.poker-community-cards {
    display: flex;
    gap: 6px;
}
.poker-community-placeholder {
    color: rgba(255,255,255,0.25);
    font-size: 0.8rem;
    font-style: italic;
}
.poker-comm-card {
    width: 52px;
    height: 74px;
    background: #fff;
    border-radius: 7px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 12px rgba(0,0,0,0.35);
    border: 1px solid rgba(0,0,0,0.08);
    transition: transform 0.2s;
}
.poker-comm-card:hover { transform: translateY(-2px); }
.poker-comm-card-val { font-size: 1.05rem; font-weight: 800; line-height: 1; }
.poker-comm-card-suit { font-size: 1.15rem; line-height: 1; }

@keyframes pokerCardFlip {
    0% { transform: rotateY(90deg) scale(0.8); opacity: 0; }
    100% { transform: rotateY(0) scale(1); opacity: 1; }
}

.poker-phase-label {
    background: rgba(0,0,0,0.5);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 10px;
    border-radius: 10px;
    letter-spacing: 1px;
}

/* Turn timer */
.poker-turn-timer {
    font-size: 1.1rem;
    font-weight: 800;
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid var(--primary-glow);
    margin-top: 0.4rem;
    transition: color 0.3s, border-color 0.3s;
}
.poker-timer-warning {
    color: #ffc107;
    border-color: rgba(255, 193, 7, 0.6);
}
.poker-timer-danger {
    color: #dc3545;
    border-color: rgba(220, 53, 69, 0.7);
    animation: pokerTimerPulse 0.5s ease-in-out infinite;
}
@keyframes pokerTimerPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Actions bar */
.poker-actions-bar {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.poker-actions-info { font-size: 0.85rem; color: var(--text-muted); text-align: center; }
.poker-actions-btns { display: flex; gap: 0.5rem; flex-wrap: wrap; justify-content: center; }
.poker-action-btn {
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    transition: all 0.2s;
    flex: 1;
    min-width: 100px;
    justify-content: center;
}
.poker-action-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.poker-fold-btn { background: rgba(220,53,69,0.12); color: #dc3545; border: 1px solid rgba(220,53,69,0.3); }
.poker-fold-btn:hover:not(:disabled) { background: rgba(220,53,69,0.25); }
.poker-check-btn { background: rgba(40,200,120,0.12); color: #28c878; border: 1px solid rgba(40,200,120,0.3); }
.poker-check-btn:hover:not(:disabled) { background: rgba(40,200,120,0.25); }
.poker-call-btn { background: rgba(24,135,252,0.12); color: #1887fc; border: 1px solid rgba(24,135,252,0.3); }
.poker-call-btn:hover:not(:disabled) { background: rgba(24,135,252,0.25); }
.poker-raise-btn { background: rgba(255,193,7,0.12); color: #ffc107; border: 1px solid rgba(255,193,7,0.3); }
.poker-raise-btn:hover:not(:disabled) { background: rgba(255,193,7,0.25); }
.poker-allin-btn { background: rgba(220,53,69,0.12); color: #ff6b6b; border: 1px solid rgba(220,53,69,0.3); }
.poker-allin-btn:hover:not(:disabled) { background: rgba(220,53,69,0.25); }

.poker-raise-slider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.poker-raise-slider input[type="range"] {
    flex: 1;
    min-width: 150px;
    accent-color: var(--primary);
}
.poker-raise-value { display: flex; align-items: center; gap: 0.5rem; }
.poker-input-sm {
    width: 80px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 6px;
    padding: 0.35rem 0.5rem;
    font-size: 0.85rem;
    text-align: center;
}
.poker-raise-confirm {
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 0.35rem 0.75rem;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}
.poker-raise-confirm:hover { background: var(--primary-hover); }

/* Start area */
.poker-start-area {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
    padding: 1rem;
}
.poker-start-btn {
    background: linear-gradient(135deg, #28c878, #1a9d5c);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 0.85rem 2rem;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: transform 0.15s, box-shadow 0.2s;
}
.poker-start-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 20px rgba(40, 200, 120, 0.35); }
.poker-start-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.poker-cancel-btn {
    background: linear-gradient(135deg, #dc3545, #a71d2a);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 0.7rem 1.4rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: transform 0.15s, box-shadow 0.2s;
}
.poker-cancel-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 20px rgba(220, 53, 69, 0.35); }
.poker-cancel-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.poker-cancel-lobby-btn {
    background: rgba(220, 53, 69, 0.15);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.3);
    border-radius: 8px;
    padding: 0.4rem 0.6rem;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.15s;
    margin-top: 0.3rem;
}
.poker-cancel-lobby-btn:hover { background: rgba(220, 53, 69, 0.3); }
.poker-cancel-lobby-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Result overlay */
.poker-table-area { position: relative; }
.poker-result-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 10, 20, 0.85);
    backdrop-filter: blur(8px);
    border-radius: 16px;
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 2rem;
}
.poker-result-content { text-align: center; }
.poker-result-title { font-size: 1.5rem; font-weight: 800; color: #fff; margin-bottom: 0.5rem; }
.poker-result-pot { font-size: 1.1rem; color: var(--warning); }
.poker-result-hand { font-size: 0.95rem; color: #28c878; margin-top: 0.5rem; font-weight: 600; }
.poker-showdown-hands { display: flex; gap: 1.5rem; flex-wrap: wrap; justify-content: center; margin-top: 1rem; }
.poker-showdown-hand { display: flex; flex-direction: column; align-items: center; gap: 0.3rem; }
.poker-showdown-hand span { font-size: 0.8rem; color: #ccc; }

/* Sidebar */
.poker-sidebar { display: flex; flex-direction: column; gap: 1rem; }
.poker-sidebar-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}
.poker-sidebar-header {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
}
.poker-sidebar-header h4 { margin: 0; font-size: 0.85rem; display: flex; align-items: center; gap: 0.4rem; }
.poker-action-log {
    padding: 0.75rem;
    max-height: 300px;
    overflow-y: auto;
    font-size: 0.8rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.poker-log-empty { color: var(--text-muted); text-align: center; padding: 1rem; font-style: italic; }
.poker-log-entry { padding: 0.25rem 0.5rem; border-radius: 6px; background: var(--bg-input); }
.poker-log-name { font-weight: 700; color: var(--primary); }
.poker-log-fold .poker-log-name { color: #dc3545; }
.poker-log-raise .poker-log-name, .poker-log-all_in .poker-log-name { color: #ffc107; }

.poker-my-hand { padding: 0.75rem; text-align: center; }
.poker-my-cards { display: flex; justify-content: center; gap: 6px; margin-bottom: 0.5rem; }
.poker-my-cards .poker-mini-card { width: 36px; height: 50px; font-size: 0.75rem; }
.poker-my-bet { font-size: 0.8rem; color: var(--text-muted); }
.poker-my-status { font-size: 0.85rem; font-weight: 700; margin-top: 0.3rem; }

/* ---- RESPONSIVE ---- */
@media (max-width: 900px) {
    .poker-game-layout { grid-template-columns: 1fr; }
    .poker-felt { min-height: 380px; border-radius: 140px / 90px; }
    .poker-result-overlay { border-radius: 14px; }
    .poker-seat-avatar { width: 38px; height: 38px; font-size: 0.7rem; }
    .poker-mini-card { width: 24px; height: 32px; font-size: 0.5rem; }
    .poker-comm-card { width: 40px; height: 58px; }
    .poker-comm-card-val { font-size: 0.85rem; }
    .poker-comm-card-suit { font-size: 0.9rem; }
}
@media (max-width: 600px) {
    .poker-felt { min-height: 320px; border-radius: 100px / 70px; }
    .poker-result-overlay { border-radius: 12px; }
    .poker-form-row { grid-template-columns: 1fr; }
    .poker-actions-btns { flex-direction: column; }
    .poker-action-btn { min-width: auto; }
    .poker-tables-list { grid-template-columns: 1fr; }
    .poker-table-card-stats { gap: 0.35rem; }
    .poker-table-card-stats .poker-stat-chip { font-size: 0.72rem; padding: 0.2rem 0.45rem; }
}

/* ============================================
   POKER — ANIMATIONS
   ============================================ */

/* Spinner */
.poker-spin {
    animation: pokerSpin 0.8s linear infinite;
}
@keyframes pokerSpin {
    to { transform: rotate(360deg); }
}

/* Fade in */
.poker-fadeIn {
    animation: pokerFadeIn 0.4s ease-out;
}
@keyframes pokerFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Lobby card entrance */
.poker-lobby-anim {
    animation: pokerLobbySlide 0.4s ease-out both;
}
@keyframes pokerLobbySlide {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Seat appear */
.poker-seat-appear {
    animation: pokerSeatAppear 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes pokerSeatAppear {
    from { opacity: 0; transform: translate(-50%, -50%) scale(0.3); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* Active turn glow pulse */
.poker-seat-active {
    animation: pokerTurnGlow 1.2s ease-in-out infinite;
    border-radius: 5px;
    padding: 5px;
}
@keyframes pokerTurnGlow {
    0%, 100% { box-shadow: 0 0 8px var(--primary-glow), 0 0 20px rgba(201, 56, 64, 0.2); }
    50% { box-shadow: 0 0 16px rgba(201, 56, 64, 0.9), 0 0 40px var(--primary-glow); }
}

/* Winner glow */
.poker-seat-winner {
    animation: pokerWinnerGlow 0.8s ease-in-out infinite alternate;
    border-radius: 5px;
    padding: 5px;
}
@keyframes pokerWinnerGlow {
    from { box-shadow: 0 0 10px rgba(255, 193, 7, 0.3); }
    to { box-shadow: 0 0 25px rgba(255, 193, 7, 0.8), 0 0 50px rgba(255, 193, 7, 0.3); }
}

/* Winner badge bounce */
.poker-winner-badge {
    position: absolute;
    top: -18px;
    right: -8px;
    font-size: 1.3rem;
    animation: pokerBadgeBounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    filter: drop-shadow(0 0 6px rgba(255, 193, 7, 0.7));
}
@keyframes pokerBadgeBounce {
    from { transform: scale(0) rotate(-30deg); opacity: 0; }
    to { transform: scale(1) rotate(0); opacity: 1; }
}

/* All-In pulse badge */
.poker-allin-badge {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #ff6b35, #dc3545);
    color: #fff;
    font-size: 0.55rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    padding: 2px 8px;
    border-radius: 6px;
    white-space: nowrap;
}
.poker-allin-pulse {
    animation: pokerAllInPulse 1s ease-in-out infinite;
}
@keyframes pokerAllInPulse {
    0%, 100% { transform: translateX(-50%) scale(1); }
    50% { transform: translateX(-50%) scale(1.1); box-shadow: 0 0 12px rgba(220, 53, 69, 0.6); }
}

/* Card flip-in */
.poker-card-flip-in {
    animation: pokerCardFlip 0.4s ease-out both;
}
@keyframes pokerCardFlip {
    from { transform: rotateY(90deg) scale(0.8); opacity: 0; }
    to { transform: rotateY(0) scale(1); opacity: 1; }
}

/* Cards deal slide */
.poker-cards-deal {
    animation: pokerCardsDeal 0.3s ease-out;
}
@keyframes pokerCardsDeal {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Community card deal */
.poker-comm-card-deal {
    animation: pokerCommDeal 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes pokerCommDeal {
    from { opacity: 0; transform: translateY(-30px) scale(0.5) rotateY(90deg); }
    to { opacity: 1; transform: translateY(0) scale(1) rotateY(0); }
}

/* Chip bet animation */
.poker-chip-anim {
    animation: pokerChipDrop 0.35s ease-out;
}
@keyframes pokerChipDrop {
    from { opacity: 0; transform: translateY(-12px) scale(0.7); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Phase label bounce */
.poker-phase-bounce {
    animation: pokerPhaseBounce 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes pokerPhaseBounce {
    0% { transform: scale(1); }
    40% { transform: scale(1.25); }
    100% { transform: scale(1); }
}

/* Actions bar slide in */
.poker-actions-slide-in {
    animation: pokerActionsSlide 0.35s ease-out;
}
@keyframes pokerActionsSlide {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Action log new entry */
.poker-log-new {
    animation: pokerLogNew 0.4s ease-out;
}
@keyframes pokerLogNew {
    from { opacity: 0; transform: translateX(-10px); background: var(--primary-glow); }
    to { opacity: 1; transform: translateX(0); background: transparent; }
}

/* Result overlay fade in */
.poker-result-fadein {
    animation: pokerResultFade 0.6s ease-out;
}
@keyframes pokerResultFade {
    from { opacity: 0; backdrop-filter: blur(0); }
    to { opacity: 1; backdrop-filter: blur(10px); }
}

/* Result icon */
.poker-result-icon {
    font-size: 3rem;
    animation: pokerResultIcon 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s both;
}
@keyframes pokerResultIcon {
    from { transform: scale(0) rotate(-10deg); opacity: 0; }
    to { transform: scale(1) rotate(0); opacity: 1; }
}

/* Result title */
.poker-result-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0.5rem 0;
    animation: pokerResultTitle 0.5s ease-out 0.3s both;
}
.poker-result-title-win { color: #ffc107; text-shadow: 0 0 20px rgba(255, 193, 7, 0.4); }
.poker-result-title-lose { color: #aaa; }
@keyframes pokerResultTitle {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Result pot */
.poker-result-pot {
    font-size: 1.1rem;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 0.75rem;
    animation: pokerResultTitle 0.5s ease-out 0.4s both;
}

/* Result hand name */
.poker-result-hand {
    background: rgba(255, 255, 255, 0.08);
    padding: 0.4rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    margin-bottom: 0.75rem;
    display: inline-block;
    animation: pokerResultTitle 0.5s ease-out 0.5s both;
}

/* Showdown hands */
.poker-showdown-hands {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 0.75rem;
}
.poker-showdown-hand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    padding: 0.6rem 0.8rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    animation: pokerResultTitle 0.5s ease-out 0.6s both;
}
.poker-showdown-hand span {
    font-size: 0.85rem;
    font-weight: 600;
}
.poker-showdown-winner {
    border: 1px solid rgba(255, 193, 7, 0.4);
    background: rgba(255, 193, 7, 0.1);
}

/* Modal visibility transition */
.poker-modal-visible .poker-modal-inner,
.poker-modal-visible {
    animation: pokerModalIn 0.3s ease-out;
}
@keyframes pokerModalIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/* Table card hover lift */
/* Folded seat dim */
.poker-seat-folded {
    opacity: 0.45;
    filter: grayscale(0.5);
    transition: opacity 0.4s, filter 0.4s;
}

/* Card-back pattern */
.poker-card-back {
    background: linear-gradient(135deg, #9e2a30 0%, var(--primary) 50%, #e04550 100%);
    border: 1px solid rgba(255,255,255,0.15);
    color: transparent;
    position: relative;
}
.poker-card-back::after {
    content: '';
    position: absolute;
    inset: 3px;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 3px;
}

/* ============================================
   SKELETON LOADING
   ============================================ */
@keyframes skeletonShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}



/* ---- Base skeleton block ---- */
.skel-block {
    position: relative;
    overflow: hidden;
    transition: opacity 0.4s ease;
    margin-bottom: 1.5rem;
}

.skel-block::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.03) 30%, rgba(255,255,255,0.06) 50%, rgba(255,255,255,0.03) 70%, transparent 100%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s ease-in-out infinite;
    pointer-events: none;
    border-radius: inherit;
}

.skel-block.skel-hide {
    opacity: 0;
    pointer-events: none;
}

/* ---- Bone (gray placeholder bar) ---- */
.skel-bone {
    background: rgba(255,255,255,0.06);
    border-radius: 8px;
    flex-shrink: 0;
}

:root[data-bs-theme="light"] .skel-bone {
    background: rgba(0,0,0,0.07);
}

:root[data-bs-theme="light"] .skel-block::after {
    background: linear-gradient(90deg, transparent 0%, rgba(0,0,0,0.02) 30%, rgba(0,0,0,0.04) 50%, rgba(0,0,0,0.02) 70%, transparent 100%);
    background-size: 200% 100%;
}

/* ---- Helper layout ---- */
.skel-row {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* ---- HERO BANNER ---- */
.skel-hero {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 40px;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ---- FILTER BAR ---- */
.skel-filter {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 12px 16px;
    display: flex;
    gap: 12px;
    align-items: center;
}

/* ---- GAME ROW ---- */
.skel-gamerow-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.skel-tiles {
    display: flex;
    gap: 12px;
    overflow: hidden;
}

.skel-tile {
    flex-shrink: 0;
    width: 155px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ---- CTA BANNER ---- */
.skel-cta {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

/* ---- SECTION HEADER ---- */
.skel-section-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 8px 0;
}

/* ---- CARD GRID ---- */
.skel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

.skel-card {
    background: var(--bg-card);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
}

/* ---- TABLE ---- */
.skel-table {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.skel-table-row {
    display: flex;
    gap: 16px;
    align-items: center;
}

/* ---- GAME CONTAINER ---- */
.skel-game {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 400px;
}

.skel-game-area {
    background: rgba(255,255,255,0.03);
    border-radius: 12px;
    flex: 1;
    min-height: 250px;
}

:root[data-bs-theme="light"] .skel-game-area {
    background: rgba(0,0,0,0.03);
}

.skel-game-controls {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* ---- STATS ROW ---- */
.skel-stats {
    display: flex;
    gap: 16px;
}

.skel-stat-card {
    background: var(--bg-card);
    border-radius: 12px;
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

/* ---- PROFILE LAYOUT ---- */
.skel-profile {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 24px;
}

.skel-profile-sidebar {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.skel-profile-main {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ---- TABS BAR ---- */
.skel-tabs {
    display: flex;
    gap: 8px;
    padding: 4px 0;
}

/* ---- PODIUM ---- */
.skel-podium {
    display: flex;
    justify-content: center;
    gap: 24px;
    align-items: flex-end;
    padding: 20px 0;
}

.skel-podium-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

/* ---- PROMO FEATURED ---- */
.skel-promo-feat {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 32px;
    display: flex;
    gap: 24px;
    align-items: center;
    min-height: 200px;
}

.skel-promo-feat-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ---- AFFILIATE HERO ---- */
.skel-aff-hero {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 40px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-items: center;
    min-height: 200px;
}

/* ---- DAILY BONUS ---- */
.skel-daily {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
}

.skel-daily-items {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.skel-daily-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

/* ---- GENERIC ---- */
.skel-generic {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
    .skel-hero { padding: 24px; min-height: 220px; }
    .skel-tile { width: 130px; }
    .skel-profile { grid-template-columns: 1fr; }
    .skel-stats { flex-direction: column; }
    .skel-promo-feat { flex-direction: column; }
    .skel-podium { gap: 12px; }
    .skel-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}

/* ============================================
   CUSTOM MODAL
   ============================================ */
.rc-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s ease;
    padding: 1rem;
}

.rc-modal-overlay.active {
    opacity: 1;
}

.rc-modal {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    width: 100%;
    max-width: 420px;
    padding: 2rem;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

.rc-modal-overlay.active .rc-modal {
    transform: scale(1) translateY(0);
}

.rc-modal-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 1.2rem;
}

.rc-modal-icon.confirm { background: rgba(59, 130, 246, 0.12); color: #3b82f6; }
.rc-modal-icon.danger { background: rgba(239, 68, 68, 0.12); color: #ef4444; }
.rc-modal-icon.success { background: rgba(16, 185, 129, 0.12); color: #10b981; }
.rc-modal-icon.warning { background: rgba(245, 158, 11, 0.12); color: #f59e0b; }
.rc-modal-icon.info { background: rgba(6, 182, 212, 0.12); color: #06b6d4; }

.rc-modal-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 0.5rem;
}

.rc-modal-body {
    color: var(--text-muted);
    font-size: 0.88rem;
    text-align: center;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.rc-modal-actions {
    display: flex;
    gap: 0.6rem;
    justify-content: center;
}

.rc-modal-btn {
    flex: 1;
    padding: 0.6rem 1.2rem;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.85rem;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.rc-modal-btn:hover {
    transform: translateY(-1px);
}

.rc-modal-btn.cancel {
    background: var(--bg-input);
    color: var(--text-primary);
}

.rc-modal-btn.cancel:hover {
    background: var(--bg-body);
    border-color: var(--text-muted);
}

.rc-modal-btn.primary {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.rc-modal-btn.primary:hover {
    background: var(--primary-hover);
    box-shadow: 0 4px 15px var(--primary-glow);
}

.rc-modal-btn.danger {
    background: #ef4444;
    border-color: #ef4444;
    color: #fff;
}

.rc-modal-btn.danger:hover {
    background: #dc2626;
    box-shadow: 0 4px 15px rgba(239,68,68,0.3);
}

.rc-modal-btn.success {
    background: #10b981;
    border-color: #10b981;
    color: #fff;
}

.rc-modal-btn.success:hover {
    background: #059669;
    box-shadow: 0 4px 15px rgba(16,185,129,0.3);
}

/* ============================================
   CUSTOM TOAST
   ============================================ */
.rc-toast-container {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 10001;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
    max-width: 380px;
}

.rc-toast {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.85rem 1.1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    box-shadow: 0 8px 32px rgba(0,0,0,0.25);
    pointer-events: auto;
    transform: translateX(120%);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.35s ease;
    position: relative;
    overflow: hidden;
}

.rc-toast.show {
    transform: translateX(0);
    opacity: 1;
}

.rc-toast.hide {
    transform: translateX(120%);
    opacity: 0;
}

.rc-toast-accent {
    display: none;
}

.rc-toast-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.rc-toast.success .rc-toast-icon { background: rgba(16,185,129,0.12); color: #10b981; }
.rc-toast.error .rc-toast-icon { background: rgba(239,68,68,0.12); color: #ef4444; }
.rc-toast.warning .rc-toast-icon { background: rgba(245,158,11,0.12); color: #f59e0b; }
.rc-toast.info .rc-toast-icon { background: rgba(6,182,212,0.12); color: #06b6d4; }

.rc-toast-content {
    flex: 1;
    min-width: 0;
}

.rc-toast-title {
    font-weight: 700;
    font-size: 0.82rem;
    color: var(--text-primary);
    margin-bottom: 0.15rem;
}

.rc-toast-message {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.rc-toast-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.2s;
    flex-shrink: 0;
}

.rc-toast-close:hover {
    color: var(--text-primary);
}

.rc-toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    border-radius: 0 0 12px 12px;
    transition: width linear;
}

.rc-toast.success .rc-toast-progress { background: #10b981; }
.rc-toast.error .rc-toast-progress { background: #ef4444; }
.rc-toast.warning .rc-toast-progress { background: #f59e0b; }
.rc-toast.info .rc-toast-progress { background: #06b6d4; }

/* ============================================
   BELOTE — Styles
   ============================================ */

/* -- Felt (table de jeu) -- */
.belote-felt {
    position: relative;
    width: 100%;
    min-height: 440px;
    background:
        radial-gradient(ellipse at 30% 20%, rgba(180,60,60,.15) 0%, transparent 60%),
        radial-gradient(ellipse at 70% 80%, rgba(120,40,40,.1) 0%, transparent 60%),
        radial-gradient(ellipse at center, #5c1818 0%, #2e0c0c 100%);
    border-radius: 24px;
    border: 3px solid rgba(255,255,255,.06);
    box-shadow: inset 0 2px 30px rgba(0,0,0,.4), 0 8px 32px rgba(0,0,0,.5);
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* -- Centre: atout + pli -- */
.belote-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    z-index: 2;
}

.belote-trump-display {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0,0,0,.5);
    backdrop-filter: blur(6px);
    padding: 8px 18px;
    border-radius: 24px;
    border: 1px solid rgba(255,255,255,.08);
    box-shadow: 0 4px 12px rgba(0,0,0,.3);
}

.belote-trump-label {
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    opacity: .6;
    color: #fff;
    font-weight: 600;
}

.belote-trump-suit {
    font-size: 1.6rem;
    filter: drop-shadow(0 1px 3px rgba(0,0,0,.4));
}

.belote-trick-area {
    position: relative;
    width: 200px;
    height: 140px;
}

.belote-trick-card {
    position: absolute;
    transition: all .35s cubic-bezier(.4,0,.2,1);
    animation: belote-trick-enter .3s ease-out;
}

@keyframes belote-trick-enter {
    from { opacity: 0; transform: translateX(-50%) scale(.8); }
    to { opacity: 1; transform: translateX(-50%) scale(1); }
}

.belote-trick-card.trick-bottom { bottom: 0; left: 50%; transform: translateX(-50%); }
.belote-trick-card.trick-top { top: 0; left: 50%; transform: translateX(-50%); }
.belote-trick-card.trick-left { left: 0; top: 50%; transform: translateY(-50%); }
.belote-trick-card.trick-right { right: 0; top: 50%; transform: translateY(-50%); }

.belote-trick-info {
    font-size: .75rem;
    color: rgba(255,255,255,.5);
    text-align: center;
    font-weight: 500;
    letter-spacing: .5px;
    text-transform: uppercase;
}

/* -- Sièges -- */
.belote-seat {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 10px 16px;
    background: rgba(0,0,0,.45);
    backdrop-filter: blur(4px);
    border-radius: 14px;
    border: 2px solid rgba(255,255,255,.06);
    transition: all .35s cubic-bezier(.4,0,.2,1);
    min-width: 95px;
    box-shadow: 0 4px 12px rgba(0,0,0,.3);
}

.belote-seat.is-turn, .belote-seat.is-trump-turn {
    border-color: var(--accent);
    box-shadow: 0 0 20px rgba(var(--accent-rgb, 245,158,11), .35), 0 0 40px rgba(var(--accent-rgb, 245,158,11), .1);
    background: rgba(0,0,0,.55);
}

.belote-seat.is-taker {
    border-color: rgba(250,204,21,.4);
}

.belote-seat.is-taker .belote-seat-name::after {
    content: ' ★';
    color: #facc15;
    text-shadow: 0 0 6px rgba(250,204,21,.5);
}

.belote-seat-bottom { bottom: 8px; left: 50%; transform: translateX(-50%); }
.belote-seat-top { top: 8px; left: 50%; transform: translateX(-50%); }
.belote-seat-left { left: 8px; top: 50%; transform: translateY(-50%); }
.belote-seat-right { right: 8px; top: 50%; transform: translateY(-50%); }

.belote-seat-name {
    font-weight: 600;
    font-size: .85rem;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0,0,0,.3);
}

.belote-seat-name.empty {
    opacity: .35;
    font-style: italic;
    font-weight: 400;
}

.belote-seat-team {
    font-size: .65rem;
    text-transform: uppercase;
    letter-spacing: .5px;
    padding: 1px 8px;
    border-radius: 8px;
}

.belote-team-badge, .belote-seat-team {
    font-size: .65rem;
    text-transform: uppercase;
    letter-spacing: .8px;
    padding: 3px 10px;
    border-radius: 8px;
    font-weight: 600;
}
.belote-team-badge.team-a, .belote-seat-team.team-a { background: rgba(59,130,246,.2); color: #93bbfd; border: 1px solid rgba(59,130,246,.15); }
.belote-team-badge.team-b, .belote-seat-team.team-b { background: rgba(239,68,68,.2); color: #fca5a5; border: 1px solid rgba(239,68,68,.15); }

/* -- Cards -- */
.belote-card {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 82px;
    background: linear-gradient(145deg, #ffffff 0%, #f3f0ec 100%);
    border-radius: 10px;
    border: 1px solid rgba(0,0,0,.12);
    font-weight: 700;
    cursor: default;
    user-select: none;
    transition: transform .2s cubic-bezier(.4,0,.2,1), box-shadow .2s ease;
    position: relative;
    box-shadow: 0 2px 6px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.1);
}

.belote-card-value {
    font-size: 1.15rem;
    color: #1a1a1a;
    line-height: 1;
    font-family: 'Georgia', serif;
}

.belote-card-suit {
    font-size: 1.35rem;
    line-height: 1;
}

.suit-red { color: #c41e3a; }
.suit-black { color: #1a1a1a; }

.belote-card-playable {
    cursor: pointer;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(var(--accent-rgb, 245,158,11), .4), 0 4px 12px rgba(var(--accent-rgb, 245,158,11), .25);
    animation: belote-card-glow 1.5s ease-in-out infinite alternate;
}

@keyframes belote-card-glow {
    from { box-shadow: 0 0 0 2px rgba(var(--accent-rgb, 245,158,11), .3), 0 4px 12px rgba(var(--accent-rgb, 245,158,11), .15); }
    to { box-shadow: 0 0 0 3px rgba(var(--accent-rgb, 245,158,11), .5), 0 4px 16px rgba(var(--accent-rgb, 245,158,11), .3); }
}

.belote-card-playable:hover {
    transform: translateY(-10px) scale(1.08);
    box-shadow: 0 0 0 3px var(--accent), 0 8px 24px rgba(var(--accent-rgb, 245,158,11), .4);
    z-index: 10;
}

.belote-card-disabled {
    opacity: .35;
    filter: grayscale(.6) brightness(.9);
}

.belote-card-back {
    background: linear-gradient(135deg, #1a237e, #283593);
    border-color: #3949ab;
    color: rgba(255,255,255,.3);
    font-size: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,.3);
}

/* -- Ma main -- */
.belote-hand-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 4px;
}

.belote-my-hand {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 16px 12px;
    flex-wrap: wrap;
    min-height: 110px;
    background: rgba(0,0,0,.15);
    border-radius: 16px;
    flex: 1;
    min-width: 0;
}

/* -- Trump actions -- */
.belote-trump-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    flex-shrink: 0;
    box-shadow: var(--shadow-md);
    min-width: 160px;
}

.belote-trump-card {
    display: flex;
    justify-content: center;
}

.belote-trump-card .belote-card {
    width: 62px;
    height: 88px;
    font-size: 1.2rem;
    box-shadow: 0 4px 16px rgba(0,0,0,.2);
}

.belote-trump-btns {
    display: flex;
    gap: 8px;
    width: 100%;
}

.belote-trump-btns .poker-action-btn {
    padding: 0.55rem 1rem;
    font-size: 0.8rem;
    border-radius: 10px;
    min-width: 0;
    flex: 1;
}

.belote-suit-picker {
    display: flex;
    gap: 8px;
    width: 100%;
    justify-content: center;
}

.belote-suit-btn {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    border: 2px solid var(--border-color);
    background: var(--bg-input);
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .2s cubic-bezier(.4,0,.2,1);
    box-shadow: var(--shadow-sm);
}

.belote-suit-btn:hover:not(.disabled) {
    border-color: var(--accent);
    background: rgba(var(--accent-rgb, 245,158,11), .1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(var(--accent-rgb, 245,158,11), .25);
}

.belote-suit-btn:active:not(.disabled) {
    transform: translateY(0) scale(.95);
}

.belote-suit-btn.disabled {
    opacity: .2;
    cursor: not-allowed;
    filter: grayscale(1);
}

/* -- Timer (uses poker-turn-timer class) -- */
.belote-felt .poker-turn-timer {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    background: rgba(0,0,0,.6);
    backdrop-filter: blur(4px);
    box-shadow: 0 4px 16px rgba(0,0,0,.4);
}

/* -- Scores panel -- */
.belote-scores-panel {
    padding: 12px;
}

.belote-scores-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.belote-scores-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    padding: 8px 0;
}

.belote-scores-sep {
    opacity: .4;
}

.belote-round-points {
    text-align: center;
    opacity: .7;
}

/* -- Score compact (header) -- */
.belote-score-compact {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .85rem;
    background: rgba(0,0,0,.2);
    padding: 6px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,.06);
}

/* -- Round result -- */
.belote-result-scores {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin: 16px 0;
}

.belote-result-team {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.belote-result-team strong {
    font-size: 2.2rem;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0,0,0,.3);
}

.belote-result-vs {
    font-size: 1.5rem;
    opacity: .3;
    font-weight: 300;
}

/* -- Light theme overrides -- */
[data-bs-theme="light"] .belote-score-compact {
    background: var(--bg-input);
    border-color: var(--border-color);
    color: var(--text-primary);
}

[data-bs-theme="light"] .belote-score-compact strong {
    color: var(--text-primary);
}

[data-bs-theme="light"] .belote-team-badge.team-a,
[data-bs-theme="light"] .belote-seat-team.team-a {
    background: rgba(37,99,235,.12);
    color: #2563eb;
    border-color: rgba(37,99,235,.2);
}

[data-bs-theme="light"] .belote-team-badge.team-b,
[data-bs-theme="light"] .belote-seat-team.team-b {
    background: rgba(220,38,38,.1);
    color: #dc2626;
    border-color: rgba(220,38,38,.18);
}

[data-bs-theme="light"] .belote-scores-total {
    color: var(--text-primary);
}

[data-bs-theme="light"] .belote-scores-panel {
    color: var(--text-primary);
}

/* ============================================
   BLACKJACK LIVE
   ============================================ */

/* ---- Lobby ---- */
.bjl-lobby-container { margin: 0 auto; width: 100%; }
.bjl-lobby-tabs {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
}
.bjl-tab {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.75rem 1.25rem;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.bjl-tab:hover { color: var(--text-primary); }
.bjl-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.bjl-tab-content { display: none; }
.bjl-tab-content.active { display: block; }

/* Filters */
.bjl-lobby-filters {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}
.bjl-filter-select, .bjl-filter-search {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 10px;
    padding: 0.6rem 1rem;
    font-size: 0.875rem;
    transition: border-color 0.2s;
}
.bjl-filter-select:focus, .bjl-filter-search:focus { border-color: var(--primary); outline: none; }
.bjl-filter-search { flex: 1; min-width: 200px; }

/* Table cards in lobby */
.bjl-tables-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
    gap: 0.75rem;
}
.bjl-tables-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 1rem;
    color: var(--text-muted);
    font-size: 1rem;
    background: var(--bg-card);
    border: 1px dashed var(--border-color);
    border-radius: 14px;
}
.bjl-tables-empty i { font-size: 2.5rem; display: block; margin-bottom: 0.75rem; opacity: 0.5; }
.bjl-table-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1rem 1.25rem;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
    gap: 0.75rem;
}
.bjl-table-card:hover { border-color: var(--primary); box-shadow: 0 0 12px var(--primary-glow); transform: translateY(-2px); }
.bjl-table-card.bjl-table-full { opacity: 0.6; }
.bjl-table-card-top {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.bjl-table-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: var(--primary);
    flex-shrink: 0;
}
.bjl-table-card-info { min-width: 0; flex: 1; }
.bjl-table-card-name { font-weight: 700; font-size: 0.95rem; display: flex; align-items: center; gap: 0.4rem; }
.bjl-table-card-name i { color: var(--warning); font-size: 0.8rem; }
.bjl-table-card-host { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.15rem; }
.bjl-table-card-stats {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.bjl-stat-chip {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.78rem;
    color: var(--text-muted);
    background: var(--bg-input);
    padding: 0.3rem 0.6rem;
    border-radius: 8px;
}
.bjl-stat-chip i { font-size: 0.85rem; }
.bjl-table-card-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-color);
}
.bjl-table-status { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; padding: 0.25rem 0.6rem; border-radius: 20px; white-space: nowrap; letter-spacing: 0.03em; }
.bjl-status-waiting { background: var(--primary-light); color: var(--primary); }
.bjl-status-playing { background: rgba(40,200,120,0.12); color: #28c878; }
.bjl-table-card-actions { display: flex; align-items: center; gap: 0.5rem; }
.bjl-join-btn {
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0.45rem 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s, box-shadow 0.15s;
    font-size: 0.82rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.bjl-join-btn:hover { background: var(--primary-hover); transform: scale(1.04); box-shadow: 0 3px 10px var(--primary-glow); }
.bjl-join-btn:disabled { background: var(--text-muted); cursor: default; transform: none; box-shadow: none; }
.bjl-delete-btn {
    background: transparent;
    color: var(--danger, #ef4444);
    border: 1px solid var(--danger, #ef4444);
    border-radius: 8px;
    padding: 0.45rem 0.6rem;
    cursor: pointer;
    transition: background 0.2s, color 0.15s;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
}
.bjl-delete-btn:hover { background: var(--danger, #ef4444); color: #fff; }
.bjl-delete-table-btn {
    background: transparent;
    color: var(--danger, #ef4444);
    border: 1px solid var(--danger, #ef4444);
    border-radius: 8px;
    padding: 0.35rem 0.8rem;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin-left: 0.5rem;
    transition: background 0.2s, color 0.15s;
}
.bjl-delete-table-btn:hover { background: var(--danger, #ef4444); color: #fff; }
.bjl-private-icon { color: var(--warning); font-size: 0.8rem; }
.bjl-msg-error { color: var(--danger); }
.bjl-msg-success { color: var(--success); }

/* ---- Create form ---- */
.bjl-create-form {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
}
.bjl-create-form h3 {
    margin: 0 0 1.5rem;
    font-size: 1.15rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.bjl-create-form h3 i { color: var(--primary); }
.bjl-form-group { margin-bottom: 1.15rem; }
.bjl-form-group label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 0.45rem; color: var(--text-secondary); }
.bjl-form-group label small { color: var(--text-muted); font-weight: 400; }
.bjl-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 0.15rem; }
.bjl-form-msg { margin-top: .75rem; font-size: .88rem; }
.bjl-input, .bjl-select {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 10px;
    padding: 0.65rem 0.85rem;
    font-size: 0.9rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.bjl-input:focus, .bjl-select:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px var(--primary-light); }
.bjl-input-lg { font-size: 1.3rem; text-align: center; letter-spacing: 4px; padding: 0.75rem; }
.bjl-input-with-btn { display: flex; gap: 0.5rem; }
.bjl-input-with-btn .bjl-input { flex: 1; }
.bjl-btn-small {
    background: var(--border-color);
    border: none;
    color: var(--text-primary);
    border-radius: 8px;
    padding: 0 0.75rem;
    cursor: pointer;
    transition: background 0.2s;
}
.bjl-btn-small:hover { background: var(--primary); }
.bjl-private-options { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border-color); }
.bjl-private-options h4 { font-size: 0.95rem; margin: 0 0 1rem; display: flex; align-items: center; gap: 0.4rem; color: var(--warning); }
.bjl-create-btn {
    width: 100%;
    margin-top: 1.25rem;
    padding: 0.85rem;
    background: linear-gradient(135deg, var(--primary), #e04550);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    letter-spacing: 0.02em;
}
.bjl-create-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 24px var(--primary-glow); }
.bjl-create-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ---- Join modal ---- */
.bjl-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.65);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.bjl-modal {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    width: 100%;
    max-width: 440px;
    overflow: hidden;
}
.bjl-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
}
.bjl-modal-header h3 { margin: 0; font-size: 1rem; display: flex; align-items: center; gap: 0.5rem; }
.bjl-modal-close { background: none; border: none; color: var(--text-muted); font-size: 1.2rem; cursor: pointer; }
.bjl-modal-body { padding: 1.25rem; }
.bjl-modal-info { margin-bottom: 1rem; padding: .75rem 1rem; background: var(--bg-input); border-radius: 8px; font-size: .88rem; color: var(--text-secondary); line-height: 1.6; }
.bjl-modal-footer { display: flex; gap: 0.75rem; padding: 0 1.25rem 1.25rem; }
.bjl-modal-footer .bjl-create-btn { margin-top: 0; }
.bjl-btn-cancel {
    flex: 1;
    background: var(--border-color);
    color: var(--text-primary);
    border: none;
    border-radius: 10px;
    padding: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.bjl-btn-cancel:hover { background: var(--bg-card-hover); }

/* ---- Game: info row & phase box ---- */
.bjl-info-row { display: flex; align-items: center; justify-content: space-between; gap: .75rem; font-size: .85rem; color: var(--text-secondary); margin-bottom: .5rem; }
.bjl-phase-box { background: var(--bg-input); border-radius: 8px; padding: .6rem .85rem; margin-bottom: .8rem; }
.bjl-phase-label { font-size: .88rem; color: var(--text-primary); display: flex; align-items: center; gap: .4rem; }
.bjl-timer-wrap { display: flex; align-items: center; gap: .6rem; margin-top: .4rem; }
.bjl-timer-bar { flex: 1; height: 6px; background: rgba(255,255,255,.08); border-radius: 3px; overflow: hidden; }
.bjl-timer-fill { height: 100%; width: 100%; border-radius: 3px; transition: width .4s linear, background .4s; }
.bjl-timer-text { font-variant-numeric: tabular-nums; font-size: .82rem; color: var(--text-secondary); min-width: 20px; text-align: right; }

/* ---- Game: player seats ---- */
.bjl-seats { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; margin-top: .5rem; }
.bjl-seat { background: rgba(0,0,0,.35); border: 2px solid rgba(255,255,255,.12); border-radius: 12px; padding: .6rem .75rem; min-width: 120px; max-width: 180px; flex: 1; display: flex; flex-direction: column; align-items: center; gap: .4rem; position: relative; transition: border-color .3s, box-shadow .3s; }
.bjl-seat-empty { border-style: dashed; border-color: rgba(255,255,255,.08) !important; opacity: .5; }
.bjl-seat-empty-label { color: rgba(255,255,255,.3); font-size: .75rem; text-align: center; padding: .5rem 0; }
.bjl-seat-me { border-color: rgba(99,102,241,.6) !important; background: rgba(99,102,241,.12); }
.bjl-seat-active { border-color: #facc15 !important; box-shadow: 0 0 18px rgba(250,204,21,.4); }
.bjl-seat-bust { border-color: rgba(239,68,68,.5) !important; background: rgba(239,68,68,.08); }
.bjl-seat-stood { border-color: rgba(148,163,184,.3) !important; opacity: .85; }
.bjl-seat-bj { border-color: rgba(234,179,8,.7) !important; box-shadow: 0 0 20px rgba(234,179,8,.35); }
.bjl-seat-win { border-color: rgba(34,197,94,.6) !important; }
.bjl-seat-lose { border-color: rgba(239,68,68,.4) !important; }
.bjl-seat-push { border-color: rgba(148,163,184,.3) !important; }
.bjl-seat-label { display: flex; align-items: center; justify-content: space-between; width: 100%; gap: .4rem; }
.bjl-seat-name { font-size: .78rem; font-weight: 600; color: rgba(255,255,255,.85); display: flex; align-items: center; gap: .3rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bjl-seat-meta { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; justify-content: center; }
.bjl-bet-display { font-size: .72rem; color: #fde047; display: flex; align-items: center; gap: .2rem; }
.bjl-bj-badge { position: absolute; top: -10px; right: -8px; background: linear-gradient(135deg, #f59e0b, #fbbf24); color: #000; font-size: .65rem; font-weight: 800; padding: .15rem .45rem; border-radius: 20px; letter-spacing: .05em; box-shadow: 0 2px 8px rgba(245,158,11,.5); }
.bjl-turn-indicator { position: absolute; top: -22px; left: 50%; transform: translateX(-50%); color: #facc15; font-size: 1rem; animation: bjlTurnBounce .7s ease-in-out infinite alternate; }
@keyframes bjlTurnBounce { from { transform: translateX(-50%) translateY(0); } to { transform: translateX(-50%) translateY(-5px); } }
.bjl-result-badge { font-size: .7rem; font-weight: 600; padding: .2rem .55rem; border-radius: 20px; display: flex; align-items: center; gap: .3rem; }
.bjl-rb-win { background: rgba(34,197,94,.2); color: #4ade80; border: 1px solid rgba(34,197,94,.3); }
.bjl-rb-bj  { background: rgba(234,179,8,.2); color: #fde047; border: 1px solid rgba(234,179,8,.4); }
.bjl-rb-lose { background: rgba(239,68,68,.15); color: #f87171; border: 1px solid rgba(239,68,68,.25); }
.bjl-rb-push { background: rgba(148,163,184,.15); color: #94a3b8; border: 1px solid rgba(148,163,184,.2); }

/* ---- Invite share ---- */
.bjl-invite-share { display: flex; align-items: center; gap: .5rem; font-size: .88rem; color: var(--text-secondary); background: var(--bg-input); padding: .4rem .9rem; border-radius: 8px; }

/* ---- Sidebar extras ---- */
.bjl-sidebar-me { color: var(--primary); font-weight: 600; }
.bjl-host-badge { color: #f59e0b; font-size: .75rem; }

/* ---- Results overlay (inline on felt, poker-style) ---- */
.bjl-felt { position: relative; }
.bjl-result-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 20, 0.88);
    backdrop-filter: blur(8px);
    border-radius: 0 0 354px 354px;
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 2rem 1.5rem;
}
.bjl-result-fadein {
    animation: bjlResultFade 0.5s ease-out;
}
@keyframes bjlResultFade {
    from { opacity: 0; backdrop-filter: blur(0); }
    to { opacity: 1; backdrop-filter: blur(8px); }
}
.bjl-result-content { text-align: center; width: 100%; max-width: 420px; }
.bjl-result-icon {
    font-size: 3rem;
    margin-bottom: 0.3rem;
    animation: bjlResultPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.15s both;
}
@keyframes bjlResultPop {
    from { transform: scale(0) rotate(-10deg); opacity: 0; }
    to { transform: scale(1) rotate(0); opacity: 1; }
}
.bjl-result-title {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
    animation: bjlResultSlide 0.5s ease-out 0.25s both;
}
.bjl-result-title-win { color: #ffc107; text-shadow: 0 0 20px rgba(255, 193, 7, 0.4); }
.bjl-result-title-lose { color: #ef4444; text-shadow: 0 0 12px rgba(239, 68, 68, 0.3); }
.bjl-result-title-push { color: #94a3b8; }
@keyframes bjlResultSlide {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.bjl-result-payout {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 0.6rem;
    animation: bjlResultSlide 0.5s ease-out 0.35s both;
}
.bjl-payout-win { color: #22c55e; }
.bjl-payout-lose { color: #ef4444; }
.bjl-payout-push { color: #94a3b8; }
.bjl-result-hands {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 0.5rem;
    animation: bjlResultSlide 0.5s ease-out 0.45s both;
}
.bjl-result-hand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 0.7rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
}
.bjl-result-hand-name {
    font-size: 0.8rem;
    font-weight: 700;
    color: #ccc;
}
.bjl-result-hand-score {
    font-size: 0.72rem;
    color: #999;
}
.bjl-result-hand-net {
    font-size: 0.75rem;
    font-weight: 700;
}
.bjl-result-hand-winner {
    border: 1px solid rgba(255, 193, 7, 0.4);
    background: rgba(255, 193, 7, 0.1);
}
.bjl-result-hand-winner .bjl-result-hand-name { color: #ffc107; }
.bjl-result-dealer {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.bjl-result-dealer .bjl-result-hand-name { color: #e8d5b0; }

/* ---- Spin animation ---- */
.bjl-spin { display: inline-block; animation: bjlSpinAnim .7s linear infinite; }
@keyframes bjlSpinAnim { to { transform: rotate(360deg); } }

@media (max-width: 640px) {
    .bjl-seats { gap: .4rem; }
    .bjl-seat { min-width: 90px; padding: .5rem; }
    .bjl-result-title { font-size: 1.1rem; }
    .bjl-result-payout { font-size: 1.2rem; }
    .bjl-result-hands { gap: 0.5rem; }
    .bjl-tables-list { grid-template-columns: 1fr; }
    .bjl-form-row { grid-template-columns: 1fr; }
}

/* ============================================================
   INVENTORY PAGE — Redesign matching shop cosm-card style
   ============================================================ */
.inv-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.inv-tabs {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}
.inv-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 1rem;
    border-radius: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.inv-tab:hover { color: var(--text-primary); border-color: var(--primary); }
.inv-tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.inv-tab .inv-tab-count {
    background: rgba(255,255,255,0.15);
    padding: 0 6px;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 700;
}
.inv-tab.active .inv-tab-count { background: rgba(255,255,255,0.25); }

.inv-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}

.inv-card {
    position: relative;
    overflow: hidden;
}
.inv-card .cosm-card-footer {
    justify-content: center;
    padding: 0.6rem 0.85rem 0.85rem;
}

/* Badge "ÉQUIPÉ" top-right sur les cards inventaire */
.inv-equipped-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(16, 185, 129, 0.18);
    color: #10b981;
    font-size: 0.55rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Prix dans le footer (non-propriétaire) */
.inv-price-tag {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 800;
    font-size: 0.88rem;
    color: var(--accent);
}

/* Badge équipé statique (visiteur non-propriétaire) */
.inv-equipped-static {
    font-size: 0.78rem;
    color: #10b981;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}
.inv-equip-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 1.2rem;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    width: 100%;
    justify-content: center;
}
.inv-equip-btn.equip {
    background: var(--primary);
    color: #fff;
}
.inv-equip-btn.equip:hover { filter: brightness(1.15); }
.inv-equip-btn.unequip {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}
.inv-equip-btn.unequip:hover { background: rgba(239, 68, 68, 0.25); }
.inv-equip-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.inv-equipped-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--success);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
}

.inv-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
}
.inv-empty i { font-size: 2.5rem; display: block; margin-bottom: 0.5rem; }

/* ============================================================
   HEADER COSMETICS — Avatar border + username gradient + pin
   ============================================================ */
.navbar-avatar.has-border {
    border-radius: 50%;
    padding: 2.5px;
}
.navbar-avatar.has-border .navbar-avatar-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--bg-navbar);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 0.78rem;
}
.navbar-avatar.has-border .level-badge {
    bottom: -3px;
    right: -3px;
}
.navbar-username-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.navbar-username-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    border-radius: 4px;
}

.cosm-pin-badge-sm {
    font-size: 0.55rem !important;
    padding: 2px 6px !important;
    border-radius: 4px !important;
}

/* ============================================================
   PROFILE COSMETICS — Avatar inner for border display
   ============================================================ */
.profile-avatar-inner {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 800;
}

/* ============================================================
   PROFILE INVENTORY GRID — Displayed on profile page
   ============================================================ */
.profile-inv-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}

.profile-inv-card {
    background: var(--bg-card-hover);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.85rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    position: relative;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.profile-inv-card.cosm-rarity-legendary {
    border-color: rgba(245, 158, 11, 0.4);
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.08);
}
.profile-inv-card.cosm-rarity-epic {
    border-color: rgba(168, 85, 247, 0.4);
}
.profile-inv-card.cosm-rarity-rare {
    border-color: rgba(59, 130, 246, 0.35);
}

.profile-inv-visual {
    width: 44px;
    min-width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-inv-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.profile-inv-name {
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-inv-type {
    font-size: 0.72rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.profile-inv-rarity {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.rarity-legendary { color: #f59e0b; }
.rarity-epic      { color: #a855f7; }
.rarity-rare      { color: #3b82f6; }
.rarity-uncommon  { color: var(--text-muted); }

.profile-inv-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.3rem;
    flex-shrink: 0;
}

.profile-inv-equipped {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--success);
    display: flex;
    align-items: center;
    gap: 0.2rem;
}

.profile-inv-btn {
    padding: 0.25rem 0.6rem !important;
    font-size: 0.75rem !important;
    border-radius: 6px !important;
    width: auto !important;
    white-space: nowrap;
}

@media (max-width: 640px) {
    .inv-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
    .inv-tabs { gap: 0.3rem; }
    .inv-tab { padding: 0.35rem 0.75rem; font-size: 0.75rem; }
    .profile-inv-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   CUSTOM CURSOR — Live cursor cosmetic on page
   ============================================================ */
.cosm-custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 99999;
    transform: translate(-2px, -2px);
    transition: opacity 0.15s;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.35));
}
.cosm-custom-cursor.legendary svg {
    animation: cosmCursorFloat 2s ease-in-out infinite;
    filter: drop-shadow(0 0 8px rgba(245, 158, 11, 0.6));
}



/* ============================================================
   CLICK PARTICLES — Click effect cosmetic
   ============================================================ */
.cosm-click-particle {
    position: fixed;
    pointer-events: none;
    z-index: 99997;
    animation: cosmClickParticle 0.65s ease-out forwards;
    font-size: 14px;
    line-height: 1;
    transform: translate(-50%, -50%);
}

@keyframes cosmClickParticle {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1) translate(0, 0);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.3) translate(var(--dx), var(--dy));
    }
}

/* ============================================================
   BADGE SPACING — Espacement autour des name_pin badges
   ============================================================ */
.cosm-pin-badge-sm {
    margin-left: 0.35rem !important;
}
