:root {
    /* Color Palette */
    --bg-main: #0b0f19;
    --bg-surface: #151a28;
    --bg-surface-hover: #1e2536;
    --bg-surface-light: #232b3e;

    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --primary-glow: rgba(59, 130, 246, 0.4);

    --success: #10b981;
    --success-hover: #059669;
    --success-bg: rgba(16, 185, 129, 0.1);

    --danger: #ef4444;
    --danger-hover: #dc2828;
    --danger-bg: rgba(239, 68, 68, 0.1);

    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --border-color: #334155;

    /* Layout & Shadow */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 9999px;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.2), 0 2px 4px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.15);

    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Utilities */
.text-gradient {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-success {
    color: var(--success);
}

.text-danger {
    color: var(--danger);
}

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

.mt-1 {
    margin-top: 0.5rem;
}

.mt-4 {
    margin-top: 1.5rem;
}

.small-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    font-family: inherit;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 14px 0 var(--primary-glow);
}

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

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

.btn-success:hover {
    background: var(--success-hover);
    transform: translateY(-2px);
}

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

.btn-danger:hover {
    background: var(--danger-hover);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-outline:hover {
    background: var(--bg-surface-hover);
    border-color: var(--text-secondary);
}

.btn-block {
    width: 100%;
}

.btn-icon {
    padding: 0.625rem;
    border-radius: var(--radius-full);
    background: var(--bg-surface-light);
    color: var(--text-primary);
}

.btn-icon:hover {
    background: var(--bg-surface-hover);
}

/* Layout */
.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    /* dynamic padding applied in bottom-nav styles */
}

/* Header */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo i {
    color: var(--primary);
}

.logo span {
    font-weight: 300;
    color: var(--text-secondary);
}

.user-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.balance-badge {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    padding: 0.4rem 1rem;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: var(--transition);
}

.balance-badge:hover {
    border-color: var(--primary);
    background: var(--bg-surface-hover);
}

.balance-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.balance-amount {
    font-weight: 700;
    color: var(--success);
}

/* Main Content */
.main-content {
    padding: 3rem 0;
}

/* Hero */
.hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 200"><path fill="%231e293b" fill-opacity="0.1" d="M0,64L48,80C96,96,192,128,288,128C384,128,480,96,576,85.3C672,75,768,85,864,101.3C960,117,1008,128,1032,133.3L1056,138.7L1056,200L1032,200C1008,200,960,200,864,200C768,200,672,200,576,200C480,200,384,200,288,200C192,200,96,200,48,200L0,200Z"></path></svg>') no-repeat bottom right;
    background-size: cover;
    border-radius: var(--radius-lg);
    padding: 3rem;
    background-color: var(--bg-surface);
    border: 1px solid rgba(255, 255, 255, 0.02);
    position: relative;
    overflow: hidden;
}

.hero-content h1 {
    font-size: 3rem;
    line-height: 1.1;
    margin-bottom: 1rem;
    font-weight: 700;
    letter-spacing: -1px;
}

.hero-content p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 500px;
}

.hero-stats {
    display: flex;
    gap: 1.5rem;
}

.stat-box {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 140px;
}

.stat-num {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Filters */
.filters {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 2rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.filters::-webkit-scrollbar {
    display: none;
}

.filter-btn {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-full);
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
    white-space: nowrap;
}

.filter-btn:hover {
    background: var(--bg-surface-hover);
    color: var(--text-primary);
}

.filter-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* Markets Grid */
.markets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.market-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.market-card:hover {
    transform: translateY(-5px);
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: var(--shadow-lg);
}

.market-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.market-category {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    background: var(--bg-surface-light);
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.market-status {
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.market-status.active {
    color: var(--success);
}

.market-status.active::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--success);
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.8);
}

.market-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.market-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.market-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.option-btn {
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.option-btn .opt-name {
    font-weight: 600;
}

.option-btn .opt-prob {
    font-size: 0.75rem;
    opacity: 0.8;
}

.market-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.pool-amount {
    font-weight: 600;
    color: var(--text-primary);
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    width: 100%;
    max-width: 450px;
    position: relative;
    transform: translateY(20px) scale(0.95);
    transition: var(--transition);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.modal-overlay.active .modal-content {
    transform: translateY(0) scale(1);
}

.close-modal {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.25rem;
    cursor: pointer;
    transition: var(--transition);
}

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

.modal-content h2 {
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.modal-subtitle {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

/* Forms */
.modern-form .form-group {
    margin-bottom: 1.25rem;
}

.modern-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.modern-form input,
.modern-form select {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.modern-form input:focus,
.modern-form select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

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

.input-with-icon .icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-weight: 600;
}

.input-with-icon input {
    padding-left: 2rem;
}

.instruction-box {
    background: var(--bg-surface-light);
    border: 1px dashed var(--border-color);
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

/* Toast Notification */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
}

.toast {
    background: var(--bg-surface);
    border-left: 4px solid var(--primary);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transform: translateX(120%);
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.toast.show {
    transform: translateX(0);
}

.toast.success {
    border-left-color: var(--success);
}

.toast.error {
    border-left-color: var(--danger);
}

/* Safari Board / Active Draw */
.active-draw-card {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    position: relative;
    overflow: hidden;
}

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

.active-draw-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.active-badge {
    background: var(--success);
    color: white;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    text-transform: uppercase;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }

    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

.active-draw-details {
    display: flex;
    justify-content: space-between;
    background: var(--bg-surface);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.detail-item {
    display: flex;
    flex-direction: column;
}

.detail-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.detail-value {
    font-size: 0.95rem;
    font-weight: 600;
}

/* Safari Grid */
.safari-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.75rem;
    padding: 1rem 0;
}

.safari-item {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.75rem 0.25rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: var(--transition);
}

.safari-item:hover {
    background: var(--bg-surface-hover);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.safari-icon {
    font-size: 2.2rem;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.safari-name {
    font-size: 0.75rem;
    font-weight: 500;
    text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 1rem;
    }

    .user-actions {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }

    .hero {
        flex-direction: column;
        padding: 2rem;
        text-align: center;
    }

    .hero-stats {
        margin-top: 2rem;
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 1rem;
    }

    .stat-box {
        flex: 1;
        min-width: 120px;
    }

    .modal-content {
        padding: 1.5rem;
        max-width: 95%;
    }

    .filters {
        padding-bottom: 1rem;
    }

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

    .safari-icon {
        font-size: 1.8rem;
    }

    .safari-name {
        font-size: 0.7rem;
        word-break: break-word;
    }
}

/* History Grid */
.history-container {
    width: 100%;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.history-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    border-left: 4px solid var(--primary);
}

.history-card.pending {
    border-left-color: #f59e0b;
}

.history-card.won {
    border-left-color: var(--success);
}

.history-card.lost {
    border-left-color: var(--danger);
    opacity: 0.7;
}

.history-card.resolved {
    border-left-color: var(--text-secondary);
    opacity: 0.7;
}

.history-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.history-card-title {
    font-weight: 600;
    font-size: 0.95rem;
}

.history-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.6rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    color: white;
}

.history-badge.pending {
    background: #f59e0b;
}

.history-badge.won {
    background: var(--success);
}

.history-badge.lost {
    background: var(--danger);
}

.history-badge.resolved {
    background: var(--text-secondary);
}

.history-card-body {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.history-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 0.75rem;
    font-size: 0.9rem;
}

/* Bottom Navigation - Native Mobile Style */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(11, 15, 25, 0.85);
    /* Darker glass effect matching var(--bg-main) */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0.6rem 0.2rem;
    z-index: 9999;
    /* Ensure it's always on top */
    box-shadow: 0 -10px 25px rgba(0, 0, 0, 0.5);
    /* Safe area for modern iOS/Android phones */
    padding-bottom: max(0.6rem, env(safe-area-inset-bottom));
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.65rem;
    font-weight: 500;
    gap: 0.35rem;
    padding: 0.2rem 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex: 1;
    min-width: 0;
}

.nav-item i {
    font-size: 1.4rem;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.nav-item:hover,
.nav-item.active {
    color: white;
    /* Bright white instead of primary for active icon usually works better on dark themes */
}

.nav-item.active i {
    color: var(--primary);
    /* Icon becomes primary colored */
    transform: translateY(-4px);
    /* Slight jump */
    text-shadow: 0 0 15px var(--primary-glow);
}

/* Hide scrollbar on body for better app feel if the user wants an "app" */
.app-container {
    padding-bottom: calc(85px + env(safe-area-inset-bottom));
    /* Dynamic bottom padding to accurately prevent overlap */
}

/* Safari History */
.safari-history {
    padding-top: 1.5rem;
    padding-bottom: 5rem;
    /* space for bottom nav */
}

.history-cards-container {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 1rem;
    scrollbar-width: none;
    /* Firefox */
}

.history-cards-container::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

.safari-history-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    min-width: 140px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: var(--transition);
}

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

.history-draw-info {
    display: flex;
    justify-content: space-between;
    width: 100%;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 0.5rem;
}

.history-winning-animal {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.history-winning-animal .winning-icon {
    font-size: 2.8rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    line-height: 1;
    margin-bottom: 0.25rem;
}

.history-winning-animal .winning-name {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--success);
}

/* Último Sorteo Destacado */
.latest-draw-card {
    background: linear-gradient(145deg, rgba(16, 185, 129, 0.15) 0%, rgba(59, 130, 246, 0.15) 100%);
    border: 2px solid rgba(16, 185, 129, 0.4);
    border-radius: var(--radius-lg);
    padding: 2.5rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px -5px rgba(16, 185, 129, 0.2);
}

.latest-draw-card::before {
    content: '';
    position: absolute;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.25) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 0;
}

.latest-draw-badge {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    background: var(--success);
    color: white;
    padding: 0.35rem 1.5rem;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    font-weight: 700;
    font-size: 0.85rem;
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.4);
    z-index: 2;
    white-space: nowrap;
}

.latest-winning-animal {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    z-index: 1;
    margin-top: 1rem;
}

.latest-icon {
    font-size: 6rem;
    line-height: 1;
    filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.4));
    animation: floatingIcon 3s ease-in-out infinite;
}

@keyframes floatingIcon {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.latest-name {
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(to right, #10b981, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    letter-spacing: 1px;
}

/* Sorteo en Marcha Flashy */
.active-draw-card-flashy {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.8) 0%, rgba(15, 23, 42, 0.9) 100%);
    border: 1px solid rgba(59, 130, 246, 0.5);
    border-radius: var(--radius-lg);
    padding: 2rem 1.5rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3), inset 0 0 20px rgba(59, 130, 246, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.pulse-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    border-radius: 50%;
    border: 2px solid rgba(59, 130, 246, 0.2);
    animation: animateRing 3s linear infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes animateRing {
    0% {
        width: 100px;
        height: 100px;
        opacity: 1;
    }

    100% {
        width: 500px;
        height: 500px;
        opacity: 0;
    }
}

.active-draw-card-flashy>* {
    z-index: 1;
}

.active-draw-card-flashy .active-draw-header {
    width: 100%;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.active-draw-card-flashy .active-draw-header h3 {
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.active-badge-large {
    background: linear-gradient(to right, #10b981, #059669);
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
    color: white;
    border-radius: 20px;
    font-weight: 800;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.5);
    animation: pulse 2s infinite;
}

.active-timer-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2rem;
}

.timer-circle {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.6);
    border: 4px solid var(--primary);
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-primary);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.5), inset 0 0 15px rgba(59, 130, 246, 0.3);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    margin-bottom: 0.5rem;
    position: relative;
    font-variant-numeric: tabular-nums;
}

.timer-circle::after {
    content: '';
    position: absolute;
    top: -4px;
    right: -4px;
    bottom: -4px;
    left: -4px;
    border-radius: 50%;
    border: 4px solid transparent;
    border-top-color: #38bdf8;
    animation: spinTimer 2s linear infinite;
}

@keyframes spinTimer {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.timer-label {
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 2px;
    color: var(--primary);
    font-weight: 600;
}

.active-draw-card-flashy .active-draw-details {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1rem;
    border-radius: var(--radius-md);
    display: flex;
    justify-content: space-between;
}

/* --- Bingo Section --- */
.bingo-bolillero {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    margin: 1.5rem 0;
    z-index: 2;
    position: relative;
}

.current-ball {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 120px;
}

.bingo-ball {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    font-size: 1.8rem;
    font-weight: 800;
    color: #111;
    box-shadow: inset -10px -10px 20px rgba(0, 0, 0, 0.5), inset 5px 5px 15px rgba(255, 255, 255, 0.8), 0 10px 15px rgba(0, 0, 0, 0.4);
    position: relative;
    border: 3px solid rgba(255, 255, 255, 0.2);
}

.bingo-ball span {
    font-size: 0.8rem;
    position: absolute;
    top: 6px;
    opacity: 0.8;
}

.bingo-ball.empty {
    background: #333;
    color: #888;
    box-shadow: none;
    border: 2px dashed #666;
}

/* Ball colors */
.bingo-ball.b {
    background: radial-gradient(circle at 30% 30%, #60a5fa, #2563eb);
}

.bingo-ball.i {
    background: radial-gradient(circle at 30% 30%, #f87171, #dc2828);
}

.bingo-ball.n {
    background: radial-gradient(circle at 30% 30%, #fde047, #ca8a04);
}

.bingo-ball.g {
    background: radial-gradient(circle at 30% 30%, #4ade80, #16a34a);
}

.bingo-ball.o {
    background: radial-gradient(circle at 30% 30%, #c084fc, #9333ea);
}

.balls-history {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
    min-height: 50px;
}

.bingo-ball.small {
    width: 45px;
    height: 45px;
    font-size: 1.1rem;
    box-shadow: inset -5px -5px 10px rgba(0, 0, 0, 0.5), inset 2px 2px 5px rgba(255, 255, 255, 0.8), 0 5px 10px rgba(0, 0, 0, 0.3);
}

.bingo-ball.small span {
    font-size: 0.5rem;
    top: 2px;
}

/* Boards */
.bingo-boards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.bingo-card {
    background: white;
    border-radius: var(--radius-md);
    padding: 0.5rem;
    box-shadow: var(--shadow-lg);
    color: #111;
}

.bingo-card-header {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    background: var(--danger);
    color: white;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    font-size: 1.5rem;
    font-weight: 800;
    text-align: center;
    padding: 0.5rem 0;
}

.bingo-card-header span {
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.bingo-card-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 2px;
    background: #ccc;
    border: 2px solid #ccc;
}

.bingo-cell {
    background: white;
    aspect-ratio: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    font-weight: 700;
    position: relative;
    transition: all 0.3s;
}

.bingo-cell.marked {
    background: #fef08a;
    /* Yellowish background */
}

.bingo-cell.marked::after {
    content: '';
    position: absolute;
    width: 75%;
    height: 75%;
    background: rgba(239, 68, 68, 0.4);
    background-image: radial-gradient(circle, rgba(239, 68, 68, 0.6) 0%, rgba(220, 38, 38, 0.8) 100%);
    border-radius: 50%;
    mix-blend-mode: multiply;
    box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.4);
}

/* Animations */
@keyframes bounceIn {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes slideIn {
    0% {
        transform: translateX(20px);
        opacity: 0;
    }

    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

.bounce-in {
    animation: bounceIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

.slide-in {
    animation: slideIn 0.3s ease-out both;
}