/* ========================================
   GLOBAL & VARIABLES
   ======================================== */

:root {
    --color-dark: #0d0d0d;
    --color-dark-secondary: #1a1a1a;
    --color-text: #e0e0e0;
    --color-text-secondary: #b0b0b0;
    --color-gold: #e8c87a;
    --color-gold-dark: #d4a859;
    --color-accent: #666666;
    --font-cinzel: 'Cinzel', serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --sidebar-width: 240px;
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

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

/* ========================================
   SIDEBAR NAVIGATION
   ======================================== */

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    width: var(--sidebar-width);
    background: linear-gradient(to bottom, rgba(13,13,13,0.4) 0%, rgba(13,13,13,0.85) 30%, #0d0d0d 60%);
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--color-accent);
    z-index: 100;
    overflow-y: auto;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.sidebar-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.sidebar-header {
    margin-bottom: 2.5rem;
    text-align: center;
}

.logo {
    width: auto;
    height: 90px;
    object-fit: contain;
    filter: brightness(1.1);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-radius: 0.5rem;
    text-decoration: none;
    color: var(--color-text-secondary);
    transition: var(--transition);
    font-size: 0.95rem;
    position: relative;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.nav-link:hover {
    color: var(--color-gold);
    background-color: rgba(232, 200, 122, 0.1);
}

.nav-link.active {
    color: var(--color-gold);
    background-color: rgba(232, 200, 122, 0.15);
    font-weight: 600;
}

.nav-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background-color: var(--color-gold);
    border-radius: 0 3px 3px 0;
}

.nav-icon {
    font-size: 1.25rem;
    width: 1.5rem;
    text-align: center;
}

.nav-text {
    flex: 1;
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-accent);
}

.language-selector {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.lang-btn {
    padding: 0.5rem 0.75rem;
    background: transparent;
    border: 1px solid var(--color-accent);
    color: var(--color-text-secondary);
    border-radius: 0.375rem;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    transition: var(--transition);
    text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}

.lang-btn:hover {
    border-color: var(--color-gold);
    color: var(--color-gold);
}

.lang-btn.active {
    background-color: var(--color-gold);
    border-color: var(--color-gold);
    color: var(--color-dark);
}

/* ========================================
   HAMBURGER MENU (MOBILE)
   ======================================== */

.hamburger {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 150;
    width: 2.5rem;
    height: 2.5rem;
    background: var(--color-dark-secondary);
    border: 1px solid var(--color-accent);
    border-radius: 0.375rem;
    cursor: pointer;
    flex-direction: column;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.5rem;
}

.hamburger span {
    width: 100%;
    height: 2px;
    background: var(--color-gold);
    border-radius: 1px;
    transition: var(--transition);
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(0.5rem, 0.5rem);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(0.25rem, -0.25rem);
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 99;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* ========================================
   MAIN CONTENT LAYOUT
   ======================================== */

.main-content {
    margin-left: var(--sidebar-width);
    transition: var(--transition);
}

/* ========================================
   HERO SECTION
   ======================================== */

.hero {
    position: relative;
    background: linear-gradient(180deg, var(--color-dark-secondary) 0%, var(--color-dark) 100%);
    overflow: hidden;
    margin-bottom: 3rem;
    margin-left: calc(var(--sidebar-width) * -1);
    width: calc(100% + var(--sidebar-width));
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 340px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.5) 50%, rgba(0,0,0,0.7) 100%);
    z-index: 1;
    pointer-events: none;
}

.hero-banner {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    max-height: 340px;
    object-fit: cover;
    object-position: center;
    display: block;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 340px;
    padding: 3rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 2;
}

.hero-title {
    font-family: var(--font-cinzel);
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--color-gold);
    margin: 0 0 0.5rem 0;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8), 0 0 20px rgba(0, 0, 0, 0.6);
}

.hero-tagline {
    font-size: 1.25rem;
    color: var(--color-text-secondary);
    margin-bottom: 2rem;
    font-style: italic;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

.hero-buttons {
    position: relative;
    margin-top: 2rem;
    padding: 3rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    background: var(--color-dark);
    z-index: 3;
}

/* ========================================
   BUTTONS
   ======================================== */

.btn {
    padding: 0.875rem 2rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
    display: inline-block;
    font-family: var(--font-body);
    text-align: center;
}

.btn-primary {
    background-color: var(--color-gold);
    color: var(--color-dark);
}

.btn-primary:hover {
    background-color: var(--color-gold-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(232, 200, 122, 0.3);
}

.btn-secondary {
    background-color: transparent;
    color: var(--color-gold);
    border: 2px solid var(--color-gold);
}

.btn-secondary:hover {
    background-color: rgba(232, 200, 122, 0.1);
    transform: translateY(-2px);
}

/* ========================================
   SECTIONS
   ======================================== */

.section {
    padding: 3rem;
    max-width: 100%;
}

.section-title {
    font-family: var(--font-cinzel);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-gold);
    margin-bottom: 0.5rem;
}

.section-subtitle {
    color: var(--color-text-secondary);
    margin-bottom: 2.5rem;
    font-size: 1.1rem;
}

/* ========================================
   WORLDS GRID
   ======================================== */

.worlds-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.world-card {
    background: var(--color-dark-secondary);
    border: 1px solid var(--color-accent);
    border-radius: 0.75rem;
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.world-card:hover {
    border-color: var(--color-gold);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(232, 200, 122, 0.15);
}

.card-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: linear-gradient(135deg, var(--color-accent) 0%, #333 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.world-logo {
    object-fit: contain !important;
    max-height: 120px !important;
    max-width: 90% !important;
    height: auto !important;
}

.card-title {
    font-family: var(--font-cinzel);
    font-size: 1.25rem;
    color: var(--color-gold);
    padding: 1rem 1rem 0.5rem;
    font-weight: 600;
}

.card-description {
    color: var(--color-text-secondary);
    padding: 0 1rem 1rem;
    font-size: 0.95rem;
    flex: 1;
}

.card-status {
    margin: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
}

.card-status.online {
    background-color: rgba(0, 200, 100, 0.2);
    color: #00c864;
}

/* ========================================
   NEWS SECTION
   ======================================== */

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.news-card {
    background: var(--color-dark-secondary);
    border: 1px solid var(--color-accent);
    border-radius: 0.75rem;
    overflow: hidden;
    transition: var(--transition);
}

.news-card:hover {
    border-color: var(--color-gold);
    transform: translateY(-4px);
}

.news-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, #444 0%, #222 100%);
}

.news-title {
    font-family: var(--font-cinzel);
    font-size: 1.1rem;
    color: var(--color-gold);
    padding: 1.5rem 1.5rem 0.5rem;
    font-weight: 600;
}

.news-excerpt {
    color: var(--color-text-secondary);
    padding: 0.5rem 1.5rem;
    font-size: 0.9rem;
}

.news-date {
    display: block;
    color: var(--color-accent);
    padding: 0 1.5rem 1.5rem;
    font-size: 0.85rem;
}

/* ========================================
   WIKI SECTION
   ======================================== */

.wiki-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.wiki-card {
    background: var(--color-dark-secondary);
    border: 1px solid var(--color-accent);
    border-radius: 0.75rem;
    padding: 1.5rem;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.wiki-card:hover {
    border-color: var(--color-gold);
    transform: translateY(-4px);
}

.wiki-card-title {
    font-family: var(--font-cinzel);
    font-size: 1.15rem;
    color: var(--color-gold);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.wiki-excerpt {
    color: var(--color-text-secondary);
    margin-bottom: 1rem;
    font-size: 0.9rem;
    flex: 1;
}

.wiki-link {
    color: var(--color-gold);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    display: inline-block;
}

.wiki-link:hover {
    transform: translateX(4px);
}

/* ========================================
   ARCADE SECTION
   ======================================== */

.arcade-container {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.arcade-card {
    background: linear-gradient(135deg, var(--color-dark-secondary) 0%, #242424 100%);
    border: 2px solid var(--color-gold);
    border-radius: 0.75rem;
    padding: 2.5rem;
    text-align: center;
    max-width: 500px;
    width: 100%;
}

.arcade-card-title {
    font-family: var(--font-cinzel);
    font-size: 1.75rem;
    color: var(--color-gold);
    margin-bottom: 1rem;
    font-weight: 700;
}

.arcade-description {
    color: var(--color-text-secondary);
    margin-bottom: 2rem;
    font-size: 1rem;
    line-height: 1.5;
}

/* ========================================
   FOOTER
   ======================================== */

.footer {
    background: var(--color-dark-secondary);
    border-top: 1px solid var(--color-accent);
    padding: 3rem;
    margin-top: 3rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 100%;
    margin-bottom: 2rem;
}

.footer-section {
    display: flex;
    flex-direction: column;
}

.footer-logo {
    width: 50px;
    height: 50px;
    object-fit: contain;
    margin-bottom: 1rem;
}

.footer-tagline {
    color: var(--color-gold);
    font-family: var(--font-cinzel);
    font-size: 1rem;
    font-weight: 600;
}

.footer-section h4 {
    font-family: var(--font-cinzel);
    color: var(--color-gold);
    margin-bottom: 1rem;
    font-weight: 600;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 0.75rem;
}

.footer-section a {
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.95rem;
}

.footer-section a:hover {
    color: var(--color-gold);
}

.footer-bottom {
    border-top: 1px solid var(--color-accent);
    padding-top: 1.5rem;
    text-align: center;
    color: var(--color-text-secondary);
    font-size: 0.9rem;
}

/* ========================================
   RESPONSIVE DESIGN - TABLET
   ======================================== */

@media (max-width: 1024px) {
    :root {
        --sidebar-width: 200px;
    }

    .worlds-grid,
    .news-grid,
    .wiki-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .section-title {
        font-size: 2rem;
    }
}

/* ========================================
   RESPONSIVE DESIGN - MOBILE
   ======================================== */

@media (max-width: 768px) {
    :root {
        --sidebar-width: 0;
    }

    /* Hero mobile - remove extensão lateral */
    .hero {
        margin-left: 0;
        width: 100%;
    }

    /* Banner mobile */
    .hero-banner {
        max-height: 225px;
    }

    /* Hero overlay mobile */
    .hero-overlay {
        height: 225px;
    }

    /* Hero dark overlay mobile */
    .hero::before {
        height: 225px;
    }

    /* Hero buttons mobile */
    .hero-buttons {
        margin-top: 1.5rem;
        padding: 2rem 1.5rem;
        gap: 0.75rem;
    }

    /* Sidebar mobile behavior */
    .sidebar {
        width: 80%;
        max-width: 280px;
        transform: translateX(-100%);
        border-right: none;
        border-left: none;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .hamburger {
        display: flex;
    }

    .main-content {
        margin-left: 0;
    }

    /* Layout adjustments */
    .worlds-grid,
    .news-grid,
    .wiki-grid {
        grid-template-columns: 1fr;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .section {
        padding: 1.5rem;
    }

    .hero-overlay {
        padding: 2rem 1.5rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-tagline {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .section-subtitle {
        font-size: 1rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .footer {
        padding: 1.5rem;
    }

    .card-title {
        font-size: 1.1rem;
    }

    .nav-text {
        display: none;
    }

    .nav-link {
        justify-content: center;
        padding: 1rem;
    }

    .sidebar-header {
        margin-bottom: 1.5rem;
    }

    .logo {
        width: 50px;
        height: 50px;
    }
}

/* ========================================
   RESPONSIVE DESIGN - SMALL MOBILE
   ======================================== */

@media (max-width: 480px) {
    .hero-overlay {
        padding: 1rem;
    }

    .hero-title {
        font-size: 1.75rem;
        margin-bottom: 0.5rem;
    }

    .hero-tagline {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .section {
        padding: 1rem;
    }

    .hero-overlay {
        padding: 1.5rem 1rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }

    .footer-logo {
        width: 40px;
        height: 40px;
    }

    .arcade-card {
        padding: 1.5rem;
    }

    .arcade-card-title {
        font-size: 1.5rem;
    }
}

/* ========================================
   ANIMATIONS
   ======================================== */

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

.world-card,
.news-card,
.wiki-card {
    animation: fadeIn 0.4s ease-out;
}

.world-card:nth-child(1) { animation-delay: 0.05s; }
.world-card:nth-child(2) { animation-delay: 0.1s; }
.world-card:nth-child(3) { animation-delay: 0.15s; }
.world-card:nth-child(4) { animation-delay: 0.2s; }
.world-card:nth-child(5) { animation-delay: 0.25s; }
.world-card:nth-child(6) { animation-delay: 0.3s; }
