/**
 * ALGA ARENA — Premium Dashboard CSS v2
 * Panoramic hero, cinematic card system, consistent spacing tokens
 */

/* ============================================================
   SPACING TOKENS
   ============================================================ */
:root {
    --dp-card-pad: 20px;
    --dp-grid-gap: 16px;
    --dp-hero-to-cards: 16px;
    --dp-section-gap: 24px;
    --dp-title-desc-gap: 6px;
    --dp-content-cta-gap: 16px;
    --arena-gradient-glow: linear-gradient(135deg, rgba(0, 212, 255, 0.08), rgba(124, 92, 252, 0.08));
}

/* ============================================================
   GLOBAL AMBIENT BACKGROUND
   ============================================================ */
.dashboard-background-ambience {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(circle at center, rgba(12, 14, 25, 0.25) 0%, rgba(5, 7, 12, 0.98) 100%);
    z-index: -1;
}

/* ============================================================
   BASE CARD SURFACES
   ============================================================ */
.card-arena {
    background: rgba(11, 13, 22, 0.65) !important;
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.06), 0 15px 35px rgba(0, 0, 0, 0.65) !important;
    border-radius: 12px;
}

/* ============================================================
   HERO BANNER — PANORAMIC SINGLE-IMAGE SYSTEM
   ============================================================ */
.hero-banner-container {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid rgba(0, 212, 255, 0.18);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    background: #030509;
    /* Total height = artwork + stats strip */
    height: 380px;
}

/* The single panoramic background image */
.hero-bg-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 62% center; /* push trophy/players right, keep left dark */
    transform: scale(1.03);
    transform-origin: center center;
    transition: transform 6s ease-out;
    will-change: transform;
    pointer-events: none;
}

/* Subtle parallax on hover — bg image shifts slightly, no text movement */
.hero-banner-container:hover .hero-bg-img {
    transform: scale(1.06) translateX(-8px);
}

/* Left-to-right gradient overlay for text safety */
.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to right,
            rgba(3, 5, 9, 0.97) 0%,
            rgba(3, 5, 9, 0.88) 28%,
            rgba(3, 5, 9, 0.45) 52%,
            rgba(0, 212, 255, 0.04) 75%,
            transparent 100%
        ),
        linear-gradient(to top,
            rgba(3, 5, 9, 0.95) 0%,
            transparent 30%
        );
    z-index: 2;
    pointer-events: none;
}

/* Animated volumetric light sweep across hero */
.hero-overlay::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(125deg, transparent 42%, rgba(0, 212, 255, 0.04) 52%, transparent 62%);
    background-size: 200% 200%;
    animation: lightSweep 9s infinite linear;
    pointer-events: none;
}

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

/* Floating ambient dust particles */
.hero-particles {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
}

.dust-particle {
    position: absolute;
    border-radius: 50%;
    filter: blur(1.5px);
    animation: floatDust 8s infinite ease-in-out;
}
.dust-particle:nth-child(2) { animation-delay: 2.5s; animation-duration: 10s; }
.dust-particle:nth-child(3) { animation-delay: 5s;   animation-duration: 12s; }

@keyframes floatDust {
    0%   { transform: translateY(0)    scale(1);   opacity: 0.35; }
    50%  {                                          opacity: 0.65; }
    100% { transform: translateY(-44px) scale(0.9); opacity: 0.1;  }
}

/* Safe content column — left 42% readable area */
.hero-safe-col {
    position: absolute;
    inset: 0;
    z-index: 10;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 28px 0 96px 40px; /* bottom padding clears the stats strip */
    max-width: 560px;
    pointer-events: auto;
}

/* Hero text reveal (masked entrance) */
.hero-stagger {
    opacity: 1; /* JS will set initial opacity: 0 before animating */
}

/* CTA button pulse */
.btn-glow-pulse {
    position: relative;
    overflow: hidden;
    animation: ctaPulse 3s infinite alternate ease-in-out;
}

@keyframes ctaPulse {
    0%   { box-shadow: 0 0 10px rgba(0, 212, 255, 0.15), 0 0 0 1px rgba(0, 212, 255, 0.2); }
    100% { box-shadow: 0 0 28px rgba(0, 212, 255, 0.5),  0 0 0 2px rgba(0, 212, 255, 0.4); }
}

/* Statistics strip — anchored at bottom of hero */
.hero-stats-strip {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 84px;
    background: rgba(6, 8, 14, 0.92);
    backdrop-filter: blur(18px);
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    z-index: 12;
    display: flex;
    align-items: center;
}

/* ============================================================
   QUICK-ACTION CARDS — FULL IMAGE SYSTEM
   ============================================================ */
.quick-card {
    position: relative;
    overflow: hidden;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-top: 1.5px solid rgba(0, 212, 255, 0.22);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.75);
    background: #070910;
    /* Fixed height: equal across all four cards */
    height: 224px;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: transform 0.32s cubic-bezier(0.25, 0.8, 0.25, 1),
                box-shadow 0.32s ease,
                border-color 0.32s ease;
}

/* Hover: card lifts, border brightens */
@media (hover: hover) {
    .quick-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 16px 44px rgba(0, 212, 255, 0.05),
                    0 20px 50px rgba(0, 0, 0, 0.85);
        border-color: rgba(0, 212, 255, 0.3);
        border-top: 1.5px solid rgba(0, 212, 255, 0.5);
    }

    /* Background image subtly scales on hover */
    .quick-card:hover .quick-card__bg {
        transform: scale(1.04);
    }
}

/* Background image layer — fills the entire card */
.quick-card__bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: right center;
    transform: scale(1.0);
    transform-origin: center center;
    transition: transform 0.45s cubic-bezier(0.25, 0.8, 0.25, 1);
    will-change: transform;
    pointer-events: none;
}

/* Gradient overlay: dark on left (text area), fades right (artwork area) */
.quick-card__overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to right,
            rgba(4, 6, 11, 0.97) 0%,
            rgba(4, 6, 11, 0.78) 38%,
            rgba(4, 6, 11, 0.28) 65%,
            transparent 100%
        ),
        linear-gradient(to top,
            rgba(4, 6, 11, 0.88) 0%,
            transparent 55%
        );
    z-index: 2;
    pointer-events: none;
}

/* Soft moving light highlight on hover */
.quick-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(
        circle 160px at var(--x, 50%) var(--y, 50%),
        rgba(0, 212, 255, 0.07),
        transparent
    );
    opacity: 0;
    transition: opacity 0.35s;
    pointer-events: none;
    z-index: 3;
}

@media (hover: hover) {
    .quick-card:hover::after {
        opacity: 1;
    }
}

/* Card body — z above image layers, flex-column to pin CTA at bottom */
.quick-card__body {
    position: relative;
    z-index: 5;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: var(--dp-card-pad);
}

.quick-card__title {
    font-size: 0.95rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
    margin: 0 0 var(--dp-title-desc-gap) 0;
    /* Prevent text from running wide into artwork */
    max-width: 68%;
}

.quick-card__desc {
    font-size: 0.72rem;
    color: rgba(180, 190, 210, 0.82);
    line-height: 1.5;
    margin: 0;
    max-width: 64%;
}

/* Optional metadata chips in the middle */
.quick-card__meta {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.quick-card__chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.6rem;
    font-weight: 600;
    color: rgba(0, 212, 255, 0.85);
    background: rgba(0, 212, 255, 0.08);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 4px;
    padding: 2px 7px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* CTA pinned to bottom */
.quick-card__cta {
    margin-top: auto;
    padding-top: var(--dp-content-cta-gap);
}

/* CTA button sweep shimmer on hover */
.quick-card__cta .btn-arena {
    position: relative;
    overflow: hidden;
    width: 100%;
    text-align: center;
    text-decoration: none;
    display: block;
}

.quick-card__cta .btn-arena::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 50%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.14), transparent);
    transform: skewX(-25deg);
    transition: left 0.5s;
}

@media (hover: hover) {
    .quick-card:hover .quick-card__cta .btn-arena::before {
        left: 150%;
    }
}

/* ============================================================
   ACTIVE SIDEBAR ITEM GLOW RAIL
   ============================================================ */
.sidebar-item.active {
    position: relative;
    background: linear-gradient(90deg, rgba(0, 212, 255, 0.08) 0%, transparent 100%) !important;
}
.sidebar-item.active::after {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: var(--arena-broadcast-blue);
    box-shadow: 0 0 10px var(--arena-broadcast-blue);
}

/* ============================================================
   REDUCED MOTION OVERRIDES
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    .hero-bg-img,
    .quick-card,
    .quick-card__bg,
    .quick-card::after,
    .btn-glow-pulse,
    .dust-particle {
        animation: none !important;
        transition: none !important;
    }

    .hero-banner-container:hover .hero-bg-img {
        transform: scale(1.03);
    }

    .quick-card:hover {
        transform: none;
    }
}

/* ============================================================
   RESPONSIVE — TABLET (≤ 1024px)
   ============================================================ */
@media (max-width: 1024px) {
    .hero-safe-col {
        padding: 24px 0 96px 28px;
        max-width: 480px;
    }

    .hero-bg-img {
        object-position: 68% center;
    }

    .quick-card {
        height: 220px;
    }

    .quick-card__title {
        max-width: 75%;
    }

    .quick-card__desc {
        max-width: 72%;
    }
}

/* ============================================================
   RESPONSIVE — MOBILE (≤ 767px)
   ============================================================ */
@media (max-width: 767px) {
    .hero-banner-container {
        height: 340px;
    }

    .hero-bg-img {
        object-position: 72% center;
    }

    .hero-safe-col {
        padding: 20px 16px 96px 20px;
        max-width: 100%;
    }

    .quick-card {
        height: 196px;
    }

    .quick-card__title {
        font-size: 0.9rem;
        max-width: 80%;
    }

    .quick-card__desc {
        max-width: 78%;
    }
}

/* ============================================================
   RESPONSIVE — SMALL MOBILE (≤ 430px)
   ============================================================ */
@media (max-width: 430px) {
    .hero-banner-container {
        height: 310px;
    }

    .hero-bg-img {
        object-position: 75% center;
    }

    .hero-safe-col {
        padding: 16px 12px 88px 16px;
    }

    .quick-card {
        height: 190px;
    }
}
