/* CrowdStrike Survivor Games Leaderboard Styles */

/* ===== CSS CUSTOM PROPERTIES (VARIABLES) ===== */
:root {
  /* Color Palette */
  --color-primary: #EC0000;
  --color-primary-dark: #8B0000;
  --color-secondary: #FFD700;
  --color-accent: #0024FF;
  --color-accent-pink: #FF69B4;
  --color-text: #FFFFFF;
  --color-text-muted: #CCCCCC;
  --color-text-dark: #000000;
  
  /* Background Colors */
  --bg-primary: #000000;
  --bg-secondary: #1a0000;
  --bg-overlay: rgba(255, 255, 255, 0.05);
  --bg-overlay-dark: rgba(0, 0, 0, 0.7);
  --bg-card: rgba(255, 255, 255, 0.1);
  
  /* Border Colors */
  --border-light: #707070;
  --border-medium: rgba(255, 255, 255, 0.2);
  --border-gold: var(--color-secondary);
  
  /* Gradients */
  --gradient-primary: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 50%, var(--bg-primary) 100%);
  --gradient-banner: linear-gradient(90deg, var(--color-primary-dark), var(--color-primary));
  --gradient-date: linear-gradient(90deg, var(--color-accent), var(--color-primary));
  --gradient-winner: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(220, 20, 60, 0.1));

  --gradient-box: linear-gradient(316.54deg, #3F3F3F -28.12%, #000000 38.07%);
  --gradient-red-blue: linear-gradient(115.11deg, var(--color-primary) 28.6%, var(--color-accent) 82.05%);
  
  /* Typography */
  --font-family: "neue-haas-grotesk-text",sans-serif;
  --font-size-xs: 0.8rem;
  --font-size-sm: 0.9rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.1rem;
  --font-size-xl: 1.2rem;
  --font-size-2xl: 1.3rem;
  --font-size-3xl: 1.5rem;
  --font-size-4xl: 2rem;
  --font-size-5xl: 2.5rem;
  --font-size-6xl: 3rem;
  --font-size-7xl: 4rem;
  
  /* Spacing */
  --spacing-xs: 5px;
  --spacing-sm: 10px;
  --spacing-md: 15px;
  --spacing-lg: 20px;
  --spacing-xl: 30px;
  --spacing-2xl: 40px;
  
  /* Border Radius */
  --radius-sm: 3px;
  --radius-md: 5px;
  --radius-lg: 8px;
  --radius-xl: 10px;
  --radius-2xl: 15px;
  --radius-3xl: 25px;
  
  /* Shadows */
  --shadow-glow: 0 0 20px rgba(220, 20, 60, 0.5);
  --shadow-text: 0 0 20px rgba(220, 20, 60, 0.5);
  --shadow-text-gold: 0 0 20px rgba(255, 215, 0, 0.5);
  
  /* Transitions */
  --transition-fast: 0.3s ease;
  --transition-normal: 0.5s ease;
  --transition-slow: 0.8s ease;
  
  /* Z-Index */
  --z-background: 1;
  --z-content: 2;
  --z-navigation: 1000;
  --z-header: 10;
  --z-footer: 10;
  
  /* Layout variables */
  --header-height: 120px;
  --footer-height: 100px;
  --content-min-height: 500px;
  --leaderboard-height: 1450px;
  --games-list-height: 300px;

  /* Grid */
  --grid-size: 50px;
  --grid-color: rgba(255, 0, 0, 0.1);
}

/* ===== RESET & BASE STYLES ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
/* Fonts */
@font-face {
  font-family: 'bruno';
  src: url('fonts/brunoacesc-regular-webfont.woff2') format('woff2'),
       url('fonts/brunoacesc-regular-webfont.woff') format('woff');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'michroma';
  src: url('fonts/michroma-regular-webfont.woff2') format('woff2'),
       url('fonts/michroma-regular-webfont.woff') format('woff');
  font-weight: normal;
  font-style: normal;
}

@import url("https://p.typekit.net/p.css?s=1&k=ycj7bbc&ht=tk&f=39494.39495.39498.39499.39500.39501.39504.39505.39508.39509&a=584292&app=typekit&e=css");

@font-face {
font-family:"neue-haas-grotesk-display";
src:url("https://use.typekit.net/af/9395af/00000000000000003b9b2046/27/l?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n4&v=3") format("woff2"),url("https://use.typekit.net/af/9395af/00000000000000003b9b2046/27/d?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n4&v=3") format("woff"),url("https://use.typekit.net/af/9395af/00000000000000003b9b2046/27/a?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n4&v=3") format("opentype");
font-display:auto;font-style:normal;font-weight:400;
}

@font-face {
font-family:"neue-haas-grotesk-display";
src:url("https://use.typekit.net/af/032ccd/00000000000000003b9b2047/27/l?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=i4&v=3") format("woff2"),url("https://use.typekit.net/af/032ccd/00000000000000003b9b2047/27/d?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=i4&v=3") format("woff"),url("https://use.typekit.net/af/032ccd/00000000000000003b9b2047/27/a?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=i4&v=3") format("opentype");
font-display:auto;font-style:italic;font-weight:400;
}

@font-face {
font-family:"neue-haas-grotesk-display";
src:url("https://use.typekit.net/af/8a200c/00000000000000003b9b204a/27/l?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n6&v=3") format("woff2"),url("https://use.typekit.net/af/8a200c/00000000000000003b9b204a/27/d?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n6&v=3") format("woff"),url("https://use.typekit.net/af/8a200c/00000000000000003b9b204a/27/a?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n6&v=3") format("opentype");
font-display:auto;font-style:normal;font-weight:600;
}

@font-face {
font-family:"neue-haas-grotesk-display";
src:url("https://use.typekit.net/af/a659fe/00000000000000003b9b204b/27/l?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=i6&v=3") format("woff2"),url("https://use.typekit.net/af/a659fe/00000000000000003b9b204b/27/d?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=i6&v=3") format("woff"),url("https://use.typekit.net/af/a659fe/00000000000000003b9b204b/27/a?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=i6&v=3") format("opentype");
font-display:auto;font-style:italic;font-weight:600;
}

@font-face {
font-family:"neue-haas-grotesk-display";
src:url("https://use.typekit.net/af/d562ce/00000000000000003b9b204c/27/l?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n7&v=3") format("woff2"),url("https://use.typekit.net/af/d562ce/00000000000000003b9b204c/27/d?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n7&v=3") format("woff"),url("https://use.typekit.net/af/d562ce/00000000000000003b9b204c/27/a?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n7&v=3") format("opentype");
font-display:auto;font-style:normal;font-weight:700;
}

@font-face {
font-family:"neue-haas-grotesk-display";
src:url("https://use.typekit.net/af/661dc5/00000000000000003b9b204d/27/l?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=i7&v=3") format("woff2"),url("https://use.typekit.net/af/661dc5/00000000000000003b9b204d/27/d?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=i7&v=3") format("woff"),url("https://use.typekit.net/af/661dc5/00000000000000003b9b204d/27/a?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=i7&v=3") format("opentype");
font-display:auto;font-style:italic;font-weight:700;
}

@font-face {
font-family:"neue-haas-grotesk-text";
src:url("https://use.typekit.net/af/1285d2/00000000000000003b9b2050/27/l?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n4&v=3") format("woff2"),url("https://use.typekit.net/af/1285d2/00000000000000003b9b2050/27/d?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n4&v=3") format("woff"),url("https://use.typekit.net/af/1285d2/00000000000000003b9b2050/27/a?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n4&v=3") format("opentype");
font-display:auto;font-style:normal;font-weight:400;
}

@font-face {
font-family:"neue-haas-grotesk-text";
src:url("https://use.typekit.net/af/032bac/00000000000000003b9b2051/27/l?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=i4&v=3") format("woff2"),url("https://use.typekit.net/af/032bac/00000000000000003b9b2051/27/d?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=i4&v=3") format("woff"),url("https://use.typekit.net/af/032bac/00000000000000003b9b2051/27/a?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=i4&v=3") format("opentype");
font-display:auto;font-style:italic;font-weight:400;
}

@font-face {
font-family:"neue-haas-grotesk-text";
src:url("https://use.typekit.net/af/abbb5b/00000000000000003b9b2054/27/l?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n7&v=3") format("woff2"),url("https://use.typekit.net/af/abbb5b/00000000000000003b9b2054/27/d?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n7&v=3") format("woff"),url("https://use.typekit.net/af/abbb5b/00000000000000003b9b2054/27/a?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n7&v=3") format("opentype");
font-display:auto;font-style:normal;font-weight:700;
}

@font-face {
font-family:"neue-haas-grotesk-text";
src:url("https://use.typekit.net/af/73eec9/00000000000000003b9b2055/27/l?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=i7&v=3") format("woff2"),url("https://use.typekit.net/af/73eec9/00000000000000003b9b2055/27/d?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=i7&v=3") format("woff"),url("https://use.typekit.net/af/73eec9/00000000000000003b9b2055/27/a?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=i7&v=3") format("opentype");
font-display:auto;font-style:italic;font-weight:700;
}

.tk-neue-haas-grotesk-display { font-family: "neue-haas-grotesk-display",sans-serif; }
.tk-neue-haas-grotesk-text { font-family: "neue-haas-grotesk-text",sans-serif; }

body {
  font-family: var(--font-family);
  background:
    radial-gradient(50% 50% at 50% 85%,
                    rgba(236, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0) 100%),
    var(--bg-primary);
  color: var(--color-text);
  overflow: hidden;
  height: 100vh;
  position: relative;
  
  /* Background grid pattern */
  &::before {
    /* content: '';
    position: absolute;
    inset: 0;
    background-image: 
      linear-gradient(var(--grid-color) 1px, transparent 1px),
      linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
    background-size: var(--grid-size) var(--grid-size);
    pointer-events: none;
    z-index: var(--z-background); */
  }
}

/* ===== LAYOUT COMPONENTS ===== */
.container {
  position: relative;
  z-index: var(--z-content);
  height: calc(100vh - 70px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Dynamic height layout system */
.layout-header {
  flex-shrink: 0;
  z-index: var(--z-header);
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  position: relative;
  padding: 0;
  height: 140px;
}

.layout-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('img/header-bg.png');
  background-size: 100% 100%;
  background-position: center center;
  background-repeat: no-repeat;
  z-index: -1;
}

.layout-content {
  flex: 1;
  min-height: var(--content-min-height);
  position: relative;
  display: flex;
  flex-direction: column;
  margin: 5px 0 0 0;
  overflow: auto;
}



.footer-content {
  text-align: center;
  width: 100%;
}

.footer-text {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  font-weight: bold;
  letter-spacing: 1px;
}

/* ===== HEADER SECTION ===== */
.header {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  height: 100%;
  gap: var(--spacing-md);
  
  .brand-banner {
    background: var(--bg-primary);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: 0;
    width: 100%;
    text-align: center;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60px;
    
    img {
      max-width: 100%;
      height: auto;
      max-height: 60px;
      object-fit: contain;
      margin: 0 20px 0 0;
    }
  }
  
  .logos {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
    font-size: var(--font-size-base);
    font-weight: bold;
    justify-content: center;
    margin: 0 0 4em 0;
  }
  
  .qr-code {
    width: 50px;
    height: 50px;
    background: var(--color-text);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: var(--shadow-glow);
    flex-shrink: 0;
    
    &::after {
      content: 'QR';
      color: var(--color-text-dark);
      font-size: var(--font-size-xs);
      font-weight: bold;
    }
    
    &::before {
      content: '🦅';
      position: absolute;
      font-size: var(--font-size-base);
    }
  }
}

/* ===== STATE MANAGEMENT ===== */
.state {
  position: absolute;
  inset: 0;
  pointer-events: none;
  visibility: hidden;
  overflow-y: auto;
    
  &.active {
    pointer-events: all;
    visibility: visible;
  }
  
  &.hidden {
    display: none;
  }
}

/* ===== STATE 0: OVERVIEW ===== */
.state-0 {
  display: flex;
  flex-direction: column;
  justify-content: start;
  align-items: center;
  text-align: center;
  min-height: 100%;

    .overview-container {
        max-width: 800px;
        margin: 0 auto;
        padding: 2rem;
        display: flex;
        flex-direction: column;
        gap: 2rem;
    }

    .cs-button {
        background: var(--color-primary);
        color: white;
        padding: 1rem 2rem;
        border: none;
        border-radius: 10px;
        cursor: pointer;
        text-decoration: none;
        font-size: 1.25rem;
        font-weight: 600;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        transition: background-color 0.3s ease;
        width: 100%;
        max-width: 400px;
        margin: 75px auto;

        &:hover {
            background: var(--color-primary-dark);
        }
    }

    .external-link-icon {
        font-size: 1.2em;
        margin-top: 3px;
    }

    .overview-content {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;

        h1 {
            font-size: 2rem;
            color: white;
            text-align: center;
            margin-bottom: 1rem;
        }
    }

    .tagline {
      font-size: var(--font-size-3xl);
      margin-bottom: var(--spacing-xl);
      color: var(--color-text);
      font-family: "neue-haas-grotesk-text",sans-serif;
      text-transform: uppercase;
      font-weight: 600;
    }

    .overview-description {
        font-size: 1.1rem;
        line-height: 1.6;
        color: #cccccc;
    }

    .prize-section {
        background: rgba(255, 255, 255, 0.05);
        padding: 1.5rem;
        border-radius: 8px;
        margin: 1rem 0;

        h2 {
            color: white;
            font-size: 1.2rem;
            margin-bottom: 1rem;
        }
    }

    .prize-list {
        list-style: none;
        padding: 0;
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
        text-align: left;
        width: 100%;

        li {
            color: #cccccc;
            font-size: 1.1rem;
            display: flex;
            gap: 0.5rem;
            align-items: flex-start;

            &:before {
                content: "•";
                color: var(--color-primary);
                margin-right: 0.5rem;
            }
        }

        strong {
            color: white;
        }
    }

    .text-link {
        color: var(--color-primary);
        text-decoration: none;
        transition: color 0.3s ease;

        &:hover {
            color: var(--color-primary-dark);
            text-decoration: underline;
        }
    }

    .rules-link {
        margin-top: 1rem;
        align-self: center;
    }

    @media (max-width: 768px) {
        .overview-container {
            padding: 1rem;
        }

        .overview-content h1 {
            font-size: 1.5rem;
        }

        .cs-button {
            font-size: 1.1rem;
            padding: 0.875rem 1.5rem;
        }
    }
}


/* ===== STATE 1: LEADERBOARD WITH SCROLLER ===== */
.state-1, .state-2 {
  display: flex;
  flex-direction: column;
  justify-content: start;
  position: relative;
  
  .leaderboard-section, .coming-soon-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--spacing-lg) 0;
    max-height: var(--leaderboard-height);

    .tagline {
      font-size: var(--font-size-3xl);
      margin-bottom: 60px;
      color: var(--color-text);
      font-family: "neue-haas-grotesk-text",sans-serif;
      text-transform: uppercase;
      font-weight: 600;
    }

    .cs-button {
        background: var(--color-primary);
        color: white;
        padding: 1rem 2rem;
        border: none;
        border-radius: 10px;
        cursor: pointer;
        text-decoration: none;
        font-size: 1.25rem;
        font-weight: 600;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        transition: background-color 0.3s ease;
        width: 100%;
        max-width: 400px;
        margin: 75px auto;

        &:hover {
            background: var(--color-primary-dark);
        }
    }
    
    .game-selector {
      display: flex;
      align-items: center;
      gap: var(--spacing-lg);
      margin-bottom: var(--spacing-lg);
      
      .nav-arrow {
        font-size: var(--font-size-4xl);
        color: var(--color-primary);
        cursor: pointer;
        transition: color var(--transition-fast);
        
        &:hover {
          color: var(--color-secondary);
        }
      }
      
      .current-game {
        /* font-size: var(--font-size-5xl); */
        font-size: 44px;
        font-family: 'bruno';
        text-transform: uppercase;
        color: var(--color-primary);
        font-weight: bold;
      }
    }

    .date-badge {
      background: var(--gradient-date);
      padding: var(--spacing-sm) var(--spacing-sm);
      border-radius: var(--radius-md);
      font-size: var(--font-size-lg);
      font-weight: 600;
      letter-spacing: 2px;
      font-family: "neue-haas-grotesk-text",sans-serif;
      text-transform: uppercase;
    }
    
    .top-players {
      display: flex;
      gap: var(--spacing-xl);
      margin: var(--spacing-2xl) 0 var(--spacing-2xl) 0;
      position: relative;
      opacity: 1 !important; /* Ensure visibility */
      visibility: visible !important; /* Ensure visibility */
      
      .player-card {
        background-image: url('img/winners-box.png');
        background-size: contain;
        background-position: center;
        background-repeat: no-repeat;
        padding: var(--spacing-lg);
        text-align: center;
        min-width: 250px;
        min-height: 250px;
        position: relative;
        /* Ensure background image is preserved during GSAP animations */
        will-change: transform, opacity;
        transform-style: preserve-3d;
        backface-visibility: hidden;
        opacity: 1 !important; /* Ensure visibility */
        visibility: visible !important; /* Ensure visibility */
        
        &:first-child {
          z-index: 3;
          top: 25px;
        }
        
        &:nth-child(2) {
          z-index: 2;
          top: 0px;
        }
        
        &:nth-child(3) {
          z-index: 1;
          top: 25px;
        }
        
        .player-rank {
          position: absolute;
          top: 10px;
          left: 50%;
          transform: translateX(-60%);
          width: 45px;
          height: 45px;
          border-radius: 8px;
          display: flex;
          align-items: center;
          justify-content: center;
          font-weight: bold;
          font-size: var(--font-size-xl);
        }
        
        &:nth-child(1) .player-rank {
          background: #CDCDCD;
          color: #444343;
          font-weight: 600;
        }
        
        &:nth-child(2) .player-rank {
          background: linear-gradient(180deg, #EC0000 43.75%, #0024FF 115.81%);
          color: var(--color-text);
        }
        
        &:nth-child(3) .player-rank {
          background: var(--color-primary);
          color: white;
        }
        
        .player-name {
          font-size: var(--font-size-lg);
          font-weight: bold;
          margin: var(--spacing-sm) 0;
          position: relative;
          top: -70px;
          color: var(--color-text); /* Ensure text is visible */
        }
        
        .player-score {
          font-size: var(--font-size-3xl);
          font-weight: bold;
          margin-bottom: var(--spacing-sm);
          font-family: 'michroma';
          text-transform: uppercase;
          font-size: var(--font-size-3xl);
          font-weight: 400;
          letter-spacing: -2%;
          margin-top: var(--spacing-xl);
        }
        
        .player-place {
          font-family: "neue-haas-grotesk-text",sans-serif;
          font-weight: 400;
          font-size: var(--font-size-xs);
          text-align: center;
          vertical-align: middle;
          text-transform: capitalize;
          margin: var(--spacing-xl) 0;
          position: relative;
          display: flex;
          align-items: center;
          justify-content: center;
          gap: var(--spacing-sm);
          
          &::before,
          &::after {
            content: '';
            height: .5px;
            background: var(--color-text-muted);
            flex: 1;
            max-width: 30px;
          }
        }
        
        .player-time {
          color: var(--color-text);
          font-size: var(--font-size-sm);

          span {
            display: block;
          color: var(--color-primary);
            font-weight: bold;
          }
        }
      }
      
      .no-players-message {
        background: var(--bg-card);
        border: 1px solid var(--border-medium);
        padding: var(--spacing-lg);
        border-radius: var(--radius-xl);
        text-align: center;
        min-width: 200px;
        opacity: 0.7;
        
        .no-players-text {
          font-size: var(--font-size-lg);
          color: var(--color-text-muted);
          margin-bottom: var(--spacing-xs);
        }
        
        .no-players-subtext {
          font-size: var(--font-size-sm);
          color: var(--color-text-muted);
        }
      }
      
      /* Corner elements for top players */
      .corner {
        position: absolute;
        font-size: var(--font-size-2xl);
        color: var(--color-text);
        z-index: 20;
      }
      
      .corner-top-left {
        top: -12px;
        left: -7px;
      }
      
      .corner-top-right {
        top: -12px;
        right: -7px;
      }
      
      .corner-bottom-left {
        bottom: -12px;
        left: -7px;
      }
      
      .corner-bottom-right {
        bottom: -12px;
        right: -7px;
      }
    }
      
      .table-header {
      width: 80%;
      max-width: 850px;
      margin: 0 auto var(--spacing-sm) auto;
      display: grid;
      grid-template-columns: 50px 1fr 100px 100px;
      gap: var(--spacing-lg);
      padding: var(--spacing-sm) var(--spacing-xl);
      font-weight: bold;
      color: white;
      font-size: var(--font-size-lg);
    }
    
    .leaderboard-table {
      width: 80%;
      max-width: 850px;
      position: relative;
      /* background: var(--gradient-box); */
      background:
        radial-gradient(50% 50% at 50% 50%,
                        rgba(236, 0, 0, 0.3) 0%, rgba(0, 0, 0, .3) 100%),
        var(--gradient-box);
      border: 1px solid var(--border-light);
      box-shadow: 0px 9.88px 10.15px 0px #00000082;
      padding: var(--spacing-lg) var(--spacing-xl);
      /* display: flex; */
      justify-content: space-between;
      align-items: center;
      position: relative;
      backdrop-filter: blur(10px);
      
      .table-row {
        display: grid;
        grid-template-columns: 50px 1fr 100px 100px;
        gap: var(--spacing-lg);
        padding: var(--spacing-md) 0;
        border-bottom: 1px solid rgba(255, 255, 255, .15);

        &:last-child {
          border-bottom: none;
        }
        
        &.no-players-row {
          opacity: 0.6;
          font-style: italic;
          color: var(--color-text-muted);
          text-align: center;
        }
      }
      
      /* Corner elements for leaderboard table */
      .corner {
        position: absolute;
        font-size: var(--font-size-2xl);
        color: var(--color-text);
        z-index: 20;
      }
      
      .corner-top-left {
        top: -12px;
        left: -7px;
      }
      
      .corner-top-right {
        top: -12px;
        right: -7px;
      }
      
      .corner-bottom-left {
        bottom: -12px;
        left: -7px;
      }
      
      .corner-bottom-right {
        bottom: -12px;
        right: -7px;
      }
    }
  }
  
  .alert-banner {
    background: linear-gradient(184.98deg, #EC0000 -78.74%, #D30000 51.08%);
    padding: var(--spacing-md) 0;
    text-align: center;
    position: relative;
    margin: var(--spacing-lg) 0;
    overflow: hidden;
    
    .marquee-container {
      width: 100%;
      overflow: hidden;
      position: relative;
    }
    
    .marquee-content {
      display: inline-block;
      white-space: nowrap;
      font-size: var(--font-size-2xl);
      
      .marquee-game-title {
        font-family: 'bruno';
        text-transform: uppercase;
        font-size: var(--font-size-2xl);
      }
      
      .marquee-divider {
        height: 20px;
        width: auto;
        margin: -2px 15px;
      }
    }
    
    /* Removed @keyframes marquee - now using GSAP */
    
    .alert-close {
      position: absolute;
      right: var(--spacing-lg);
      top: 50%;
      transform: translateY(-50%);
      cursor: pointer;
      font-weight: bold;
    }
  }
  
  .scroller-section {
    height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    
    .scroller-title {
      display: flex;
      align-items: center;
      justify-content: center;
      flex-direction: column;
      gap: var(--spacing-sm);
      margin-bottom: var(--spacing-xl);
      margin-top: var(--spacing-sm);
      
      img {
        display: block;
      }
      
      .caption {
        font-size: var(--font-size-lg);
        color: var(--color-text);
        opacity: 0.85;
        letter-spacing: 1px;
        text-transform: uppercase;
      }
    }
    
    .scroller-container {
      display: flex;
      align-items: center;
      gap: var(--spacing-lg);
      width: 100%;
      max-width: 1000px;
      
      .scroller-arrow {
        font-size: var(--font-size-4xl);
        color: var(--color-primary);
        cursor: pointer;
        transition: color var(--transition-fast);
        
        &:hover {
          color: var(--color-secondary);
        }
      }
      
      .scroller-content {
        display: flex;
        gap: var(--spacing-lg);
        overflow: hidden;
        flex: 1;
        min-height: 200px; /* Fixed height to prevent shifting */
        align-items: center;
        justify-content: center;
        
        .scroller-card {
          background: var(--gradient-box) !important;
          box-shadow: 0px 9.88px 10.15px 0px #00000082;
          padding: var(--spacing-lg);
          border-radius: 8px;
          flex: 1;
          min-width: 300px;
          max-width: 300px;
          height: 265px; /* Fixed height for all cards */
          text-align: center;
          position: relative;
          display: flex;
          flex-direction: column;
          justify-content: center;
          border: none;
          
          /* Create gradient border using pseudo-element */
          &::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            border-radius: 8px;
            padding: 1px; /* Border width */
            background: var(--gradient-red-blue);
            mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
            mask-composite: exclude;
            -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
            -webkit-mask-composite: xor;
            pointer-events: none;
          }
      
          & > * {
            position: relative;
            z-index: 1;
          }
          
          .card-status {
            position: absolute;
            top: var(--spacing-sm);
            left: var(--spacing-sm);
            padding: var(--spacing-xs) var(--spacing-sm);
            border-radius: var(--radius-2xl);
            font-size: var(--font-size-xs);
            font-weight: bold;
            /* position: relative; */
            top: 0px;
            left: 0px;
            border-top-left-radius: 8px;
              border-bottom-left-radius: 0;
              border-top-right-radius: 0;
              border-bottom-right-radius: 0;
            
            &.status-soon {
              background: linear-gradient(270deg, #EC0000 27.31%, #0024FF 210.38%);
              color: var(--color-text);
              
            }
            
            &.status-tomorrow {
              background: linear-gradient(270deg, #EC0000 -3.17%, #0024FF 77.11%);
              color: var(--color-text);
            }
            
            &.status-urgent {
              background: linear-gradient(270deg, #EC0000 27.31%, #0024FF 210.38%);
              color: var(--color-text);
            }
            
            &.status-started {
              background: var(--color-primary);
              color: var(--color-text);
            }

            &.status-completed {
              background: var(--color-primary);
              color: var(--color-background);
            }
          }
          
          .card-title {
            font-size: var(--font-size-2xl);
            font-family: 'bruno';
            color: var(--color-primary);
            margin: 0 0 var(--spacing-sm) 0;
            line-height: 1.2;
            height: 75px;
            text-transform: uppercase;
            display: flex;
            align-items: center;
            justify-content: center;
            /* white-space: nowrap; */
          }

          .card-divider {
            width: 100%;
            background-image: url('img/card-divider.png');
            background-size: cover;
            background-position: center;
            background-repeat: no-repeat;
            height: 16px;
            margin: var(--spacing-sm) 0;
          }
          
          .card-details {
            font-size: var(--font-size-sm);
            color: var(--color-text-muted);
            display: flex;
            flex-direction: row; /* Changed from column to row for side-by-side layout */
            justify-content: space-between; /* Distribute items evenly */
            align-items: center;
            gap: var(--spacing-sm);
            
            .card-time {
              font-weight: bold;
              color: var(--color-text);
            }
            
            .card-room {
              font-weight: bold;
              color: var(--color-text);
            }

            .room-value,
            .time-value {
              font-family: 'michroma', monospace;
              display: block;
              text-transform: uppercase;
              font-size: var(--font-size-xl);
              font-weight: normal;
              color: var(--color-text);
              margin: 10px 0 0 0;
            }
          }
        }
      }
    }
  }

.coming-soon-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--spacing-lg) 0;
    
    .game-title {
        font-size: 44px;
        font-family: 'bruno';
        text-transform: uppercase;
        color: var(--color-primary);
        margin: 2rem 0;
    }
    
    .game-time {
        font-family: 'michroma';
        font-size: 1.5rem;
        color: var(--color-text);
    }
}
  
  /* State Footer */
  .state-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    min-height: var(--footer-height);
    z-index: 1; /* lower than main content to avoid overlaying */
    padding: var(--spacing-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
  }
}

/* Leaderboard progress bar */
.state-1 .leaderboard-progress,
.state-2 .leaderboard-progress {
  width: 90%;
  max-width: 1100px;
  height: 6px;
  background: rgba(255,255,255,0.15);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin: 0 auto 35px auto;
}

/* Leaderboard pagination dots */
.leaderboard-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-lg);
  padding: var(--spacing-md) 0;
}

.leaderboard-pagination .pagination-dot {
  width: 12px;
  height: 12px;
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.6);
  transform: rotate(45deg);
  transition: all 0.3s ease;
  cursor: pointer;
}

.leaderboard-pagination .pagination-dot.active {
  background: white;
  border-color: white;
  transform: rotate(45deg) scale(1.2);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.leaderboard-pagination .pagination-dot:hover {
  border-color: white;
  transform: rotate(45deg) scale(1.1);
}

.state-1 .leaderboard-progress .leaderboard-progress-fill,
.state-2 .leaderboard-progress .leaderboard-progress-fill {
  width: 0%;
  height: 100%;
  background: var(--color-primary);
  will-change: width;
}

/* Add to styles.css */
.countdown-container {
    display: flex;
    gap: 20px;
    margin-top: 40px;
}

.countdown-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 100px;
}

.countdown-value {
    font-family: 'michroma';
    font-size: 42px;
    color: var(--color-text);
}

.countdown-label {
    font-size: 14px;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 5px;
}


/* ===== QR CODE - GLOBAL POSITIONING ===== */
.leaderboard-qr {
  position: fixed !important;
  top: 110px !important;
  right: var(--spacing-2xl) !important;
  z-index: 999999999 !important; /* Maximum z-index value */
  transform: translateZ(0) !important;
  isolation: isolate; /* Create new stacking context */
  visibility: hidden;

  /* QR Code Holder Styles */
  .qr-holder {
    background: #000;
    border-radius: 10px;
    box-shadow: 
      0 0 20px rgba(255, 107, 107, 0.6),
      0 0 40px rgba(255, 107, 107, 0.4),
      0 0 60px rgba(255, 107, 107, 0.2);
    margin: 20px auto;
    padding: 4px;
  }

  .qr-container {
    background: white;
    border-radius: 5px;
    margin: 4px 4px 0 4px;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .qr-code-display {
    width: 100%;
    max-width: 150px;
    height: auto;
    border-radius: 8px;
    min-width: 150px;
    min-height: 150px;
    height: 150px;
  }

  .label {
    background: #000;
    color: white;
    text-align: center;
    padding: 5px 5px;
    border-radius: 0 0 5px 5px;
  }

  .label span {
    font-size: small;
    letter-spacing: 0.5px;
  }

  /* Responsive adjustments */
  @media (max-width: 480px) {
    .qr-holder {
      max-width: 280px;
      margin: 0 10px;
    }
    
    .qr-container {
      padding: 15px;
      min-height: 150px;
    }
    
    .qr-code-display {
      max-width: 180px;
    }
    
    .label span {
      font-size: 16px;
    }
  }
}

/* ===== NAVIGATION CONTROLS ===== */
.state-nav {
  display: flex;
  gap: var(--spacing-sm);
  justify-content: center;
  align-items: center;
  width: 100%;
  
  .nav-btn {
    background: rgba(220, 20, 60, 0.8);
    border: none;
    color: var(--color-text);
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background var(--transition-fast);
    
    &:hover {
      background: rgba(220, 20, 60, 1);
    }
    
    &.active {
      background: var(--color-secondary);
      color: var(--color-text-dark);
    }
  }
}

/* ===== RESPONSIVE DESIGN ===== */

/* Height-based responsive design */
@media (max-height: 600px) {
  :root {
    --header-height: 80px;
    --footer-height: 60px;
    --content-min-height: 300px;
  }
  
  .layout-header,
  .layout-footer {
    padding: var(--spacing-sm);
  }
  
  .layout-content {
    padding: var(--spacing-sm);
  }
}

@media (min-height: 800px) {
  :root {
    --header-height: 140px;
    --footer-height: 100px;
    --content-min-height: 500px;
  }
}

@media (min-height: 1000px) {
  :root {
    --header-height: 220px;
    --footer-height: 120px;
    --content-min-height: 600px;
  }
}

/* Width-based responsive design */
@media (max-width: 1200px) {
  :root {
    --font-size-7xl: 3rem;
    --font-size-5xl: 2rem;
  }
  
  .winners-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 768px) {
  :root {
    --spacing-lg: 10px;
    --font-size-7xl: 2rem;
  }
  
  .top-players {
    flex-direction: column !important;
    gap: var(--spacing-md) !important;
  }
  
  .winners-grid {
    grid-template-columns: 1fr !important;
  }
}

/* ===== UTILITY CLASSES ===== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-row { flex-direction: row; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }

.gap-sm { gap: var(--spacing-sm); }
.gap-md { gap: var(--spacing-md); }
.gap-lg { gap: var(--spacing-lg); }
.gap-xl { gap: var(--spacing-xl); }

.mb-sm { margin-bottom: var(--spacing-sm); }
.mb-md { margin-bottom: var(--spacing-md); }
.mb-lg { margin-bottom: var(--spacing-lg); }
.mb-xl { margin-bottom: var(--spacing-xl); }

.p-sm { padding: var(--spacing-sm); }
.p-md { padding: var(--spacing-md); }
.p-lg { padding: var(--spacing-lg); }
.p-xl { padding: var(--spacing-xl); }

.rounded-sm { border-radius: var(--radius-sm); }
.rounded-md { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }

.transition { transition: var(--transition-normal); }
.transition-fast { transition: var(--transition-fast); }
.transition-slow { transition: var(--transition-slow); } 

/* Footer Grid */
.page-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px; /* adjust height as needed */
  z-index: 0; /* below all content */
  pointer-events: none;
}

.footer-grid {
  width: 100%;
  height: 100%;
  background: url('img/footer-grid.png') bottom / contain no-repeat;
  background-size: 100% auto;
  background-position: center 5px;
} 

/* CSS for live badge */
.live-badge {
  background: linear-gradient(90deg, rgba(236, 0, 0, 0.8) 0%, rgba(236, 0, 0, 0.6) 100%);
  border-radius: var(--radius-md);
  padding: var(--spacing-sm) var(--spacing-sm);
  margin-left: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-lg);
  font-weight: 600;
  letter-spacing: 2px;
  font-family: "neue-haas-grotesk-text",sans-serif;
  text-transform: uppercase;
}

.live-badge .record-icon {
  width: 12px;
  height: 12px;
  background-color: #fff;
  border-radius: 50%;
  margin-right: 8px;
  animation: blink 1.5s infinite;
}

@keyframes blink {
  0% { opacity: 1; }
  50% { opacity: 0.3; }
  100% { opacity: 1; }
}

/* Add a container for the badges */
.badges-container {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--spacing-2xl);
}

.connection-error {
    position: fixed;
    bottom: 1px;
    left: 1px;
    color: lightgrey;
    padding: 2px;
    z-index: 9999;
    font-size: 14px;
}


/* QR Code Holder Styles */
.qr-holder {
  background: #000;
  border-radius: 15px;
  box-shadow: 
    0 0 20px rgba(255, 107, 107, 0.6),
    0 0 40px rgba(255, 107, 107, 0.4),
    0 0 60px rgba(255, 107, 107, 0.2);
  margin: 20px auto;
  padding: 4px;
}

.qr-container {
  background: white;
  border-radius: 15px;
  margin: 4px 4px 0 4px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.qr-code-display {
  width: 100%;
  max-width: 150px;
  height: auto;
  border-radius: 8px;
  min-width: 150px;
  min-height: 150px;
  height: 150px;
}

.label {
  background: #000;
  color: white;
  text-align: center;
  padding: 5px 5px;
  border-radius: 0 0 5px 5px;
}

.label span {
  letter-spacing: 0.5px;
}

/* Responsive adjustments */
@media (max-width: 480px) {
  .qr-holder {
    max-width: 280px;
    margin: 0 10px;
  }
  
  .qr-container {
    padding: 15px;
    min-height: 150px;
  }
  
  .qr-code-display {
    max-width: 180px;
  }
  
  .label span {
    font-size: 16px;
  }
}

/* Navigation */
.main-navigation {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: 1440px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Brand Styling */
.nav-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.brand-title {
    font-size: 2rem;
    font-weight: 600;
    display: none;
    font-family: 'bruno';
    text-transform: uppercase;
    margin-left: 20px;
}

@media (min-width: 768px) {
    .brand-title {
        display: block;
    }
}

/* Hauptnavigation Tabs */
.nav-tabs {
    display: flex;
    gap: 1rem;
}

.nav-tab {
    background: transparent;
    border: none;
    color: var(--color-text-muted);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-tab:hover {
    color: var(--color-text);
    background: var(--bg-overlay);
}

.nav-tab.active {
    color: var(--color-primary);
    background: var(--bg-overlay);
}

.nav-tab i {
    font-size: 1.1rem;
}

/* Subnavigation für Games */
.subnav-container {
    background: var(--bg-secondary);
    padding: 0.5rem 2rem;
    width: 100%;
    display: flex;
    justify-content: center;
}

.subnav-container.hidden {
    display: none;
}

.game-tabs {
    max-width: 1440px;
    margin: 0 auto;
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
    justify-content: center;
}

.game-tabs::-webkit-scrollbar {
    display: none; /* Chrome/Safari/Opera */
}

.game-tab {
    background: transparent;
    border: none;
    color: var(--color-text-muted);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.game-tab:hover {
    color: var(--color-text);
    background: var(--bg-overlay);
}

.game-tab.active {
    color: var(--color-primary);
    background: var(--bg-overlay);
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: transparent;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
}

.mobile-menu-btn .bar {
    width: 24px;
    height: 2px;
    background: var(--color-text);
    transition: all 0.3s ease;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-tabs {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-primary);
        flex-direction: column;
        padding: 1rem;
    }

    .nav-tabs.show {
        display: flex;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .mobile-menu-btn.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .mobile-menu-btn.active .bar:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-btn.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}
