/* ── Design Tokens — Minimalist Autumn / Warm Tech ────── */
:root {
    /* Parchment off-white — bridges white cards and warm brand */
    --bg: #FAF9F6;
    /* Solid white cards — clean, no translucency needed */
    --card: #FFFFFF;
    /* 1px golden-beige border instead of shadow */
    --card-border: rgba(194, 158, 80, 0.22);
    --card-border-hover: rgba(194, 158, 80, 0.45);
    /* Nearly-invisible shadow — just tiny lift */
    --shadow-sm: 0 1px 2px rgba(59, 47, 47, 0.03);
    --shadow-hover: 0 3px 14px rgba(139, 95, 50, 0.07);
    /* Brand palette */
    --accent: #E07818;
    /* Vibrant orange */
    --accent-gold: #D4A017;
    /* Golden yellow  */
    --accent-deep: #B85A08;
    /* Deep amber     */
    --accent-green: #3A7A54;
    /* Typography — warm espresso browns */
    --text-1: #1C1212;
    /* Deep espresso  */
    --text-2: #5C3E2F;
    /* Tobacco brown  */
    --text-3: #9A7A65;
    /* Warm muted     */
    /* 20px consistent radius */
    --radius: 1.25rem;
    /* Golden-beige divider */
    --divider: rgba(194, 158, 80, 0.16);
}

.dark {
    --bg: #18120E;
    --card: #231A14;
    --card-border: rgba(194, 158, 80, 0.12);
    --card-border-hover: rgba(194, 158, 80, 0.28);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.15);
    --shadow-hover: 0 4px 20px rgba(0, 0, 0, 0.25);
    --divider: rgba(194, 158, 80, 0.10);
    --text-1: #F2E8DA;
    --text-2: #C4A07A;
    --text-3: #7A6050;
}

.hayaanshufiya-container {
    font-family: 'Heebo', sans-serif;
    color: var(--text-1);
    background-color: var(--bg);
    min-height: 100vh;
    padding-bottom: 6rem;
    
    /* ── Breakout of WordPress Theme Containers ── */
    width: 100vw !important;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw !important;
    margin-right: -50vw !important;
    max-width: 100vw !important;
}

/* ── Warm Card — solid white, golden-beige border ──────── */
.glass-card {
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: border-color 0.2s ease, box-shadow 0.22s ease, transform 0.22s ease;
}

.glass-card:hover {
    border-color: var(--card-border-hover);
    box-shadow: var(--shadow-hover);
    transform: translateY(-1px);
}

/* ── Hero — Deep Espresso, premium & warm ──────────────── */
.hero-gradient {
    background: linear-gradient(148deg, #3B2F2F 0%, #251818 52%, #1A1212 100%);
    border: 1px solid rgba(255, 220, 150, 0.08) !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 220, 150, 0.07),
        inset 0 -1px 0 rgba(0, 0, 0, 0.30),
        0 16px 48px rgba(26, 18, 18, 0.28),
        0 3px 8px rgba(26, 18, 18, 0.16) !important;
    position: relative;
    overflow: hidden;
}

.hero-gradient::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 50% 65% at 100% 100%, rgba(224, 120, 24, 0.10) 0%, transparent 58%),
        radial-gradient(ellipse 35% 50% at 0% 0%, rgba(246, 195, 67, 0.06) 0%, transparent 50%);
    border-radius: inherit;
    pointer-events: none;
}

.hero-gradient::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    opacity: 0.08;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.80' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 200px 200px;
    background-repeat: repeat;
}

/* ── Stat animation ────────────────────────────────────── */
@keyframes countUp {
    from { opacity: 0; transform: translateY(7px); }
    to { opacity: 1; transform: translateY(0); }
}

.stat-animate { animation: countUp 0.5s ease both; }

/* ── Streak pulse ──────────────────────────────────────── */
@keyframes flamePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.20); }
}

.flame-pulse { animation: flamePulse 1.8s ease-in-out infinite; }

.progress-fill { transition: width 1.1s cubic-bezier(0.4, 0, 0.2, 1); }

.xp-pill {
    background: linear-gradient(135deg, #F6C343 0%, #E8A020 100%);
    box-shadow: 0 2px 10px rgba(230, 160, 32, 0.28);
}

.topbar-pill {
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.85);
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.05);
}

.dark .topbar-pill {
    background: rgba(28, 18, 10, 0.65);
    border-color: rgba(255, 255, 255, 0.08);
}

.label-chip {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-3);
}

.unit-ring-badge {
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    border-radius: 1rem;
}

.unit-ring-badge:hover {
    transform: scale(1.10);
    background: rgba(255, 255, 255, 0.5);
}

.dark .unit-ring-badge:hover {
    background: rgba(255, 255, 255, 0.07);
}

/* ── Weekly Play-Time Bar Chart ─────────────────────────── */
.stats-bar-container {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    height: 48px;
}

.stat-bar {
    width: 8px;
    min-height: 4px;
    background: #D1C5BC;
    border-radius: 4px;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    cursor: default;
}

.dark .stat-bar {
    background: rgba(255, 255, 255, 0.18);
}

.stat-bar:hover {
    opacity: 0.85;
    transform: scaleY(1.08);
}

.stat-bar.active {
    background: var(--accent) !important;
    box-shadow: 0 0 10px rgba(224, 120, 24, 0.40);
}

/* Tooltip — hidden by default, revealed on hover */
.stat-bar .tooltip {
    position: absolute;
    bottom: 110%;
    left: 50%;
    transform: translateX(-50%) translateY(5px);
    background: #27272A;
    color: #fff;
    padding: 7px 11px;
    border-radius: 10px;
    font-size: 11px;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
    white-space: nowrap;
    box-shadow: 0 8px 20px -4px rgba(0,0,0,0.28);
    z-index: 50;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 58px;
}

.stat-bar .tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -4px;
    border: 4px solid transparent;
    border-top-color: #27272A;
}

.stat-bar:hover .tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ── Dashboard card accent strips ───────────────────────── */
.card-accent-top {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    border-radius: var(--radius) var(--radius) 0 0;
    background: linear-gradient(90deg, var(--accent-gold), var(--accent));
    opacity: 0;
    transition: opacity 0.22s ease;
}

.glass-card:hover .card-accent-top {
    opacity: 1;
}

/* ── Activity table row ──────────────────────────────────── */
.activity-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 4px;
    border-bottom: 1px solid var(--divider);
    transition: background 0.15s ease;
    border-radius: 8px;
}

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

.activity-row:hover {
    background: rgba(224, 120, 24, 0.04);
}

/* ── Bento card hover glow ───────────────────────────────── */
.glass-card {
    position: relative;
    overflow: hidden;
}

.glass-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(ellipse 60% 40% at 50% 0%, rgba(224,120,24,0.04) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.glass-card:hover::after {
    opacity: 1;
}

/* ── Game feedback animations ────────────────────────────── */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%       { transform: translateX(-8px); }
    40%       { transform: translateX(8px); }
    60%       { transform: translateX(-5px); }
    80%       { transform: translateX(5px); }
}

.animate-shake {
    animation: shake 0.4s ease-in-out;
}

/* Red flash for wrong match cards */
.wrong-flash {
    background-color: rgba(220, 38, 38, 0.12) !important;
    border-color: rgba(220, 38, 38, 0.5) !important;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}
