:root {
    --bg-color: #060809;
    --surface-color: #0d1112;
    --primary-color: #1fcc58;
    --primary-glow: rgba(31, 204, 88, 0.4);
    --accent-cyan: #00f2ff;
    --accent-purple: #b026ff;
    --text-main: #ffffff;
    --text-dim: #8a8d91;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --card-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    --nav-height: 72px;
}

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

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    scroll-behavior: smooth;
}

:not(.fa):not(.fas):not(.far):not(.fab):not(.fal):not(.fad)::before,
:not(.fa):not(.fas):not(.far):not(.fab):not(.fal):not(.fad)::after {
    box-sizing: border-box;
}

html, body {
    max-width: 100%;
    overflow-x: hidden;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    padding-top: var(--nav-height);
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(16px, 4vw, 40px);
    width: 100%;
}

nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    height: var(--nav-height);
    display: flex;
    align-items: center;
    background: rgba(6, 8, 9, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
}

nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.brand img {
    height: clamp(28px, 4vw, 36px);
    border-radius: 8px;
}

.brand span {
    font-weight: 900;
    letter-spacing: 2px;
    font-size: clamp(1rem, 2vw, 1.3rem);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: clamp(8px, 1.5vw, 24px);
}

.nav-links a {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 700;
    font-size: clamp(0.78rem, 1.2vw, 0.9rem);
    letter-spacing: 1px;
    transition: color 0.3s;
    white-space: nowrap;
}

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

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px;
}

.lang-selector {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    padding: 8px 32px 8px 14px;
    border-radius: 12px;
    font-size: 0.78rem;
    font-weight: 800;
    cursor: pointer;
    outline: none;
    transition: all 0.3s;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%231fcc58' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.lang-selector:hover {
    border-color: var(--primary-color);
    background-color: rgba(31, 204, 88, 0.08);
}

.lang-selector:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.lang-selector option {
    background: var(--surface-color);
    color: var(--text-main);
}

.hero {
    min-height: 90vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    padding: 40px clamp(16px, 4vw, 40px) 60px;
    background:
        radial-gradient(circle at 20% 30%, rgba(31, 204, 88, 0.08), transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(0, 242, 255, 0.05), transparent 40%);
}

.hero-logo {
    width: clamp(100px, 18vw, 160px);
    height: clamp(100px, 18vw, 160px);
    margin-bottom: clamp(20px, 4vw, 40px);
    border-radius: 30%;
    background: var(--surface-color);
    padding: 10px;
    box-shadow: 0 0 40px var(--primary-glow);
    animation: float 4s ease-in-out infinite;
}

.hero h1 {
    font-size: clamp(2rem, 8vw, 5rem);
    font-weight: 900;
    letter-spacing: clamp(4px, 2vw, 16px);
    margin-bottom: clamp(4px, 1vw, 12px);
    text-transform: uppercase;
    background: linear-gradient(to bottom, #fff, #888);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    word-break: break-word;
}

.hero .slogan {
    font-size: clamp(0.85rem, 3.5vw, 1.4rem);
    color: var(--primary-color);
    letter-spacing: clamp(0.2px, 0.4vw, 1px);
    font-weight: 800;
    margin-bottom: clamp(32px, 6vw, 56px);
    text-shadow: 0 0 20px var(--primary-glow);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.btn-primary {
    background: var(--primary-color);
    color: #000;
    padding: clamp(14px, 2vw, 20px) clamp(28px, 5vw, 44px);
    border-radius: clamp(12px, 2vw, 18px);
    text-decoration: none;
    font-weight: 900;
    letter-spacing: 2px;
    box-shadow: 0 10px 40px var(--primary-glow);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-transform: uppercase;
    font-size: clamp(0.85rem, 1.2vw, 1rem);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: none;
    cursor: pointer;
    max-width: 320px;
    text-align: center;
    justify-content: center;
}

.btn-primary:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 15px 50px var(--primary-glow);
    background: #25ef69;
}

section {
    padding: clamp(50px, 8vw, 100px) 0;
}

.section-title {
    text-align: center;
    margin-bottom: clamp(32px, 5vw, 64px);
}

.section-title h2 {
    font-size: clamp(1.4rem, 4vw, 2.8rem);
    font-weight: 900;
    letter-spacing: clamp(2px, 1vw, 4px);
    text-transform: uppercase;
    margin-bottom: clamp(8px, 1.5vw, 20px);
}

.section-title p {
    color: var(--text-dim);
    font-size: clamp(0.9rem, 1.5vw, 1.15rem);
    max-width: 600px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: clamp(16px, 2.5vw, 28px);
}

.feature-card {
    background: var(--surface-color);
    border: 1px solid var(--glass-border);
    padding: clamp(28px, 4vw, 44px) clamp(20px, 3vw, 36px);
    border-radius: clamp(20px, 3vw, 36px);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(45deg, transparent, rgba(31, 204, 88, 0.05), transparent);
    transform: translateX(-100%);
    transition: 0.6s;
}

.feature-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary-color);
    box-shadow: var(--card-shadow);
}

.feature-card:hover::before {
    transform: translateX(100%);
}

.feature-card i {
    font-size: clamp(2.2rem, 4vw, 3.2rem);
    color: var(--primary-color);
    margin-bottom: clamp(20px, 3vw, 36px);
    display: block;
}

.news-section {
    background: var(--surface-color);
    border-top: 1px solid var(--glass-border);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
    gap: clamp(16px, 2.5vw, 28px);
}

.news-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: clamp(16px, 2.5vw, 28px);
    overflow: hidden;
    transition: all 0.4s ease;
    text-decoration: none;
    color: var(--text-main);
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-6px);
    border-color: var(--primary-color);
    box-shadow: var(--card-shadow);
}

.news-card-image {
    width: 100%;
    height: clamp(140px, 20vw, 220px);
    background-size: cover;
    background-position: center;
    background-color: var(--surface-color);
}

.news-card-body {
    padding: clamp(16px, 2.5vw, 28px);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-card-date {
    font-size: clamp(0.7rem, 1vw, 0.8rem);
    color: var(--primary-color);
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: clamp(4px, 1vw, 10px);
}

.news-card-body h3 {
    font-size: clamp(1rem, 1.8vw, 1.2rem);
    font-weight: 800;
    margin-bottom: clamp(6px, 1vw, 12px);
    line-height: 1.3;
}

.news-card-body p {
    color: var(--text-dim);
    font-size: clamp(0.82rem, 1.2vw, 0.92rem);
    line-height: 1.5;
    flex: 1;
    margin-bottom: clamp(8px, 1.5vw, 18px);
}

.news-card-link {
    color: var(--primary-color);
    font-weight: 700;
    font-size: clamp(0.78rem, 1vw, 0.88rem);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: gap 0.3s;
}

.news-card:hover .news-card-link {
    gap: 12px;
}

.loading-text {
    text-align: center;
    color: var(--text-dim);
    font-size: clamp(0.95rem, 1.5vw, 1.15rem);
    padding: clamp(24px, 4vw, 48px) 0;
    grid-column: 1 / -1;
}

.ranking-section {
    background: radial-gradient(circle at bottom left, rgba(176, 38, 255, 0.05), transparent 40%);
}

.ranking-tabs {
    display: flex;
    justify-content: center;
    gap: clamp(4px, 1vw, 10px);
    margin-bottom: clamp(20px, 3vw, 40px);
    flex-wrap: wrap;
}

.rank-tab {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    color: var(--text-dim);
    padding: clamp(8px, 1.2vw, 12px) clamp(14px, 2.5vw, 28px);
    border-radius: clamp(8px, 1.5vw, 14px);
    font-weight: 800;
    font-size: clamp(0.72rem, 1vw, 0.88rem);
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
}

.rank-tab:hover {
    border-color: var(--primary-color);
    color: var(--text-main);
    background: rgba(31, 204, 88, 0.08);
}

.rank-tab.active {
    background: var(--primary-color);
    color: #000;
    border-color: var(--primary-color);
    box-shadow: 0 4px 20px var(--primary-glow);
}

.ranking-list {
    max-width: 700px;
    margin: 0 auto;
}

.rank-item {
    display: flex;
    align-items: center;
    gap: clamp(10px, 2vw, 18px);
    padding: clamp(12px, 1.8vw, 18px) clamp(14px, 2.5vw, 24px);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: clamp(12px, 2vw, 18px);
    margin-bottom: 8px;
    transition: all 0.3s;
}

.rank-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.12);
}

.rank-pos {
    font-size: clamp(1rem, 1.8vw, 1.3rem);
    font-weight: 900;
    min-width: clamp(28px, 4vw, 40px);
    text-align: center;
}

.rank-avatar {
    width: clamp(32px, 5vw, 44px);
    height: clamp(32px, 5vw, 44px);
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    background-color: var(--surface-color);
    border: 2px solid var(--glass-border);
    flex-shrink: 0;
}

.rank-name {
    flex: 1;
    font-weight: 700;
    font-size: clamp(0.85rem, 1.2vw, 0.98rem);
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-value {
    font-weight: 800;
    color: var(--primary-color);
    font-size: clamp(0.8rem, 1.1vw, 0.92rem);
    text-align: right;
    white-space: nowrap;
}

.downloads {
    background: var(--surface-color);
    border-top: 1px solid var(--glass-border);
}

.table-container {
    background: rgba(0, 0, 0, 0.2);
    border-radius: clamp(16px, 2.5vw, 28px);
    border: 1px solid var(--glass-border);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.download-table {
    width: 100%;
    min-width: 440px;
    border-collapse: collapse;
}

.download-table th {
    background: rgba(255, 255, 255, 0.03);
    padding: clamp(14px, 2vw, 22px) clamp(14px, 2.5vw, 28px);
    text-align: left;
    font-weight: 800;
    text-transform: uppercase;
    font-size: clamp(0.7rem, 1vw, 0.82rem);
    letter-spacing: 2px;
    color: var(--text-dim);
    white-space: nowrap;
}

.download-table td {
    padding: clamp(14px, 2vw, 22px) clamp(14px, 2.5vw, 28px);
    border-top: 1px solid var(--glass-border);
    white-space: nowrap;
}

.platform-cell {
    display: flex;
    align-items: center;
    gap: clamp(8px, 1.5vw, 14px);
}

.platform-cell i {
    font-size: clamp(1.2rem, 2vw, 1.6rem);
    flex-shrink: 0;
}

.status-badge {
    color: var(--primary-color);
    font-weight: 800;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    padding: clamp(10px, 1.5vw, 14px) clamp(14px, 2.5vw, 22px);
    border-radius: clamp(8px, 1.5vw, 14px);
    text-decoration: none;
    font-weight: 700;
    transition: 0.3s;
    display: inline-flex;
    align-items: center;
    gap: clamp(4px, 1vw, 10px);
    white-space: nowrap;
    font-size: clamp(0.78rem, 1vw, 0.88rem);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

footer {
    padding: clamp(32px, 5vw, 60px) 0;
    border-top: 1px solid var(--glass-border);
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: clamp(8px, 2vw, 24px);
    margin-bottom: 16px;
}

.footer-links a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: clamp(0.82rem, 1vw, 0.92rem);
    font-weight: 600;
    transition: 0.3s;
}

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

footer p {
    color: var(--text-dim);
    font-size: clamp(0.78rem, 1vw, 0.88rem);
}

/* Aviso legal (não afiliado à Mojang) no rodapé */
.legal-disclaimer {
    margin-top: 14px;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
    color: var(--text-dim);
    font-size: clamp(0.68rem, 0.9vw, 0.78rem);
    opacity: 0.75;
    line-height: 1.5;
}

/*  NOVO: Seção Como Funciona  */
.how-section {
    background: radial-gradient(circle at top right, rgba(0, 242, 255, 0.04), transparent 40%);
}

.how-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: clamp(16px, 2.5vw, 28px);
    counter-reset: how-step;
}

.how-card {
    background: var(--surface-color);
    border: 1px solid var(--glass-border);
    border-radius: clamp(20px, 3vw, 32px);
    padding: clamp(28px, 4vw, 44px) clamp(20px, 3vw, 36px);
    text-align: center;
    position: relative;
    transition: all 0.4s ease;
    overflow: hidden;
}

.how-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 0%, rgba(31, 204, 88, 0.08), transparent 60%);
    opacity: 0;
    transition: opacity 0.4s;
}

.how-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary-color);
    box-shadow: var(--card-shadow);
}

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

.how-step {
    position: absolute;
    top: 14px;
    right: 20px;
    font-size: clamp(2.4rem, 5vw, 3.6rem);
    font-weight: 900;
    color: rgba(255, 255, 255, 0.06);
    line-height: 1;
    pointer-events: none;
}

.how-card i {
    font-size: clamp(2rem, 4vw, 3rem);
    color: var(--primary-color);
    margin-bottom: clamp(16px, 2.5vw, 28px);
    display: block;
    position: relative;
}

.how-card h3 {
    font-size: clamp(1.05rem, 1.8vw, 1.3rem);
    font-weight: 800;
    margin-bottom: clamp(10px, 1.5vw, 16px);
    position: relative;
}

.how-card p {
    color: var(--text-dim);
    font-size: clamp(0.85rem, 1.2vw, 0.95rem);
    line-height: 1.6;
    position: relative;
}

/*  NOVO: FAQ  */
.faq-section {
    background: var(--surface-color);
    border-top: 1px solid var(--glass-border);
}

.faq-list {
    max-width: 760px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.faq-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: clamp(12px, 2vw, 18px);
    overflow: hidden;
    transition: border-color 0.3s, background 0.3s;
}

.faq-item:hover {
    border-color: rgba(255, 255, 255, 0.14);
}

.faq-item[open] {
    border-color: var(--primary-color);
    background: rgba(31, 204, 88, 0.04);
}

.faq-item summary {
    padding: clamp(14px, 2.2vw, 20px) clamp(16px, 2.5vw, 24px);
    font-weight: 700;
    font-size: clamp(0.92rem, 1.3vw, 1.02rem);
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    transition: color 0.3s;
    user-select: none;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '+';
    font-size: 1.4rem;
    font-weight: 400;
    color: var(--primary-color);
    flex-shrink: 0;
    line-height: 1;
    transition: transform 0.3s;
}

.faq-item[open] summary::after {
    transform: rotate(45deg);
}

.faq-item summary:hover {
    color: var(--primary-color);
}

.faq-item p {
    padding: 0 clamp(16px, 2.5vw, 24px) clamp(14px, 2.2vw, 20px);
    color: var(--text-dim);
    font-size: clamp(0.85rem, 1.2vw, 0.95rem);
    line-height: 1.65;
}

/*  Acessibilidade: skip-link, foco visível e prefers-reduced-motion  */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: fixed;
    top: -100px;
    left: 16px;
    z-index: 2000;
    background: var(--primary-color);
    color: #000;
    font-weight: 800;
    padding: 12px 20px;
    border-radius: 12px;
    text-decoration: none;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 12px;
}

:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: 6px;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .hero-logo {
        animation: none;
    }
}

@media (max-width: 768px) {
    :root { --nav-height: 64px; }

    .nav-links {
        display: none;
        position: absolute;
        top: var(--nav-height);
        left: 0;
        width: 100%;
        flex-direction: column;
        background: rgba(6, 8, 9, 0.95);
        backdrop-filter: blur(12px);
        border-bottom: 1px solid var(--glass-border);
        padding: 16px;
        gap: 12px;
    }

    .nav-links.open {
        display: flex;
    }

    .nav-toggle {
        display: block;
    }

    .nav-links a {
        font-size: 1rem;
        margin: 0;
    }

    .lang-selector {
        margin: 0;
        align-self: flex-start;
    }

    section {
        padding: clamp(40px, 6vw, 60px) 0;
    }

    .news-grid {
        grid-template-columns: 1fr;
    }

    .download-table {
        min-width: 360px;
    }
}

@media (max-width: 480px) {
    .ranking-tabs {
        gap: 4px;
    }

    .rank-tab {
        padding: 6px 10px;
        font-size: 0.65rem;
    }

    .modal {
        align-items: flex-end;
        padding: 0;
    }

    .modal-content {
        border-radius: 24px 24px 0 0;
        max-height: 90vh;
        overflow-y: auto;
    }
}
