@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    --premium-font: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --premium-bg: #080a0f;
    --premium-panel: #11141d;
    --premium-panel-hover: #181d2a;
    --premium-sidebar: #0b0d14;
    --premium-border: rgba(255, 255, 255, 0.07);
    --premium-border-focus: rgba(255, 183, 3, 0.4);
    --premium-accent: #ffb703;
    --premium-accent-hover: #ffa200;
    --premium-accent-rgb: 255, 183, 3;
    --premium-success: #00f5d4;
    --premium-success-bg: rgba(0, 245, 212, 0.1);
    --premium-danger: #ff5d73;
    --premium-danger-bg: rgba(255, 93, 115, 0.1);
    --premium-text-primary: #f8f9fa;
    --premium-text-secondary: #909bb0;
    --premium-text-muted: #647087;
    --premium-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    --premium-glass-bg: rgba(17, 20, 29, 0.85);
    --premium-radius-lg: 1rem;
    --premium-radius-md: 0.65rem;
    --premium-transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --premium-input-bg: rgba(255, 255, 255, 0.03);
}

/* Light Mode Variables Override */
body.light-theme {
    --premium-bg: #f3f4f6;
    --premium-panel: #ffffff;
    --premium-panel-hover: #f9fafb;
    --premium-sidebar: #ffffff;
    --premium-border: rgba(0, 0, 0, 0.08);
    --premium-border-focus: rgba(217, 119, 6, 0.4);
    --premium-accent: #d97706; /* Higher contrast amber for light background */
    --premium-accent-hover: #b45309;
    --premium-accent-rgb: 217, 119, 6;
    --premium-success: #059669;
    --premium-success-bg: rgba(5, 150, 105, 0.1);
    --premium-danger: #dc2626;
    --premium-danger-bg: rgba(220, 38, 38, 0.1);
    --premium-text-primary: #111827;
    --premium-text-secondary: #4b5563;
    --premium-text-muted: #6b7280;
    --premium-shadow: 0 10px 25px rgba(0, 0, 0, 0.04);
    --premium-glass-bg: rgba(255, 255, 255, 0.85);
    --premium-input-bg: #ffffff;
}

/* Global Reset & Base Styling under .premium-theme */
body.premium-theme {
    background-color: var(--premium-bg);
    color: var(--premium-text-primary);
    font-family: var(--premium-font);
    font-size: 15px;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    overflow-x: hidden;
    letter-spacing: -0.01em;
}

/* Scrollbar Styling */
body.premium-theme::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
body.premium-theme::-webkit-scrollbar-track {
    background: var(--premium-bg);
}
body.premium-theme::-webkit-scrollbar-thumb {
    background: var(--premium-border);
    border-radius: 4px;
}
body.premium-theme::-webkit-scrollbar-thumb:hover {
    background: var(--premium-text-muted);
}

/* Layout Wrapper */
.premium-layout {
    display: flex;
    min-height: 100vh;
}

/* 1. Sidebar Styles (Laptop / Desktop View) */
.premium-sidebar {
    width: 280px;
    background-color: var(--premium-sidebar);
    border-right: 1px solid var(--premium-border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1000;
    transition: var(--premium-transition);
}

.premium-brand {
    padding: 1.75rem 1.5rem;
    border-bottom: 1px solid var(--premium-border);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.premium-brand-logo {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--premium-accent), #ff6b6b);
    border-radius: var(--premium-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    font-weight: 800;
    font-size: 1.25rem;
    box-shadow: 0 0 15px rgba(255, 183, 3, 0.4);
}

.premium-brand-name {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--premium-text-primary);
    letter-spacing: 0.5px;
    background: linear-gradient(to right, #ffffff, #eaeaea);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

body.light-theme .premium-brand-name {
    background: linear-gradient(to right, var(--premium-text-primary), #475569);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.premium-sidebar-nav {
    flex-grow: 1;
    padding: 1.5rem 1rem;
    overflow-y: auto;
}

.premium-nav-section-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--premium-text-muted);
    margin-bottom: 0.75rem;
    padding-left: 0.75rem;
}

.premium-nav-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
}

.premium-nav-item {
    margin-bottom: 0.35rem;
}

.premium-nav-link {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.75rem 1rem;
    color: var(--premium-text-secondary);
    text-decoration: none;
    font-weight: 500;
    border-radius: var(--premium-radius-md);
    transition: var(--premium-transition);
    border: 1px solid transparent;
}

.premium-nav-link:hover, 
.premium-nav-item.active .premium-nav-link {
    color: var(--premium-text-primary);
    background-color: var(--premium-panel-hover);
    border-color: rgba(255, 255, 255, 0.05);
}

.premium-nav-item.active .premium-nav-link {
    background: linear-gradient(90deg, rgba(255, 183, 3, 0.1) 0%, rgba(255, 183, 3, 0.02) 100%);
    border-left: 3px solid var(--premium-accent);
    color: var(--premium-accent);
}

body.light-theme .premium-nav-item.active .premium-nav-link {
    background: linear-gradient(90deg, rgba(217, 119, 6, 0.08) 0%, rgba(217, 119, 6, 0.01) 100%);
}

.premium-nav-icon {
    font-size: 1.25rem;
    width: 24px;
    display: inline-flex;
    justify-content: center;
}

.premium-sidebar-footer {
    padding: 1.25rem;
    border-top: 1px solid var(--premium-border);
    background-color: rgba(0, 0, 0, 0.15);
}

body.light-theme .premium-sidebar-footer {
    background-color: #f9fafb;
}

.premium-user-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.premium-user-avatar {
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--premium-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--premium-accent);
}

body.light-theme .premium-user-avatar {
    background: #f3f4f6;
}

.premium-user-info {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex-grow: 1;
}

.premium-user-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--premium-text-primary);
    margin: 0;
}

.premium-user-role {
    font-size: 0.75rem;
    color: var(--premium-text-secondary);
    margin: 0;
}

.premium-sidebar-logout-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: rgba(255, 93, 115, 0.1);
    border: 1px solid rgba(255, 93, 115, 0.2);
    color: var(--premium-danger);
    padding: 0.6rem;
    border-radius: var(--premium-radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: var(--premium-transition);
}

.premium-sidebar-logout-btn:hover {
    background: var(--premium-danger);
    color: #fff;
}

/* Theme Toggle Button Style */
.premium-theme-toggle-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--premium-border);
    color: var(--premium-text-primary);
    width: 38px;
    height: 38px;
    border-radius: var(--premium-radius-md);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    transition: var(--premium-transition);
}

.premium-theme-toggle-btn:hover {
    background: var(--premium-panel-hover);
    border-color: var(--premium-accent);
    color: var(--premium-accent);
}

body.light-theme .premium-theme-toggle-btn {
    background: #f3f4f6;
}

/* For sidebar toggle button (full width) */
aside .premium-theme-toggle-btn {
    height: 40px;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
}

/* 2. Main Content Area */
.premium-main {
    flex-grow: 1;
    min-width: 0; /* flex-grow child overflow fix */
    margin-left: 280px; /* Offset for left sidebar */
    transition: var(--premium-transition);
    display: flex;
    flex-direction: column;
}

/* 3. Topbar Styles */
.premium-topbar {
    height: 70px;
    background-color: var(--premium-glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--premium-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 999;
}

.premium-page-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    color: var(--premium-text-primary);
}

.premium-topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Mobile drawer toggle */
.premium-mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--premium-text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem;
}

/* Dynamic Balance Badge */
.premium-balance-box {
    background: linear-gradient(135deg, rgba(0, 245, 212, 0.15) 0%, rgba(0, 245, 212, 0.03) 100%);
    border: 1px solid rgba(0, 245, 212, 0.25);
    color: var(--premium-success);
    font-weight: 700;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    box-shadow: 0 0 10px rgba(0, 245, 212, 0.1);
}

body.light-theme .premium-balance-box {
    background: linear-gradient(135deg, rgba(5, 150, 105, 0.08) 0%, rgba(5, 150, 105, 0.01) 100%);
    border-color: rgba(5, 150, 105, 0.25);
}

.premium-balance-icon {
    font-size: 1.1rem;
}

/* 4. Page Content Wrapper */
.premium-content {
    padding: 2rem;
    flex-grow: 1;
    max-width: 1300px;
    width: 100%;
    margin: 0 auto;
}

/* 5. Mobile Bottom Navbar */
.premium-bottombar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background-color: var(--premium-glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--premium-border);
    z-index: 1000;
    justify-content: space-around;
    align-items: center;
    padding-bottom: env(safe-area-inset-bottom);
}

.premium-bottom-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--premium-text-secondary);
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 600;
    gap: 0.2rem;
    width: 20%;
    height: 100%;
    transition: var(--premium-transition);
}

.premium-bottom-item:hover,
.premium-bottom-item.active {
    color: var(--premium-accent);
}

.premium-bottom-icon {
    font-size: 1.4rem;
}

/* Premium Card Styles (Redesigning the entire site cards) */
.card, 
.market-card, 
.rate-card,
.session-box {
    background-color: var(--premium-panel) !important;
    border: 1px solid var(--premium-border) !important;
    border-radius: var(--premium-radius-lg) !important;
    box-shadow: var(--premium-shadow) !important;
    padding: 1.25rem;
    transition: var(--premium-transition);
    color: var(--premium-text-primary);
}

/* Hover effects for primary cards */
.market-card:hover {
    transform: translateY(-4px);
    border-color: rgba(var(--premium-accent-rgb), 0.25) !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4), 0 0 15px rgba(var(--premium-accent-rgb), 0.05) !important;
}

body.light-theme .market-card:hover {
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08), 0 0 10px rgba(var(--premium-accent-rgb), 0.05) !important;
}

/* Market card interior custom styling override */
.market-card {
    margin-bottom: 1.5rem;
}
.market-card h4 {
    color: var(--premium-text-primary) !important;
    font-weight: 700 !important;
    font-size: 1.25rem;
    text-align: left !important;
    margin-bottom: 0.5rem !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.market-result {
    text-align: left !important;
    color: var(--premium-accent) !important;
    font-weight: 700 !important;
    font-size: 1.1rem !important;
    letter-spacing: 1px !important;
    margin-bottom: 1rem !important;
    background: rgba(var(--premium-accent-rgb), 0.07);
    padding: 0.5rem 0.75rem;
    border-radius: var(--premium-radius-md);
    border-left: 3px solid var(--premium-accent);
}

.session-box {
    background: rgba(0, 0, 0, 0.15) !important;
    border-radius: var(--premium-radius-md) !important;
    padding: 0.85rem !important;
    height: 100%;
}

body.light-theme .session-box {
    background: rgba(0, 0, 0, 0.02) !important;
}

.session-box .session-title {
    text-align: left !important;
    font-weight: 700 !important;
    font-size: 0.85rem;
    color: var(--premium-text-secondary);
    background: none !important;
    border-radius: 0 !important;
    margin-bottom: 0.5rem !important;
    border-bottom: 1px solid var(--premium-border);
    padding-bottom: 0.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.session-box .row-line {
    display: flex;
    justify-content: space-between;
    font-size: 0.88rem;
    margin-bottom: 0.25rem;
}
.session-box .row-line .lbl {
    color: var(--premium-text-muted) !important;
    font-weight: 500 !important;
}

/* Play Now Button & closed states */
.play-btn {
    background: linear-gradient(135deg, var(--premium-accent) 0%, var(--premium-accent-hover) 100%) !important;
    border: none !important;
    border-radius: var(--premium-radius-md) !important;
    text-align: center;
    padding: 0.75rem 1.25rem !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    text-shadow: none;
    box-shadow: 0 4px 15px rgba(var(--premium-accent-rgb), 0.2);
    transition: var(--premium-transition);
}
body.light-theme .play-btn {
    color: #ffffff !important;
}
.play-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(var(--premium-accent-rgb), 0.35);
    background: linear-gradient(135deg, var(--premium-accent-hover) 0%, var(--premium-accent) 100%) !important;
}
.play-btn.text-muted {
    background: rgba(0, 0, 0, 0.1) !important;
    color: var(--premium-text-muted) !important;
    box-shadow: none !important;
    border: 1px solid var(--premium-border) !important;
}
body.light-theme .play-btn.text-muted {
    background: #e5e7eb !important;
}

/* Rates sidebar list card styling */
.rate-card {
    border-radius: var(--premium-radius-md) !important;
    padding: 0.75rem 1rem !important;
    margin-bottom: 0.65rem !important;
    background: rgba(255, 255, 255, 0.01) !important;
    box-shadow: none !important;
}
body.light-theme .rate-card {
    background: rgba(0, 0, 0, 0.01) !important;
}
.rate-card .game {
    color: var(--premium-text-secondary) !important;
    font-weight: 500;
}
.rate-card span:last-child {
    color: var(--premium-accent);
}

/* Dynamic Game Category Cards in Play/Index */
.game-card {
    border: 1px solid var(--premium-border) !important;
    border-radius: var(--premium-radius-lg) !important;
    background-color: var(--premium-panel) !important;
    color: var(--premium-text-primary) !important;
    padding: 1.5rem 1rem !important;
    box-shadow: var(--premium-shadow) !important;
    transition: var(--premium-transition) !important;
}
.game-card:hover {
    transform: translateY(-5px) scale(1.02) !important;
    border-color: var(--premium-border-focus) !important;
    background-color: var(--premium-panel-hover) !important;
    color: var(--premium-accent) !important;
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.4), 0 0 15px rgba(var(--premium-accent-rgb), 0.1) !important;
}
.game-card .icon {
    font-size: 2.25rem !important;
    margin-bottom: 0.5rem !important;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

/* Premium Form Elements */
.form-control, .form-select {
    background-color: var(--premium-input-bg) !important;
    border: 1px solid var(--premium-border) !important;
    color: var(--premium-text-primary) !important;
    border-radius: var(--premium-radius-md) !important;
    padding: 0.65rem 1rem !important;
    transition: var(--premium-transition) !important;
}
.form-control:focus, .form-select:focus {
    background-color: var(--premium-input-bg) !important;
    border-color: var(--premium-accent) !important;
    box-shadow: 0 0 0 3px rgba(var(--premium-accent-rgb), 0.15) !important;
}
.form-label {
    font-weight: 500;
    color: var(--premium-text-secondary);
    margin-bottom: 0.5rem;
}
.input-group-text {
    background-color: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid var(--premium-border) !important;
    color: var(--premium-text-secondary) !important;
    border-radius: var(--premium-radius-md) !important;
}
body.light-theme .input-group-text {
    background-color: #f3f4f6 !important;
}

/* Checkbox and radio customization */
.form-check-input {
    background-color: var(--premium-input-bg) !important;
    border: 1px solid var(--premium-border) !important;
    cursor: pointer;
}
.form-check-input:checked {
    background-color: var(--premium-accent) !important;
    border-color: var(--premium-accent) !important;
}
.form-check-label {
    color: var(--premium-text-primary);
    font-weight: 500;
    cursor: pointer;
}

/* Premium Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--premium-accent) 0%, var(--premium-accent-hover) 100%) !important;
    border: none !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    border-radius: var(--premium-radius-md) !important;
    padding: 0.65rem 1.25rem !important;
    box-shadow: 0 4px 15px rgba(var(--premium-accent-rgb), 0.15) !important;
    transition: var(--premium-transition) !important;
}
.btn-primary:hover {
    background: linear-gradient(135deg, var(--premium-accent-hover) 0%, var(--premium-accent) 100%) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 20px rgba(var(--premium-accent-rgb), 0.25) !important;
}
.btn-success {
    background: linear-gradient(135deg, var(--premium-success) 0%, #00d2b4 100%) !important;
    border: none !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    border-radius: var(--premium-radius-md) !important;
    padding: 0.65rem 1.25rem !important;
    box-shadow: 0 4px 15px rgba(0, 245, 212, 0.15) !important;
    transition: var(--premium-transition) !important;
}
body.light-theme .btn-success {
    background: linear-gradient(135deg, var(--premium-success) 0%, #047857 100%) !important;
    box-shadow: 0 4px 15px rgba(5, 150, 105, 0.15) !important;
}
.btn-success:hover {
    transform: translateY(-1px) !important;
}
.btn-danger {
    background: linear-gradient(135deg, var(--premium-danger) 0%, #dc2626 100%) !important;
    border: none !important;
    color: #fff !important;
    font-weight: 600 !important;
    border-radius: var(--premium-radius-md) !important;
    padding: 0.65rem 1.25rem !important;
    transition: var(--premium-transition) !important;
}
.btn-danger:hover {
    transform: translateY(-1px) !important;
}
.btn-outline-secondary {
    border-color: var(--premium-border) !important;
    color: var(--premium-text-secondary) !important;
    border-radius: var(--premium-radius-md) !important;
}
.btn-outline-secondary:hover {
    background-color: rgba(255, 255, 255, 0.05) !important;
    color: var(--premium-text-primary) !important;
    border-color: var(--premium-text-secondary) !important;
}
body.light-theme .btn-outline-secondary:hover {
    background-color: #f3f4f6 !important;
}

/* Premium Tables - Highly Optimized to prevent text contrast/overlap issues */
body.premium-theme .table, 
body.premium-theme .table td, 
body.premium-theme .table th {
    color: var(--premium-text-primary) !important;
    border-color: var(--premium-border) !important;
}
.table th, .table td {
    padding: 1rem 0.75rem !important;
    border-bottom: 1px solid var(--premium-border) !important;
    word-break: break-word;
    vertical-align: middle;
}
body.premium-theme .table th {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    color: var(--premium-text-secondary) !important;
    background-color: rgba(0, 0, 0, 0.15) !important;
}
body.light-theme .table th {
    background-color: rgba(0, 0, 0, 0.03) !important;
}
.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(255, 255, 255, 0.01) !important;
}
body.light-theme .table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.01) !important;
}
.table-striped tbody tr:nth-of-type(even) {
    background-color: transparent !important;
}
.table-hover tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.02) !important;
}
body.light-theme .table-hover tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.02) !important;
}

/* Badges styling */
.badge {
    padding: 0.4rem 0.65rem !important;
    border-radius: 4px !important;
    font-weight: 600 !important;
}
.bg-success {
    background-color: var(--premium-success-bg) !important;
    color: var(--premium-success) !important;
    border: 1px solid rgba(var(--premium-success), 0.2);
}
.bg-danger {
    background-color: var(--premium-danger-bg) !important;
    color: var(--premium-danger) !important;
    border: 1px solid rgba(var(--premium-danger), 0.2);
}
.bg-secondary {
    background-color: rgba(255, 255, 255, 0.08) !important;
    color: var(--premium-text-secondary) !important;
    border: 1px solid var(--premium-border);
}
body.light-theme .bg-secondary {
    background-color: #f3f4f6 !important;
}
.bg-warning {
    background-color: rgba(var(--premium-accent-rgb), 0.12) !important;
    color: var(--premium-accent) !important;
    border: 1px solid rgba(var(--premium-accent-rgb), 0.25);
}

/* Alerts */
.alert {
    background-color: var(--premium-panel) !important;
    border: 1px solid var(--premium-border) !important;
    border-radius: var(--premium-radius-md) !important;
    color: var(--premium-text-primary) !important;
    padding: 1rem 1.25rem !important;
}
.alert-danger {
    background-color: var(--premium-danger-bg) !important;
    border-color: rgba(255, 93, 115, 0.2) !important;
    color: var(--premium-danger) !important;
}
body.light-theme .alert-danger {
    border-color: rgba(220, 38, 38, 0.2) !important;
}
.alert-success {
    background-color: var(--premium-success-bg) !important;
    border-color: rgba(0, 245, 212, 0.2) !important;
    color: var(--premium-success) !important;
}
body.light-theme .alert-success {
    border-color: rgba(5, 150, 105, 0.2) !important;
}

/* Custom Tree/Caret styles in Account List */
.caret {
    transition: var(--premium-transition);
    color: var(--premium-accent);
}

/* Mobile Sidebar Drawer Navigation */
.premium-drawer-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.65);
    z-index: 1001;
    backdrop-filter: blur(4px);
}

/* Chart badge links style */
.chart-links {
    font-size: 0.82rem;
    display: flex;
    gap: 0.5rem;
    align-items: center;
}
.chart-links a {
    color: var(--premium-accent) !important;
    text-decoration: none !important;
    font-weight: 600;
    background: rgba(var(--premium-accent-rgb), 0.08);
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    border: 1px solid rgba(var(--premium-accent-rgb), 0.15);
    transition: var(--premium-transition);
}
.chart-links a:hover {
    background: var(--premium-accent);
    color: #ffffff !important;
}
body.light-theme .chart-links a:hover {
    color: #ffffff !important;
}
.chart-links .text-muted {
    display: none; /* Hide the "|" separator since we are using flex gap badges */
}

/* Drill crumbs style in Report view */
.ar-crumb {
    color: var(--premium-accent) !important;
    text-decoration: none;
    font-weight: 500;
    transition: var(--premium-transition);
}
.ar-crumb:hover {
    color: var(--premium-text-primary) !important;
    text-decoration: underline;
}

/* Live Video Preview Styles */
video#preview, video#live {
    border: 1px solid var(--premium-border) !important;
    background-color: #0b0e14 !important;
    box-shadow: var(--premium-shadow);
    border-radius: var(--premium-radius-lg);
}
#offline {
    background-color: var(--premium-panel);
    border: 1px dashed var(--premium-border);
    border-radius: var(--premium-radius-lg);
    padding: 3rem 1.5rem !important;
}

/* Load Panel Premium Overrides */
.lp-tab {
    border-radius: var(--premium-radius-md) !important;
    border: 1px solid var(--premium-border) !important;
    padding: 0.75rem !important;
    box-shadow: var(--premium-shadow) !important;
    color: var(--premium-text-primary) !important;
    text-shadow: none !important;
    transition: var(--premium-transition) !important;
}
.lp-single {
    background: linear-gradient(135deg, rgba(75, 69, 209, 0.2) 0%, rgba(75, 69, 209, 0.05) 100%) !important;
    border-color: rgba(75, 69, 209, 0.3) !important;
}
.lp-jodi {
    background: linear-gradient(135deg, rgba(192, 102, 58, 0.2) 0%, rgba(192, 102, 58, 0.05) 100%) !important;
    border-color: rgba(192, 102, 58, 0.3) !important;
}
.lp-panna {
    background: linear-gradient(135deg, rgba(107, 98, 56, 0.2) 0%, rgba(107, 98, 56, 0.05) 100%) !important;
    border-color: rgba(107, 98, 56, 0.3) !important;
}
.lp-ld {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.01) 100%) !important;
    color: var(--premium-text-secondary) !important;
    border-color: var(--premium-border) !important;
}
body.light-theme .lp-ld {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.03) 0%, rgba(0, 0, 0, 0.005) 100%) !important;
}
.lp-total {
    background: linear-gradient(135deg, rgba(var(--premium-accent-rgb), 0.15) 0%, rgba(var(--premium-accent-rgb), 0.02) 100%) !important;
    color: var(--premium-accent) !important;
    border-color: rgba(var(--premium-accent-rgb), 0.3) !important;
}

.lp-grid {
    background: rgba(0, 0, 0, 0.25) !important;
    border: 1px solid var(--premium-border) !important;
    border-radius: var(--premium-radius-lg) !important;
    padding: 0.75rem !important;
}
body.light-theme .lp-grid {
    background: rgba(0, 0, 0, 0.01) !important;
}
.lp-single-grid {
    border-color: rgba(75, 69, 209, 0.2) !important;
}
.lp-jodi-grid {
    border-color: rgba(192, 102, 58, 0.2) !important;
}
.lp-panna-grid {
    border-color: rgba(107, 98, 56, 0.2) !important;
}

.lp-cell {
    background-color: var(--premium-panel) !important;
    border: 1px solid var(--premium-border) !important;
    border-radius: var(--premium-radius-md) !important;
    color: var(--premium-text-primary) !important;
    transition: var(--premium-transition) !important;
}
.lp-cell:hover {
    outline: none !important;
    border-color: var(--premium-accent) !important;
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5) !important;
    z-index: 10;
}
body.light-theme .lp-cell:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08) !important;
}
.lp-cell .num {
    color: var(--premium-text-secondary) !important;
    font-weight: 500;
}
.lp-cell .amt {
    color: var(--premium-success) !important;
}
.lp-cell.empty .amt {
    color: transparent !important;
}

/* Responsive adjustments */
@media (max-width: 991px) {
    .premium-sidebar {
        left: -280px; /* Hide sidebar offscreen on mobile */
        box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
    }
    
    .premium-sidebar.open {
        left: 0; /* Open drawer */
    }
    
    .premium-drawer-overlay.open {
        display: block;
    }
    
    .premium-main {
        margin-left: 0; /* Full width on mobile */
        padding-bottom: 64px; /* Space for bottom navbar */
    }
    
    .premium-topbar {
        padding: 0 1rem;
    }
    
    .premium-mobile-toggle {
        display: block; /* Hamburger button */
    }
    
    .premium-bottombar {
        display: flex; /* Show mobile bottom navbar */
    }
    
    .premium-content {
        padding: 1.25rem;
    }
}

@media (max-width: 767px) {
    .table th, .table td {
        padding: 0.6rem 0.4rem !important;
        font-size: 0.85rem;
    }
}

/* Subtle transitions and micro-animations */
@keyframes pulseGlow {
    0% { box-shadow: 0 0 5px rgba(var(--premium-accent-rgb), 0.2); }
    50% { box-shadow: 0 0 15px rgba(var(--premium-accent-rgb), 0.4); }
    100% { box-shadow: 0 0 5px rgba(var(--premium-accent-rgb), 0.2); }
}

.premium-brand-logo {
    animation: pulseGlow 3s infinite ease-in-out;
}
