:root {
    /* Team colors */
    --red-team: #ff0000;
    --blue-team: #0044cc;
    --yellow-accent: #ffcc00;
    
    /* Text colors */
    --text-light: #ffffff;
    --text-dark: #333333;
    --purple-accent: #8626c9;
    
    /* Background colors */
    --bg-light: #f9f9f9;
    --bg-secondary: #f8f9fa;
    
    /* Gradients */
    --gradient-red: linear-gradient(135deg, var(--red-team), #aa0000);
    --gradient-blue: linear-gradient(135deg, var(--blue-team), #002288);
    --gradient-red-alt: linear-gradient(135deg, #ff5e62, #ff9966);
    --gradient-blue-alt: linear-gradient(135deg, #4e54c8, #8f94fb);
    
    /* Z-index layers */
    --z-base: 1;
    --z-header: 9999;
    --z-popup: 10000;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
    background-image: url('images/pattern.svg');
    background-attachment: fixed;
    overflow-x: hidden;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.5rem 0;
}

/* Header Styles */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--z-header);
    transition: all 0.3s ease;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

/* Logo container */
.logo-container {
    display: flex;
    align-items: center;
    padding: 1.5rem 5%;
    background: var(--bg-light);
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.logo-container img.logo {
    height: 100px;
    width: auto;
    margin-right: 1rem;
    transition: all 0.3s ease;
}

.logo-container h1 {
    font-size: 1.4rem;
    margin: 0;
    color: var(--text-dark);
    transition: all 0.3s ease;
}

/* Navigation Styles */
.main-nav {
    margin: 0;
    background: linear-gradient(90deg, var(--red-team) 0%, var(--blue-team) 100%);
    position: relative;
    z-index: var(--z-header);
    width: 100%;
    max-width: 100vw;
    overflow-x: auto;
    padding: 0.8rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

/* Scrolled header state */
header.scrolled .logo-container {
    padding: 0.5rem 5%;
}

header.scrolled .logo-container img.logo {
    height: 35px;
}

header.scrolled .logo-container h1 {
    font-size: 1rem;
}

header.scrolled .main-nav {
    padding: 0.8rem 0; /* Match base .main-nav padding */
}

main {
    padding-top: 70px /* Offset for fixed header */
}

.nav-tabs {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0 auto;
    justify-content: space-around;
    flex-wrap: nowrap;
    width: 100%;
    max-width: 1200px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Hide scrollbar for Firefox */
    font-size: clamp(0.8rem, 1.5vw, 1rem); /* Dynamic font size */
}

.nav-tabs::before,
.nav-tabs::after {
    content: '';
    display: block;
    min-width: 1rem; /* This creates the space */
}

/* Carousel Styles */
.carousel-wrapper {
    position: relative; /* Context for absolute positioning of arrows */
    overflow: hidden; /* Optional: if track overflows wrapper, good to hide */
}

.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%); /* Vertically center */
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10; /* Ensure arrows are above slides */
    transition: background-color 0.3s ease;
    margin: 0; /* Reset any margins */
    padding: 0; /* Reset any padding */
}

.carousel-arrow:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.carousel-arrow svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.carousel-arrow.prev {
    left: 15px;
}

.carousel-arrow.next {
    right: 15px;
}

/* Carousel container and navigation styles */
.carousel-container {
    margin: 0 auto;
    position: relative;
    margin: 0 auto;
    overflow: hidden;
    max-width: 550px;
}

.carousel-track {
    display: flex;
    position: relative;
    width: 100%;
}

.carousel-slide {
    flex: 0 0 100%;
    width: 100%;
    min-width: 100%;
    box-sizing: border-box;
    padding: 0 5px;
    position: relative;
    opacity: 1;
}

/* Make sure the posts display properly within the slides */
.x-post {
    margin: 0 auto; 
    width: 100%;
    max-width: 450px;
}

/* Mobile responsive styles */
@media (max-width: 768px) {
    .carousel-container,
    .carousel-wrapper {
        max-width: 100%;
    }
    
    .carousel-track {
        flex-direction: row;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .carousel-slide {
        flex: 0 0 auto;
        width: clamp(280px, 80vw, 320px);
        padding: 0 5px;
    }
    
    .x-post {
        /* min-width: 100%; */
        width: 100%;
    }
}


/* Hide scrollbar for Chrome/Safari */
.nav-tabs::-webkit-scrollbar {
    display: none;
}

/* Adjust padding for better touch targets */
.nav-tab {
    padding: 0.8rem clamp(0.5rem, 1.5vw, 1rem);
}

.nav-tabs li {
    flex: 0 0 auto;
    min-width: 100px;
    text-align: center;
    white-space: nowrap;
}



.nav-tab {
    display: block;
    padding: 1rem 0;
    color: white;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.nav-tab:before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background-color: var(--yellow-accent);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-tab:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.nav-tab:hover:before {
    width: 80%;
}

.nav-tabs li:first-child .nav-tab {
    background: linear-gradient(90deg, #ff0000 0%, rgba(255, 0, 0, 0.7) 100%);
}

.nav-tabs li:last-child .nav-tab {
    background: linear-gradient(90deg, rgba(0, 68, 204, 0.7) 0%, #0044cc 100%);
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    transition: all 0.3s ease-in-out;
    will-change: transform, flex-wrap, justify-content;
    position: relative;
    z-index: var(--z-header);
}

/* Scrolled state for logo container */
header.scrolled .logo-container {
    flex-wrap: nowrap;
    justify-content: flex-start;
    padding-left: 1rem;
}

.logo {
    height: 70px;
    margin-right: 20px;
    transition: all 0.3s ease-in-out;
    will-change: transform, height;
    backface-visibility: hidden;
    transform: translateZ(0);
    min-height: 35px; /* Minimum height to prevent disappearance */
    position: relative;
    z-index: var(--z-header);
}

/* Scrolled state for logo */
header.scrolled .logo {
    height: 40px;
    margin-right: 15px;
}

header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--purple-accent);
    text-align: center;
    transition: all 0.3s ease-in-out;
    will-change: transform, font-size, margin;
    backface-visibility: hidden;
    transform: translateZ(0);
    position: relative;
    z-index: var(--z-header);
    min-height: 1.2rem; /* Minimum height to prevent disappearance */
}

/* Scrolled state for header title */
header.scrolled h1 {
    font-size: 1.5rem;
    text-align: left;
    margin: 0;
}

/* Hero Section */
.hero {
    background-image: url('images/lv.png');
    background-size: cover;
    background-position: center;
    color: var(--text-light);
    text-align: center;
    padding: 6rem 2rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,0,0,0.85) 0%, rgba(0,68,204,0.85) 100%);
    z-index: 1;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    overflow: hidden;
    opacity: 1;
}

.hero-bg-image {
    height: 100%;
    width: 100%;
    object-fit: cover;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.team-captains {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 2.5rem;
    gap: 1.5rem;
}

.captain {
    position: relative;
    text-align: center;
}

.captain-image {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--yellow-accent);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.red-captain .captain-image {
    border-color: var(--red-team);
}

.blue-captain .captain-image {
    border-color: var(--blue-team);
}

.captain:hover .captain-image {
    transform: scale(1.1);
}

.captain-label {
    display: block;
    margin-top: 0.8rem;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--yellow-accent);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.vs-text {
    font-size: 2rem;
    font-weight: 900;
    color: var(--yellow-accent);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    margin: 0 0.5rem;
}

.hero h2 {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.subtitle {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--yellow-accent);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

/* Challenge Info Section */
.challenge-info {
    background-color: white;
    padding: 2rem 0;
    text-align: center;
}

.challenge-info h2 {
    color: var(--text-dark);
    margin-bottom: 2rem;
    font-size: 2.5rem;
    font-weight: 700;
}

.rewards {
    background-color: #f0f0f0;
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.rewards p {
    font-size: 1.2rem;
}

.how-to-play {
    margin-bottom: 2rem;
}

.how-to-play h3 {
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

.how-to-play ol {
    text-align: left;
    max-width: 600px;
    margin: 0 auto;
    padding-left: 2rem;
}

.how-to-play li {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.red-team {
    color: var(--red-team);
    font-weight: 700;
}

.blue-team {
    color: var(--blue-team);
    font-weight: 700;
}

.bonus-challenge {
    background-color: #f5f5f5;
    padding: 1.5rem;
    border-radius: 10px;
    border-left: 5px solid var(--yellow-accent);
    text-align: left;
    max-width: 800px;
    margin: 0 auto;
}

.bonus-challenge h3 {
    margin-bottom: 1rem;
    font-size: 1.6rem;
}

/* Team Selection Section */

/* Team button states */
.team-buttons a.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
    position: relative;
}

.team-buttons a.disabled::after {
    content: "\2718";
    position: absolute;
    top: -10px;
    right: -10px;
    background-color: var(--accent-color);
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
}

.team-buttons a.selected {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.7);
    position: relative;
}

.team-buttons a.selected::after {
    content: "\2713";
    position: absolute;
    top: -10px;
    right: -10px;
    background-color: #4CAF50;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
}

/* Override disabled state for specific team buttons */
.team-buttons a.red-button.disabled::after {
    background-color: var(--blue-team);
}

.team-buttons a.blue-button.disabled::after {
    background-color: var(--red-team);
}

.fair-play-section {
    padding: 0.25rem 0;
    background-color: #f8f9fa;
}

.team-selection h2 {
    margin-bottom: 1.5rem;
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
}

.requirements {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #333;
    text-align: center;
}

.qualification-list {
    list-style-type: none;
    padding: 0;
    margin-bottom: 2rem;
    max-width: 600px;
    margin: 0 auto 3rem;
}

.qualification-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #ddd;
    text-align: center;
}

.qualification-list li:last-child {
    border-bottom: none;
}

.link-highlight {
    color: var(--blue-team);
    font-weight: 700;
    text-decoration: none;
    transition: color 0.3s;
    border-bottom: 1px dotted var(--blue-team);
}

.link-highlight:hover {
    color: var(--red-team);
    border-bottom-color: var(--red-team);
}

.versus {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--yellow-accent);
    margin: 0 1.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.team-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0 auto;
}

.team-option {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.team-image {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.team-option:hover .team-image {
    transform: scale(1.05);
}

.red-button, .blue-button {
    padding: 1.2rem 2.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
    color: white;
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    min-width: 200px;
    text-align: center;
}

.red-button {
    background: var(--gradient-red);
}

.blue-button {
    background: var(--gradient-blue);
}

.red-button:hover, .blue-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.versus {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--yellow-accent);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* Launch Pack Section */
.launch-pack {
    background: linear-gradient(135deg, #8626c9 0%, #6a1b9a 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    animation: fadeIn 1s ease-out 0.9s forwards;
    opacity: 0;
}

.launch-pack::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><path d="M0,10 10,0 20,10 10,20z" fill="rgba(255,255,255,0.05)"/></svg>');
    opacity: 0.3;
    pointer-events: none;
}

.launch-pack h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.launch-pack-content {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.launch-pack-info {
    flex: 1;
    min-width: 300px;
}

.launch-pack-info p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.6;
}

.benefits-list {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 1.5rem;
    margin: 2rem 0;
    text-align: left;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.benefits-list h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    text-align: center;
    color: var(--yellow-accent);
}

.benefits-list ul {
    list-style-type: none;
    padding: 0;
}

.benefits-list li {
    margin-bottom: 0.8rem;
    padding-left: 1.5rem;
    position: relative;
    font-size: 1rem;
}

.benefits-list li:before {
    content: '✦';
    position: absolute;
    left: 0;
    color: var(--yellow-accent);
}

.benefits-list li strong {
    font-weight: 700;
    color: var(--yellow-accent);
}

.mint-button {
    display: inline-block;
    padding: 1rem 2rem;
    background: var(--yellow-accent);
    color: var(--text-dark);
    font-weight: 700;
    text-decoration: none;
    border-radius: 8px;
    transition: transform 0.3s, box-shadow 0.3s;
    margin-top: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    font-size: 1.2rem;
}

.mint-button:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* Footer */
footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 2rem 0;
}

footer a {
    color: var(--yellow-accent);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

.small {
    font-size: 0.9rem;
    margin-top: 0.5rem;
    opacity: 0.8;
}

/* Animations */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.pulse {
    animation: pulse 1s ease-in-out;
}

.hero-content, .challenge-info, .team-selection {
    animation: fadeIn 1s ease-out forwards;
}

.challenge-info {
    animation-delay: 0.3s;
}

.team-selection {
    animation-delay: 0.6s;
}

/* Responsive Design */
body {
    padding-top: 170px; /* Adjust this value based on your header height */
}

/* Responsive navigation */
.nav-tab {
    font-size: 1rem;
}

@media (max-width: 1200px) {
    .nav-tab {
        font-size: 0.95rem;
        padding: 0.8rem 0.7rem;
    }
}

@media (max-width: 1024px) {
    .nav-tab {
        font-size: 0.9rem;
        padding: 0.8rem 0.6rem;
    }
    
    .nav-tabs li {
        min-width: 90px;
    }
}

@media (max-width: 768px) {
    body {
        padding-top: 140px; /* Smaller padding for mobile */
    }
    
    .nav-tab {
        font-size: 0.8rem;
        padding: 0.8rem 0.4rem;
    }
    
    .nav-tabs li {
        min-width: 80px;
    }
    
    .hero h2 {
        font-size: 2.5rem;
    }
    
    .subtitle {
        font-size: 1.2rem;
    }
    
    .team-captains {
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .captain-image {
        width: 80px;
        height: 80px;
    }
    
    .vs-text {
        font-size: 1.5rem;
        width: 100%;
        margin: 0.5rem 0;
    }
    
    .team-overlay {
        opacity: 0.08;
    }
    
    .team-buttons {
        flex-direction: column;
        gap: 30px;
    }
    
    .versus {
        margin: 10px 0;
    }
    
    .team-image {
        width: 180px;
        height: 180px;
    }
    
    /* Fix sticky header for mobile */
    header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
    }
    
    header h1 {
        font-size: 1.5rem;
        margin-top: 1rem;
    }
    
    .logo-container {
        flex-direction: row;
        justify-content: center;
        padding: 0 1rem;
    }
    
    .logo {
        margin-right: 0;
        margin-bottom: 0.5rem;
    }
    
    /* Mobile scrolled header styles */
    header.scrolled .logo-container {
        flex-direction: row;
        padding-left: 0.5rem;
        opacity: 1;
        visibility: visible;
        display: flex !important; /* Force display */
    }
    
    header.scrolled h1 {
        font-size: 1.2rem;
        margin-top: 0;
        opacity: 1;
        visibility: visible;
        display: block !important; /* Force display */
    }
    
    header.scrolled .logo {
        height: 35px;
        margin-bottom: 0;
        opacity: 1;
        visibility: visible;
        display: block !important; /* Force display */
    }
    
    /* Team Selection Mobile Styles */
    .team-selection {
        padding: 40px 0;
    }
    
    .team-selection h2 {
        font-size: 2rem;
    }
    
    .qualification-box {
        padding: 1.5rem;
        margin: 0 1rem;
    }
    
    .requirements {
        font-size: 1.2rem;
    }
    
    .qualification-list li {
        font-size: 1rem;
    }
    
    .team-buttons {
        flex-direction: column;
        gap: 30px;
        padding: 0 1rem;
    }
    
    .team-option {
        max-width: 100%;
    }
    
    .versus-container {
        margin-bottom: 1.5rem;
    }
    
    .versus-line {
        max-width: 100px;
    }
    
    .team-image-container {
        height: 180px;
    }
    
    .stat-value {
        font-size: 1.8rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
    
    .red-button, .blue-button {
        padding: 0.8rem 1.5rem;
        font-size: 1.1rem;
    }
}

/* X Post Example Styles - Carousel */
.carousel-container {
    margin: 20px auto;
    width: 100%;
    max-width: 100%;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    padding: 20px 0 40px;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    min-height: 400px;
    box-sizing: border-box;
}

.carousel-wrapper {
    position: relative;
    width: 100%;
    overflow: visible;
    padding: 20px 0;
    margin: 0 auto;
    padding: 0 40px;
}

/* Carousel Navigation Arrows */
.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    opacity: 0.9;
}

.carousel-arrow:hover {
    background: #fff;
    transform: translateY(-50%) scale(1.1);
    opacity: 1;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.carousel-arrow.prev {
    left: 20px;
}

.carousel-arrow.next {
    right: 20px;
}

.carousel-arrow svg {
    width: 24px;
    height: 24px;
    fill: #333;
}

@media (max-width: 768px) {
    .carousel-arrow {
        width: 40px;
        height: 40px;
    }
    
    .carousel-arrow svg {
        width: 20px;
        height: 20px;
    }
}

.example-label {
    font-weight: bold;
    margin-bottom: 15px;
    color: #333;
    text-align: center;
}

.carousel-track {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    margin: 0;
    padding: 20px 0px; /* Adjusted padding, consider adding side padding if slides touch edges */
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    position: relative;
    white-space: nowrap; /* Useful for inline-block fallbacks or if flex items have unusual white-space properties */
    gap: 20px;
    align-items: stretch; /* Ensures slides take full height of the track if they have different content heights */
    box-sizing: border-box;
    /* width: auto; and min-width: 100%; removed to let flexbox and content define size */
    justify-content: flex-start;
}

/* Hide scrollbar for Chrome, Safari and Opera */
.carousel-track::-webkit-scrollbar {
    display: none; /* This hides it completely. If you want a styled scrollbar, adjust below. */
    /* height: 6px; */ /* This line would be active if display: none was removed */
}

/* To style the scrollbar (if not completely hidden) */
.carousel-track::-webkit-scrollbar-thumb {
    background-color: rgba(0,0,0,0.2);
    border-radius: 3px;
}

.carousel-track::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.05);
    border-radius: 3px;
}

.carousel-slide {
    flex: 0 0 auto; /* THIS IS CRUCIAL: Do not shrink, do not grow, basis is auto */
    width: clamp(300px, 80vw, 450px); /* Responsive width, slightly adjusted max for better fit on smaller screens with gap */
    height: auto; /* Auto height based on content */
    min-height: 350px; /* Minimum height to maintain some consistency */
    box-sizing: border-box;
    padding: 20px; /* Increased padding for better content spacing */
    scroll-snap-align: center; /* Ensures the slide snaps to the center of the viewport */
    scroll-snap-stop: always; /* Ensures snapping happens reliably */
    /* display: inline-block; REMOVED - Not needed for flex items */
    /* vertical-align: top; REMOVED - Not applicable to flex items in this context */
    background-color: #ffffff; /* White background for slides */
    border-radius: 12px; /* Slightly more rounded corners */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12); /* Enhanced shadow for better depth */
    overflow: hidden; /* Prevents content from spilling out */
    /* margin-right is handled by 'gap' on .carousel-track 
       If .carousel-track didn't have 'gap', a margin would be needed here, e.g., margin: 0 10px; 
       but 'gap' is generally preferred for spacing flex/grid items. */
}

.carousel-slide:last-child {
    margin-right: 0; /* No margin for the last slide */
}

.carousel-navigation {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    padding: 0 10px;
}

.carousel-dots {
    display: flex;
    gap: 8px;
}

.dot {
    height: 10px;
    width: 10px;
    background-color: #bbb;
    border-radius: 50%;
    display: inline-block;
    transition: all 0.3s ease;
    cursor: pointer;
    margin: 0 5px;
    border: 2px solid transparent;
}

.dot:hover, .dot:focus {
    transform: scale(1.2);
}

.dot.active {
    background-color: #4285F4;
    transform: scale(1.2);
    border-color: rgba(0,0,0,0.1);
}

.x-post {
    flex: 1;
    min-width: 280px;
    max-width: 400px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.x-post:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.red-post {
    border-top: 3px solid var(--red-team);
}

.blue-post {
    border-top: 3px solid var(--blue-team);
}

.example-label {
    font-weight: 600;
    margin-bottom: 10px;
    font-style: italic;
    color: #555;
}

.x-post {
    background-color: #fff;
    border-radius: 12px;
    border: 1px solid #e5e5e5;
    margin: 15px 0;
    padding: 16px;
    max-width: 500px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    color: #0f1419;
}

.post-header {
    display: flex;
    align-items: flex-start;
    margin-bottom: 12px;
}

.profile-image {
    width: 48px;
    height: 48px;
    margin-right: 12px;
    flex-shrink: 0;
}

.profile-image img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #e5e5e5;
}

.user-info {
    flex-grow: 1;
}

.name-container {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.display-name {
    font-weight: 700;
    font-size: 16px;
    margin-right: 4px;
}

.verified-badge {
    background-color: #1d9bf0;
    color: white;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    margin-right: 4px;
}

.username {
    color: #536471;
    font-size: 14px;
}

.menu-icon {
    margin-left: auto;
    color: #536471;
}

.post-content {
    margin-bottom: 12px;
}

.x-post .post-text {
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word; /* Break words if necessary */
    overflow-wrap: break-word; /* More modern property for word breaking */
    hyphens: auto; /* Enable hyphenation if supported and lang is set */
    min-height: 60px; /* Ensure a minimum height for text area */
    font-size: 16px;
    margin-bottom: 12px;
    line-height: 1.4;
}

.hashtag {
    color: #1d9bf0;
    cursor: pointer;
}

.mention {
    color: #1d9bf0;
    cursor: pointer;
}

.post-media {
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 12px;
}

.post-media img {
    width: 100%;
    display: block;
    border-radius: 16px;
}

.post-stats {
    color: #536471;
    font-size: 14px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e5e5;
}

.post-actions {
    display: flex;
    justify-content: space-between;
    color: #536471;
}

.action-button {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    transition: color 0.2s;
}

.action-button:hover {
    color: #1d9bf0;
}

.action-button.like:hover {
    color: #f91880;
}

.action-button.repost:hover {
    color: #00ba7c;
}

/* Fair Play Section Styles */
.fair-play-section {
    background: linear-gradient(135deg, rgba(255,0,0,0.03) 0%, rgba(0,68,204,0.03) 100%);
    padding: 60px 0;
    border-top: 1px solid #eaeaea;
    border-bottom: 1px solid #eaeaea;
}

.fair-play-section h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
    font-size: 2.5rem;
    font-weight: 700;
}

/* Fair Play Rules Styles */
.fair-play-rules {
    background-color: #fff;
    border-radius: 10px;
    border-left: 5px solid #dc3545;
    padding: 25px;
    margin: 0 auto;
    max-width: 900px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.fair-play-rules h3 {
    color: #dc3545;
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.rules-list {
    list-style-type: none;
    padding-left: 0;
}

.rules-list li {
    margin-bottom: 10px;
    padding-left: 25px;
    position: relative;
}

.rules-list li:before {
    content: "⚠️";
    position: absolute;
    left: 0;
    top: 2px;
}

.verification-note {
    font-style: italic;
    margin-top: 15px;
    color: #555;
    border-top: 1px solid #ddd;
    padding-top: 15px;
}

/* Sample post styles override */
.sample-post .post-header {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.post-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 12px;
    border: 2px solid #1d9bf0;
}

.post-user {
    display: flex;
    flex-direction: column;
}

.post-name {
    font-weight: 700;
    font-size: 16px;
}

.post-handle {
    font-size: 15px;
    color: #536471;
}

.post-content {
    font-size: 16px;
    line-height: 1.4;
    margin-bottom: 12px;
}

.post-image {
    margin-bottom: 12px;
    border-radius: 12px;
    overflow: hidden;
}

.post-media {
    width: 100%;
    border-radius: 12px;
    max-height: 300px;
    object-fit: cover;
}

.post-engagement {
    display: flex;
    justify-content: space-between;
    max-width: 250px;
    color: #536471;
    font-size: 14px;
}

.post-action {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Dark mode style overrides */
@media (prefers-color-scheme: dark) {
    .sample-post {
        background-color: #15202b;
        border-color: #38444d;
        color: #ffffff;
    }
    
    .post-handle {
        color: #8899a6;
    }
    
    .post-engagement {
        color: #8899a6;
    }
}

/* Small screen navigation */
@media (max-width: 600px) {
    .nav-tab {
        font-size: 0.6rem;
        padding: 0.8rem 0.3rem;
    }
    
    .nav-tabs li {
        min-width: 70px;
    }
    
    .nav-tab:before {
        height: 2px;
    }
    
    .carousel-arrow {
        display: none;
    }
    
    .carousel-wrapper {
        padding: 0 10px;
    }
}

/* Mobile responsiveness for fair play rules */
@media (max-width: 768px) {
    .fair-play-rules {
        padding: 15px;
        margin: 20px 0;
    }
    
    .fair-play-rules h3 {
        font-size: 1.3rem;
    }
    
    .rules-list li {
        font-size: 0.95rem;
        padding-left: 22px;
        margin-bottom: 8px;
    }
    
    .verification-note {
        font-size: 0.9rem;
    }
    
    /* Mobile responsiveness for posts */
    .sample-post, .x-post {
        max-width: 100%;
        padding: 12px;
        margin: 10px 0;
    }
    
    .post-content, .post-text {
        font-size: 14px;
    }
    
    .post-name, .display-name {
        font-size: 15px;
    }
    
    .post-handle, .username {
        font-size: 13px;
    }
    
    .post-engagement, .post-stats, .post-actions {
        font-size: 13px;
    }
    
    .carousel-container {
        margin: 15px auto;
        max-width: 100%;
    }
    
    .carousel-track {
        flex-direction: row;    /* Changed from column */
        overflow-x: auto;       /* Ensure horizontal scrolling */
        gap: 15px;              /* Kept existing gap */
        -webkit-overflow-scrolling: touch; /* Smoother mobile scroll */
    }
    
    .carousel-slide {
        flex: 0 0 auto; /* To respect item width for horizontal scroll */
        width: clamp(280px, 80vw, 320px); /* Responsive width for mobile slides */
        max-width: 100%; /* Keep, prevents slide being wider than screen */
    }
    
    .x-post {
        /* min-width: 100%; */ /* Commented out if x-post is a carousel slide, to allow horizontal scrolling */
        margin-bottom: 10px;
    }
    
    .carousel-dots {
        margin-top: 10px;
    }
    
    .dot {
        height: 8px;
        width: 8px;
    }
    
    .action-button {
        font-size: 13px;
    }
    
    .profile-image {
        width: 40px;
        height: 40px;
    }
    
    .verified-badge {
        width: 16px;
        height: 16px;
        font-size: 10px;
    }
}

/* Leaderboard Styles */
.leaderboard-section {
    background-color: var(--bg-secondary);
    padding: 0.25rem 0;
    text-align: center;
    margin: 0;
}

.leaderboard {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin: 40px 0;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Hide scrollbar for Firefox */
    padding-bottom: 10px;
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* Hide scrollbar for Chrome/Safari */
.leaderboard::-webkit-scrollbar {
    display: none;
}

/* Ensure leaderboard cards stay side by side */
.leaderboard-card {
    flex: 1 1 0;
    min-width: 300px; /* Minimum width for each card */
    max-width: 100%;
    box-sizing: border-box;
}

.team-scoreboard {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin: 2rem 0;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 10px;
    width: 100%;
}

.team-score {
    flex: 1;
    min-width: 300px;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
}

.team-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem;
    border-radius: 10px;
    min-width: 200px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.red-team {
    background: var(--gradient-red-alt);
    color: var(--text-light);
}

.blue-team {
    background: var(--gradient-blue-alt);
    color: var(--text-light);
}

.team-name {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.team-count {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.team-posts {
    font-size: 1rem;
    opacity: 0.9;
}

.winning-team {
    font-size: 1.75rem;
    font-weight: bold;
    margin: 2rem 0;
    padding: 1rem;
    border-radius: 8px;
    background-color: #e9ecef;
    display: inline-block;
    min-width: 300px;
}

.red-leader {
    background-color: #ff5e62;
    color: var(--text-light);
}

.blue-leader {
    background-color: #4e54c8;
    color: var(--text-light);
}

.tie {
    background: linear-gradient(90deg, #ff5e62 0%, #4e54c8 100%);
    color: var(--text-light);
}

.leaderboard-info {
    .team-scoreboard {
        display: flex;
        justify-content: space-between;
        gap: 20px;
        margin: 2rem 0;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 10px;
        width: 100%;
    }

    .team-score {
        min-width: 150px;
        padding: 1rem;
    }
    
    .team-count {
        font-size: 2.5rem;
    }
    
    .winning-team {
        font-size: 1.5rem;
        min-width: 250px;
    }
}

/* Example Posts Grid */
.example-posts-container {
  margin-top: 3rem;
  padding: 1.5rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
  position: relative;
}

.example-posts-container h3 {
  font-size: 2rem;
  color: #000000;
  margin: 0 auto 2rem;
  text-align: center;
  position: relative;
  display: inline-block;
  padding: 0 2rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.example-posts-container h3::before,
.example-posts-container h3::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 50px;
  height: 2px;
  background: linear-gradient(90deg, var(--red-team), var(--blue-team));
}

.example-posts-container h3::before {
  left: -30px;
}

.example-posts-container h3::after {
  right: -30px;
}

.example-posts-grid {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding: 1rem 0;
  scroll-padding: 0 1rem;
  gap: 1.5rem;
  margin: 0 1rem;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.example-posts-grid::-webkit-scrollbar {
  display: none;
}

.example-posts-grid::after {
  content: '';
  flex: 0 0 1rem;
}

.example-post {
  min-width: 300px;
  max-width: 400px;
  scroll-snap-align: start;
  flex: 0 0 auto;
  position: relative;
  margin: 0 0.5rem;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Navigation arrows */
.example-posts-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  border: none;
  padding: 0;
  opacity: 0.8;
  transition: opacity 0.3s;
}

.example-posts-nav:hover {
  opacity: 1;
}

.example-posts-nav.prev {
  left: 10px;
}

.example-posts-nav.next {
  right: 10px;
}

.example-posts-nav svg {
  width: 20px;
  height: 20px;
  fill: #333;
}

@media (max-width: 768px) {
  .example-posts-nav {
    display: none;
  }
  
  .example-posts-container h3 {
    font-size: 1.75rem;
    padding: 0 1.5rem;
  }
  
  .example-posts-container h3::before,
  .example-posts-container h3::after {
    width: 30px;
  }
  
  .example-posts-container h3::before {
    left: -15px;
  }
  
  .example-posts-container h3::after {
    right: -15px;
  }
  
  .example-post {
    min-width: 280px;
    max-width: 85%;
  }
}

/* Recent Posts Grid */
.recent-posts-container {
  margin-top: 3rem;
  padding: 1.5rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
  position: relative;
}

.recent-posts-container h3 {
  font-size: 2rem;
  color: #000000; /* Changed to black */
  margin: 0 auto 2rem;
  text-align: center;
  position: relative;
  display: inline-block;
  padding: 0 2rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.recent-posts-container h3::before,
.recent-posts-container h3::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 50px;
  height: 2px;
  background: linear-gradient(90deg, var(--red-team), var(--blue-team));
}

.recent-posts-container h3::before {
  left: -30px;
}

.recent-posts-container h3::after {
  right: -30px;
}

@media (max-width: 768px) {
  .recent-posts-container h3 {
    font-size: 1.75rem;
    padding: 0 1.5rem;
  }
  
  .recent-posts-container h3::before,
  .recent-posts-container h3::after {
    width: 30px;
  }
  
  .recent-posts-container h3::before {
    left: -15px;
  }
  
  .recent-posts-container h3::after {
    right: -15px;
  }
}

.recent-posts-grid {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding: 1rem 0;
  scroll-padding: 0 1rem;
  gap: 1.5rem;
  margin: 0 1rem;
  scrollbar-width: none; /* Hide scrollbar for Firefox */
  -ms-overflow-style: none; /* Hide scrollbar for IE/Edge */
}

/* Hide scrollbar for Chrome/Safari */
.recent-posts-grid::-webkit-scrollbar {
  display: none;
}

/* Add some space at the end of the scroll */
.recent-posts-grid::after {
  content: '';
  flex: 0 0 1rem;
}

.recent-post {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  padding: 1rem;
  box-sizing: border-box;
  display: flex;
  justify-content: center;
  min-height: 200px;
  min-width: 300px;
  max-width: 400px;
  scroll-snap-align: start;
  flex: 0 0 auto;
  position: relative;
  margin: 0 0.5rem;
}

/* Twitter embed styling */
.recent-post iframe {
  max-width: 100% !important;
  min-width: 100% !important;
  border: none !important;
  border-radius: 12px !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
  display: block !important;
}

/* Twitter embed container */
.recent-post .twitter-tweet {
  margin: 0 auto !important;
  width: 100% !important;
  max-width: 550px !important;
}

/* Twitter embed link */
.recent-post a.twitter-timeline-link {
  display: none !important;
}

/* Ensure proper centering of the tweet content */
.recent-post .twitter-tweet {
  margin: 0 auto !important;
}

/* Make sure the embedded tweet container takes full width */
.recent-post > div {
  width: 100%;
  display: flex;
  justify-content: center;
}

.recent-post:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.no-posts {
  grid-column: 1 / -1;
  text-align: center;
  color: rgba(255, 255, 255, 0.8);
  font-style: italic;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  margin: 0 auto;
  max-width: 600px;
  width: 100%;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .recent-posts-grid {
    padding: 1rem 0.5rem;
    gap: 1rem;
    margin: 0 0.5rem;
  }
  
  .recent-post {
    min-width: 280px;
    max-width: 85%;
    margin: 0 0.5rem;
  }
  
  .recent-posts-container h3 {
    padding: 0 1rem;
  }
}

/* Navigation arrows */
.recent-posts-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  border: none;
  padding: 0;
  opacity: 0.8;
  transition: opacity 0.3s;
}

.recent-posts-nav:hover {
  opacity: 1;
}

.recent-posts-nav.prev {
  left: 10px;
}

.recent-posts-nav.next {
  right: 10px;
}

.recent-posts-nav svg {
  width: 20px;
  height: 20px;
  fill: #333;
}

@media (max-width: 768px) {
  .recent-posts-nav {
    display: none; /* Hide arrows on mobile, rely on swiping */
  }
}

/* Countdown styles */
.countdown {
    text-align: center;
    font-size: 1.2em;
    font-weight: bold;
    margin: 20px 0;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 5px;
    color: #6c757d;
}

/* Disabled button styles */
.team-option a[disabled],
.team-option a[style*="opacity: 0.6"] {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
    position: relative;
}

.team-option a[style*="opacity: 0.6"]:after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    cursor: not-allowed;
}
