/* Variáveis de Cores (Brawl Stars Theme) */
:root {
    --primary-color: #FACC15; /* Amarelo Brawl */
    --secondary-color: #3B82F6; /* Azul Brawl */
    --dark-bg: #111827;
    --darker-bg: #030712;
    --text-light: #F9FAFB;
    --text-dark: #1F2937;
    --accent-red: #EF4444;
    --card-bg: #1F2937;
    --font-heading: 'Nougat', 'Roboto', sans-serif;
    --font-body: 'Roboto', sans-serif;
}

/* Reset e Configurações Globais */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--dark-bg);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    letter-spacing: 1px;
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Loading Screen */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--darker-bg);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loader {
    text-align: center;
}

.loader img {
    width: 150px;
    margin-bottom: 20px;
}

.loader h2 {
    color: var(--primary-color);
    font-size: 2rem;
    text-transform: uppercase;
}

.pulse {
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Navbar */
#navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 15px 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(3, 7, 18, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: all 0.3s ease;
    border-bottom: 2px solid var(--secondary-color);
}

#navbar.scrolled {
    padding: 10px 50px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.logo img {
    height: 70px;
    transition: height 0.3s;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 1.1rem;
    position: relative;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 3px;
    background-color: var(--primary-color);
    transition: width 0.3s;
}

.nav-links a:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--primary-color);
}

/* Sections Generais */
.section {
    padding: 100px 20px;
}

.dark-bg {
    background-color: var(--darker-bg);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 50px;
    text-transform: uppercase;
    text-shadow: 2px 2px 0px var(--accent-red);
}

/* Hero Section (Parallax) */
#hero {
    height: 100vh;
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.7)), url('https://supercell.com/images/307455d315cbbfd0a133a876a4ee228d/bs_bg_hero_2.8a2e1d0d.jpg') no-repeat center center/cover;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 80px;
}

.hero-content h1 {
    font-size: 5rem;
    color: var(--primary-color);
    text-transform: uppercase;
    text-shadow: 4px 4px 0px var(--secondary-color), 8px 8px 0px #000;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 40px;
    text-shadow: 1px 1px 3px #000;
}

.primary-btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--text-dark);
    font-size: 1.5rem;
    font-family: var(--font-heading);
    padding: 15px 40px;
    border-radius: 50px;
    text-transform: uppercase;
    border: 4px solid var(--text-dark);
    box-shadow: 0 6px 0 var(--secondary-color);
    transition: all 0.2s;
    cursor: pointer;
}

.primary-btn:hover {
    transform: translateY(2px);
    box-shadow: 0 4px 0 var(--secondary-color);
    background-color: #ffe066;
}

.primary-btn:active {
    transform: translateY(6px);
    box-shadow: 0 0 0 var(--secondary-color);
}

/* About Grid */
.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.about-card {
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    border: 2px solid var(--secondary-color);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    overflow: hidden;
}

.about-card::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(59,130,246,0.2) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.5s;
    pointer-events: none;
}

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

.about-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    border-color: var(--primary-color);
}

.about-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.about-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

/* Timeline */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background-color: var(--primary-color);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 50%;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    right: -10px;
    background-color: var(--accent-red);
    border: 4px solid var(--primary-color);
    top: 15px;
    border-radius: 50%;
    z-index: 1;
}

.left {
    left: 0;
}

.right {
    left: 50%;
}

.left::after {
    right: -10px;
}

.right::after {
    left: -10px;
}

.timeline-content {
    padding: 20px;
    background-color: var(--card-bg);
    position: relative;
    border-radius: 10px;
    border: 2px solid var(--secondary-color);
}

.timeline-content h3 {
    color: var(--primary-color);
}

/* Game Modes Grid */
.modes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.mode-card {
    background: linear-gradient(145deg, var(--card-bg), var(--darker-bg));
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    border-top: 4px solid var(--accent-red);
    transition: transform 0.3s;
}

.mode-card:hover {
    transform: scale(1.05);
    border-top: 4px solid var(--primary-color);
}

.mode-card i {
    font-size: 4rem;
    color: #fff;
    margin-bottom: 15px;
    text-shadow: 0 0 10px var(--accent-red);
}

/* Brawlers Carousel */
.carousel-container {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 20px 0;
}

.brawler-carousel {
    display: flex;
    gap: 30px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
    padding: 10px;
}

.brawler-carousel::-webkit-scrollbar {
    display: none;
}

.brawler-card {
    min-width: 280px;
    background-color: var(--card-bg);
    border-radius: 20px;
    padding: 20px;
    text-align: center;
    scroll-snap-align: center;
    border: 3px solid var(--secondary-color);
    transition: transform 0.3s;
}

.brawler-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    box-shadow: 0 0 20px rgba(250, 204, 21, 0.4);
}

.brawler-card img {
    width: 150px;
    height: 150px;
    object-fit: contain;
    margin-bottom: 15px;
    filter: drop-shadow(0 10px 10px rgba(0,0,0,0.5));
}

.class-badge {
    display: inline-block;
    background-color: var(--accent-red);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    margin: 10px 0;
    text-transform: uppercase;
}

.carousel-btn {
    background-color: var(--primary-color);
    border: none;
    color: var(--text-dark);
    font-size: 1.5rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    position: absolute;
    z-index: 10;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    transition: background-color 0.3s;
}

.carousel-btn:hover {
    background-color: #fff;
}

.carousel-btn.prev {
    left: 0;
}

.carousel-btn.next {
    right: 0;
}

/* Video Section */
.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
    max-width: 900px;
    margin: 0 auto;
    border-radius: 20px;
    border: 5px solid var(--primary-color);
    box-shadow: 0 10px 30px rgba(0,0,0,0.7);
}

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

/* Gallery */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.gallery-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.3s, filter 0.3s;
    border: 2px solid transparent;
}

.gallery-img:hover {
    transform: scale(1.05);
    filter: brightness(1.2);
    border-color: var(--primary-color);
    z-index: 1;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(0,0,0,0.9);
}

.lightbox-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 900px;
    max-height: 80%;
    object-fit: contain;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: zoomIn 0.3s;
}

.close {
    position: absolute;
    top: 30px;
    right: 40px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

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

@keyframes zoomIn {
    from {transform: translate(-50%, -50%) scale(0.8); opacity: 0;}
    to {transform: translate(-50%, -50%) scale(1); opacity: 1;}
}

/* Trivia Stats */
.stats-grid {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 30px;
}

.stat-card {
    text-align: center;
    background-color: var(--card-bg);
    padding: 40px 20px;
    border-radius: 50%;
    width: 200px;
    height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border: 5px solid var(--primary-color);
    box-shadow: 0 0 20px rgba(250, 204, 21, 0.2);
}

.stat-card i {
    font-size: 2rem;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.stat-card h3 {
    font-size: 2.5rem;
    color: var(--primary-color);
}

.stat-card h1 {
    font-size: 1.6rem;
    color: var(--primary-color);
    line-height: 1.2;
    margin: 5px 0;
}

.stat-card p {
    font-weight: bold;
    text-transform: uppercase;
}

/* Community */
.community-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.community-content p {
    font-size: 1.2rem;
    margin-bottom: 40px;
}

.community-stats {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 20px;
}

.comm-stat {
    font-size: 1.2rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: var(--card-bg);
    padding: 15px 30px;
    border-radius: 50px;
    border: 1px solid var(--secondary-color);
}

.comm-stat i {
    color: var(--accent-red);
    font-size: 1.5rem;
}

/* Footer */
footer {
    background-color: #000;
    padding: 50px 20px 20px;
    text-align: center;
    border-top: 5px solid var(--primary-color);
}

.footer-logo img {
    height: 60px;
    margin-bottom: 30px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.footer-links a {
    color: #fff;
    font-size: 1.2rem;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-credits {
    color: #6B7280;
    font-size: 0.9rem;
}

/* Back to Top */
#backToTop {
    display: none;
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: var(--primary-color);
    color: var(--text-dark);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    z-index: 1000;
    transition: transform 0.3s, background-color 0.3s;
}

#backToTop:hover {
    transform: translateY(-5px);
    background-color: #fff;
}

/* Fade In Animation */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Media Queries */
@media screen and (max-width: 768px) {
    .nav-links {
        position: absolute;
        right: 0;
        top: 70px;
        background-color: rgba(3, 7, 18, 0.95);
        display: flex;
        flex-direction: column;
        width: 100%;
        text-align: center;
        padding: 20px 0;
        gap: 20px;
        transform: translateY(-150%);
        transition: transform 0.3s ease-in-out;
        z-index: -1;
    }

    .nav-links.active {
        transform: translateY(0);
    }

    .hamburger {
        display: block;
    }

    .hero-content h1 {
        font-size: 3rem;
    }

    .timeline::after {
        left: 31px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }

    .left, .right {
        left: 0;
    }

    .left::after, .right::after {
        left: 21px;
    }
}
