/* =============================================
   DRAZE — My Bets History Page CSS
   ============================================= */

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

:root {
    --red: #e53e3e;
    --red-light: #fc8181;
    --red-dark: #9b2c2c;
    --red-glow: rgba(229, 62, 62, 0.4);

    --black-card: #16213e;

    --gold: #22c55e;
    --gold-light: #86efac;
    --gold-dark: #15803d;

    --green: #22c55e;
    --green-glow: rgba(34, 197, 94, 0.25);

    --bg: #060614;
    --surface: rgba(255, 255, 255, 0.04);
    --surface-hover: rgba(255, 255, 255, 0.07);
    --border: rgba(255, 255, 255, 0.08);
    --text: #f0f0ff;
    --text-muted: rgba(240, 240, 255, 0.5);

    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;

    --font: 'Outfit', sans-serif;
}

html,
body {
    height: 100%;
    overflow-x: hidden;
}

body {
    background: var(--bg);
    font-family: var(--font);
    color: var(--text);
    min-height: 100vh;
    background-image:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(229, 62, 62, 0.12), transparent),
        radial-gradient(ellipse 60% 40% at 80% 80%, rgba(22, 33, 62, 0.8), transparent);
}

/* ── Particles ── */
.particles {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.particle {
    position: absolute;
    border-radius: 50%;
    opacity: 0;
    animation: floatParticle linear infinite;
}

@keyframes floatParticle {
    0% {
        opacity: 0;
        transform: translateY(100vh) scale(0);
    }

    10% {
        opacity: 0.6;
    }

    90% {
        opacity: 0.3;
    }

    100% {
        opacity: 0;
        transform: translateY(-10vh) scale(1.2);
    }
}

/* ── Header ── */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 32px;
    border-bottom: 1px solid var(--border);
    background: rgba(6, 6, 20, 0.95);
}

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

.logo-img{height: 34px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(34, 197, 94, 0.5));
    
}

@keyframes logoFloat {

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

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

.back-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 100px;
    padding: 8px 18px;
    color: var(--text-muted);
    font-family: var(--font);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.22s ease;
    letter-spacing: 0.3px;
}

.back-btn:hover {
    background: var(--surface-hover);
    color: var(--green);
    border-color: rgba(34, 197, 94, 0.3);
    transform: translateX(-2px);
}

.back-btn .back-arrow {
    font-size: 1rem;
    transition: transform 0.2s;
}

.back-btn:hover .back-arrow {
    transform: translateX(-3px);
}

.page-title-header {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: 0.5px;
}

/* ── Page Content ── */
.page-wrapper {
    position: relative;
    z-index: 5;
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 24px 60px;
}

/* ── Page Hero ── */
.page-hero {
    margin-bottom: 36px;
    text-align: center;
}

.page-hero-icon {
    font-size: 3.5rem;
    margin-bottom: 12px;
    filter: drop-shadow(0 0 20px rgba(34, 197, 94, 0.5));
    animation: heroIconPulse 2.5s ease-in-out infinite;
}

@keyframes heroIconPulse {

    0%,
    100% {
        transform: scale(1);
        filter: drop-shadow(0 0 20px rgba(34, 197, 94, 0.5));
    }

    50% {
        transform: scale(1.06);
        filter: drop-shadow(0 0 32px rgba(34, 197, 94, 0.75));
    }
}

.page-hero h1 {
    font-size: 2rem;
    font-weight: 900;
    color: var(--text);
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.page-hero p {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 400;
}

/* ── Stats Row ── */
.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 18px 16px;
    text-align: center;
    backdrop-filter: blur(10px);
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
    animation: statFadeIn 0.5s ease both;
}

@keyframes statFadeIn {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-card:nth-child(1) {
    animation-delay: 0.05s;
}

.stat-card:nth-child(2) {
    animation-delay: 0.12s;
}

.stat-card:nth-child(3) {
    animation-delay: 0.19s;
}

.stat-card:nth-child(4) {
    animation-delay: 0.26s;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--stat-color, var(--green));
    opacity: 0.6;
}

.stat-card:hover {
    background: var(--surface-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.stat-icon {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 1.55rem;
    font-weight: 900;
    color: var(--stat-color, var(--green));
    line-height: 1;
    margin-bottom: 4px;
    letter-spacing: -0.5px;
    text-shadow: 0 0 16px var(--stat-glow, rgba(34, 197, 94, 0.3));
    transition: all 0.5s ease;
}

.stat-label {
    font-size: 0.67rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Card color accents */
.stat-card.stat-total {
    --stat-color: var(--green);
    --stat-glow: rgba(34, 197, 94, 0.3);
}

.stat-card.stat-wins {
    --stat-color: var(--green);
    --stat-glow: rgba(34, 197, 94, 0.3);
}

.stat-card.stat-losses {
    --stat-color: var(--red);
    --stat-glow: rgba(229, 62, 62, 0.3);
}

.stat-card.stat-pnl {
    --stat-color: var(--green);
    --stat-glow: rgba(34, 197, 94, 0.3);
}

/* ── Filters ── */
.filters-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-tabs {
    display: flex;
    gap: 6px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 100px;
    padding: 4px;
}

.filter-tab {
    padding: 6px 16px;
    border-radius: 100px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-family: var(--font);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.3px;
}

.filter-tab.active {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(34, 197, 94, 0.1));
    color: var(--green);
    box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.3);
}

.filter-tab:hover:not(.active) {
    background: var(--surface-hover);
    color: var(--text);
}

.filter-tab.tab-red.active {
    background: linear-gradient(135deg, rgba(229, 62, 62, 0.2), rgba(229, 62, 62, 0.08));
    color: var(--red-light);
    box-shadow: inset 0 0 0 1px rgba(229, 62, 62, 0.3);
}

.filter-tab.tab-black.active {
    background: linear-gradient(135deg, rgba(100, 100, 160, 0.2), rgba(100, 100, 160, 0.08));
    color: #a0a0d0;
    box-shadow: inset 0 0 0 1px rgba(100, 100, 160, 0.3);
}

.filter-tab.tab-win.active {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(34, 197, 94, 0.08));
    color: #86efac;
    box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.3);
}

.filter-tab.tab-loss.active {
    background: linear-gradient(135deg, rgba(229, 62, 62, 0.2), rgba(229, 62, 62, 0.08));
    color: var(--red-light);
    box-shadow: inset 0 0 0 1px rgba(229, 62, 62, 0.3);
}

.filter-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.result-count {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ── Bets Table / List ── */
.bets-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Header row */
.bets-table-header {
    display: grid;
    grid-template-columns: 80px 1fr 100px 100px 100px 90px;
    gap: 8px;
    padding: 10px 20px;
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Bet row card */
.bet-row {
    display: grid;
    grid-template-columns: 80px 1fr 100px 100px 100px 90px;
    gap: 8px;
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    backdrop-filter: blur(10px);
    transition: all 0.22s ease;
    animation: rowSlide 0.4s ease both;
    cursor: default;
}

@keyframes rowSlide {
    from {
        opacity: 0;
        transform: translateX(-12px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.bet-row:hover {
    background: var(--surface-hover);
    transform: translateX(3px);
    border-color: rgba(255, 255, 255, 0.14);
}

.bet-row.row-win {
    border-color: rgba(34, 197, 94, 0.2);
}

.bet-row.row-win:hover {
    border-color: rgba(34, 197, 94, 0.4);
    box-shadow: 0 4px 20px rgba(34, 197, 94, 0.08);
}

.bet-row.row-loss {
    border-color: rgba(229, 62, 62, 0.15);
}

.bet-row.row-loss:hover {
    border-color: rgba(229, 62, 62, 0.3);
    box-shadow: 0 4px 20px rgba(229, 62, 62, 0.08);
}

/* Cell styles */
.cell-round {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    font-family: monospace;
    letter-spacing: 0.5px;
}

.cell-date {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cell-date .date-main {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text);
}

.cell-date .date-time {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 400;
}

.cell-color {
    display: flex;
    align-items: center;
    gap: 8px;
}

.color-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px 4px 7px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.color-dot-sm {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.color-pill.pill-red {
    background: rgba(229, 62, 62, 0.15);
    color: var(--red-light);
    border: 1px solid rgba(229, 62, 62, 0.3);
}

.color-pill.pill-red .color-dot-sm {
    background: var(--red);
    box-shadow: 0 0 6px rgba(229, 62, 62, 0.8);
}

.color-pill.pill-black {
    background: rgba(100, 100, 160, 0.15);
    color: #a0a0d0;
    border: 1px solid rgba(100, 100, 160, 0.3);
}

.color-pill.pill-black .color-dot-sm {
    background: #2d2d4e;
    border: 1px solid rgba(100, 100, 160, 0.5);
    box-shadow: 0 0 6px rgba(60, 60, 120, 0.8);
}

.cell-amount {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text);
}

.cell-result {
    font-size: 0.92rem;
    font-weight: 700;
}

.result-win {
    color: #68d391;
}

.result-loss {
    color: var(--red-light);
}

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

.cell-pnl {
    font-size: 0.92rem;
    font-weight: 800;
    text-align: right;
}

.pnl-positive {
    color: #68d391;
    text-shadow: 0 0 10px rgba(104, 211, 145, 0.3);
}

.pnl-negative {
    color: var(--red-light);
    text-shadow: 0 0 10px rgba(229, 62, 62, 0.3);
}

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

/* Outcome badge */
.outcome-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.outcome-badge.badge-win {
    background: rgba(34, 197, 94, 0.15);
    color: #86efac;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.outcome-badge.badge-loss {
    background: rgba(229, 62, 62, 0.15);
    color: #fca5a5;
    border: 1px solid rgba(229, 62, 62, 0.3);
}

.outcome-badge.badge-no-bet {
    background: rgba(100, 116, 139, 0.15);
    color: #94a3b8;
    border: 1px solid rgba(100, 116, 139, 0.2);
}

/* ── Empty state ── */
.empty-state {
    text-align: center;
    padding: 80px 24px;
    animation: statFadeIn 0.5s ease both;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}

.empty-text {
    font-size: 0.88rem;
    color: var(--text-muted);
    max-width: 300px;
    margin: 0 auto 28px;
    line-height: 1.6;
}

.empty-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 28px;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(34, 197, 94, 0.1));
    border: 1px solid rgba(34, 197, 94, 0.35);
    border-radius: 100px;
    color: var(--green);
    font-family: var(--font);
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.22s ease;
    letter-spacing: 0.3px;
}

.empty-cta:hover {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.3), rgba(34, 197, 94, 0.15));
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(34, 197, 94, 0.2);
}

/* ── Loading skeleton ── */
.skeleton-row {
    height: 68px;
    background: linear-gradient(90deg,
            rgba(255, 255, 255, 0.03) 25%,
            rgba(255, 255, 255, 0.07) 50%,
            rgba(255, 255, 255, 0.03) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* ── Load More ── */
.load-more-wrap {
    text-align: center;
    margin-top: 28px;
}

.load-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 32px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 100px;
    color: var(--text-muted);
    font-family: var(--font);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.22s ease;
}

.load-more-btn:hover {
    background: var(--surface-hover);
    color: var(--text);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.load-more-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

/* ── Responsive ── */
@media (max-width: 720px) {
    .header {
        padding: 14px 18px;
    }

    .page-wrapper {
        padding: 28px 16px 50px;
    }

    .page-hero h1 {
        font-size: 1.6rem;
    }

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

    .bets-table-header {
        display: none;
    }

    .bet-row {
        grid-template-columns: 1fr;
        gap: 6px;
        padding: 14px 16px;
    }

    .bet-row::before {
        content: attr(data-color) ' · ' attr(data-outcome);
        font-size: 0.7rem;
        color: var(--text-muted);
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .cell-round::before {
        content: 'Round ';
    }

    .cell-amount::before {
        content: 'Bet: ';
        color: var(--text-muted);
        font-size: 0.75rem;
    }

    .cell-pnl::before {
        content: 'P&L: ';
        color: var(--text-muted);
        font-size: 0.75rem;
        font-weight: 600;
    }

    .cell-pnl {
        text-align: left;
    }

    .filters-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .filter-tabs {
        flex-wrap: wrap;
        border-radius: var(--radius-md);
    }
}

@media (max-width: 480px) {
    .stats-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .stat-value {
        font-size: 1.3rem;
    }
}