/* ============================================
   8BMF8 - Design System Stylesheet
   ============================================ */

/* ============================================
   1. DESIGN TOKENS (CSS Variables)
   ============================================ */

:root {
    /* Colors - Background */
    --color-bg-body: #F5F7FA;
    --color-bg-surface: #FFFFFF;
    --color-bg-overlay: rgba(0, 0, 0, 0.5);

    /* Colors - Text */
    --color-text-primary: #1A1A1A;
    --color-text-secondary: #666666;
    --color-text-muted: #999999;

    /* Colors - Border */
    --color-border: #E0E0E0;
    --color-border-light: #F0F0F0;

    /* Colors - Accent/Brand */
    --color-accent: #4F46E5;
    --color-accent-hover: #4338CA;
    --color-accent-light: #EEF2FF;

    /* Colors - Semantic */
    --color-success: #1E8E3E;
    --color-success-bg: #E6F4EA;
    --color-danger: #D93025;
    --color-danger-bg: #FCE8E6;
    --color-warning: #E37400;
    --color-warning-bg: #FFF4E5;
    --color-info: #0D47A1;
    --color-info-bg: #E3F2FD;

    /* Typography */
    --font-family-base: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-family-mono: 'Courier New', Consolas, monospace;

    --font-size-xs: 0.75rem;
    /* 12px */
    --font-size-sm: 0.875rem;
    /* 14px */
    --font-size-base: 1rem;
    /* 16px */
    --font-size-lg: 1.125rem;
    /* 18px */
    --font-size-xl: 1.25rem;
    /* 20px */
    --font-size-2xl: 1.5rem;
    /* 24px */
    --font-size-3xl: 2rem;
    /* 32px */

    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;

    --line-height-tight: 1.25;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.75;

    /* Spacing */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-6: 24px;
    --space-8: 32px;
    --space-12: 48px;
    --space-16: 64px;
    --space-24: 96px;
    --space-32: 128px;

    /* Layout */
    --container-width: 1200px;
    --header-height: 70px;

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 200ms ease;
    --transition-slow: 300ms ease;
}

/* ============================================
   2. RESET & BASE STYLES
   ============================================ */

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

body {
    font-family: var(--font-family-base);
    font-size: var(--font-size-base);
    line-height: var(--line-height-normal);
    color: var(--color-text-primary);
    background-color: var(--color-bg-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

ul,
ol {
    list-style: none;
}

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

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ============================================
   3. TYPOGRAPHY
   ============================================ */

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: var(--font-weight-semibold);
    line-height: var(--line-height-tight);
    color: var(--color-text-primary);
}

h1 {
    font-size: var(--font-size-3xl);
}

h2 {
    font-size: var(--font-size-2xl);
}

h3 {
    font-size: var(--font-size-xl);
}

h4 {
    font-size: var(--font-size-lg);
}

p {
    margin-bottom: var(--space-4);
}

small {
    font-size: var(--font-size-sm);
}

/* Typography Utilities */
.text-xs {
    font-size: var(--font-size-xs);
}

.text-sm {
    font-size: var(--font-size-sm);
}

.text-lg {
    font-size: var(--font-size-lg);
}

.text-xl {
    font-size: var(--font-size-xl);
}

.text-2xl {
    font-size: var(--font-size-2xl);
}

.text-3xl {
    font-size: var(--font-size-3xl);
}

.text-muted {
    color: var(--color-text-secondary);
}

.text-center {
    text-align: center;
}

.font-normal {
    font-weight: var(--font-weight-normal);
}

.font-medium {
    font-weight: var(--font-weight-medium);
}

.font-bold {
    font-weight: var(--font-weight-semibold);
}

.font-mono {
    font-family: var(--font-family-mono);
}

/* ============================================
   4. LAYOUT UTILITIES
   ============================================ */

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--space-4);
}

/* Flexbox */
.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.flex-1 {
    flex: 1;
}

.items-start {
    align-items: flex-start;
}

.items-center {
    align-items: center;
}

.items-end {
    align-items: flex-end;
}

.justify-start {
    justify-content: flex-start;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-end {
    justify-content: flex-end;
}

/* Grid */
.grid {
    display: grid;
}

.grid-cols-1 {
    grid-template-columns: repeat(1, 1fr);
}

.grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Gap */
.gap-2 {
    gap: var(--space-2);
}

.gap-3 {
    gap: var(--space-3);
}

.gap-4 {
    gap: var(--space-4);
}

.gap-6 {
    gap: var(--space-6);
}

.gap-8 {
    gap: var(--space-8);
}

/* Spacing */
.mt-2 {
    margin-top: var(--space-2);
}

.mt-4 {
    margin-top: var(--space-4);
}

.mt-6 {
    margin-top: var(--space-6);
}

.mt-8 {
    margin-top: var(--space-8);
}

.mb-1 {
    margin-bottom: var(--space-1);
}

.mb-2 {
    margin-bottom: var(--space-2);
}

.mb-3 {
    margin-bottom: var(--space-3);
}

.mb-4 {
    margin-bottom: var(--space-4);
}

.mb-6 {
    margin-bottom: var(--space-6);
}

.mb-8 {
    margin-bottom: var(--space-8);
}

.p-2 {
    padding: var(--space-2);
}

.p-3 {
    padding: var(--space-3);
}

.p-4 {
    padding: var(--space-4);
}

.p-6 {
    padding: var(--space-6);
}

.py-2 {
    padding-top: var(--space-2);
    padding-bottom: var(--space-2);
}

.py-4 {
    padding-top: var(--space-4);
    padding-bottom: var(--space-4);
}

.py-8 {
    padding-top: var(--space-8);
    padding-bottom: var(--space-8);
}

.py-12 {
    padding-top: var(--space-12);
    padding-bottom: var(--space-12);
}

/* Width */
.w-full {
    width: 100%;
}

/* Misc */
.hidden {
    display: none;
}

.sticky {
    position: sticky;
}

.top-4 {
    top: var(--space-4);
}

.overflow-hidden {
    overflow: hidden;
}

/* ============================================
   5. COMPONENT CLASSES
   ============================================ */

/* ----- Buttons ----- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-2) var(--space-4);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    transition: all var(--transition-base);
    cursor: pointer;
    white-space: nowrap;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background-color: var(--color-accent);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background-color: var(--color-accent-hover);
}

.btn-secondary {
    background-color: transparent;
    border-color: var(--color-border);
    color: var(--color-text-primary);
}

.btn-secondary:hover:not(:disabled) {
    border-color: var(--color-text-secondary);
    background-color: var(--color-bg-body);
}

.btn-ghost {
    background-color: transparent;
    color: var(--color-accent);
}

.btn-ghost:hover:not(:disabled) {
    background-color: var(--color-accent-light);
}

.btn-sm {
    padding: var(--space-1) var(--space-3);
    font-size: var(--font-size-xs);
}

.btn-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0.5;
    color: inherit;
    padding: 0;
}

.btn-close:hover {
    opacity: 1;
}

/* ----- Cards & Surfaces ----- */
.card {
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-4);
}

.card--compact {
    padding: var(--space-3);
}

.card--highlight {
    border-color: var(--color-accent);
    box-shadow: var(--shadow-md);
}

.card-hero {
    padding: var(--space-6);
}

/* ----- Forms ----- */
.form-group {
    margin-bottom: var(--space-4);
}

.form-label {
    display: block;
    margin-bottom: var(--space-2);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    color: var(--color-text-primary);
}

.form-input,
.form-select {
    width: 100%;
    padding: var(--space-2) var(--space-3);
    font-size: var(--font-size-base);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background-color: var(--color-bg-surface);
    color: var(--color-text-primary);
    transition: border-color var(--transition-base);
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: var(--color-accent);
}

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

.form-error {
    margin-top: var(--space-1);
    font-size: var(--font-size-xs);
    color: var(--color-danger);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
}

/* ----- Pills & Badges ----- */
.pill {
    display: inline-flex;
    align-items: center;
    padding: var(--space-1) var(--space-3);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    border-radius: var(--radius-full);
    background: var(--color-bg-body);
    border: 1px solid var(--color-border);
}

.pill--success {
    background: var(--color-success-bg);
    color: var(--color-success);
    border-color: var(--color-success-bg);
}

.pill--warning {
    background: var(--color-warning-bg);
    color: var(--color-warning);
    border-color: var(--color-warning-bg);
}

.pill--danger {
    background: var(--color-danger-bg);
    color: var(--color-danger);
    border-color: var(--color-danger-bg);
}

/* Status Pills */
.status-pill {
    display: inline-block;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-bold);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-pill.status-new {
    background: var(--color-success-bg);
    color: var(--color-success);
}

.status-pill.status-hot {
    background: var(--color-danger-bg);
    color: var(--color-danger);
}

.status-pill.status-low {
    background: var(--color-warning-bg);
    color: var(--color-warning);
}

.status-pill.status-active {
    background: var(--color-success-bg);
    color: var(--color-success);
}

.status-pill.status-locked {
    background: var(--color-warning-bg);
    color: var(--color-warning);
}

.status-pill.status-won {
    background: var(--color-success-bg);
    color: var(--color-success);
}

.status-pill.status-pending {
    background: var(--color-warning-bg);
    color: var(--color-warning);
}

.status-pill.status-expired {
    background: #F5F5F5;
    color: #5F6368;
}

/* Tags */
.tag {
    display: inline-block;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-semibold);
    text-transform: uppercase;
}

.tag-accent {
    background: var(--color-accent-light);
    color: var(--color-accent);
}

/* ----- Notification Banners ----- */
.notification-banner {
    padding: var(--space-4);
    border-radius: var(--radius-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid transparent;
}

.notification-banner--info {
    background-color: var(--color-info-bg);
    border-color: #BBDEFB;
    color: var(--color-info);
}

.notification-banner--success {
    background-color: var(--color-success-bg);
    border-color: #C8E6C9;
    color: #1B5E20;
}

.notification-banner--warning {
    background-color: var(--color-warning-bg);
    border-color: #FFE0B2;
    color: #E65100;
}

.notification-banner--error {
    background-color: #FFEBEE;
    border-color: #FFCDD2;
    color: #B71C1C;
}

/* ----- Progress Bar ----- */
.progress-bar {
    height: 4px;
    background: var(--color-bg-body);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--color-accent);
    border-radius: var(--radius-sm);
    transition: width var(--transition-slow);
}

/* ============================================
   6. LAYOUT COMPONENTS
   ============================================ */

/* ----- Page Header ----- */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-6);
    padding-bottom: var(--space-4);
    border-bottom: 1px solid var(--color-border);
}

.section-title {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-semibold);
    margin-bottom: var(--space-6);
}

/* ----- Two Column Layout ----- */
.layout-two-column {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: var(--space-8);
}

@media (max-width: 768px) {
    .layout-two-column {
        grid-template-columns: 1fr;
    }
}

/* ----- Detail Layout ----- */
.layout-detail {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: var(--space-8);
}

@media (max-width: 768px) {
    .layout-detail {
        grid-template-columns: 1fr;
    }
}

/* ----- Main Header & Navigation ----- */
/* ----- Main Header & Navigation ----- */
.main-header {
    background: var(--color-bg-surface);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

.header-inner {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    height: 72px;
}

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

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo-mark {
    width: 32px;
    height: 32px;
    background: var(--color-accent);
    border-radius: var(--radius-sm);
    display: block;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text-primary);
}

/* Navigation */
.main-nav {
    display: flex;
    gap: 16px;
}

.nav-link {
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-secondary);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.nav-link:hover {
    color: var(--color-accent);
    background: var(--color-accent-light);
}

.nav-link--active {
    color: var(--color-accent);
    font-weight: 600;
}

/* Header Balance */
.header-balance {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--color-bg-body);
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid var(--color-border);
}

.balance-label {
    font-size: 12px;
    color: var(--color-text-secondary);
}

.balance-value {
    font-size: 14px;
    font-weight: 700;
    color: var(--color-text-primary);
}

/* Header User */
.header-user {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px;
    border-radius: var(--radius-full);
    transition: background 0.2s;
    cursor: pointer;
}

.header-user:hover {
    background: var(--color-bg-body);
}

.user-avatar {
    width: 32px;
    height: 32px;
    background: #e0e0e0;
    border-radius: 50%;
}

.user-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-primary);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .header-inner {
        flex-wrap: wrap;
        height: auto;
        padding: 12px 16px;
        gap: 12px;
    }

    .main-nav {
        order: 3;
        width: 100%;
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .header-right {
        margin-left: auto;
    }

    .user-name,
    .balance-label {
        display: none;
    }
}

/* ----- Footer ----- */
.site-footer {
    background: var(--color-bg-surface);
    border-top: 1px solid var(--color-border);
    padding: var(--space-8) 0;
    margin-top: var(--space-8);
    color: var(--color-text-secondary);
}

/* ============================================
   7. PAGE-SPECIFIC COMPONENTS
   ============================================ */

/* ----- Lobby / Hero Grid ----- */
.hero-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--space-6);
    margin-bottom: var(--space-8);
}

@media (max-width: 1024px) {
    .hero-grid {
        grid-template-columns: 1fr;
    }
}

/* ----- Competition Grid ----- */
.comp-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-6);
}

@media (max-width: 1024px) {
    .comp-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .comp-grid {
        grid-template-columns: 1fr;
    }
}

/* ----- Filters Sidebar ----- */
.filters {
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-4);
}

.filter-group {
    margin-bottom: var(--space-6);
    padding-bottom: var(--space-4);
    border-bottom: 1px solid var(--color-border);
}

.filter-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.filter-group h4 {
    font-size: var(--font-size-sm);
    margin-bottom: var(--space-2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-text-secondary);
}

.filter-label {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-2);
    font-size: var(--font-size-sm);
    cursor: pointer;
    color: var(--color-text-primary);
}

.filter-label input[type="checkbox"],
.filter-label input[type="radio"] {
    accent-color: var(--color-accent);
}

/* ----- Competitions List ----- */
.competitions-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
}

.list-controls {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-4);
}

.sort-select {
    padding: var(--space-1) var(--space-2);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-bg-surface);
    color: var(--color-text-primary);
}

/* ----- Pagination ----- */
.pagination {
    display: flex;
    justify-content: center;
    gap: var(--space-2);
    margin-top: var(--space-8);
}

/* ----- Purchase Panel ----- */
.purchase-panel {
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-4);
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.qty-btn {
    width: 36px;
    height: 36px;
    border: 1px solid var(--color-border);
    background: var(--color-bg-body);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    cursor: pointer;
}

.qty-input {
    width: 60px;
    height: 36px;
    text-align: center;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-weight: 600;
}

.quick-qty-btn {
    padding: var(--space-1) var(--space-3);
    border: 1px solid var(--color-border);
    background: var(--color-bg-body);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-xs);
    cursor: pointer;
}

.total-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-4);
    background: var(--color-bg-body);
    border-radius: var(--radius-sm);
    font-weight: 600;
}

/* ----- Info Sections ----- */
.info-section {
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-6);
    margin-bottom: var(--space-6);
}

.info-section h3 {
    font-size: var(--font-size-lg);
    margin-bottom: var(--space-4);
    padding-bottom: var(--space-2);
    border-bottom: 1px solid var(--color-border);
}

/* ----- Tickets ----- */
.tickets-tabs {
    display: flex;
    gap: var(--space-2);
    margin-bottom: var(--space-6);
    border-bottom: 2px solid var(--color-border);
}

.tickets-tab {
    padding: var(--space-3) var(--space-4);
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    color: var(--color-text-secondary);
    font-weight: var(--font-weight-medium);
    transition: all var(--transition-base);
}

.tickets-tab:hover {
    color: var(--color-accent);
}

.tickets-tab--active {
    color: var(--color-accent);
    border-bottom-color: var(--color-accent);
    font-weight: var(--font-weight-semibold);
}

.tickets-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.ticket-item {
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-6);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ticket-won {
    border-left: 4px solid var(--color-success);
}

.ticket-expired {
    opacity: 0.7;
}

.ticket-numbers-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: var(--space-2);
}

.ticket-number {
    padding: var(--space-2);
    background: var(--color-bg-body);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    text-align: center;
    font-weight: 600;
    font-size: var(--font-size-sm);
}

/* ----- Cart ----- */
.cart-items {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.cart-item {
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-6);
}

.empty-cart {
    text-align: center;
    padding: var(--space-8);
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
}

/* ----- Payment Methods ----- */
.payment-methods {
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-6);
    margin-bottom: var(--space-6);
}

.method-option {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-3);
    cursor: pointer;
    transition: all var(--transition-base);
}

.method-option:hover {
    border-color: var(--color-accent);
}

.method-option input[type='radio'] {
    accent-color: var(--color-accent);
}

/* ----- Wallet / Transactions Table ----- */
.transactions-table {
    overflow-x: auto;
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-6);
}

.wallet-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.wallet-table th,
.wallet-table td {
    padding: var(--space-4);
    text-align: left;
    border-bottom: 1px solid var(--color-border);
}

.wallet-table th {
    background: var(--color-bg-body);
    font-weight: var(--font-weight-semibold);
    color: var(--color-text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
}

.qty-input {
    width: 60px;
    height: 36px;
    text-align: center;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-weight: 600;
}

.quick-qty-btn {
    padding: var(--space-1) var(--space-3);
    border: 1px solid var(--color-border);
    background: var(--color-bg-body);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-xs);
    cursor: pointer;
}

.total-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-4);
    background: var(--color-bg-body);
    border-radius: var(--radius-sm);
    font-weight: 600;
}

/* ----- Info Sections ----- */
.info-section {
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-6);
    margin-bottom: var(--space-6);
}

.info-section h3 {
    font-size: var(--font-size-lg);
    margin-bottom: var(--space-4);
    padding-bottom: var(--space-2);
    border-bottom: 1px solid var(--color-border);
}

/* ----- Tickets ----- */
.tickets-tabs {
    display: flex;
    gap: var(--space-2);
    margin-bottom: var(--space-6);
    border-bottom: 2px solid var(--color-border);
}

.tickets-tab {
    padding: var(--space-3) var(--space-4);
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    color: var(--color-text-secondary);
    font-weight: var(--font-weight-medium);
    transition: all var(--transition-base);
}

.tickets-tab:hover {
    color: var(--color-accent);
}

.tickets-tab--active {
    color: var(--color-accent);
    border-bottom-color: var(--color-accent);
    font-weight: var(--font-weight-semibold);
}

.tickets-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.ticket-item {
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-6);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ticket-won {
    border-left: 4px solid var(--color-success);
}

.ticket-expired {
    opacity: 0.7;
}

.ticket-numbers-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: var(--space-2);
}

.ticket-number {
    padding: var(--space-2);
    background: var(--color-bg-body);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    text-align: center;
    font-weight: 600;
    font-size: var(--font-size-sm);
}

/* ----- Cart ----- */
.cart-items {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.cart-item {
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-6);
}

.empty-cart {
    text-align: center;
    padding: var(--space-8);
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
}

/* ----- Payment Methods ----- */
.payment-methods {
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-6);
    margin-bottom: var(--space-6);
}

.method-option {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-3);
    cursor: pointer;
    transition: all var(--transition-base);
}

.method-option:hover {
    border-color: var(--color-accent);
}

.method-option input[type='radio'] {
    accent-color: var(--color-accent);
}

/* ----- Wallet / Transactions Table ----- */
.transactions-table {
    overflow-x: auto;
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-6);
}

.wallet-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.wallet-table th,
.wallet-table td {
    padding: var(--space-4);
    text-align: left;
    border-bottom: 1px solid var(--color-border);
}

.wallet-table th {
    background: var(--color-bg-body);
    font-weight: var(--font-weight-semibold);
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wallet-table tr:last-child td {
    border-bottom: none;
}

.wallet-table tr:hover td {
    background-color: #F9F9F9;
}

/* ----- Misc Components ----- */
.checkbox-label {
    display: flex;
    align-items: center;

    .md\:grid-cols-3 {
        grid-template-columns: repeat(3, 1fr);
    }

    .md\:col-span-2 {
        grid-column: span 2;
    }
}

@media (max-width: 640px) {
    .sm\:grid-cols-1 {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   9. UTILITY CLASSES
   ============================================ */

.hover\:underline:hover {
    text-decoration: underline;
}

.hover\:bg-gray-50:hover {
    background-color: #F9FAFB;
}

.hover\:bg-gray-200:hover {
    background-color: #E5E7EB;
}

.transition-all {
    transition: all var(--transition-base);
}

.cursor-pointer {
    cursor: pointer;
}

.opacity-50 {
    opacity: 0.5;
}

.opacity-75 {
    opacity: 0.75;
}

.line-through {
    text-decoration: line-through;
}

.whitespace-nowrap {
    white-space: nowrap;
}

.space-y-2>*+* {
    margin-top: var(--space-2);
}

.space-y-3>*+* {
    margin-top: var(--space-3);
}

.space-y-4>*+* {
    margin-top: var(--space-4);
}

.items-start {
    align-items: flex-start;
}

.flex-shrink-0 {
    flex-shrink: 0;
}

.border {
    border: 1px solid var(--color-border);
}

.border-2 {
    border-width: 2px;
}

.border-b {
    border-bottom: 1px solid var(--color-border);
}

.border-t {
    border-top: 1px solid var(--color-border);
}

.rounded {
    border-radius: var(--radius-sm);
}

.rounded-lg {
    border-radius: var(--radius-md);
}

.rounded-full {
    border-radius: var(--radius-full);
}

.shadow-sm {
    box-shadow: var(--shadow-sm);
}

.shadow-lg {
    box-shadow: var(--shadow-lg);
}

.transform {
    transform: translateZ(0);
}

.hover\:-translate-y-0\.5:hover {
    transform: translateY(-2px);
}

.hover\:shadow-xl:hover {
    box-shadow: var(--shadow-lg);
}

/* ============================================
   10. RESPONSIVE BREAKPOINTS
   ============================================ */

/* ----- TABLET: 768px - 1199px ----- */
@media (max-width: 1199px) {

    /* Typography adjustments */
    h1 {
        font-size: 1.75rem;
        /* Slightly smaller */
    }

    h2 {
        font-size: 1.375rem;
    }

    /* Container padding */
    .container {
        padding: 0 var(--space-3);
    }

    /* Hero grid - stack on tablet */
    .hero-grid {
        grid-template-columns: 1fr;
        gap: var(--space-4);
    }

    /* Competition grid - 3 columns on tablet */
    .comp-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-4);
    }

    /* Layout detail - adjust ratio */
    .layout-detail {
        grid-template-columns: 1.2fr 1fr;
        gap: var(--space-6);
    }

    /* Two column layout - adjust sidebar width */
    .layout-two-column {
        grid-template-columns: 220px 1fr;
        gap: var(--space-6);
    }

    /* Header navigation - wrap if needed */
    .main-header nav {
        flex-wrap: wrap;
        gap: var(--space-1);
    }

    .nav-link {
        padding: var(--space-1) var(--space-2);
        font-size: 0.8rem;
    }
}

/* ----- MOBILE: ≤ 767px ----- */
@media (max-width: 767px) {

    /* ===== TYPOGRAPHY ===== */
    :root {
        --font-size-3xl: 1.5rem;
        /* Reduce from 2rem */
        --font-size-2xl: 1.25rem;
        /* Reduce from 1.5rem */
        --font-size-xl: 1.125rem;
        /* Reduce from 1.25rem */
    }

    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.25rem;
    }

    h3 {
        font-size: 1.125rem;
    }

    /* ===== LAYOUT ===== */
    .container {
        padding: 0 var(--space-3);
    }

    /* Stack all multi-column layouts */
    .hero-grid,
    .layout-detail,
    .layout-two-column {
        grid-template-columns: 1fr;
        gap: var(--space-4);
    }

    /* Competition grid - single column */
    .comp-grid {
        grid-template-columns: 1fr;
        gap: var(--space-4);
    }

    /* Form rows - stack vertically */
    .form-row {
        grid-template-columns: 1fr;
        gap: var(--space-3);
    }

    /* ===== HEADER & NAVIGATION ===== */
    .main-header {
        padding: var(--space-3) 0;
    }

    .main-header .container {
        flex-direction: column;
        gap: var(--space-3);
        align-items: stretch;
    }

    /* Logo section */
    .main-header .container>a {
        justify-content: center;
    }

    /* Navigation - stack or wrap */
    .main-header nav {
        flex-direction: column;
        gap: var(--space-1);
        width: 100%;
    }

    .nav-link {
        padding: var(--space-2);
        text-align: center;
        width: 100%;
    }

    /* User section - center and stack */
    .main-header .container>div:last-child {
        flex-direction: column;
        gap: var(--space-2);
        align-items: stretch;
    }

    .main-header .pill {
        justify-content: center;
    }

    /* ===== BUTTONS ===== */
    .btn {
        width: 100%;
        justify-content: center;
        min-height: 44px;
        /* Touch-friendly */
    }

    .btn-sm {
        min-height: 36px;
    }

    /* Button groups - stack */
    .flex.gap-2>.btn,
    .flex.gap-3>.btn,
    .flex.gap-4>.btn {
        width: 100%;
    }

    /* ===== CARDS ===== */
    .card {
        padding: var(--space-3);
    }

    .card-hero {
        padding: var(--space-4);
    }

    /* ===== PAGE HEADER ===== */
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-3);
    }

    /* ===== FILTERS ===== */
    .filters {
        position: static;
        margin-bottom: var(--space-4);
    }

    .filter-group {
        margin-bottom: var(--space-4);
        padding-bottom: var(--space-3);
    }

    /* ===== TICKETS ===== */
    .tickets-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .tickets-tab {
        white-space: nowrap;
        padding: var(--space-2) var(--space-3);
    }

    .ticket-item {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-3);
        padding: var(--space-4);
    }

    .ticket-actions {
        width: 100%;
        align-items: stretch;
    }

    .ticket-actions .btn {
        width: 100%;
    }

    .ticket-numbers-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* ===== TABLES ===== */
    .wallet-table {
        font-size: var(--font-size-sm);
    }

    .wallet-table th,
    .wallet-table td {
        padding: var(--space-2) var(--space-3);
    }

    /* Hide less important columns on mobile */
    .wallet-table th:nth-child(3),
    .wallet-table td:nth-child(3),
    .wallet-table th:nth-child(4),
    .wallet-table td:nth-child(4) {
        display: none;
    }

    /* ===== CART & PAYMENT ===== */
    .cart-item {
        padding: var(--space-4);
    }

    .cart-item-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-2);
    }

    .cart-quantity {
        width: 100%;
        justify-content: space-between;
    }

    .line-total {
        width: 100%;
        justify-content: space-between;
        font-size: var(--font-size-lg);
    }

    /* Payment methods */
    .method-option {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-2);
    }

    /* ===== PURCHASE PANEL ===== */
    .purchase-panel {
        position: static;
        margin-top: var(--space-6);
    }

    .quantity-selector {
        justify-content: center;
    }

    .quick-qty-btn {
        flex: 1;
        min-width: 0;
    }

    /* ===== COMPETITION DETAIL ===== */
    .info-section {
        padding: var(--space-4);
    }

    /* ===== PAGINATION ===== */
    .pagination {
        flex-wrap: wrap;
        gap: var(--space-1);
    }

    /* ===== CONFIRMATION ===== */
    .next-actions {
        grid-template-columns: 1fr;
    }

    .action-card {
        padding: var(--space-4);
    }

    /* ===== WALLET ===== */
    .transactions-table {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* ===== SPACING ADJUSTMENTS ===== */
    .mb-8 {
        margin-bottom: var(--space-6);
    }

    .mt-8 {
        margin-top: var(--space-6);
    }

    .gap-6 {
        gap: var(--space-4);
    }

    .gap-8 {
        gap: var(--space-4);
    }

    /* ===== FOOTER ===== */
    .site-footer {
        padding: var(--space-6) 0;
    }

    .site-footer .container {
        flex-direction: column;
        gap: var(--space-4);
        text-align: center;
    }

    .site-footer .flex {
        flex-direction: column;
        gap: var(--space-2);
    }

    /* ===== MISC ===== */
    /* List controls */
    .list-controls,
    .tickets-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .sort-select {
        width: 100%;
    }

    /* Notification banners */
    .notification-banner {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-2);
    }

    .btn-close {
        align-self: flex-end;
    }

    /* Detail rows */
    .detail-row {
        flex-direction: column;
        gap: var(--space-1);
        align-items: flex-start;
    }

    /* Prize info */
    .prize-info {
        flex-direction: column;
        align-items: flex-start;
    }

    /* Sticky elements - disable on mobile */
    .sticky {
        position: static;
    }
}

/* ----- SMALL MOBILE: ≤ 480px ----- */
@media (max-width: 480px) {

    /* Further reduce typography */
    h1 {
        font-size: 1.375rem;
    }

    h2 {
        font-size: 1.125rem;
    }

    /* Tighter spacing */
    .container {
        padding: 0 var(--space-2);
    }

    .card {
        padding: var(--space-2);
    }

    /* Ticket numbers - 2 columns */
    .ticket-numbers-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Competition grid items */
    .comp-grid .card {
        padding: var(--space-3);
    }
}

/* ============================================
   END OF STYLESHEET
   ============================================ */
/* Page Headers */
.page-header {
    margin-bottom: var(--space-6);
    padding-bottom: var(--space-4);
    border-bottom: 1px solid var(--color-border);
}

.page-header h1 {
    font-size: var(--font-size-2xl);
    margin-bottom: var(--space-2);
}

/* Section Spacing */
.section {
    margin-bottom: var(--space-8);
}

.section--tight {
    margin-bottom: var(--space-4);
}

/* Form Groups - Standardize */
.form-group {
    margin-bottom: var(--space-4);
}

.form-label {
    display: block;
    margin-bottom: var(--space-2);
    font-weight: var(--font-weight-medium);
    font-size: var(--font-size-sm);
    color: var(--color-text-primary);
}

.form-input,
.form-select {
    width: 100%;
    padding: var(--space-3);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: var(--font-size-base);
    transition: border-color var(--transition-fast);
}

.form-input:focus,
.form-select:focus {
    border-color: var(--color-accent);
    outline: none;
    box-shadow: 0 0 0 3px var(--color-accent-light);
}

/* Step Indicator (for Cart/Payment) */
.step-indicator {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
}

.step-item.step-active {
    color: var(--color-accent);
    font-weight: var(--font-weight-bold);
}

.step-separator {
    color: var(--color-text-muted);
}

/* ============================================
   SITEMAP STYLES
   ============================================ */

.sitemap-wrapper {
    width: 100%;
}

.sitemap-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: var(--space-6);
}

@media (min-width: 768px) {
    .sitemap-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .sitemap-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.sitemap-section {
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-6);
    box-shadow: var(--shadow-sm);
    height: 100%;
}

.sitemap-section-title {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-bold);
    color: var(--color-text-primary);
    margin-top: 0;
    margin-bottom: var(--space-4);
    padding-bottom: var(--space-2);
    border-bottom: 2px solid var(--color-accent-light);
}

.sitemap-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sitemap-item {
    margin-bottom: var(--space-3);
}

.sitemap-item:last-child {
    margin-bottom: 0;
}

.sitemap-link {
    display: block;
    color: var(--color-text-primary);
    text-decoration: none;
    font-weight: var(--font-weight-medium);
    transition: color var(--transition-fast);
}

.sitemap-link:hover {
    color: var(--color-accent);
    text-decoration: underline;
}

.sitemap-link-note {
    display: block;
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
    margin-top: 2px;
}

.sitemap-intro {
    background: var(--color-bg-surface);
    border: 1px solid var(--color-info);
    background-color: var(--color-info-bg);
    color: var(--color-info);
    padding: var(--space-3);
    border-radius: var(--radius-sm);
    display: inline-block;
    font-size: var(--font-size-sm);
}

/* ============================================
   7. PAGE SPECIFIC STYLES
   ============================================ */

/* Lobby First Time - Featured Grid */
.lobby-featured-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 16px;
}

@media (max-width: 991px) {
    .lobby-featured-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .lobby-featured-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   8. BREADCRUMBS
   ============================================ */

.breadcrumb {
    font-size: 0.85rem;
    margin-bottom: 12px;
    color: var(--color-text-secondary);
}

.breadcrumb-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0;
    margin: 0;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
}

.breadcrumb-item+.breadcrumb-item::before {
    content: "›";
    padding: 0 4px;
    color: var(--color-text-muted, var(--color-text-secondary));
}

.breadcrumb a {
    text-decoration: none;
    color: var(--color-text-secondary);
}

.breadcrumb a:hover {
    text-decoration: underline;
    color: var(--color-text-primary);
}

.breadcrumb-item--current {
    font-weight: 500;
    color: var(--color-text-primary);
}

/* ============================================
   Competition Detail Layout
   ============================================ */

.competition-detail-page {
    padding-top: 24px;
    padding-bottom: 40px;
}

.competition-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
}

.competition-header-meta {
    display: flex;
    align-items: center;
    gap: 8px;
}

.competition-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 24px;
}

.competition-main {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.competition-media-card {
    padding: 0;
    overflow: hidden;
}

.competition-image-placeholder {
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f0f0f0;
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    width: 100%;
}

.competition-info-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.competition-meta-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 0.9rem;
}

.competition-purchase-panel {
    align-self: flex-start;
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: sticky;
    top: 24px;
}

.purchase-title {
    font-size: 1.1rem;
    font-weight: 600;
}

.purchase-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text-primary);
}

.purchase-price-note {
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--color-text-secondary);
    margin-left: 4px;
}

.purchase-quantity {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 8px;
}

.purchase-quantity-control {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.purchase-quantity-control .qty-btn {
    border: none;
    border-radius: 0;
    background: var(--color-bg-surface);
    height: 40px;
    width: 40px;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.purchase-quantity-control .qty-btn:hover {
    background-color: var(--color-bg-body);
}

.purchase-quantity-control input {
    border: none;
    border-radius: 0;
    text-align: center;
    height: 40px;
    width: 100%;
    font-size: 1.1rem;
    /* remove inner border if any */
    border-left: 1px solid var(--color-border);
    border-right: 1px solid var(--color-border);
}

.purchase-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    padding-top: 12px;
    border-top: 1px solid var(--color-border);
    margin-bottom: 8px;
}

.btn--full {
    width: 100%;
}

.purchase-note {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    text-align: center;
}

.purchase-safe {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    background-color: var(--color-bg-body);
    padding: 8px;
    border-radius: var(--radius-sm);
}

@media (max-width: 991px) {
    .competition-layout {
        grid-template-columns: 1fr;
    }

    .competition-purchase-panel {
        position: static;
        order: 2;
    }

    .competition-main {
        order: 1;
    }
}

/* ============================================
   SKILL QUESTION PAGE STYLES
   ============================================ */

.skill-question-page {
    padding-top: 24px;
    padding-bottom: 40px;
}

.skill-question-layout {
    max-width: 640px;
    margin: 0 auto;
}

.skill-question-card {
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.skill-question-header {
    display: flex;
    flex-direction: column;
    gap: 4px;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 8px;
}

.skill-question-competition-name {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
}

.skill-question-hint {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
}

.skill-question-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.skill-question-text h2 {
    font-size: 1.1rem;
    margin: 0;
}

.skill-question-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.skill-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid var(--color-border);
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.skill-option input[type="radio"] {
    margin: 0;
}

.skill-option span {
    font-size: 0.95rem;
}

.skill-option:hover {
    background-color: var(--color-bg-body);
    /* using body bg as alt surface */
    border-color: var(--color-accent);
}

.skill-question-note {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
}

.skill-question-actions {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.skill-question-actions .btn {
    min-width: 180px;
}

.skill-question-error {
    font-size: 0.85rem;
    color: var(--color-danger);
    background: var(--color-danger-bg);
    padding: 8px;
    border-radius: 4px;
}

.checkout-step-indicator {
    font-size: 0.8rem;
    text-align: right;
    color: var(--color-text-secondary);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

@media (max-width: 600px) {
    .checkout-step-indicator {
        text-align: left;
        margin-top: 8px;
    }
}

/* ============================================
   WALLET & TRANSACTIONS
   ============================================ */

@media (max-width: 768px) {
    .wallet-summary-grid {
        grid-template-columns: 1fr;
    }
}

.wallet-summary-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 120px;
}

.wallet-summary-label {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-2);
    font-weight: var(--font-weight-medium);
}

.wallet-summary-amount {
    font-size: var(--font-size-3xl);
    font-weight: var(--font-weight-bold);
    color: var(--color-text-primary);
    margin-bottom: var(--space-1);
    letter-spacing: -0.5px;
}

.wallet-summary-note {
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
    margin: 0;
}

/* Transactions List (Card view) */
.transactions-list {
    display: flex;
    flex-direction: column;
}

.transaction-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-4);
    border-bottom: 1px solid var(--color-border-light);
    transition: background-color var(--transition-fast);
}

.transaction-row:last-child {
    border-bottom: none;
}

.transaction-row:hover {
    background-color: var(--color-bg-body);
}

.transaction-main {
    flex: 1;
}

.transaction-title {
    font-weight: var(--font-weight-medium);
    margin-bottom: 2px;
}

.transaction-description {
    font-size: var(--font-size-xs);
    color: var(--color-text-secondary);
}

.transaction-meta {
    text-align: right;
}

.transaction-amount {
    font-weight: var(--font-weight-bold);
    font-family: var(--font-family-mono);
    margin-bottom: 2px;
}

.transaction-amount--positive {
    color: var(--color-success);
}

.transaction-amount--negative {
    color: var(--color-text-primary);
}

.transaction-status-pill {
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    background: var(--color-bg-body);
    border: 1px solid var(--color-border);
    text-transform: uppercase;
}

.transaction-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--color-bg-body);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-right: var(--space-3);
    flex-shrink: 0;
}

/* Wallet History Table */
.wallet-table {
    width: 100%;
    border-collapse: collapse;
}

.wallet-table th {
    text-align: left;
    padding: var(--space-3) var(--space-4);
    border-bottom: 2px solid var(--color-border);
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    font-weight: var(--font-weight-semibold);
    white-space: nowrap;
}

.wallet-table td {
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid var(--color-border-light);
    font-size: var(--font-size-sm);
    vertical-align: middle;
}

.wallet-table tr:last-child td {
    border-bottom: none;
}

.tx-type {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: var(--font-weight-medium);
}

/* Amounts */
.amount {
    font-weight: var(--font-weight-medium);
    font-family: var(--font-family-mono);
}

.amount.positive {
    color: var(--color-success);
}

.amount.negative {
    color: var(--color-text-primary);
}

/* Payment Methods Grid */
.payment-methods {
    margin-bottom: var(--space-6);
}

.amount-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-3);
}

.amount-btn {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: var(--space-3);
    text-align: center;
    background: var(--color-bg-surface);
    font-weight: var(--font-weight-medium);
    transition: all var(--transition-fast);
}

.amount-btn:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.amount-btn--active {
    border-color: var(--color-accent);
    background-color: var(--color-accent-light);
    color: var(--color-accent);
    font-weight: var(--font-weight-bold);
}

.method-option {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-4);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    margin-bottom: var(--space-2);
    font-size: var(--font-size-sm);
}

.summary-total {
    margin-top: var(--space-4);
    padding-top: var(--space-4);
    border-top: 1px solid var(--color-border);
    font-weight: var(--font-weight-bold);
    font-size: var(--font-size-lg);
}

/* Steps (Timeline) */
.status-timeline {
    position: relative;
    padding-left: var(--space-4);
    border-left: 2px solid var(--color-border-light);
    margin-top: var(--space-4);
    margin-left: var(--space-2);
}

.timeline-item {
    position: relative;
    padding-bottom: var(--space-6);
    padding-left: var(--space-4);
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -21px;
    /* Adjust based on border/padding */
    top: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--color-bg-body);
    border: 2px solid var(--color-border);
}

.timeline-item.active .timeline-dot {
    background: var(--color-accent);
    border-color: var(--color-accent);
    box-shadow: 0 0 0 4px var(--color-accent-light);
}

.timeline-item.completed .timeline-dot {
    background: var(--color-success);
    border-color: var(--color-success);
}

/* ============================================
   RESPONSIBLE GAMING & LEGAL
   ============================================ */
.legal-page {
    max-width: 900px;
    margin: 0 auto;
}

.legal-content {
    line-height: 1.7;
    color: var(--color-text-primary);
}

.legal-content h2 {
    font-size: 1.5rem;
    font-weight: var(--font-weight-bold);
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--color-text-primary);
}

.legal-content h3 {
    font-size: 1.25rem;
    font-weight: var(--font-weight-semibold);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.legal-content p {
    margin-bottom: 1rem;
    color: var(--color-text-secondary);
}

.legal-content ul {
    list-style-type: disc;
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--color-text-secondary);
}

.legal-content li {
    margin-bottom: 0.5rem;
}

.rg-hero {
    background-color: var(--color-bg-surface);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    text-align: center;
    margin-bottom: 2rem;
    border: 1px solid var(--color-border);
}

.rg-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.rg-card {
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: var(--color-bg-surface);
    transition: transform 0.2s, box-shadow 0.2s;
}

.rg-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--color-accent);
}

.rg-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--color-accent);
}

.rg-title {
    font-size: 1.1rem;
    font-weight: var(--font-weight-bold);
    margin-bottom: 0.5rem;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    background: var(--color-bg-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    overflow: hidden;
}

.sidebar-nav-link {
    display: flex;
    align-items: center;
    padding: 1rem 1.25rem;
    color: var(--color-text-secondary);
    border-bottom: 1px solid var(--color-border-light);
    transition: background-color 0.2s;
    text-decoration: none;
    font-weight: 500;
}

.sidebar-nav-link:last-child {
    border-bottom: none;
}

.sidebar-nav-link:hover {
    background-color: var(--color-bg-body);
    color: var(--color-text-primary);
}

.sidebar-nav-link--active {
    background-color: var(--color-accent-light);
    color: var(--color-accent);
    border-left: 3px solid var(--color-accent);
    padding-left: calc(1.25rem - 3px);
}

.account-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
}

@media (max-width: 768px) {
    .account-layout {
        grid-template-columns: 1fr;
    }
}

/* =========================================
   6. CHECKOUT & CART STYLES
   ========================================= */

.checkout-page {
    position: relative;
    padding-bottom: 4rem;
}

/* Checkout Progress */
.checkout-progress {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 2rem;
    gap: 1rem;
}

.progress-step {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
}

.progress-step.active {
    color: var(--color-primary);
    font-weight: 700;
}

.progress-step.completed {
    color: var(--color-success);
}

.step-number {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
}

.progress-step.active .step-number {
    background-color: var(--color-primary);
    color: white;
}

.progress-step.completed .step-number {
    background-color: var(--color-success);
    color: white;
}

.step-divider {
    width: 40px;
    height: 2px;
    background-color: #eee;
}

/* =========================================
   8. UI POLISH & PAGE SPECIFIC STYLES
   ========================================= */

/* General Layout Rules */
.page-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
}

.page-header-title {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

/* Draw Result Hero */
.results-hero {
    background: linear-gradient(135deg, var(--color-surface) 0%, #f9fafb 100%);
    border: 1px solid var(--border-color);
    text-align: center;
    padding: 2.5rem;
    margin-bottom: 2rem;
}

.results-hero-title {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.results-hero-subtitle {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.results-hero-status {
    display: inline-flex;
    align-items: center;
    background: white;
    padding: 1rem 2rem;
    border-radius: var(--radius-full);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
}

.results-hero-status--win {
    border-color: var(--color-success);
    background: #ecfdf5;
}

.results-hero-status--lose {
    border-color: var(--border-color);
    background: #f3f4f6;
}

.results-hero-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.results-hero-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-secondary);
}

.results-hero-status--win .results-hero-value {
    color: var(--color-success);
}

.results-hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Live Draw */
.live-draw-card {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.live-draw-meta {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.live-draw-video {
    width: 100%;
    aspect-ratio: 16/9;
    background: black;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.live-draw-video-placeholder {
    color: white;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.live-draw-note {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Past Draws Table */
.past-draws-table {
    width: 100%;
    border-collapse: collapse;
}

.past-draw-row {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr 1fr auto;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    align-items: center;
}

.past-draw-row:last-child {
    border-bottom: none;
}

/* Loyalty Dashboard */
.loyalty-summary {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: white;
    margin-bottom: 2rem;
}

.loyalty-summary h2 {
    color: white;
}

.loyalty-progress {
    background: rgba(255, 255, 255, 0.1);
    height: 8px;
    border-radius: 4px;
    margin-top: 1rem;
    overflow: hidden;
}

.loyalty-progress-bar {
    background: var(--color-primary);
    height: 100%;
    border-radius: 4px;
}

/* Daily Game */
.daily-game-card {
    text-align: center;
    max-width: 600px;
    margin: 4rem auto;
    padding: 3rem;
    border: 2px dashed var(--color-primary);
    background: #fff;
}

.daily-game-note {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 1rem;
}

/* Account Layout & Sidebar */
.account-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
}

.account-sidebar {
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    padding: 1rem;
    height: fit-content;
}

.account-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.account-menu li {
    margin-bottom: 0.25rem;
}

.account-menu-link {
    display: block;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    color: var(--color-text);
    text-decoration: none;
    transition: var(--transition-base);
}

.account-menu-link:hover {
    background: var(--color-surface);
    color: var(--color-secondary);
}

.account-menu-link--active {
    background: var(--color-primary);
    color: white;
    font-weight: 600;
}

.account-menu-link--active:hover {
    background: var(--color-primary);
    color: white;
}

/* Support & FAQ */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.faq-item {
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.faq-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.faq-question {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    cursor: pointer;
}

.faq-answer {
    color: var(--text-muted);
    line-height: 1.6;
}

.contact-card {
    max-width: 600px;
    margin: 0 auto;
}

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

/* Style Guide */
.styleguide-section {
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .account-layout {
        grid-template-columns: 1fr;
    }

    .past-draw-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .results-hero-actions {
        flex-direction: column;
    }
}