/* ==========================================================================
   SwissBorg Guardians - Landing Portal CSS
   Aesthetic: Cyberpunk / SwissBorg Neon / Modern Glassmorphism
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
    --bg-dark: #020617;
    --bg-surface: #0b1120;
    --bg-card: rgba(15, 23, 42, 0.75);
    --bg-card-hover: rgba(30, 41, 59, 0.85);
    --border-subtle: rgba(56, 189, 248, 0.12);
    --border-glow: rgba(0, 245, 155, 0.35);

    --primary-green: #00F59B;
    --primary-green-glow: 0 0 25px rgba(0, 245, 155, 0.45);
    --accent-blue: #38bdf8;
    --accent-indigo: #818cf8;
    --accent-purple: #c084fc;
    --accent-gold: #fbbf24;
    --accent-red: #ef4444;

    --text-main: #f8fafc;
    --text-sub: #94a3b8;
    --text-muted: #64748b;

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 22px;
    --radius-full: 9999px;

    --font-heading: 'Space Grotesk', -apple-system, sans-serif;
    --font-body: 'Outfit', -apple-system, sans-serif;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    color-scheme: dark;
    overflow-x: hidden;
    max-width: 100%;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
    max-width: 100%;
    position: relative;
    background-image: 
        radial-gradient(circle at 15% 15%, rgba(0, 245, 155, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 85% 30%, rgba(56, 189, 248, 0.07) 0%, transparent 45%),
        radial-gradient(circle at 50% 80%, rgba(99, 102, 241, 0.06) 0%, transparent 50%),
        linear-gradient(to bottom, #020617 0%, #080e1c 100%);
    background-attachment: fixed;
    min-height: 100vh;
}

/* Container */
.container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--text-main);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

a {
    color: inherit;
    text-decoration: none;
    transition: all 0.2s ease;
}

/* Generic Utility Classes */
.hidden {
    display: none !important;
}

/* ==========================================================================
   Header & Sticky Navbar
   ========================================================================== */
.landing-header {
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    background: rgba(2, 6, 23, 0.82);
    border-bottom: 1px solid var(--border-subtle);
    transition: all 0.3s ease;
}

.nav-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 76px;
}

.brand-link {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo {
    width: 38px;
    height: 38px;
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(0, 245, 155, 0.4));
    transition: transform 0.3s ease;
}

.brand-link:hover .brand-logo {
    transform: rotate(-8deg) scale(1.08);
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 6px;
}

.brand-title .green {
    color: var(--primary-green);
    text-shadow: 0 0 12px rgba(0, 245, 155, 0.5);
}

.brand-badge {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--accent-blue);
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
    list-style: none;
}

.nav-link {
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--text-sub);
    position: relative;
    padding: 6px 0;
}

.nav-link:hover {
    color: #fff;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--primary-green);
    transition: width 0.25s ease;
    border-radius: var(--radius-full);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.user-status-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid var(--border-subtle);
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    color: var(--accent-blue);
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.user-status-pill:hover {
    background: rgba(30, 41, 59, 0.9);
    border-color: var(--primary-green);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 0 12px rgba(0, 245, 155, 0.25);
}

.user-status-pill.online::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--primary-green);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--primary-green);
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn-primary-play {
    background: linear-gradient(135deg, #00F59B 0%, #059669 100%);
    color: #020617;
    box-shadow: 0 4px 20px rgba(0, 245, 155, 0.35);
}

.btn-primary-play:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(0, 245, 155, 0.55);
    filter: brightness(1.05);
}

.btn-primary-play:active {
    transform: translateY(0);
}

.btn-pulse-glow {
    animation: btnPulse 2.8s infinite;
}

@keyframes btnPulse {
    0% { box-shadow: 0 0 0 0 rgba(0, 245, 155, 0.6); }
    70% { box-shadow: 0 0 0 14px rgba(0, 245, 155, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 245, 155, 0); }
}

.btn-secondary {
    background: rgba(15, 23, 42, 0.7);
    color: #fff;
    border: 1px solid rgba(56, 189, 248, 0.25);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(30, 41, 59, 0.9);
    border-color: var(--accent-blue);
    transform: translateY(-2px);
}

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

.btn-outline:hover {
    background: rgba(0, 245, 155, 0.1);
    transform: translateY(-2px);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
    border-radius: var(--radius-sm);
}

.btn-lg {
    padding: 16px 36px;
    font-size: 1.1rem;
    border-radius: var(--radius-md);
}

.btn-copy {
    background: rgba(30, 41, 59, 0.8);
    color: var(--text-sub);
    border: 1px dashed rgba(148, 163, 184, 0.3);
    font-size: 0.8rem;
    padding: 8px 14px;
}

.btn-copy:hover {
    color: #fff;
    border-color: var(--primary-green);
    background: rgba(0, 245, 155, 0.08);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
    padding: 70px 0 100px;
    position: relative;
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 48px;
    align-items: center;
}

.hero-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(0, 245, 155, 0.1);
    border: 1px solid rgba(0, 245, 155, 0.3);
    border-radius: var(--radius-full);
    color: var(--primary-green);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 22px;
}

.hero-badge-pill .pulse-dot {
    width: 8px;
    height: 8px;
    background: var(--primary-green);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--primary-green);
    animation: blink 1.6s infinite ease-in-out;
}

@keyframes blink {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.85); }
}

.hero-title {
    font-size: clamp(2.4rem, 4.5vw, 3.8rem);
    font-weight: 900;
    margin-bottom: 20px;
    letter-spacing: -0.03em;
}

.hero-title .gradient-text {
    background: linear-gradient(135deg, #ffffff 30%, var(--primary-green) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-sub);
    margin-bottom: 34px;
    max-width: 580px;
}

.hero-cta-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    margin-bottom: 44px;
}

.hero-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--border-subtle);
}

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

.metric-val {
    font-family: var(--font-heading);
    font-size: 1.55rem;
    font-weight: 800;
    color: #fff;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.metric-val.green { color: var(--primary-green); }
.metric-val.blue { color: var(--accent-blue); }
.metric-val.gold { color: var(--accent-gold); }

.metric-dino-img {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    object-fit: cover;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.35);
    border: 1px solid rgba(245, 158, 11, 0.4);
    display: inline-block;
}

.metric-lbl {
    font-size: 0.78rem;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    font-weight: 600;
}

/* Holographic Cover Card */
.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
}

.hologram-card {
    position: relative;
    border-radius: var(--radius-lg);
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid rgba(56, 189, 248, 0.25);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.65), 0 0 40px rgba(0, 245, 155, 0.15);
    overflow: hidden;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    width: 100%;
    max-width: 440px;
}

.hologram-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 35px 80px rgba(0, 0, 0, 0.8), 0 0 50px rgba(0, 245, 155, 0.3);
}

.hologram-card img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.card-overlay-info {
    padding: 18px 22px;
    background: rgba(11, 17, 32, 0.95);
    border-top: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-title-tag {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
    color: #fff;
}

.card-sub-tag {
    font-size: 0.75rem;
    color: var(--text-sub);
}

.card-live-chip {
    padding: 4px 10px;
    background: rgba(0, 245, 155, 0.12);
    border: 1px solid var(--primary-green);
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--primary-green);
}

/* ==========================================================================
   Section Common Styles
   ========================================================================== */
.section {
    padding: 90px 0;
    position: relative;
}

.section-alt {
    background: rgba(11, 17, 32, 0.45);
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
}

.section-header {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 56px;
}

.section-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--primary-green);
    margin-bottom: 12px;
}

.section-tag.danger { color: var(--accent-red); }
.section-tag.blue { color: var(--accent-blue); }
.section-tag.gold { color: var(--accent-gold); }

.section-title {
    font-size: clamp(1.9rem, 3.2vw, 2.7rem);
    font-weight: 800;
    margin-bottom: 16px;
}

.section-desc {
    font-size: 1.05rem;
    color: var(--text-sub);
}

/* ==========================================================================
   Community Fails Video Section
   ========================================================================== */
.fails-grid {
    display: grid;
    grid-template-columns: 1.3fr 0.7fr;
    gap: 32px;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(14px);
}

.fails-video-box {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: #000;
    border: 1px solid rgba(239, 68, 68, 0.3);
    box-shadow: 0 10px 30px rgba(239, 68, 68, 0.15);
    aspect-ratio: 16 / 9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fails-video-box video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fail-play-overlay {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 23, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    z-index: 10;
    transition: opacity 0.3s ease;
}

.fail-play-overlay.hidden {
    display: none !important;
}

.fail-replay-btn {
    position: absolute;
    bottom: 16px;
    right: 16px;
    z-index: 15;
}

.fails-video-overlay {
    position: absolute;
    top: 14px;
    left: 14px;
    display: flex;
    gap: 8px;
    z-index: 5;
}

.badge-fail-live {
    background: rgba(239, 68, 68, 0.9);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 4px;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 6px;
}

.fails-info-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.fail-meta-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

.fail-meta-badges {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.fail-date-badge {
    font-size: 0.8rem;
    color: var(--text-muted);
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid var(--border-subtle);
    padding: 3px 10px;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.fail-level-badge {
    font-size: 0.8rem;
    color: var(--accent-blue);
    font-weight: 600;
    background: rgba(56, 189, 248, 0.1);
    padding: 4px 10px;
    border-radius: var(--radius-full);
}

.fail-player {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.fail-story-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
}

.fail-story-desc {
    color: var(--text-sub);
    font-size: 0.95rem;
    line-height: 1.6;
}

.fail-stats-chips {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.fail-stat-chip {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid var(--border-subtle);
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.fail-stat-chip.red { color: #fca5a5; border-color: rgba(239, 68, 68, 0.3); }
.fail-stat-chip.gold { color: #fde68a; border-color: rgba(251, 191, 36, 0.3); }

.fail-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.fail-tag {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.fail-player-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.95) 0%, rgba(2, 6, 23, 0.6) 70%, transparent 100%);
    padding: 12px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 12;
    backdrop-filter: blur(6px);
    transition: opacity 0.3s ease;
}

.fail-player-controls.hidden {
    display: none !important;
}

.fail-ctrl-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
}

.btn-ctrl-icon {
    background: rgba(30, 41, 59, 0.85);
    border: 1px solid rgba(56, 189, 248, 0.3);
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.btn-ctrl-icon:hover {
    background: rgba(56, 189, 248, 0.25);
    border-color: #38bdf8;
    transform: scale(1.08);
}

.fail-clip-badge {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #fca5a5;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

/* Secondary Fails Grid & Playlist */
.top-fails-playlist {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 14px;
    max-height: 480px;
    overflow-y: auto;
    padding-right: 6px;
    scrollbar-width: thin;
    scrollbar-color: rgba(239, 68, 68, 0.5) rgba(15, 23, 42, 0.6);
}

.top-fails-playlist::-webkit-scrollbar {
    width: 6px;
}

.top-fails-playlist::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.6);
    border-radius: 4px;
}

.top-fails-playlist::-webkit-scrollbar-thumb {
    background: rgba(239, 68, 68, 0.5);
    border-radius: 4px;
}

.top-fails-playlist::-webkit-scrollbar-thumb:hover {
    background: #ef4444;
}

.playlist-card {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.playlist-card:hover {
    transform: translateY(-3px);
    border-color: rgba(56, 189, 248, 0.5);
    background: rgba(30, 41, 59, 0.8);
}

.playlist-card.active {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.12);
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.25);
}

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

.playlist-rank-pill {
    font-size: 0.75rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(239, 68, 68, 0.25);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.4);
}

.playlist-card.active .playlist-rank-pill {
    background: #ef4444;
    color: #fff;
}

.playlist-card-level {
    font-size: 0.88rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.playlist-card-player {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.playlist-card-stats {
    font-size: 0.75rem;
    color: #f87171;
    font-weight: 600;
}

.playlist-card-date {
    font-size: 0.72rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 2px;
}

.mini-fails-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 36px;
}

.mini-fail-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.mini-fail-card:hover {
    transform: translateY(-4px);
    border-color: rgba(239, 68, 68, 0.4);
}

.mini-fail-title {
    font-size: 1.05rem;
    font-weight: 700;
}

.mini-fail-snippet {
    font-size: 0.88rem;
    color: var(--text-sub);
}

/* ==========================================================================
   Live Leaderboard Section
   ========================================================================== */
.leaderboard-container {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 36px;
    backdrop-filter: blur(14px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

.lb-control-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-subtle);
}

.lb-select-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.lb-select-label {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-sub);
}

.lb-dropdown {
    background: #0f172a;
    border: 1px solid rgba(56, 189, 248, 0.3);
    color: #fff;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s ease;
}

.lb-dropdown:focus {
    border-color: var(--primary-green);
    box-shadow: 0 0 10px rgba(0, 245, 155, 0.25);
}

/* Top 3 Podium Cards */
.podium-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.podium-card {
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 22px 18px;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.podium-card:hover {
    transform: translateY(-4px);
}

.podium-card.gold {
    border-color: rgba(251, 191, 36, 0.45);
    background: linear-gradient(180deg, rgba(251, 191, 36, 0.08) 0%, rgba(15, 23, 42, 0.95) 100%);
    box-shadow: 0 10px 25px rgba(251, 191, 36, 0.12);
}

.podium-card.silver {
    border-color: rgba(148, 163, 184, 0.4);
    background: linear-gradient(180deg, rgba(148, 163, 184, 0.06) 0%, rgba(15, 23, 42, 0.95) 100%);
}

.podium-card.bronze {
    border-color: rgba(217, 119, 6, 0.4);
    background: linear-gradient(180deg, rgba(217, 119, 6, 0.06) 0%, rgba(15, 23, 42, 0.95) 100%);
}

.podium-medal {
    font-size: 2.2rem;
    margin-bottom: 8px;
}

.podium-pseudo {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.podium-score {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary-green);
    margin-bottom: 4px;
}

.podium-stats {
    font-size: 0.8rem;
    color: var(--text-sub);
}

/* Leaderboard Table */
.lb-table-wrap {
    overflow-x: auto;
}

.lb-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
    text-align: left;
}

.lb-table th {
    padding: 12px 16px;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-bottom: 1px solid var(--border-subtle);
}

.lb-table td {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    vertical-align: middle;
}

.lb-table tr:hover td {
    background: rgba(56, 189, 248, 0.04);
}

.lb-rank {
    font-weight: 700;
    color: var(--accent-blue);
    width: 50px;
}

.lb-player {
    font-weight: 600;
    color: #fff;
}

.lb-saved {
    color: var(--primary-green);
    font-weight: 600;
}

.lb-time {
    color: var(--text-sub);
}

.lb-pts {
    font-family: var(--font-heading);
    font-weight: 800;
    color: #fff;
}

.lb-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-sub);
    font-size: 0.95rem;
}

/* ==========================================================================
   Referral & Sponsorship Section
   ========================================================================== */
.referral-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 28px;
}

.referral-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 32px 26px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 24px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(14px);
    transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.referral-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-green), var(--accent-blue));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.referral-card:hover {
    transform: translateY(-6px);
    border-color: rgba(0, 245, 155, 0.35);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.5), 0 0 30px rgba(0, 245, 155, 0.1);
}

.referral-card:hover::before {
    opacity: 1;
}

.ref-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ref-icon-box {
    width: 54px;
    height: 54px;
    border-radius: var(--radius-md);
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
}

.ref-icon-box img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.ref-perk-badge {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    background: rgba(0, 245, 155, 0.12);
    border: 1px solid rgba(0, 245, 155, 0.3);
    color: var(--primary-green);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ref-perk-badge.gold {
    background: rgba(251, 191, 36, 0.12);
    border-color: rgba(251, 191, 36, 0.3);
    color: var(--accent-gold);
}

.ref-perk-badge.blue {
    background: rgba(56, 189, 248, 0.12);
    border-color: rgba(56, 189, 248, 0.3);
    color: var(--accent-blue);
}

.ref-body h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.ref-body p {
    font-size: 0.92rem;
    color: var(--text-sub);
    line-height: 1.55;
}

.ref-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.code-copy-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    font-size: 0.85rem;
}

.code-copy-val {
    font-family: monospace;
    font-weight: 700;
    color: var(--primary-green);
    letter-spacing: 0.06em;
}

/* ==========================================================================
   Skills & Features Showcase Section
   ========================================================================== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 48px;
}

.skill-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 20px;
    transition: all 0.25s ease;
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.skill-card:hover {
    border-color: rgba(56, 189, 248, 0.4);
    transform: translateY(-3px);
    background: var(--bg-card-hover);
}

.skill-icon-big {
    font-size: 2rem;
    line-height: 1;
}

.skill-info h4 {
    font-size: 1.05rem;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.skill-key-badge {
    font-size: 0.65rem;
    background: rgba(56, 189, 248, 0.15);
    color: var(--accent-blue);
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 700;
}

.skill-info p {
    font-size: 0.84rem;
    color: var(--text-sub);
    line-height: 1.45;
}

/* Features Highlight Banner */
.features-double-banner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.feature-box {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9) 0%, rgba(30, 41, 59, 0.7) 100%);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 30px;
    display: flex;
    gap: 20px;
    align-items: center;
}

.feature-box-icon {
    font-size: 2.8rem;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-dino-img {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 0 16px rgba(245, 158, 11, 0.35);
    border: 1px solid rgba(245, 158, 11, 0.4);
    display: block;
}

.feature-box-text h3 {
    font-size: 1.25rem;
    margin-bottom: 8px;
}

.feature-box-text p {
    font-size: 0.9rem;
    color: var(--text-sub);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.landing-footer {
    background: #01040f;
    border-top: 1px solid var(--border-subtle);
    padding: 60px 0 30px;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    gap: 24px;
    list-style: none;
}

.footer-links a:hover {
    color: var(--primary-green);
}

/* ==========================================================================
   Toast Notification
   ========================================================================== */
.toast-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    pointer-events: none;
}

.toast {
    background: #0f172a;
    border: 1px solid var(--primary-green);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 20px rgba(0, 245, 155, 0.3);
    color: #fff;
    padding: 14px 22px;
    border-radius: var(--radius-md);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.92rem;
    display: flex;
    align-items: center;
    gap: 10px;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */
@media (max-width: 960px) {
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-subtitle {
        margin: 0 auto 34px;
    }

    .hero-cta-group {
        justify-content: center;
    }

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

    .fails-grid {
        grid-template-columns: 1fr;
    }

    .nav-links {
        display: none; /* Hide default nav links on mobile */
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 14px;
    }

    .nav-wrap {
        height: 64px;
        gap: 8px;
    }

    .brand-link {
        gap: 8px;
        min-width: 0;
        flex-shrink: 1;
    }

    .brand-logo {
        width: 32px;
        height: 32px;
        flex-shrink: 0;
    }

    .brand-title {
        font-size: 0.95rem;
        letter-spacing: 0.02em;
        white-space: nowrap;
    }

    .brand-badge {
        display: none; /* Hide lengthy subtitle on mobile */
    }

    .nav-actions {
        gap: 6px;
        flex-shrink: 0;
    }

    .nav-actions .btn-sm {
        padding: 6px 10px;
        font-size: 0.8rem;
        gap: 5px;
        white-space: nowrap;
    }

    .user-status-pill {
        padding: 5px 9px;
        font-size: 0.78rem;
        max-width: 105px;
        gap: 5px;
    }

    #nav-user-pseudo {
        display: inline-block;
        max-width: 75px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* Hide long button labels on mobile: keep clear icon for compact fit */
    .nav-btn-text {
        display: none;
    }

    .hero-title {
        font-size: clamp(1.85rem, 6.5vw, 2.8rem);
        word-break: break-word;
    }

    .hero-badge-pill {
        font-size: 0.72rem;
        padding: 5px 10px;
        max-width: 100%;
        white-space: normal;
        line-height: 1.35;
    }

    .hero-subtitle {
        font-size: 1rem;
        line-height: 1.5;
    }

    .hero-metrics {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
        text-align: left;
    }

    .fails-grid {
        padding: 20px;
    }

    .feature-box {
        padding: 20px;
    }
}

@media (max-width: 640px) {
    .hero-section {
        padding: 30px 0 50px;
    }

    .section {
        padding: 50px 0;
    }

    .btn-lg {
        width: 100%;
    }

    .hero-cta-group {
        flex-direction: column;
        width: 100%;
    }

    .hero-cta-group .btn {
        width: 100%;
    }

    .features-double-banner {
        grid-template-columns: 1fr;
    }

    .skills-grid {
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
    }

    .mini-fails-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 400px) {
    .container {
        padding: 0 10px;
    }

    .nav-wrap {
        height: 58px;
        gap: 4px;
    }

    .brand-logo {
        width: 28px;
        height: 28px;
    }

    .brand-title {
        font-size: 0.85rem;
    }

    .nav-actions {
        gap: 4px;
    }

    .nav-actions .btn-sm {
        padding: 5px 8px;
        font-size: 0.75rem;
    }

    .user-status-pill {
        padding: 4px 6px;
        max-width: 80px;
        font-size: 0.72rem;
    }

    #nav-user-pseudo {
        max-width: 50px;
    }
}

/* ==========================================================================
   Modals & Authentication Portal
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(2, 6, 23, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    animation: fadeInModal 0.25s ease-out;
}

.modal-overlay.hidden {
    display: none !important;
}

@keyframes fadeInModal {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

.modal-content {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.98) 0%, rgba(8, 14, 28, 0.98) 100%);
    border: 1px solid rgba(56, 189, 248, 0.35);
    border-radius: var(--radius-lg);
    padding: 32px 28px;
    text-align: center;
    max-width: 440px;
    width: 100%;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(0, 245, 155, 0.15);
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: relative;
}

.modal-content h2 {
    font-size: 1.6rem;
    color: #fff;
    margin: 0;
}

.modal-content p {
    font-size: 0.92rem;
    color: var(--text-sub);
    line-height: 1.5;
    margin: 0;
}

.modal-btn-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 10px;
}

/* Provider buttons */
.provider-btn-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 10px 0;
    width: 100%;
}

.provider-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 13px 20px;
    border-radius: var(--radius-md);
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    width: 100%;
}

.provider-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.provider-icon {
    font-size: 1.2rem;
    font-weight: 900;
}

.provider-google {
    background: #ffffff;
    color: #1f2937;
    border-color: #d1d5db;
}

.provider-google .provider-icon {
    color: #4285f4;
}

.provider-google:hover {
    background: #f8fafc;
}

/* Development sign-in button */
.gate-dev-btn {
    background: rgba(30, 41, 59, 0.8);
    border: 1px dashed #f59e0b;
    color: #fbbf24;
    padding: 11px 16px;
    border-radius: var(--radius-md);
    font-family: var(--font-heading);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.gate-dev-btn:hover {
    background: rgba(245, 158, 11, 0.15);
    border-color: #fbbf24;
    transform: translateY(-2px);
}

/* Nickname input and feedback */
.pseudo-input {
    width: 100%;
    margin: 10px auto 4px;
    display: block;
    padding: 12px 16px;
    background: rgba(2, 6, 23, 0.85);
    color: #f1f5f9;
    border: 1px solid var(--accent-blue);
    border-radius: var(--radius-md);
    font-size: 1.05rem;
    text-align: center;
    letter-spacing: 0.04em;
    outline: none;
    transition: all 0.2s ease;
}

.pseudo-input:focus {
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(0, 245, 155, 0.25);
}

.pseudo-feedback {
    min-height: 1.2em;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
}

.pseudo-feedback.ok {
    color: var(--primary-green);
}

.pseudo-feedback.warn {
    color: #f87171;
}

/* Logout button in navbar */
.btn-logout {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #fca5a5;
}

.btn-logout:hover {
    background: rgba(239, 68, 68, 0.3);
    border-color: #ef4444;
    color: #fff;
    transform: translateY(-2px);
}
