/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* CSS Variables - Minecraft theme */
:root {
    --background: hsl(220,20%,8%);
    --foreground: hsl(0,0%,98%);
    --card: hsl(220,15%,12%);
    --card-foreground: hsl(0,0%,95%);
    --popover: hsl(220,15%,12%);
    --popover-foreground: hsl(0,0%,95%);
    --primary: hsl(120,100%,35%);
    --primary-foreground: hsl(0,0%,0%);
    --primary-glow: hsl(120,100%,45%);
    --secondary: hsl(220,12%,18%);
    --secondary-foreground: hsl(0,0%,90%);
    --muted: hsl(220,10%,15%);
    --muted-foreground: hsl(0,0%,65%);
    --accent: hsl(120,100%,35%);
    --accent-foreground: hsl(0,0%,0%);
    --destructive: hsl(0,84%,60%);
    --destructive-foreground: hsl(0,0%,98%);
    --border: hsl(220,8%,25%);
    --input: hsl(220,8%,25%);
    --ring: hsl(120,100%,35%);
    --radius: .375rem;
    --minecraft-green: hsl(120,100%,35%);
    --minecraft-green-hover: hsl(120,100%,40%);
    --minecraft-dark: hsl(220,20%,8%);
    --minecraft-card: hsl(220,15%,12%);
    --minecraft-border: hsl(220,8%,25%);
    --gradient-hero: linear-gradient(135deg,hsl(220,20%,8%),hsl(220,25%,12%));
    --gradient-card: linear-gradient(145deg,hsl(220,15%,12%),hsl(220,12%,10%));
    --gradient-green: linear-gradient(135deg,hsl(120,100%,35%),hsl(120,100%,45%));
    --shadow-glow: 0 0 30px hsl(120 100% 35% / .3);
    --shadow-card: 0 10px 30px -10px hsl(0 0% 0% / .5);
    --shadow-button: 0 4px 15px hsl(120 100% 35% / .4);
    --transition-smooth: all .3s cubic-bezier(.4,0,.2,1);
}

body {
    font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
    background: var(--background);
    color: var(--foreground);
    line-height: 1.5;
}

.min-h-screen {
    min-height: 100vh;
}

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

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header */
header {
    background: var(--minecraft-dark);
    border-bottom: 1px solid var(--minecraft-border);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
}

.logo-text {
    font-family: 'Orbitron',monospace;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--foreground);
    letter-spacing: .05em;
}

.nav-desktop {
    display: none;
    align-items: center;
    gap: 2rem;
}

@media (min-width:768px) {
    .nav-desktop {
        display: flex;
    }
}

.nav-item {
    display: flex;
    align-items: center;
    gap: .25rem;
    color: var(--foreground);
    cursor: pointer;
    transition: var(--transition-smooth);
}

    .nav-item:hover {
        color: var(--minecraft-green);
    }

.nav-text {
    font-weight: 500;
}

.chevron-icon {
    width: 1rem;
    height: 1rem;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.icon-actions {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.action-icon {
    width: 1.25rem;
    height: 1.25rem;
    color: var(--foreground);
    cursor: pointer;
    transition: var(--transition-smooth);
}

    .action-icon:hover {
        color: var(--minecraft-green);
    }

.account-section {
    display: flex;
    align-items: center;
    gap: .25rem;
    color: var(--foreground);
    cursor: pointer;
    transition: var(--transition-smooth);
}

    .account-section:hover {
        color: var(--minecraft-green);
    }

.account-text {
    font-weight: 500;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    white-space: nowrap;
    border-radius: var(--radius);
    font-size: .875rem;
    font-weight: 500;
    transition: var(--transition-smooth);
    cursor: pointer;
    border: none;
    text-decoration: none;
    font-family: inherit;
}

    .btn:focus-visible {
        outline: 2px solid var(--ring);
        outline-offset: 2px;
    }

    .btn:disabled {
        pointer-events: none;
        opacity: .5;
    }

.btn-lg {
    height: 2.75rem;
    padding: 0 2rem;
    border-radius: var(--radius);
}

.btn-xl {
    height: 3.5rem;
    padding: 0 2.5rem;
    border-radius: .5rem;
    font-size: 1.125rem;
}

.btn-minecraft {
    background: var(--gradient-green);
    color: #000;
    font-family: 'Orbitron',monospace;
    font-weight: 700;
    border: 2px solid var(--minecraft-green);
    box-shadow: var(--shadow-glow);
}

    .btn-minecraft:hover {
        box-shadow: var(--shadow-button);
        transform: scale(1.05);
    }

.btn-icon {
    width: 1.5rem;
    height: 1.5rem;
}

/* Hero */
.hero-section {
    background: var(--gradient-hero);
    padding: 5rem 0;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
}

@media (min-width:1024px) {
    .hero-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.hero-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.hero-title {
    font-family: 'Orbitron',monospace;
    font-size: 3rem;
    font-weight: 900;
    color: var(--foreground);
    line-height: 1.1;
}

@media (min-width:1024px) {
    .hero-title {
        font-size: 3.75rem;
    }
}

.hero-title-accent {
    color: var(--minecraft-green);
}

.hero-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.hero-subtitle {
    color: var(--muted-foreground);
}

.link-accent {
    color: var(--minecraft-green);
    cursor: pointer;
}

    .link-accent:hover {
        text-decoration: underline;
    }

.hero-image-container {
    position: relative;
}

.hero-image-wrapper {
    background: var(--gradient-card);
    border-radius: .5rem;
    overflow: hidden;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--minecraft-border);
}

.hero-image {
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* Features */
.features-section {
    padding: 5rem 0;
    background: var(--minecraft-dark);
}

.section-title {
    font-family: 'Orbitron',monospace;
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    color: var(--foreground);
    margin-bottom: 4rem;
}

.features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width:768px) {
    .features-grid {
        grid-template-columns: repeat(2,1fr);
    }
}

@media (min-width:1024px) {
    .features-grid {
        grid-template-columns: repeat(3,1fr);
    }
}

.feature-card {
    background: var(--gradient-card);
    padding: 1.5rem;
    border-radius: .5rem;
    border: 1px solid var(--minecraft-border);
    box-shadow: var(--shadow-card);
    transition: var(--transition-smooth);
}

    .feature-card:hover {
        border-color: var(--minecraft-green);
        box-shadow: var(--shadow-glow);
    }

.feature-content {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.feature-icon-wrapper {
    flex-shrink: 0;
}

.feature-icon-bg {
    width: 3rem;
    height: 3rem;
    background: hsla(120,100%,35%,.2);
    border-radius: .5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.feature-card:hover .feature-icon-bg {
    background: hsla(120,100%,35%,.3);
}

.feature-icon {
    width: 1.5rem;
    height: 1.5rem;
    color: var(--minecraft-green);
}

.feature-text {
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.feature-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--foreground);
}

.feature-description {
    color: var(--muted-foreground);
    font-size: .875rem;
    line-height: 1.6;
}

/* Games */
.games-section {
    padding: 5rem 0;
    background: var(--gradient-hero);
}

.games-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width:768px) {
    .games-grid {
        grid-template-columns: repeat(2,1fr);
    }
}

@media (min-width:1024px) {
    .games-grid {
        grid-template-columns: repeat(3,1fr);
    }
}

.game-card {
    background: var(--gradient-card);
    border-radius: .5rem;
    overflow: hidden;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--minecraft-border);
    cursor: pointer;
    transition: var(--transition-smooth);
}

    .game-card:hover {
        border-color: var(--minecraft-green);
        box-shadow: var(--shadow-glow);
        transform: scale(1.05);
    }

.game-image-wrapper {
    aspect-ratio: 16/9;
    overflow: hidden;
}

.game-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.game-card:hover .game-image {
    transform: scale(1.1);
}

.game-content {
    padding: 1.5rem;
}

.game-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--foreground);
    transition: var(--transition-smooth);
}

.game-card:hover .game-title {
    color: var(--minecraft-green);
}

/* ---------- Modal (centered & responsive) ---------- */
.modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: clamp(12px,3vw,32px);
}

    .modal.active {
        display: flex;
    }

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.65);
    backdrop-filter: blur(2px);
}

.modal-content {
    position: relative;
    width: min(720px, 92vw);
    max-height: min(90vh, 1000px);
    overflow: auto;
    border-radius: 14px;
    border: 1px solid var(--minecraft-border);
    background: var(--minecraft-dark);
    box-shadow: 0 20px 60px rgba(0,0,0,.45);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid var(--minecraft-border);
}

.modal-title {
    font-family: 'Orbitron',monospace;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--foreground);
    text-align: left;
}

.modal-close {
    background: none;
    border: none;
    color: var(--foreground);
    cursor: pointer;
    padding: .5rem;
    border-radius: .25rem;
    transition: var(--transition-smooth);
}

    .modal-close:hover {
        background: var(--muted);
    }

    .modal-close svg {
        width: 1.5rem;
        height: 1.5rem;
    }

.modal-body {
    padding: 18px 22px;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.modal-description {
    color: var(--muted-foreground);
    text-align: center;
}

/* Center & contain the third-party locker */
.captcha-container {
    display: grid;
    place-items: center;
    background: var(--background);
    border: 1px solid var(--minecraft-border);
    border-radius: .5rem;
    padding: 16px;
    min-height: 180px;
}

    .captcha-container > * {
        margin-inline: auto !important;
    }

/* Tiny screens: gentle downscale safeguard */
@media (max-width:380px) {
    .captcha-container > * {
        transform: scale(.9);
        transform-origin: top center;
    }
}

.modal-footer-note {
    font-size: .75rem;
    color: var(--muted-foreground);
    text-align: center;
}

/* Responsive tweaks */
@media (max-width:768px) {
    .container {
        padding: 0 1rem;
    }

    .hero-section {
        padding: 3rem 0;
    }

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

    .features-section, .games-section {
        padding: 3rem 0;
    }

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

    .header-actions .btn {
        font-size: .75rem;
        padding: 0 1rem;
        height: 2.25rem;
    }

    .icon-actions {
        display: none;
    }
}
