:root {
    --primary-orange: #ff8c00;
    --gold: #ffd700;
    --dark-bg: #121212;
    --card-bg: #1e1e1e;
    --text-white: #ffffff;
    --accent-gradient: linear-gradient(135deg, #ff8c00 0%, #ffd700 100%);
}

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

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

/* Bubbly Background */
.bubbles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.bubble {
    position: absolute;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.1), rgba(255, 215, 0, 0.05));
    border-radius: 50%;
    bottom: -100px;
    animation: float-up var(--duration) linear infinite;
    opacity: 0.5;
    filter: blur(2px);
}

@keyframes float-up {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.5;
    }
    90% {
        opacity: 0.5;
    }
    100% {
        transform: translateY(-120vh) rotate(360deg);
        opacity: 0;
    }
}

h1, h2, h3, .logo, button {
    font-family: 'Fredoka', sans-serif;
    font-weight: 700;
    letter-spacing: 1px;
}

.main-header {
    width: 100%;
    position: relative;
    z-index: 100;
}

.banner-container {
    position: relative;
    width: 100%;
    height: 500px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.banner-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.4) blur(4px);
    z-index: -1;
    transform: scale(1.1);
}

.banner-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    padding-top: 2rem;
    width: 100%;
}

.main-logo {
    width: 600px;
    max-width: 90%;
    height: auto;
    object-fit: contain;
    cursor: pointer;
    filter: drop-shadow(0 0 20px rgba(255, 140, 0, 0.4));
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: float 4s ease-in-out infinite;
}

.main-logo:hover {
    transform: scale(1.05) rotate(2deg);
    filter: drop-shadow(0 0 30px rgba(255, 215, 0, 0.6));
}

.centered-nav {
    display: flex;
    gap: 2rem;
    background: rgba(0, 0, 0, 0.4);
    padding: 0.8rem 2rem;
    border-radius: 50px;
    border: 1px solid rgba(255, 215, 0, 0.3);
    backdrop-filter: blur(10px);
}

.centered-nav button {
    background: transparent;
    border: none;
    color: var(--text-white);
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 700;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.centered-nav button:hover {
    color: var(--gold);
    transform: scale(1.1);
}

.centered-nav button.active {
    color: var(--primary-orange);
    text-shadow: 0 0 10px rgba(255, 140, 0, 0.5);
}

/* Game Images */
.game-images {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.game-img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease;
}

.game-img:hover {
    transform: scale(1.05);
    border-color: var(--primary-orange);
}

.players-tab-content {
    background: var(--card-bg);
    padding: 3rem;
    border-radius: 20px;
    border: 2px solid #2a2a2a;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

main {
    padding: 2rem 10%;
    min-height: 60vh;
}

section h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-align: center;
    text-transform: uppercase;
}

.section-subtitle {
    text-align: center;
    color: #aaa;
    font-size: 1.2rem;
    margin-bottom: 3rem;
    font-weight: 600;
}

.hidden {
    display: none;
}

/* Home Section */
.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 5vh;
}

.description {
    font-size: 1.5rem;
    max-width: 800px;
    margin: 0 auto 3rem auto;
    color: #cccccc;
    font-weight: 600;
}

.countdown-container {
    display: flex;
    gap: 2rem;
    margin-bottom: 4rem;
    background: rgba(0, 0, 0, 0.4);
    padding: 2rem;
    border-radius: 20px;
    border: 2px solid var(--gold);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.1);
}

.countdown-item {
    display: flex;
    flex-direction: column;
    min-width: 100px;
}

.countdown-item span {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--gold);
    line-height: 1;
    display: inline-block;
    transition: transform 0.2s ease;
}

.countdown-item:hover span {
    transform: scale(1.2);
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.countdown-item label {
    font-size: 0.9rem;
    text-transform: uppercase;
    color: var(--primary-orange);
    font-weight: 700;
    margin-top: 0.5rem;
    letter-spacing: 2px;
}

.social-links {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.social-btn {
    padding: 1rem 2rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 900;
    font-family: 'Montserrat', sans-serif;
    text-transform: uppercase;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid var(--primary-orange);
    color: var(--text-white);
    background: rgba(0, 0, 0, 0.2);
}

.social-btn:hover {
    background: var(--primary-orange);
    color: var(--dark-bg);
    transform: scale(1.1) rotate(2deg);
    box-shadow: 0 5px 15px rgba(255, 140, 0, 0.4);
}

.social-btn.twitch:hover { background: #9146FF; border-color: #9146FF; color: white; }
.social-btn.discord:hover { background: #5865F2; border-color: #5865F2; color: white; }
.social-btn.twitter:hover { background: #1DA1F2; border-color: #1DA1F2; color: white; }
.social-btn.bluesky:hover { background: #0085FF; border-color: #0085FF; color: white; }
.social-btn.youtube:hover { background: #FF0000; border-color: #FF0000; color: white; }

/* Games Grid */
.games-grid {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    max-width: 900px;
    margin: 0 auto;
}

.game-card {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 16px;
    text-align: left;
    border: 2px solid #2a2a2a;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.game-card h2 {
    color: var(--gold);
    font-size: 2rem;
    text-transform: uppercase;
    border-bottom: 2px solid var(--primary-orange);
    padding-bottom: 0.5rem;
    display: inline-block;
    align-self: flex-start;
}

.game-desc {
    color: #dddddd;
    font-size: 1.1rem;
    line-height: 1.7;
}

.game-desc p {
    margin-bottom: 1.2rem;
}

.game-desc p:last-child {
    margin-bottom: 0;
}

.game-desc .points {
    color: var(--gold);
    font-weight: 700;
    padding: 1rem;
    background: rgba(255, 215, 0, 0.05);
    border-left: 4px solid var(--gold);
    font-style: italic;
}

.game-card:hover {
    border-color: var(--primary-orange);
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 40px rgba(255, 140, 0, 0.2);
}

/* Players Page Styling */
.players-tab-content {
    background: transparent !important;
    border: none !important;
    display: block !important;
    padding: 0 !important;
}

.players-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 2rem;
    padding: 2rem 0;
}

.player-card {
    background: var(--card-bg);
    border: 2px solid #2a2a2a;
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.player-card:hover {
    transform: translateY(-10px) scale(1.05);
    border-color: var(--gold);
    box-shadow: 0 10px 25px rgba(255, 215, 0, 0.2);
}

.player-head {
    width: 80px;
    height: 80px;
    image-rendering: pixelated;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.5));
}

.player-name {
    font-weight: 700;
    color: var(--text-white);
    font-size: 1.1rem;
    text-align: center;
}

/* Modal Styling */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(8px);
}

.modal-content {
    background: var(--card-bg);
    border: 3px solid var(--gold);
    border-radius: 24px;
    padding: 3rem;
    max-width: 500px;
    width: 90%;
    position: relative;
    text-align: center;
    box-shadow: 0 0 50px rgba(255, 215, 0, 0.15);
    animation: modalPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalPop {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.close-btn {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2.5rem;
    color: #888;
    cursor: pointer;
    transition: color 0.3s;
}

.close-btn:hover {
    color: var(--primary-orange);
}

.modal-player-body {
    width: 120px;
    image-rendering: pixelated;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.5));
}

#modal-player-details h2 {
    font-size: 2.5rem;
    color: var(--gold);
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.stats-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-label {
    color: #aaa;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.stat-value {
    color: var(--text-white);
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--primary-orange);
}
.stream-container {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    aspect-ratio: 16 / 9;
    border: 4px solid var(--primary-orange);
    border-radius: 8px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 0 40px rgba(255, 140, 0, 0.3);
}

#twitch-embed {
    width: 100%;
    height: 100%;
}

/* Teams Grid */
.teams-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
    justify-content: center;
}

.team-card-live {
    background: var(--card-bg);
    border-radius: 24px;
    padding: 2.5rem;
    border: 2px solid #2a2a2a;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.team-icon {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.5));
    animation: float 3s ease-in-out infinite;
}

.team-card-live:nth-child(even) .team-icon {
    animation-delay: 0.5s;
    animation-duration: 3.5s;
}

.team-card-live:nth-child(3n) .team-icon {
    animation-delay: 1s;
    animation-duration: 4s;
}

/* Floating Animations */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

@keyframes pulse-glow {
    0%, 100% { filter: drop-shadow(0 0 5px rgba(255, 140, 0, 0.5)); }
    50% { filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.8)); }
}

@keyframes sectionFadeIn {
    0% { opacity: 0; transform: translateY(20px) scale(0.98); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

section:not(.hidden) {
    animation: sectionFadeIn 0.5s ease-out forwards;
}

.team-card-live h3 {
    font-size: 1.8rem;
    text-transform: uppercase;
    margin-bottom: 0.8rem;
    padding-bottom: 0.8rem;
    border-bottom: 3px solid rgba(255, 255, 255, 0.1);
    width: 100%;
}

.team-score {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.player-slots {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    width: 100%;
}

.player-slot {
    background: rgba(0, 0, 0, 0.4);
    padding: 0.8rem 1.2rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.player-slot-info {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.slot-head {
    width: 24px;
    height: 24px;
    image-rendering: pixelated;
    border-radius: 4px;
}

.player-slot.clickable {
    cursor: pointer;
    transition: all 0.2s ease;
}

.player-slot.clickable:hover {
    background: rgba(255, 215, 0, 0.1);
    border-color: var(--gold);
    transform: scale(1.02);
}

.player-slot.tbd {
    color: #555;
    justify-content: center;
}

.player-score {
    color: var(--gold);
    font-size: 0.9rem;
    opacity: 0.9;
}

.player-slot:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--gold);
    transform: scale(1.05);
    z-index: 1;
}

/* Team Colors */
.team-card-live.red h3 { color: #ff4d4d; border-color: #ff4d4d; }
.team-card-live.orange h3 { color: #ff944d; border-color: #ff944d; }
.team-card-live.yellow h3 { color: #ffff4d; border-color: #ffff4d; }
.team-card-live.green h3 { color: #4dff4d; border-color: #4dff4d; }
.team-card-live.aqua h3 { color: #4dffff; border-color: #4dffff; }
.team-card-live.blue h3 { color: #4d4dff; border-color: #4d4dff; }
.team-card-live.purple h3 { color: #b34dff; border-color: #b34dff; }
.team-card-live.pink h3 { color: #ff4db3; border-color: #ff4db3; }

/* Tab Transition Overlay */
.tab-transition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    overflow: hidden;
}

.transition-bg {
    position: absolute;
    top: 0;
    left: -50%;
    width: 200%;
    height: 100%;
    background: linear-gradient(135deg, #ff8c00 0%, #ffd700 100%);
    transform: skewX(-25deg) translateX(-120%);
    transition: transform 0.8s cubic-bezier(0.77, 0, 0.175, 1);
    z-index: 1;
}

.tab-transition.active .transition-bg {
    transform: skewX(-25deg) translateX(0);
}

.tab-transition.wipe-out .transition-bg {
    transform: skewX(-25deg) translateX(120%);
}

.transition-content {
    position: relative;
    z-index: 2;
    text-align: center;
    opacity: 0;
    transition: opacity 0.4s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tab-transition.active .transition-content {
    opacity: 1;
}

.tab-transition.wipe-out .transition-content {
    opacity: 0;
}

.transition-crown {
    width: 500px; /* Even bigger */
    height: auto;
    filter: drop-shadow(0 30px 60px rgba(0,0,0,0.5));
    display: block;
    margin: 0 auto;
}

.tab-transition.active .transition-crown {
    animation: crownBounce 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes crownBounce {
    0% { transform: scale(0.1) translateY(500px) rotate(-45deg); opacity: 0; }
    60% { transform: scale(1.8) translateY(-150px) rotate(20deg); opacity: 1; }
    100% { transform: scale(1) translateY(0) rotate(0deg); opacity: 1; }
}

@media (max-width: 768px) {
    section h1 {
        font-size: 2rem;
    }
    nav {
        flex-direction: column;
        gap: 1rem;
    }
}
