/* ==========================================================================
   SCOUWTY CASINO - BLOXFLIP INSPIRED THEME
   Warm charcoal dark mode, amber/gold accents, responsive sleek layout
   ========================================================================== */

:root {
    --bg-root: #0e0d0c;
    --bg-sidebar: #141110;
    --bg-header: #141110;
    --bg-card: #1c1815;
    --bg-card-hover: #26211c;
    --bg-input: #120f0e;
    --border-color: #2c2520;
    --border-light: #3d342d;
    
    --gold-primary: #f59e0b;
    --gold-hover: #fbbf24;
    --gold-glow: rgba(245, 158, 11, 0.25);
    --gold-bg: rgba(245, 158, 11, 0.12);
    
    --green-win: #10b981;
    --green-glow: rgba(16, 185, 129, 0.25);
    --red-loss: #ef4444;
    --red-glow: rgba(239, 68, 68, 0.25);
    
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 76px;
    --header-height: 68px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    background-color: var(--bg-root);
    color: var(--text-primary);
    font-family: var(--font-family);
    min-height: 100vh;
    display: flex;
    overflow-x: hidden;
    line-height: 1.5;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-root);
}
::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--border-light);
}

/* ==========================================================================
   SIDEBAR (Matching Bloxflip reference screenshot)
   ========================================================================== */

#sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: var(--transition);
}

.sidebar-brand {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 20px;
    gap: 12px;
    border-bottom: 1px solid var(--border-color);
    text-decoration: none;
    cursor: pointer;
}

.brand-icon {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 4px 12px var(--gold-glow);
}

.brand-text {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(90deg, #ffffff, #fbbf24);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
}

.sidebar-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Category header like reference: Originals with toggle chevron */
.nav-category {
    background: #171311;
    border: 1px solid #28211b;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    cursor: pointer;
    user-select: none;
    transition: var(--transition);
}

.category-header:hover {
    background: rgba(245, 158, 11, 0.05);
}

.category-title-group {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    font-weight: 700;
    color: #e5e7eb;
}

.category-icon {
    font-size: 1.1rem;
    color: var(--gold-primary);
}

.category-chevron {
    width: 24px;
    height: 24px;
    background: #251e18;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: var(--gold-primary);
    transition: transform 0.2s ease;
}

.nav-category.collapsed .category-chevron {
    transform: rotate(180deg);
}

.nav-category.collapsed .category-items {
    display: none;
}

.category-items {
    display: flex;
    flex-direction: column;
    padding: 4px 8px 8px 8px;
    gap: 2px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: #d1d5db;
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    border: 1px solid transparent;
}

.nav-item:hover {
    background-color: var(--bg-card-hover);
    color: #ffffff;
    border-color: var(--border-light);
}

.nav-item.active {
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.15), rgba(245, 158, 11, 0.03));
    color: var(--gold-primary);
    border-color: rgba(245, 158, 11, 0.35);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.nav-item-icon {
    font-size: 1.25rem;
    width: 24px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-item-badge {
    margin-left: auto;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(245, 158, 11, 0.2);
    color: var(--gold-primary);
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 14px;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.owner-nav-btn {
    display: none; /* Shown dynamically if owner */
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(180, 83, 9, 0.15));
    border: 1px solid var(--gold-primary);
    color: #fbbf24;
    font-weight: 700;
    font-size: 0.88rem;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
}

.owner-nav-btn:hover {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.35), rgba(180, 83, 9, 0.25));
    box-shadow: 0 0 15px var(--gold-glow);
}

/* ==========================================================================
   MAIN CONTENT AREA & HEADER
   ========================================================================== */

#main-wrapper {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}

#top-header {
    height: var(--header-height);
    background-color: var(--bg-header);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    backdrop-filter: blur(8px);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.4rem;
    cursor: pointer;
}

/* Header Live Bets Ticker */
.header-ticker {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
    max-width: 500px;
}

.ticker-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    white-space: nowrap;
    animation: fadeIn 0.3s ease;
}

.ticker-win {
    color: var(--green-win);
    font-weight: 700;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* User Balance Pill */
.balance-container {
    display: flex;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    padding: 4px 14px;
    gap: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.balance-coin {
    font-size: 1.25rem;
    filter: drop-shadow(0 0 4px rgba(245, 158, 11, 0.5));
}

.balance-text {
    display: flex;
    flex-direction: column;
}

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

.balance-amount {
    font-size: 0.95rem;
    font-weight: 800;
    color: #ffffff;
    font-variant-numeric: tabular-nums;
}

.balance-refresh-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.9rem;
    padding: 4px;
    transition: var(--transition);
}

.balance-refresh-btn:hover {
    color: var(--gold-primary);
    transform: rotate(90deg);
}

/* Profile Pill / Auth Buttons */
.auth-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-primary {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #110d0a;
    font-weight: 700;
    font-size: 0.88rem;
    padding: 9px 18px;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 12px var(--gold-glow);
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(245, 158, 11, 0.4);
}

.btn-secondary {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.88rem;
    padding: 9px 16px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-light);
}

.user-profile-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 5px 12px 5px 6px;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--transition);
}

.user-profile-badge:hover {
    border-color: var(--border-light);
}

.profile-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4b5563, #374151);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    color: #fff;
    border: 1px solid var(--border-light);
}

.profile-name {
    font-size: 0.88rem;
    font-weight: 700;
    color: #ffffff;
}

.profile-role-tag {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(245, 158, 11, 0.2);
    color: var(--gold-primary);
}

/* ==========================================================================
   PAGE VIEWS & DASHBOARD
   ========================================================================== */

#content-container {
    flex: 1;
    padding: 30px;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.view-section {
    display: none;
    animation: fadeIn 0.25s ease;
}

.view-section.active {
    display: block;
}

/* Hero Banner */
.hero-banner {
    background: linear-gradient(135deg, #241c16 0%, #171310 60%, #100d0b 100%);
    border: 1px solid #3d3024;
    border-radius: var(--radius-lg);
    padding: 40px;
    margin-bottom: 34px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.hero-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: var(--gold-primary);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 14px;
}

.hero-title {
    font-size: 2.4rem;
    font-weight: 900;
    line-height: 1.15;
    margin-bottom: 12px;
    color: #ffffff;
}

.hero-title span {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-desc {
    color: var(--text-secondary);
    font-size: 1.05rem;
    max-width: 600px;
    margin-bottom: 24px;
}

.hero-cta {
    display: flex;
    gap: 14px;
}

/* Games Grid */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.section-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title span {
    color: var(--gold-primary);
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.game-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    position: relative;
}

.game-card:hover {
    transform: translateY(-4px);
    border-color: rgba(245, 158, 11, 0.4);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.5), 0 0 16px var(--gold-glow);
}

.game-thumbnail {
    height: 140px;
    background: linear-gradient(135deg, #2b211a, #161210);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    position: relative;
    border-bottom: 1px solid var(--border-color);
}

.game-thumbnail-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: var(--radius-full);
}

.game-info {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.game-name {
    font-size: 1.05rem;
    font-weight: 800;
    color: #ffffff;
}

.game-category {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.game-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.game-edge {
    font-size: 0.72rem;
    color: var(--text-secondary);
}

.game-play-btn {
    background: var(--gold-bg);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: var(--gold-primary);
    font-size: 0.78rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    transition: var(--transition);
}

.game-card:hover .game-play-btn {
    background: var(--gold-primary);
    color: #120e0b;
}

/* ==========================================================================
   GAME VIEWPORT (Bloxflip dual layout: Bet controls left, Game board right)
   ========================================================================== */

.game-view-wrapper {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    min-height: 560px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Left Betting Controls */
.game-controls-panel {
    background: #151210;
    border-right: 1px solid var(--border-color);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.game-controls-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 14px;
}

.game-title-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.15rem;
    font-weight: 800;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.control-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    justify-content: space-between;
}

.bet-input-box {
    display: flex;
    align-items: center;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0 10px;
    transition: var(--transition);
}

.bet-input-box:focus-within {
    border-color: var(--gold-primary);
    box-shadow: 0 0 0 2px var(--gold-glow);
}

.bet-input-box input {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 700;
    padding: 10px 0;
    width: 100%;
    outline: none;
}

.bet-presets {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin-top: 6px;
}

.preset-btn {
    background: #201b17;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 700;
    padding: 6px 0;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
}

.preset-btn:hover {
    background: #2b231c;
    color: #fff;
    border-color: var(--border-light);
}

/* Main Action Button (Play / Cashout) */
.action-btn-main {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #110e0c;
    font-size: 1.05rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 6px 18px var(--gold-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: auto;
}

.action-btn-main:hover:not(:disabled) {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(245, 158, 11, 0.45);
}

.action-btn-main:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.action-btn-main.cashout-state {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #ffffff;
    box-shadow: 0 6px 18px var(--green-glow);
}

.action-btn-main.cashout-state:hover:not(:disabled) {
    background: linear-gradient(135deg, #34d399, #10b981);
    box-shadow: 0 8px 22px rgba(16, 185, 129, 0.45);
}

/* Right Game Board */
.game-board-panel {
    background: #181412;
    padding: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Mines Grid */
.mines-grid {
    display: grid;
    grid-template-columns: repeat(5, 74px);
    grid-template-rows: repeat(5, 74px);
    gap: 12px;
}

.mine-tile {
    background: #251e18;
    border: 1px solid #382c23;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    cursor: pointer;
    user-select: none;
    transition: transform 0.15s ease, background-color 0.2s ease, border-color 0.2s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.mine-tile:hover:not(.revealed):not(.disabled) {
    background: #332820;
    border-color: var(--gold-primary);
    transform: translateY(-2px);
}

.mine-tile.revealed-diamond {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(5, 150, 105, 0.3));
    border-color: var(--green-win);
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.mine-tile.revealed-mine {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.3), rgba(185, 28, 28, 0.4));
    border-color: var(--red-loss);
    animation: shake 0.4s ease;
}

/* Towers Grid */
.towers-board {
    display: flex;
    flex-direction: column-reverse; /* Bottom floor to top */
    gap: 10px;
    width: 100%;
    max-width: 460px;
}

.tower-floor {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #1e1915;
    border: 1px solid #2e241c;
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    transition: var(--transition);
}

.tower-floor.active-floor {
    border-color: var(--gold-primary);
    background: rgba(245, 158, 11, 0.08);
    box-shadow: 0 0 14px var(--gold-glow);
}

.floor-number-badge {
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--text-muted);
    width: 44px;
}

.floor-multiplier-badge {
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--gold-primary);
    width: 60px;
    text-align: right;
    margin-left: auto;
}

.tower-tiles-row {
    display: flex;
    gap: 8px;
    flex: 1;
}

.tower-tile {
    flex: 1;
    height: 44px;
    background: #28201a;
    border: 1px solid #3c3027;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    cursor: pointer;
    transition: var(--transition);
}

.tower-tile:hover:not(.revealed):not(.disabled) {
    background: #392d24;
    border-color: var(--gold-primary);
}

/* Coinflip 3D */
.coinflip-arena {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.coin-3d {
    width: 160px;
    height: 160px;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 1s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.coin-face {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    backface-visibility: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
    border: 4px solid #fef08a;
}

.coin-heads {
    background: radial-gradient(circle, #f59e0b 0%, #b45309 100%);
    color: #ffffff;
}

.coin-tails {
    background: radial-gradient(circle, #3b82f6 0%, #1d4ed8 100%);
    color: #ffffff;
    transform: rotateY(180deg);
}

/* Plinko Canvas */
.plinko-canvas-container {
    position: relative;
    border-radius: var(--radius-md);
    background: #14100e;
    border: 1px solid var(--border-color);
    box-shadow: inset 0 4px 16px rgba(0, 0, 0, 0.6);
}

/* Roulette Slider */
.roulette-track-container {
    width: 100%;
    max-width: 600px;
    height: 120px;
    background: #14100e;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 4px 20px rgba(0, 0, 0, 0.8);
}

.roulette-needle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 3px;
    background: var(--gold-primary);
    z-index: 10;
    transform: translateX(-50%);
    box-shadow: 0 0 10px var(--gold-primary);
}

.roulette-strip {
    display: flex;
    position: absolute;
    top: 15px;
    left: 0;
    height: 90px;
    transition: transform 4s cubic-bezier(0.12, 0.8, 0.32, 1);
}

.roulette-slot {
    width: 90px;
    height: 90px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: 800;
    color: #fff;
    border-radius: 8px;
    margin: 0 4px;
}

.slot-red { background: linear-gradient(135deg, #dc2626, #991b1b); }
.slot-blue { background: linear-gradient(135deg, #2563eb, #1e40af); }
.slot-gold { background: linear-gradient(135deg, #f59e0b, #b45309); border: 2px solid #fde047; }

/* ==========================================================================
   OWNER PANEL (Strictly for scouwty)
   ========================================================================== */

.owner-dashboard {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.owner-header {
    background: linear-gradient(135deg, #281d15, #171310);
    border: 1px solid var(--gold-primary);
    border-radius: var(--radius-lg);
    padding: 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 20px var(--gold-glow);
}

.stats-grid-owner {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.stat-card-owner {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.stat-label-owner {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
}

.stat-value-owner {
    font-size: 1.6rem;
    font-weight: 800;
    color: #ffffff;
}

/* User Management Table */
.owner-card-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.panel-header-bar {
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.search-input-owner {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: #fff;
    padding: 8px 14px;
    font-size: 0.88rem;
    outline: none;
    min-width: 260px;
}

.search-input-owner:focus {
    border-color: var(--gold-primary);
}

.table-responsive {
    overflow-x: auto;
}

.owner-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
    text-align: left;
}

.owner-table th {
    background: #171311;
    color: var(--text-secondary);
    padding: 12px 18px;
    font-weight: 700;
    border-bottom: 1px solid var(--border-color);
}

.owner-table td {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-color);
    color: #e5e7eb;
}

.owner-table tr:hover td {
    background: #241e19;
}

.table-action-btn {
    background: var(--bg-card-hover);
    border: 1px solid var(--border-light);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 5px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
}

.table-action-btn:hover {
    background: var(--gold-primary);
    color: #120e0b;
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.2s ease;
}

.modal-overlay.open {
    display: flex;
}

.modal-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 440px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
    position: relative;
    animation: slideUp 0.25s ease;
}

.modal-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.4rem;
    cursor: pointer;
}

.modal-close-btn:hover {
    color: #fff;
}

/* Toasts */
#toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: #1c1714;
    border: 1px solid var(--border-color);
    padding: 12px 18px;
    border-radius: var(--radius-sm);
    color: #ffffff;
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.5);
    animation: slideInRight 0.3s ease;
}

.toast.success { border-left: 4px solid var(--green-win); }
.toast.error { border-left: 4px solid var(--red-loss); }
.toast.info { border-left: 4px solid var(--gold-primary); }

/* Keyframe Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes popIn {
    0% { transform: scale(0.6); opacity: 0; }
    80% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

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

/* Responsive adjustments */
@media (max-width: 1024px) {
    .game-view-wrapper {
        grid-template-columns: 1fr;
    }
    .game-controls-panel {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
}

@media (max-width: 768px) {
    #sidebar {
        transform: translateX(-100%);
    }
    #sidebar.mobile-open {
        transform: translateX(0);
    }
    #main-wrapper {
        margin-left: 0;
    }
    .mobile-menu-toggle {
        display: block;
    }
    #content-container {
        padding: 16px;
    }
}
