@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&family=Orbitron:wght@400;700;900&family=Fira+Code:wght@400;500&display=swap');

:root {
    /* Color Palette - Genesis Synthesis */
    --bg-dark: #070214;
    --bg-darker: #030108;
    --bg-card: rgba(15, 10, 40, 0.7);
    --primary: #ff00cc;
    /* Genesis Pink */
    --secondary: #ff9900;
    /* Genesis Orange */
    --accent: #00ffff;
    /* Cyber Cyan */
    --accent-purple: #9d4edd;
    /* Deep Purple */
    --accent-blue: #4361ee;
    /* Electric Blue */
    --text-main: #ffffff;
    --text-muted: #b0b0d0;
    --border-color: rgba(255, 255, 255, 0.1);
    --border-glow: rgba(255, 0, 204, 0.3);

    /* Gradients */
    --grad-genesis: linear-gradient(90deg, #ff00cc, #ff9900);
    --grad-cyber: linear-gradient(135deg, #ff00cc, #9d4edd, #4361ee);
    --grad-surface: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0) 100%);
    --grad-card: linear-gradient(145deg, rgba(255, 0, 204, 0.1) 0%, rgba(157, 78, 221, 0.05) 50%, rgba(0, 0, 0, 0) 100%);

    /* Layout */
    --container-max-width: 1200px;
    --section-padding: 100px 20px;

    /* Transitions */
    --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Scanline Overlay - Cinematic CRT Effect */
body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.15) 50%),
        linear-gradient(90deg, rgba(255, 0, 0, 0.03), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.03));
    background-size: 100% 3px, 3px 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.6;
}

/* Gradient Mesh Wave Visualization */
.gradient-mesh {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -4;
    overflow: hidden;
    pointer-events: none;
}

.cyber-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -3;
    pointer-events: none;
    background: radial-gradient(circle at 50% 50%, rgba(157, 78, 221, 0.05), transparent 70%);
    mix-blend-mode: screen;
    animation: overlayPulse 10s ease-in-out infinite;
}

@keyframes overlayPulse {

    0%,
    100% {
        opacity: 0.5;
    }

    50% {
        opacity: 0.8;
    }
}

.gradient-mesh::before {
    content: "";
    position: absolute;
    top: 20%;
    left: -20%;
    width: 80%;
    height: 60%;
    background: radial-gradient(ellipse at center, rgba(255, 0, 204, 0.15) 0%, transparent 70%);
    animation: meshFloat1 15s ease-in-out infinite;
    filter: blur(80px);
}

.gradient-mesh::after {
    content: "";
    position: absolute;
    bottom: 10%;
    right: -10%;
    width: 70%;
    height: 50%;
    background: radial-gradient(ellipse at center, rgba(157, 78, 221, 0.12) 0%, transparent 70%);
    animation: meshFloat2 18s ease-in-out infinite reverse;
    filter: blur(100px);
}

@keyframes meshFloat1 {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(10%, 5%) scale(1.1);
    }

    66% {
        transform: translate(-5%, -10%) scale(0.95);
    }
}

@keyframes meshFloat2 {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    50% {
        transform: translate(-15%, 10%) rotate(10deg);
    }
}

/* Wave Background - Enhanced */
.wave-bg {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    z-index: -2;
    overflow: hidden;
}

.wave-bg::before {
    content: "";
    position: absolute;
    bottom: -50%;
    left: -10%;
    width: 120%;
    height: 100%;
    background:
        radial-gradient(ellipse 80% 50% at 50% 100%, rgba(255, 0, 204, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 30% 90%, rgba(157, 78, 221, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse 70% 45% at 70% 95%, rgba(255, 153, 0, 0.05) 0%, transparent 50%);
    filter: blur(40px);
    animation: waveUndulate 20s ease-in-out infinite;
}

@keyframes waveUndulate {

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

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

/* Dot Grid - Enhanced */
.dot-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -5;
}

/* Particle Canvas Layer */
#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* Floating Geometric Shapes */
.geo-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.geo-shape {
    position: absolute;
    border: 1px solid rgba(255, 0, 204, 0.2);
    animation: geoFloat 20s ease-in-out infinite;
}

.geo-shape:nth-child(1) {
    top: 15%;
    left: 10%;
    width: 60px;
    height: 60px;
    transform: rotate(45deg);
    animation-delay: 0s;
}

.geo-shape:nth-child(2) {
    top: 60%;
    right: 15%;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border-color: rgba(0, 255, 255, 0.15);
    animation-delay: -5s;
}

.geo-shape:nth-child(3) {
    bottom: 25%;
    left: 20%;
    width: 30px;
    height: 30px;
    border-color: rgba(255, 153, 0, 0.2);
    animation-delay: -10s;
}

.geo-shape:nth-child(4) {
    top: 40%;
    right: 8%;
    width: 50px;
    height: 50px;
    transform: rotate(30deg);
    border-color: rgba(157, 78, 221, 0.2);
    animation-delay: -15s;
}

@keyframes geoFloat {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.3;
    }

    25% {
        transform: translateY(-30px) rotate(90deg);
        opacity: 0.6;
    }

    50% {
        transform: translateY(-15px) rotate(180deg);
        opacity: 0.4;
    }

    75% {
        transform: translateY(-40px) rotate(270deg);
        opacity: 0.5;
    }
}

@keyframes geoPulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 0 40px rgba(0, 255, 255, 0.5);
    }

    50% {
        transform: scale(1.3);
        box-shadow: 0 0 60px rgba(0, 255, 255, 0.8);
    }
}

/* Framed Highlights */
.framed {
    display: inline-block;
    border: 1px solid var(--primary);
    padding: 2px 12px;
    position: relative;
}

.framed::before,
.framed::after {
    content: "";
    position: absolute;
    width: 6px;
    height: 6px;
    background: var(--primary);
}

.framed::before {
    top: -3px;
    left: -3px;
}

.framed::after {
    bottom: -3px;
    right: -3px;
}



/* Glitch Animation */
.glitch-text {
    position: relative;
}

.glitch-text::before,
.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-dark);
}

.glitch-text::before {
    left: 2px;
    text-shadow: -2px 0 #ff00c1;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}

.glitch-text::after {
    left: -2px;
    text-shadow: -2px 0 #00fff9, 2px 2px #ff00c1;
    animation: glitch-anim2 1s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% {
        clip: rect(31px, 9999px, 94px, 0);
    }

    10% {
        clip: rect(112px, 9999px, 34px, 0);
    }

    /* ... more keyframes for variety ... */
    100% {
        clip: rect(67px, 9999px, 62px, 0);
    }
}

@keyframes glitch-anim2 {
    0% {
        clip: rect(12px, 9999px, 129px, 0);
    }

    100% {
        clip: rect(100px, 9999px, 12px, 0);
    }
}

.hero-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 40px;
    max-width: 500px;
}

.stat-card {
    padding: 20px;
    border-radius: 12px;
    text-align: left;
    background: var(--grad-surface);
    position: relative;
    overflow: hidden;
    transition: var(--transition-smooth);
}

.stat-card.primary {
    background: linear-gradient(145deg, rgba(255, 0, 204, 0.15) 0%, rgba(157, 78, 221, 0.05) 100%);
    border: 1px solid rgba(255, 0, 204, 0.2);
}

.stat-card.secondary {
    background: linear-gradient(145deg, rgba(255, 153, 0, 0.15) 0%, rgba(157, 78, 221, 0.05) 100%);
    border: 1px solid rgba(255, 153, 0, 0.2);
}

.stat-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 12px;
    padding: 1px;
    background: linear-gradient(135deg, rgba(255, 0, 204, 0.3), rgba(157, 78, 221, 0.1), transparent);
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.5;
    transition: opacity 0.4s ease;
}

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

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(255, 0, 204, 0.15);
}

.stat-card .stat-label {
    display: block;
    font-size: 0.65rem;
    color: var(--text-muted);
    letter-spacing: 2px;
    margin-bottom: 8px;
    font-family: 'Fira Code', monospace;
}

.stat-card .stat-value {
    font-size: 1.4rem;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    transition: var(--transition-smooth);
}

/* Counter Animation Effects */
.stat-value.counting {
    animation: counterGlitch 0.1s infinite;
}

@keyframes counterGlitch {

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

    25% {
        transform: translate(-1px, 1px);
    }

    50% {
        transform: translate(1px, -1px);
    }

    75% {
        transform: translate(-1px, -1px);
    }
}

.stat-value.threat-critical {
    animation: threatPulse 1s ease-in-out infinite;
}

@keyframes threatPulse {

    0%,
    100% {
        text-shadow: 0 0 15px var(--primary);
        transform: scale(1);
    }

    50% {
        text-shadow: 0 0 30px var(--primary), 0 0 60px rgba(255, 0, 204, 0.5);
        transform: scale(1.05);
    }
}

.surreal-glow {
    position: relative;
}

.surreal-glow::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 80%;
    height: 80%;
    background: var(--primary);
    filter: blur(120px);
    opacity: 0.3;
    transform: translate(-50%, -50%);
    z-index: -1;
}

.hero-image {
    flex: 1;
}

.image-wrapper img {
    width: 100%;
    filter: drop-shadow(0 0 30px rgba(255, 0, 204, 0.3));
}

/* --- Command Center Switcher Logic --- */
.hero-image.live-active .image-wrapper {
    display: none;
}

.hero-image.live-active .leaderboard-wrapper {
    display: block !important;
    /* Force show when active */
    animation: fadeScaleIn 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    max-height: 600px;
    overflow-y: auto;
}

@keyframes fadeScaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* --- Refined Layout & 3D Tilt (Active Mode) --- */

/* 1. Layout: Maximize Left Panel Width */
.hero-container.live-mode .hero-content {
    flex: 1.8 !important;
    /* Maximized width for text */
    margin-right: 30px;
    transition: var(--transition-smooth);
    /* Smooth fade/scale */
}

/* 2. Responsive Text Scaling in Split View */
.hero-container.live-mode .hero-title {
    font-size: clamp(2rem, 4vw, 3rem);
    /* Further reduced for balance */
}

.hero-container.live-mode .hero-subtitle {
    font-size: 1rem;
    max-width: 90%;
}

.hero-container.live-mode .hero-image {
    flex: 1 !important;
    /* Standard width for image col */
    perspective: 1500px;
    /* Enable 3D space */
}

/* 3. 3D Tilted Scoreboard */
.hero-image.live-active .leaderboard-wrapper {
    display: block !important;
    height: 100%;
    max-height: 850px;
    /* Increased height for top 10 */
    overflow-y: auto;

    /* The Tilt */
    transform-origin: right center;
    /* Pivot from right to prevent overflow */
    transform: rotateY(-10deg) rotateX(2deg) scale(0.95);
    transform-style: preserve-3d;
    box-shadow: -30px 20px 60px rgba(0, 0, 0, 0.5),
        inset 0 0 0 1px rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 0, 204, 0.3);
    background: rgba(15, 10, 40, 0.9);
    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.5s ease;
}

/* Optimize Inner Content to Prevent Overflow */
.hero-image.live-active .rank-card {
    max-width: 100%;
    overflow: hidden;
    /* Contain inner floaters */
}

/* Specific fix for card text overflow */
.hero-image.live-active .team-name {
    font-size: 0.9rem;
    /* Smaller font */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    width: 100%;
    padding: 0 4px;
}

.hero-image.live-active .leaderboard-table td {
    padding: 8px 4px;
    /* Tighter padding */
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
    /* Force truncation on table cells too */
}

.hero-image.live-active .leaderboard-header h2 {
    font-size: 1.2rem !important;
    /* Smaller header */
}

/* Hover effect to straighten it slightly for interaction */
.hero-image.live-active .leaderboard-wrapper:hover {
    transform: rotateY(0deg) rotateX(0deg) scale(1);
    box-shadow: -15px 15px 40px rgba(255, 0, 204, 0.2);
    z-index: 100;
}

/* --- Interaction: Focus Right --- */
.hero-container.live-mode.focus-right .hero-content {
    opacity: 0.5;
    transform: scale(0.98);
    filter: blur(2px);
}

/* --- Responsive Stacking (Tablet/Small Laptop) --- */
@media (max-width: 1100px) {
    .hero-container.live-mode {
        flex-direction: column !important;
        align-items: center;
        text-align: center;
    }

    .hero-container.live-mode .hero-content {
        width: 100%;
        margin-right: 0;
        margin-bottom: 40px;
        align-items: center;
        text-align: center;
    }

    .hero-container.live-mode .hero-stats-grid {
        margin: 40px auto;
        /* Center stats */
    }

    .hero-container.live-mode .hero-image {
        width: 100%;
        perspective: none;
        /* Disable extreme 3D on small screens */
    }

    /* Flatten the tilt on mobile for usability */
    .hero-image.live-active .leaderboard-wrapper {
        transform: none !important;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    }
}

@keyframes float {

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

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

/* Team Section */
.team {
    padding: 100px 0;
}

.team-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin-top: 60px;
}

.team-card {
    flex: 0 1 350px;
    padding: 40px 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: var(--transition-smooth);
    background: linear-gradient(180deg,
            rgba(255, 0, 204, 0.08) 0%,
            rgba(157, 78, 221, 0.04) 50%,
            var(--bg-card) 100%);
}

.team-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 16px;
    padding: 1px;
    background: linear-gradient(180deg, rgba(255, 0, 204, 0.4), rgba(157, 78, 221, 0.2), transparent);
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    transition: opacity 0.4s ease;
}

.team-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 50px rgba(255, 0, 204, 0.2);
}

.team-card:hover::before {
    background: linear-gradient(180deg, rgba(255, 0, 204, 0.8), rgba(157, 78, 221, 0.4), rgba(0, 255, 255, 0.2));
}

.avatar-wrapper {
    width: 120px;
    height: 120px;
    margin: 0 auto 25px;
    position: relative;
    z-index: 1;
}

.avatar-wrapper::before {
    content: "";
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: var(--grad-genesis);
    border-radius: 50%;
    z-index: -1;
    opacity: 0.6;
    filter: blur(15px);
    transition: var(--transition-smooth);
}

.team-card:hover .avatar-wrapper::before {
    opacity: 0.9;
    filter: blur(20px);
    transform: scale(1.1);
}

.avatar-wrapper img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--bg-dark);
    transition: var(--transition-smooth);
}

.team-card:hover .avatar-wrapper img {
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(255, 0, 204, 0.4);
}

.team-card h3 {
    margin-bottom: 5px;
    font-size: 24px;
    transition: var(--transition-smooth);
}

.team-card:hover h3 {
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.team-card .role {
    display: block;
    font-size: 16px;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
    font-family: 'Fira Code', monospace;
}

.team-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
.brand-font {
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    letter-spacing: 2px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-smooth);
}

ul {
    list-style: none;
}

.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Glassmorphism Utility */
.glass {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    position: relative;
    overflow: hidden;
}

/* Premium Gradient Border Card */
.gradient-border {
    position: relative;
    background: var(--bg-card);
    border-radius: 16px;
    padding: 2px;
    overflow: visible;
}

.gradient-border::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 16px;
    padding: 1px;
    background: linear-gradient(135deg, var(--primary), var(--accent-purple), var(--accent));
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.5;
    transition: opacity 0.4s ease;
}

.gradient-border:hover::before {
    opacity: 1;
}

/* Animated Gradient Border */
.animated-border {
    position: relative;
    background: var(--bg-card);
    border-radius: 16px;
}

.animated-border::before {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: 18px;
    background: linear-gradient(90deg,
            var(--primary),
            var(--accent-purple),
            var(--accent),
            var(--secondary),
            var(--primary));
    background-size: 300% 100%;
    animation: gradientShift 8s linear infinite;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.animated-border:hover::before {
    opacity: 1;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    100% {
        background-position: 300% 50%;
    }
}

/* Card Glow Effect */
.card-glow {
    position: relative;
}

.card-glow::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 80%;
    height: 80%;
    background: var(--primary);
    filter: blur(60px);
    opacity: 0;
    transform: translate(-50%, -50%);
    transition: opacity 0.4s ease;
    z-index: -1;
    pointer-events: none;
}

.card-glow:hover::after {
    opacity: 0.15;
}

/* Enhanced Card Hover */
.card-lift {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-lift:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.3),
        0 0 40px rgba(255, 0, 204, 0.1);
}

/* Shimmer Effect on Cards */
.card-shimmer {
    position: relative;
    overflow: hidden;
}

.card-shimmer::after {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg,
            transparent 40%,
            rgba(255, 255, 255, 0.03) 50%,
            transparent 60%);
    transform: translateX(-100%) rotate(45deg);
    transition: none;
}

.card-shimmer:hover::after {
    animation: shimmer 0.8s ease forwards;
}

@keyframes shimmer {
    100% {
        transform: translateX(100%) rotate(45deg);
    }
}

/* Neon Border Pulse */
.neon-pulse {
    animation: neonPulse 2s ease-in-out infinite;
}

@keyframes neonPulse {

    0%,
    100% {
        box-shadow: 0 0 5px var(--primary),
            0 0 10px rgba(255, 0, 204, 0.3);
    }

    50% {
        box-shadow: 0 0 20px var(--primary),
            0 0 40px rgba(255, 0, 204, 0.5);
    }
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    text-align: center;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

/* Button Ripple Effect */
.btn::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease, opacity 0.6s ease;
    opacity: 0;
}

.btn:active::after {
    width: 300px;
    height: 300px;
    opacity: 0;
}

.btn-primary {
    background: linear-gradient(45deg, var(--primary), var(--accent));
    color: white;
    box-shadow: 0 0 15px rgba(255, 0, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 5px 30px rgba(255, 0, 255, 0.5),
        0 0 60px rgba(255, 0, 255, 0.2);
}

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

.btn-outline {
    background: transparent;
    border: 1px solid var(--secondary);
    color: var(--secondary);
    box-shadow: 0 0 10px rgba(255, 153, 0, 0.2);
}

.btn-outline:hover {
    background: var(--secondary);
    color: var(--bg-dark);
    box-shadow: 0 5px 30px rgba(255, 153, 0, 0.4),
        0 0 60px rgba(255, 153, 0, 0.15);
    transform: translateY(-3px) scale(1.02);
}

.btn-outline:active {
    transform: translateY(0) scale(0.98);
}

/* Glowing Button Variant */
.btn-glow {
    animation: btnGlow 2s ease-in-out infinite;
}

@keyframes btnGlow {

    0%,
    100% {
        box-shadow: 0 0 20px var(--primary), 0 0 40px rgba(255, 0, 204, 0.3);
    }

    50% {
        box-shadow: 0 0 30px var(--primary), 0 0 60px rgba(255, 0, 204, 0.5);
    }
}

/* Cursor Trail Styles */
.cursor-trail {
    position: fixed;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    mix-blend-mode: screen;
    transition: transform 0.1s ease, opacity 0.3s ease;
}

.cursor-dot {
    position: fixed;
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 10px var(--primary), 0 0 20px rgba(255, 0, 204, 0.5);
}

/* Typing Animation */
.typing-text {
    overflow: hidden;
    border-right: 2px solid var(--primary);
    white-space: nowrap;
    animation: typing 3s steps(60, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
    from {
        width: 0;
    }

    to {
        width: 100%;
    }
}

@keyframes blink-caret {

    from,
    to {
        border-color: transparent;
    }

    50% {
        border-color: var(--primary);
    }
}

/* Multi-line Typing Effect (using JS) */
.typewriter {
    font-family: 'Fira Code', monospace;
}

.typewriter .cursor {
    display: inline-block;
    width: 2px;
    height: 1em;
    background: var(--primary);
    animation: cursorBlink 1s infinite;
    vertical-align: text-bottom;
    margin-left: 2px;
}

@keyframes cursorBlink {

    0%,
    50% {
        opacity: 1;
    }

    51%,
    100% {
        opacity: 0;
    }
}

/* Magnetic Button Effect */
.btn-magnetic {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Focus States */
.btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 0, 204, 0.3);
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(255, 0, 204, 0.2);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.fade-in {
    animation: fadeIn 0.8s ease forwards;
}

/* Scroll Reveal Animations */
.reveal {
    opacity: 0;
    transform: translateY(60px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-60px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-left.revealed {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(60px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-right.revealed {
    opacity: 1;
    transform: translateX(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.85);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-scale.revealed {
    opacity: 1;
    transform: scale(1);
}

/* Staggered Grid Animations */
.stagger-grid>* {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.stagger-grid.revealed>*:nth-child(1) {
    transition-delay: 0.1s;
}

.stagger-grid.revealed>*:nth-child(2) {
    transition-delay: 0.2s;
}

.stagger-grid.revealed>*:nth-child(3) {
    transition-delay: 0.3s;
}

.stagger-grid.revealed>*:nth-child(4) {
    transition-delay: 0.4s;
}

.stagger-grid.revealed>*:nth-child(5) {
    transition-delay: 0.5s;
}

.stagger-grid.revealed>*:nth-child(6) {
    transition-delay: 0.6s;
}

.stagger-grid.revealed>* {
    opacity: 1;
    transform: translateY(0);
}

/* Parallax Elements */
.parallax {
    will-change: transform;
    transition: transform 0.1s linear;
}

/* Glitch on Scroll */
@keyframes glitchReveal {
    0% {
        clip-path: inset(0 100% 0 0);
        opacity: 0;
    }

    20% {
        clip-path: inset(0 80% 0 0);
        opacity: 0.3;
    }

    40% {
        clip-path: inset(0 50% 0 0);
        opacity: 0.6;
    }

    60% {
        clip-path: inset(0 20% 0 0);
        opacity: 0.8;
    }

    80% {
        clip-path: inset(0 5% 0 0);
        opacity: 0.9;
    }

    100% {
        clip-path: inset(0 0 0 0);
        opacity: 1;
    }
}

.glitch-reveal {
    opacity: 0;
}

.glitch-reveal.revealed {
    animation: glitchReveal 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Scoreboard Section Styles */
.scoreboard-section {
    padding: 80px 0;
    position: relative;
    background: transparent;
}

.scoreboard-grid {
    display: grid;
    grid-template-columns: 1.2fr 1.8fr;
    gap: 30px;
    margin-top: 50px;
}

.scoreboard-panel,
.graph-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    height: 600px;
    position: relative;
}

/* Panel Header */
.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.panel-title {
    font-family: 'Fira Code', monospace;
    font-size: 1.1rem;
    color: var(--primary);
    margin: 0;
    letter-spacing: 1px;
}

/* Live Indicator */
.live-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    color: var(--accent);
    text-transform: uppercase;
}

.blink-dot {
    width: 8px;
    height: 8px;
    background-color: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent);
    animation: blink 1.5s infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }
}

/* Ranking Styles */
.top-three-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 24px;
    align-items: end;
}



.rank-name {
    display: block;
    font-family: 'Fira Code', monospace;
    font-weight: 600;
    margin: 10px 0 4px;
    font-size: 0.95rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-score {
    font-family: 'Orbitron', sans-serif;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Leaderboard List */
.leaderboard-list-container {
    flex: 1;
    overflow-y: auto;
    padding-right: 8px;
}

.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
}

.leaderboard-table th {
    text-align: left;
    font-family: 'Fira Code', monospace;
    font-size: 0.8rem;
    color: var(--text-muted);
    padding-bottom: 12px;
    border-bottom: 1px dashed var(--border-color);
}

.leaderboard-table td {
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
}

.leaderboard-table tr:hover td {
    color: var(--primary);
    text-shadow: 0 0 8px rgba(255, 0, 204, 0.4);
}

.rank-num {
    color: var(--text-muted);
    font-weight: 700;
}

.text-right {
    text-align: right;
}

/* Custom Scrollbar */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: var(--border-glow);
    border-radius: 3px;
}

/* Graph Panel */
.graph-controls {
    display: flex;
    gap: 6px;
}

.control-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    opacity: 0.7;
}

.control-dot.red {
    background: #ff5f56;
}

.control-dot.yellow {
    background: #ffbd2e;
}

.control-dot.green {
    background: #27c93f;
}

.graph-container {
    flex: 1;
    position: relative;
    display: flex;
    align-items: flex-end;
    padding: 20px 0 40px 40px;
    /* Space for axis labels */
}

/* Loader */
.loader-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(7, 2, 20, 0.8);
    z-index: 10;
    backdrop-filter: blur(4px);
}

.cyber-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid transparent;
    border-top-color: var(--primary);
    border-right-color: var(--secondary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
    box-shadow: 0 0 15px var(--primary);
}

.loading-text {
    font-family: 'Fira Code', monospace;
    letter-spacing: 2px;
    font-size: 0.9rem;
    color: var(--text-muted);
    animation: pulse 1.5s infinite;
}

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

/* Graph Body */
.graph-body {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    position: relative;
    z-index: 2;
}

.graph-bar-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: flex-end;
    margin: 0 10px;
    group: hover;
    position: relative;
}

.graph-bar {
    width: 60%;
    background: linear-gradient(180deg, var(--accent) 0%, rgba(67, 97, 238, 0.2) 100%);
    border-top: 2px solid var(--accent);
    position: relative;
    transition: height 1s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.2);
    border-radius: 4px 4px 0 0;
    min-height: 4px;
}

.graph-bar::after {
    content: attr(title);
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-darker);
    border: 1px solid var(--accent);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    color: var(--accent);
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    z-index: 10;
    font-family: 'Fira Code', monospace;
}

.graph-bar:hover::after {
    opacity: 1;
}

.graph-bar:hover {
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.5);
    background: linear-gradient(180deg, var(--primary) 0%, rgba(255, 0, 204, 0.2) 100%);
    border-top-color: var(--primary);
}

.bar-label {
    margin-top: 12px;
    font-family: 'Fira Code', monospace;
    font-size: 0.8rem;
    color: var(--text-muted);
    transform: rotate(-45deg);
    transform-origin: left top;
    white-space: nowrap;
}

/* Grid Lines */
.graph-grid {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding-bottom: 40px;
}

.grid-line {
    width: 100%;
    height: 1px;
    background: rgba(255, 255, 255, 0.05);
}

/* Responsive */
@media (max-width: 900px) {
    .scoreboard-grid {
        grid-template-columns: 1fr;
    }

    .scoreboard-panel,
    .graph-panel {
        height: 500px;
    }
}

/* --- Leaderboard Section Redesign --- */
.leaderboard-section {
    padding: 100px 0;
    position: relative;
    overflow: hidden;
    background: radial-gradient(circle at 50% 0%, rgba(255, 0, 204, 0.05), transparent 50%);
}



/* Animations */
@keyframes neon-pulse-primary {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(255, 0, 204, 0.2);
        border-color: rgba(255, 0, 204, 0.4);
    }

    50% {
        box-shadow: 0 0 50px rgba(255, 0, 204, 0.5);
        border-color: var(--primary);
    }
}

@keyframes neon-pulse-secondary {

    0%,
    100% {
        box-shadow: 0 0 15px rgba(157, 78, 221, 0.1);
        border-color: rgba(157, 78, 221, 0.3);
    }

    50% {
        box-shadow: 0 0 35px rgba(157, 78, 221, 0.4);
        border-color: var(--accent-purple);
    }
}

@keyframes neon-pulse-tertiary {

    0%,
    100% {
        box-shadow: 0 0 10px rgba(0, 255, 255, 0.1);
        border-color: rgba(0, 255, 255, 0.3);
    }

    50% {
        box-shadow: 0 0 25px rgba(0, 255, 255, 0.4);
        border-color: var(--accent);
    }
}

/* Table Style */
.leaderboard-container {
    max-width: 900px;
    margin: 0 auto;
    background: rgba(15, 10, 40, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 0;
    overflow: hidden;
}

.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Fira Code', monospace;
}

.leaderboard-table th {
    text-align: left;
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.leaderboard-table td {
    padding: 18px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition-smooth);
}

.leaderboard-table tr:hover td {
    background: rgba(255, 0, 204, 0.05);
    color: #fff;
}

.rank-col {
    width: 80px;
    color: var(--text-muted);
}

.score-col {
    text-align: right;
    color: var(--accent);
}

@media (max-width: 768px) {
    .top-3-grid {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .rank-1 {
        order: 1;
    }
}

/* Leaderboard Section Styles - Live Ops HUD Redesign */
.leaderboard-section {
    padding: 80px 0;
    position: relative;
    background: radial-gradient(circle at center, #1a1033 0%, #05020a 100%);
    overflow: hidden;
}

/* Background Grid/Mesh for depth */
.leaderboard-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: radial-gradient(circle at center, black 0%, transparent 80%);
    pointer-events: none;
}

.leaderboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

.leaderboard-header .section-title {
    font-size: 2rem;
    margin-bottom: 0;
    display: flex;
    align-items: center;
    gap: 15px;
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: #fff;
    text-shadow: 0 0 20px rgba(255, 0, 204, 0.5);
}

.leaderboard-header .prompt {
    color: var(--primary);
    font-family: 'Fira Code', monospace;
    font-weight: bold;
    animation: flashPrompt 1s infinite steps(2, start);
}

@keyframes flashPrompt {
    to {
        visibility: hidden;
    }
}

.live-indicator {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'Fira Code', monospace;
    font-size: 0.85rem;
    letter-spacing: 2px;
    color: #ff3131;
    background: rgba(255, 49, 49, 0.1);
    padding: 8px 16px;
    border: 1px solid rgba(255, 49, 49, 0.3);
    border-radius: 4px;
    box-shadow: 0 0 15px rgba(255, 49, 49, 0.2);
}

.live-dot {
    width: 8px;
    height: 8px;
    background: #ff3131;
    border-radius: 50%;
    box-shadow: 0 0 10px #ff3131;
    animation: livePulse 2s infinite ease-in-out;
}

@keyframes livePulse {

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

    50% {
        opacity: 0.5;
        transform: scale(0.85);
    }
}


.header-line {
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255, 0, 204, 0.5), transparent);
    margin-bottom: 60px;
    position: relative;
}

.header-line::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100px;
    height: 4px;
    background: var(--primary);
    box-shadow: 0 0 15px var(--primary);
    transform: translateY(-50%);
    animation: scanLineMove 4s infinite linear;
}

@keyframes scanLineMove {
    0% {
        left: 0;
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        left: 100%;
        opacity: 0;
    }
}

#leaderboard-status-message {
    text-align: center;
    font-family: 'Fira Code', monospace;
    font-size: 1rem;
    color: var(--secondary);
    margin: -20px auto 40px;
    padding: 10px 20px;
    background: rgba(255, 153, 0, 0.05);
    border-radius: 4px;
    text-shadow: 0 0 10px rgba(255, 153, 0, 0.5);
    max-width: fit-content;
    line-height: 1.5;
    position: relative;
    z-index: 10;
}

#leaderboard-status-message:empty {
    display: none;
}

/* Neutral State for Rank Cards (Scores = 0) */
.rank-card.is-neutral {
    border-color: rgba(255, 255, 255, 0.1) !important;
    background: rgba(10, 5, 25, 0.8) !important;
    box-shadow: none !important;
    animation: none !important;
    transform: scale(1) !important;
    filter: grayscale(0.5);
    opacity: 0.8;
}

.rank-card.is-neutral .rank-badge-chip {
    border-color: rgba(255, 255, 255, 0.2) !important;
    box-shadow: none !important;
}

.rank-card.is-neutral .rank-num,
.rank-card.is-neutral .team-name {
    color: rgba(255, 255, 255, 0.6) !important;
    text-shadow: none !important;
}

/* Top 3 Cards - High Stakes Styling */
.top-rank-container {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 30px;
    margin-bottom: 80px;
    perspective: 1000px;
}

.rank-card {
    flex: 1;
    max-width: 320px;
    min-width: 260px;
    position: relative;
    background: rgba(10, 5, 25, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    /* Use a slight rounding for a premium feel */
    padding: 0;
    display: flex;
    flex-direction: column;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.8),
        inset 0 0 20px rgba(255, 255, 255, 0.05);
    margin-top: 30px;
    /* Space for the overlapping badge */
}

/* Internal Container for padding/content */
.card-content {
    padding: 60px 20px 25px;
    text-align: center;
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Complex Background Layers */
.rank-card::before {
    /* Noise Texture */
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.04;
    pointer-events: none;
    mix-blend-mode: overlay;
}

.rank-card::after {
    /* Scanline Overlay */
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 50%, rgba(0, 0, 0, 0.3) 50%);
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 1;
}

/* Rank Badge - HUD Chip */
.rank-badge-chip {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    width: 90px;
    height: 70px;
    background: #000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 5;
    border: 2px solid transparent;
    border-radius: 6px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.8),
        0 0 15px rgba(0, 0, 0, 0.5);
    /* Stronger shadow for mounting feel */
}


.rank-text {
    font-family: 'Fira Code', monospace;
    font-size: 14px;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 2px;
}

.rank-num {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
    font-weight: 900;
    line-height: 1;
}

/* Rank Specific Styles & Hierarchy */

/* RANK 1 - Hero */
.rank-card.rank-1 {
    min-height: 220px;
    order: 2;
    z-index: 10;
    border: 2px solid var(--primary);
    background: linear-gradient(180deg, rgba(255, 0, 204, 0.2) 0%, rgba(10, 5, 25, 0.98) 100%);
    box-shadow: 0 0 60px rgba(255, 0, 204, 0.4),
        inset 0 0 40px rgba(255, 0, 204, 0.2);
    /* Deeper inner glow */
    transform: scale(1.05);
    animation: pulse-rank-1 8s infinite ease-in-out;
}


.rank-1 .rank-badge-chip {
    border: 2px solid var(--primary);
    box-shadow: 0 0 20px rgba(255, 0, 204, 0.6);
}

.rank-1 .rank-num {
    color: var(--primary);
    text-shadow: 0 0 12px var(--primary);
}

.rank-1 .team-name {
    color: var(--primary);
    font-size: 1.8rem;
    text-shadow: 0 0 25px rgba(255, 0, 204, 0.6);
}

/* RANK 2 - Secondary */
.rank-card.rank-2 {
    min-height: 200px;
    order: 1;
    border: 2px solid var(--secondary);
    background: linear-gradient(180deg, rgba(255, 153, 0, 0.08) 0%, rgba(10, 5, 25, 0.95) 100%);
    box-shadow: 0 0 30px rgba(255, 153, 0, 0.15), inset 0 0 15px rgba(255, 153, 0, 0.05);
    animation: pulse-rank-2 10s infinite ease-in-out;
}


.rank-2 .rank-badge-chip {
    border: 2px solid var(--secondary);
    box-shadow: 0 0 15px rgba(255, 153, 0, 0.4);
}

.rank-2 .rank-num {
    color: var(--secondary);
    text-shadow: 0 0 10px var(--secondary);
}

.rank-2 .team-name {
    color: var(--secondary);
    font-size: 1.5rem;
    text-shadow: 0 0 15px rgba(255, 153, 0, 0.4);
}

/* RANK 3 - Tertiary */
.rank-card.rank-3 {
    min-height: 200px;
    order: 3;
    border: 2px solid var(--accent);
    background: linear-gradient(180deg, rgba(0, 255, 255, 0.08) 0%, rgba(10, 5, 25, 0.95) 100%);
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.15), inset 0 0 15px rgba(0, 255, 255, 0.05);
    animation: pulse-rank-3 10s infinite ease-in-out;
}


.rank-3 .rank-badge-chip {
    border: 2px solid var(--accent);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.4);
}

.rank-3 .rank-num {
    color: var(--accent);
    text-shadow: 0 0 10px var(--accent);
}

.rank-3 .team-name {
    color: var(--accent);
    font-size: 1.4rem;
    text-shadow: 0 0 15px rgba(0, 255, 255, 0.4);
}


/* Content Typography */
.team-name {
    font-family: 'Orbitron', sans-serif;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
    line-height: 1.2;
}

.team-score {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.85);
    letter-spacing: 1px;
    margin: 0 auto;
    width: fit-content;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
    /* Reduced competition with team name */
}


.score-unit {
    font-size: 1rem;
    opacity: 0.6;
    margin-left: 5px;
}


/* Pulse Micro-Animations */
@keyframes pulse-rank-1 {

    0%,
    100% {
        box-shadow: 0 0 60px rgba(255, 0, 204, 0.4), inset 0 0 40px rgba(255, 0, 204, 0.2);
        border-color: var(--primary);
    }

    50% {
        box-shadow: 0 0 80px rgba(255, 0, 204, 0.55), inset 0 0 50px rgba(255, 0, 204, 0.3);
        border-color: rgba(255, 0, 204, 0.9);
    }
}

@keyframes pulse-rank-2 {

    0%,
    100% {
        box-shadow: 0 0 30px rgba(255, 153, 0, 0.15), inset 0 0 15px rgba(255, 153, 0, 0.05);
        border-color: var(--secondary);
    }

    50% {
        box-shadow: 0 0 45px rgba(255, 153, 0, 0.25), inset 0 0 20px rgba(255, 153, 0, 0.1);
        border-color: rgba(255, 153, 0, 0.7);
    }
}

@keyframes pulse-rank-3 {

    0%,
    100% {
        box-shadow: 0 0 30px rgba(0, 255, 255, 0.15), inset 0 0 15px rgba(0, 255, 255, 0.05);
        border-color: var(--accent);
    }

    50% {
        box-shadow: 0 0 45px rgba(0, 255, 255, 0.25), inset 0 0 20px rgba(0, 255, 255, 0.1);
        border-color: rgba(0, 255, 255, 0.7);
    }
}

/* Active Hover State */
.rank-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9);
    z-index: 20;
}

.rank-card.rank-1:hover {
    transform: translateY(-8px) scale(1.08);
    /* Maintain dominance on hover */
}


/* Leaderboard Table - Tech Update */
.leaderboard-table-wrapper {
    max-width: 1000px;
    margin: 0 auto;
    background: linear-gradient(145deg, rgba(255, 0, 204, 0.1) 0%, rgba(157, 78, 221, 0.05) 100%);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 0, 204, 0.2);
    border-left: 2px solid var(--primary);
    box-shadow: 0 0 30px rgba(255, 0, 204, 0.1);
    padding: 0;
    position: relative;
    overflow: hidden;
}

.leaderboard-table th {
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-muted);
    font-family: 'Fira Code', monospace;
    font-size: 0.75rem;
    padding: 15px 25px;
    text-transform: uppercase;
}

.leaderboard-table td {
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    padding: 20px 25px;
    font-family: 'Inter', sans-serif;
    color: rgba(255, 255, 255, 0.9);
}

.leaderboard-table tr:hover td {
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 0, 204, 0.5);
}

@media (max-width: 968px) {
    .top-rank-container {
        flex-direction: column;
        align-items: center;
        gap: 60px;
    }

    .rank-card {
        width: 100%;
        max-width: 320px;
        min-height: 180px;
        margin-top: 25px;
    }

    .rank-badge-chip {
        width: 80px;
        height: 60px;
        top: -20px;
    }
}