/* Base Styles */
:root {
    --primary-blue: #0066cc;
    --secondary-blue: #003366;
    --light-blue: #0099ff;
    --dark-blue: #001933;
    --pure-white: #ffffff;
    --off-white: #f5f5f5;
    --pure-black: #000000;
    --dark-gray: #1a1a1a;
    --max-width: 1200px;
    --box-shadow: 0 0 20px rgba(0, 153, 255, 0.5);
    --retro-font: 'Press Start 2P', cursive;
    --body-font: 'Montserrat', sans-serif;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--body-font);
    background-color: var(--dark-gray);
    color: var(--pure-white);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

body::before {
    content: "";
    position: fixed;
    top: -100%; /* Extend beyond viewport */
    left: -100%; /* Extend beyond viewport */
    width: 300%; /* Make much larger than viewport */
    height: 300%; /* Make much larger than viewport */
    background-image: url('../images/logo_m.png');
    background-repeat: repeat;
    background-size: 100px 100px;
    opacity: 0.1;
    transform: rotate(-45deg);
    z-index: -1;
    pointer-events: none;
}

/* Container for boxed layout */
.container {
    max-width: var(--max-width);
    width: 90%;
    margin: 2rem auto;
    background-color: rgba(0, 25, 51, 0.9);
    box-shadow: var(--box-shadow);
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid var(--primary-blue);
    position: relative;
    z-index: 1; /* Ensure content is above background */
}

/* Header Styles */
.header {
    text-align: center;
    padding: 2rem;
    background-color: var(--dark-blue);
    border-bottom: 2px solid var(--primary-blue);
}

.main-logo {
    max-width: 80%;
    content: url('../images/logo_full.png');
}

.main-nav {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 0 1rem;
}

.nav-button {
    background-color: var(--primary-blue);
    color: var(--pure-white);
    border: none;
    padding: 1rem 2rem;
    font-family: var(--retro-font);
    font-size: 0.8rem;
    cursor: pointer;
    transition: transform 0.2s, background-color 0.2s;
    border-radius: 4px; 
    text-decoration: none;
}

.nav-button:hover {
    background-color: var(--light-blue);
    transform: translateY(-2px);
}

/* Section Styles */
.section {
    padding-top: 3rem;
    padding-bottom: 88px;
    text-align: center;
}

.section h2 {
    font-size: 2rem;
    padding-bottom: 3rem;
    font-weight: 700;
    color: var(--pure-white);
    font-family: var(--retro-font);
    text-shadow: 0 0 10px var(--light-blue);
    letter-spacing: 1px;
}

/* Features Section */
.features {
    background-color: var(--dark-blue);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Unified large icons for feature and statistics cards */
.feature-card i.material-icons,
.stat-card i.material-icons {
    font-size: 96px;  /* Doubled from previous 48px */
    margin-bottom: 2rem;
    color: var(--pure-white);
}

/* Unified card animations for all sections */
.feature-card,
.dev-card,
.stat-card {
    background-color: rgba(0, 102, 204, 0.15);
    padding: 2rem;
    border: 2px solid var(--primary-blue);
    transition: transform 0.2s;
    box-shadow: 0 0 10px rgba(0, 153, 255, 0.3);
}

.feature-card:hover,
.dev-card:hover,
.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 153, 255, 0.5);
}

/* Apply retro font to all card headings */

.feature-card h3,
.dev-card h3,
.stat-card h3 {
    font-family: var(--retro-font);
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--light-blue);
}

/* Unified social icon styling for all sections */
.social-icons a i,
.footer-social a i {
    color: var(--pure-white);
    font-size: 24px;
    margin: 0 10px;
    transition: color 0.2s;
}

.social-icons a i:hover,
.footer-social a i:hover {
    color: var(--light-blue);
}

.stat-card {
    color: var(--pure-white);
}

.stat-number {
    color: var(--light-blue);
    font-size: 1.8rem;
    font-family: var(--retro-font);
}

.leaderboard {
    color: var(--pure-white);
    list-style-position: inside;
    padding: 0;
    text-align: left;
}

/* Hero Section Styles */
.hero-section {
    background-color: var(--dark-blue);
    padding-top: 2rem;
    padding-bottom: 5rem;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 25, 51, 0.9) 0%, rgba(0, 51, 102, 0.8) 100%);
    z-index: 1;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.hero-content {
    display: flex;
    justify-content: center;
    margin-bottom: 4rem;
}

.hero-text {
    text-align: center;
    max-width: 900px;
}

.hero-text h1  {
    text-shadow: 0 0 10px var(--light-blue);
    color: var(--pure-white);
    font-size: 2.5rem; /* Slightly reduced from 3.2rem because retro fonts tend to be larger */
    margin-bottom: 1.5rem;
    font-weight: 700;
    line-height: 1.4; /* Increased line height for better readability with the pixel font */
    font-family: 'Press Start 2P', cursive; /* Apply the retro font */
    text-transform: uppercase; /* Optional: makes it more retro-game-like */
}

.hero-text p {
    color: var(--off-white);
    font-size: 1.2rem; /* Slightly reduced for better contrast with the heading */
    line-height: 1.8; /* Increased for readability */
    margin-bottom: 1.5rem;
    font-family: 'Montserrat', sans-serif; /* Keep the regular font for better readability */
}

.hero-cta {
    text-align: center;
}

.download-button {
    background-color: var(--primary-blue);
    color: var(--pure-white);
    border: none;
    padding: 2rem 4.5rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 1.6rem;
    font-weight: 600;
    text-transform: uppercase;
    text-decoration: none;
    letter-spacing: 1px;
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.3s, background-color 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.download-button:hover {
    background-color: var(--light-blue);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

/* Responsive adjustments */
@media (max-width: 900px) {
    .hero-content {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }
    
    .hero-text h1 {
        font-size: 1.8rem; /* Further reduced for smaller screens */
        line-height: 1.5;
    }
    
    .hero-text p {
        font-size: 1.3rem;
    }
    
    .download-button {
        padding: 1.8rem 3.5rem;
        font-size: 1.4rem;
    }
}

@media (max-width: 600px) {
    .hero-section {
        padding: 4rem 1.5rem;
    }
    
    .logo-image {
        width: 150px;
    }
    
    .hero-text h1 {
        font-size: 1.4rem;
        line-height: 1.6;
    }
    
    .hero-text p {
        font-size: 1rem;
    }
    
    .download-button {
        padding: 1.5rem 3rem;
        font-size: 1.2rem;
        width: 100%;
        max-width: 320px;
    }
}

/* Robot Masters Section - with image swap on hover and modal */
.robot-masters {
    background-color: var(--secondary-blue);
    padding: 4rem 2rem 8rem;
}

.masters-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.master-card {
    background-color: rgba(0, 102, 204, 0.15);
    border: 2px solid var(--primary-blue);
    border-radius: 8px;
    padding: 1.6rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    overflow: hidden;
    aspect-ratio: 1/1; /* Maintain square shape */
    cursor: pointer; /* Add pointer cursor to indicate clickability */
}

.master-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(0, 153, 255, 0.2) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
}

.master-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 20px rgba(0, 153, 255, 0.4);
}

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

.master-card .image-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    position: relative;
}

.master-card img {
    max-width: 85%;
    max-height: 85%;
    object-fit: contain;
    transition: transform 0.3s, opacity 0.3s;
    position: relative;
}

.master-card .default-image {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.85);
    max-width: 85%;
    max-height: 85%;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
}

.master-card .hover-image {
    opacity: 1;
}

.master-card:hover .default-image {
    opacity: 1;
    transform: translate(-50%, -50%) scale(0.92); /* Slightly larger on hover */
}

.master-card:hover .hover-image {
    opacity: 0;
}

/* Center logo styling */
.master-card.center-logo {
    background-color: rgba(0, 102, 204, 0.3);
    border: 3px solid var(--light-blue);
    box-shadow: 0 0 16px rgba(0, 153, 255, 0.5);
    cursor: default; /* Remove pointer cursor for logo */
}

.master-card.center-logo .image-container {
    max-height: 90%;
}

.master-card.center-logo img {
    max-width: 90%;
    max-height: 90%;
    filter: drop-shadow(0 0 8px rgba(0, 153, 255, 0.8));
}

/* Modal Styles - Updated with stats stat */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal.show {
    display: block;
}

.modal.show .modal-content {
    transform: translateY(0);
    opacity: 1;
}

.modal-content {
    background-color: var(--dark-blue);
    margin: 5% auto;
    padding: 1.5rem;
    border: 3px solid var(--primary-blue);
    border-radius: 8px;
    width: 80%;
    max-width: 700px;
    box-shadow: 0 0 30px rgba(0, 153, 255, 0.6);
    position: relative;
    transform: translateY(-20px);
    opacity: 0;
    transition: transform 0.3s, opacity 0.3s;
    max-height: 85vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.close-modal {
    color: var(--light-blue);
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
}

.close-modal:hover {
    color: var(--pure-white);
}

.modal-image-container {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

#modal-image {
    max-width: 60%;
    max-height: 180px;
    object-fit: contain;
    filter: drop-shadow(0 0 15px rgba(0, 153, 255, 0.5));
}

#modal-name {
    font-family: var(--retro-font);
    color: var(--light-blue);
    text-align: center;
    margin-bottom: 0.8rem;
    font-size: 1.7rem;
}

#modal-description {
    color: var(--pure-white);
    text-align: center;
    line-height: 1.5;
    margin: 0;
    padding-bottom: 0.8rem;
    font-size: 0.95rem;
}

/* Ensure the modal fits better on smaller screens */
@media (max-height: 700px) {
    .modal-content {
        margin: 3% auto;
        padding: 1.2rem;
    }
    
    #modal-image {
        max-height: 150px;
    }
    
    #modal-name {
        font-size: 1.5rem;
        margin-bottom: 0.6rem;
    }
    
    #modal-description {
        font-size: 0.9rem;
        padding-bottom: 0.6rem;
    }
}

/* Tooltip styling */
.tooltip {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    z-index: 10;
}

.weakness-spoiler:hover .tooltip {
    opacity: 1;
}

.weakness-spoiler.revealed:hover .tooltip {
    opacity: 0;
}

/* Ensure the weapon styling remains consistent */
#modal-weapon {
    background-color: rgba(0, 102, 204, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    border: 1px solid rgba(0, 113, 255, 0.3);
    display: inline-block;
    min-width: 180px;
}

/* Responsive adjustments */
@media (max-width: 900px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding: 3rem 1rem;
    }
    
    .hero-content {
        padding-right: 0;
        margin-bottom: 3rem;
    }
    
    .hero-description {
        margin: 0 auto 2.5rem;
    }
    
    .masters-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.2rem;
    }
    
    .master-card.center-logo {
        grid-column: span 2;
        width: 60%;
        margin: 0 auto;
    }
    
    .modal-content {
        width: 90%;
        padding: 1.5rem;
    }
    
    #modal-image {
        max-height: 250px;
    }
    
    .skull {
        font-size: 20px;
    }
    
    .skull-container {
        width: 25px;
        height: 25px;
    }
}

@media (max-width: 600px) {
    .masters-grid {
        grid-template-columns: 1fr;
        max-width: 300px;
    }
    
    .master-card.center-logo {
        grid-column: auto;
        width: 100%;
        margin: 0 auto;
    }
    
    .modal-content {
        width: 95%;
        padding: 1rem;
    }
    
    #modal-image {
        max-height: 200px;
    }
    
    #modal-name {
        font-size: 1.4rem;
    }
    
    .modal-stats h3 {
        font-size: 1rem;
    }
    
    #modal-weapon, #modal-weakness {
        font-size: 0.9rem;
    }
    
    .skull {
        font-size: 18px;
    }
    
    .skull-container {
        width: 22px;
        height: 22px;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 0.8rem;
    }
 }
    .cta-button {
        padding: 1rem 2rem;
        font-size: 0.8rem;
    }

/* Footer Styles */
.footer {
    background-color: var(--secondary-blue);
    padding: 2rem;
    width: 100%;
}

/* Updated Footer Layout */
.footer-main {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Two equal columns */
    gap: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

/* First column - Branding */
.footer-branding {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.footer-logo {
    width: 320px;
    height: auto;
    margin-bottom: 0.5rem;
}

.footer-branding h3 {
    font-family: var(--retro-font);
    font-size: 1rem;
    color: var(--light-blue);
    margin-top: 0.5rem;
    text-align: center;
}

/* Second column - Social Media */
.footer-social {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.footer-social h3 {
    font-family: var(--retro-font);
    font-size: 1rem;
    color: var(--light-blue);
    margin-bottom: 1.5rem;
}

/* Social links container */
.social-links-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

/* Common social link styling */
.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 180px;
    padding: 0.7rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.social-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.social-link i {
    font-size: 1.5rem;
    margin-right: 0.8rem;
}

.social-link span {
    font-family: var(--body-font);
}

/* Discord specific styling */
.social-link.discord {
    background-color: #5865F2; /* Discord brand color */
}

.social-link.discord:hover {
    background-color: #4752C4; /* Slightly darker on hover */
}

/* X (Twitter) specific styling */
.social-link.twitter {
    background-color: #000000; /* X brand color */
}

.social-link.twitter:hover {
    background-color: #333333; /* Slightly lighter on hover */
}

/* itch.io specific styling */
.social-link.itch {
    background-color: #FA5C5C; /* itch.io brand color */
}

.social-link.itch:hover {
    background-color: #E54B4B; /* Slightly darker on hover */
}

/* Footer disclaimer */
.footer-disclaimer {
    text-align: center;
    margin-top: 2rem;
    font-size: 0.88;
    opacity: 0.8;
    line-height: 1.5;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .footer-main {
        grid-template-columns: 1fr; /* Stack columns on small screens */
        gap: 3rem;
    }
    
    .social-link {
        width: 160px;
        padding: 0.6rem 0.8rem;
        font-size: 1rem;
    }
    
    .social-link i {
        font-size: 1.3rem;
    }
}

/* Leaderboard table styling */
.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    color: var(--pure-white);
}

.leaderboard-table th, 
.leaderboard-table td {
    padding: 0.5rem;
    text-align: center;
    border-bottom: 1px solid var(--primary-blue);
}

.leaderboard-table th {
    background-color: rgba(0, 102, 204, 0.3);
    font-family: var(--retro-font);
    font-size: 0.75rem;
    letter-spacing: 0;
}

.leaderboard-table .rank {
    color: var(--light-blue);
    font-weight: bold;
    font-family: var(--retro-font);
    font-size: 0.8rem;
}

.leaderboard-table .score {
    color: var(--light-blue);
    font-family: var(--retro-font);
    font-size: 0.8rem;
}

/* Footer headings */
.footer-social h3 {
    font-family: var(--retro-font);
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--pure-blue);
}

/* Footer navigation */
.footer-nav a {
    font-family: var(--retro-font);
    font-size: 0.8rem;
    color: var(--pure-white);
    text-decoration: none;
    margin: 0 10px;
    transition: color 0.2s;
}

.footer-nav a:hover {
    color: var(--light-blue);
}

/* Footer disclaimer */
.footer-disclaimer {
    margin-top: 2rem;
    font-size: 0.8rem;
    opacity: 0.8;
}

/* Call to action section between screenshots and footer */
.cta-section {
    background-color: var(--dark-gray);
    padding: 4rem 0;
    text-align: center;
}

.cta-section h2 {
    color: var(--pure-white);
    margin-bottom: 1.5rem;
}

.cta-section p {
    color: var(--off-white);
    max-width: 600px;
    margin: 0 auto 2rem auto;
    font-size: 1.2rem;
}

.download-button-alt {
    background-color: var(--light-blue);
    color: var(--pure-white);
    border: none;
    padding: 1rem 2.5rem;
    font-weight: 600;
    font-size: 1.1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}

.download-button-alt:hover {
    background-color: var(--primary-blue);
    transform: translateY(-2px);
}

/* Game Stats Section */
.game-stats {
    background-color: var(--dark-blue);
    border-top: 2px solid var(--primary-blue);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 1rem;
}

.stat-card {
    background-color: rgba(0, 102, 204, 0.15);
    padding: 1rem;
    border: 2px solid var(--primary-blue);
    border-radius: 8px;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 0 10px rgba(0, 153, 255, 0.3);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 153, 255, 0.5);
}

.stat-card i.material-icons,
.stat-card i.fas {
    font-size: 48px;
    margin-bottom: 0.5rem;
    color: var(--light-blue);
}

.stat-card h3 {
    font-family: var(--retro-font);
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--light-blue);
}

.stat-number {
    color: var(--pure-white);
    font-size: 2rem;
    font-family: var(--retro-font);
    text-shadow: 0 0 10px var(--light-blue);
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-subtitle {
    color: var(--off-white);
    font-size: 0.9rem;
    margin-top: 0.5rem;
    opacity: 0.8;
}

/* Loading spinner */
.loading-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(0, 153, 255, 0.3);
    border-top: 3px solid var(--light-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: inline-block;
}

.loading-cell {
    padding: 2rem !important;
}

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

/* Level selector for time trials */
.level-selector {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.level-selector label {
    font-family: var(--retro-font);
    font-size: 0.7rem;
    color: var(--off-white);
}

.level-selector select {
    background-color: var(--dark-blue);
    color: var(--pure-white);
    border: 2px solid var(--primary-blue);
    border-radius: 4px;
    padding: 0.5rem 1rem;
    font-family: var(--body-font);
    font-size: 0.9rem;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.level-selector select:hover,
.level-selector select:focus {
    border-color: var(--light-blue);
    box-shadow: 0 0 10px rgba(0, 153, 255, 0.3);
    outline: none;
}

.level-selector select option {
    background-color: var(--dark-blue);
    color: var(--pure-white);
}

/* Leaderboard table styling for stats section */
.stat-card .leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.5rem;
}

.stat-card .leaderboard-table th,
.stat-card .leaderboard-table td {
    padding: 0.5rem 0.3rem;
    text-align: center;
    border-bottom: 1px solid rgba(0, 153, 255, 0.3);
    font-size: 0.85rem;
}

.stat-card .leaderboard-table th {
    background-color: rgba(0, 102, 204, 0.3);
    font-family: var(--retro-font);
    font-size: 0.65rem;
    color: var(--light-blue);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card .leaderboard-table tbody tr:hover {
    background-color: rgba(0, 153, 255, 0.1);
}

.stat-card .leaderboard-table .rank {
    color: var(--light-blue);
    font-weight: bold;
    font-family: var(--retro-font);
    font-size: 0.75rem;
}

.stat-card .leaderboard-table .score,
.stat-card .leaderboard-table .time {
    color: var(--light-blue);
    font-family: var(--retro-font);
    font-size: 0.75rem;
}

.stat-card .leaderboard-table .player-name {
    color: var(--pure-white);
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Gold, Silver, Bronze for top 3 */
.stat-card .leaderboard-table tbody tr:nth-child(1) .rank { color: #FFD700; text-shadow: 0 0 8px rgba(255, 215, 0, 0.5); }
.stat-card .leaderboard-table tbody tr:nth-child(2) .rank { color: #C0C0C0; text-shadow: 0 0 8px rgba(192, 192, 192, 0.5); }
.stat-card .leaderboard-table tbody tr:nth-child(3) .rank { color: #CD7F32; text-shadow: 0 0 8px rgba(205, 127, 50, 0.5); }

/* Error state */
.stat-error {
    color: #ff6b6b;
    font-size: 0.9rem;
    padding: 1rem;
}

/* Responsive adjustments for stats grid */
@media (max-width: 900px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 700px) {
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 1rem;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-card i.material-icons,
    .stat-card i.fas {
        font-size: 48px;
    }
    
    .stat-card .leaderboard-table th,
    .stat-card .leaderboard-table td {
        padding: 0.4rem 0.2rem;
        font-size: 0.8rem;
    }
    
    .stat-card .leaderboard-table th {
        font-size: 0.6rem;
    }
    
    .stat-card .leaderboard-table .rank,
    .stat-card .leaderboard-table .score,
    .stat-card .leaderboard-table .time {
        font-size: 0.7rem;
    }
}

/* Screenshots Section */
.screenshots {
    background-color: var(--secondary-blue);
    padding-bottom: 6rem;
    border-bottom: 2px solid var(--primary-blue);
}

.screenshot-carousel {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
}

.carousel-container {
    width: 60%;
    overflow: hidden; /* This hides anything outside the container */
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    margin: 0 auto;
    background-color: var(--dark-blue);
    position: relative;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease;
    width: 100%; /* Ensure the track takes full width */
}

.carousel-slide {
    min-width: 100%; /* Each slide takes exactly 100% of container width */
    flex: 0 0 100%; /* Don't allow the slide to grow or shrink */
    box-sizing: border-box;
    padding: 0;
    opacity: 0.8;
    transition: opacity 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 350px;
    background-color: var(--dark-blue);
}

.carousel-slide.active {
    opacity: 1;
}

.carousel-slide img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

.carousel-arrow {
    background-color: rgba(0, 102, 204, 0.8);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    margin: 0 15px;
    z-index: 10;
}

.carousel-arrow:hover {
    background-color: var(--primary-blue);
    transform: scale(1.1);
}

.carousel-arrow i {
    font-size: 20px;
}

/* Responsive adjustments for carousel */
@media (max-width: 768px) {
    .carousel-container {
        width: 80%;
    }
    
    .carousel-slide img {
        max-height: 300px;
    }
    
    .carousel-arrow {
        width: 40px;
        height: 40px;
        margin: 0 10px;
    }
}

@media (max-width: 480px) {
    .carousel-container {
        width: 90%;
    }
    
    .carousel-slide img {
        max-height: 250px;
    }
    
    .carousel-arrow {
        width: 35px;
        height: 35px;
        margin: 0 5px;
    }
}

/* Discord link styling */
.discord-container {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
}

.discord-link {
    display: flex;
    align-items: center;
    background-color: #5865F2; /* Discord brand color */
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.discord-link:hover {
    background-color: #4752C4; /* Slightly darker on hover */
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.discord-link i.fab.fa-discord {
    font-size: 1.8rem;
    margin-right: 0.8rem;
}

.discord-link span {
    font-family: var(--body-font);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .discord-link {
        padding: 0.7rem 1.2rem;
        font-size: 1.1rem;
    }
    
    .discord-link i.fab.fa-discord {
        font-size: 1.6rem;
    }
}

/* Teaser Video Section */
.teaser-video-container {
    margin-top: 5rem;
    text-align: center;
    width: 100%;
}

.teaser-video-container h2 {
    font-family: var(--retro-font);
    font-size: 1.5rem;
    color: var(--pure-white);
    margin-bottom: 2.5rem;
    text-shadow: 0 0 8px rgba(0, 153, 255, 0.5);
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    max-width: 800px;
    margin: 0 auto;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid var(--primary-blue);
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Responsive adjustments */
@media (max-width: 900px) {
    .teaser-video-container {
        margin-top: 2.5rem;
    }
    
    .teaser-video-container h2 {
        font-size: 1.3rem;
    }
    
    .video-wrapper {
        max-width: 90%;
    }
}

@media (max-width: 600px) {
    .teaser-video-container {
        margin-top: 2rem;
    }
    
    .teaser-video-container h2 {
        font-size: 1.1rem;
    }
}
/* Download Modal Styles */
.download-instructions {
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    padding: 2rem;
}

.download-instructions h2 {
    color: var(--light-blue);
    font-family: var(--retro-font);
    text-align: center;
    margin-bottom: 1.5rem;
    padding-bottom: 0;
    font-size: 1.8rem;
}

.instruction-toggle {
    color: var(--light-blue);
    font-family: var(--retro-font);
    font-size: 1.2rem;
    margin: 1rem 0;
    padding: 1rem;
    background-color: rgba(0, 102, 204, 0.1);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    border: 1px solid rgba(0, 153, 255, 0.3);
}

.instruction-toggle:hover {
    background-color: rgba(0, 102, 204, 0.2);
}

.instruction-toggle.active {
    background-color: rgba(0, 102, 204, 0.3);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-bottom: none;
    margin-bottom: 0;
}

.instruction-section {
    display: none; /* Hidden by default */
    text-align: left;
    background-color: rgba(0, 102, 204, 0.1);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid rgba(0, 153, 255, 0.3);
    margin-bottom: 1.5rem;
}

.instruction-section.active {
    display: block; /* Show when active */
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

.instruction-section p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.instruction-section ol, 
.instruction-section ul {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.instruction-section li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.instruction-section ul li {
    list-style-type: disc;
    margin-left: 1rem;
    margin-top: 0.5rem;
}

.download-button-container {
    text-align: center;
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.final-download-btn {
    display: inline-block;
    background-color: var(--primary-blue);
    color: var(--pure-white);
    padding: 2rem 3rem;
    font-family: var(--retro-font);
    font-size: 1rem;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.final-download-btn:hover {
    background-color: var(--light-blue);
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}
/* Responsive adjustments */
@media (max-width: 768px) {
    .download-instructions {
        padding: 1.5rem;
    }
    
    .download-instructions h2 {
        font-size: 1.5rem;
    }
    
    .instruction-section h3 {
        font-size: 1.1rem;
    }
    
    .final-download-btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }
}