/* ============================================================
   RESET & BASE
   ============================================================ */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #090B12;
    --bg-secondary: #0F1422;
    --purple-dark: #5A1D96;
    --purple: #8A2EFF;
    --blue: #2CA8FF;
    --cyan: #66E9FF;
    --white: #FFFFFF;
    --glass-bg: rgba(21, 27, 47, 0.55);
    --glass-border: rgba(138, 46, 255, 0.25);
    --font-display: 'Orbitron', monospace;
    --font-body: 'Space Grotesk', sans-serif;
    --transition: 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--white);
    overflow-x: hidden;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    background-image: radial-gradient(circle at 20% 30%, rgba(90, 29, 150, 0.05) 0%, transparent 60%),
        radial-gradient(circle at 80% 70%, rgba(44, 168, 255, 0.04) 0%, transparent 50%);
}

::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: var(--purple);
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(138, 46, 255, 0.4);
}

a {
    text-decoration: none;
    color: inherit;
}
ul {
    list-style: none;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 28px;
}

/* ============================================================
   GLASSMORPHISM
   ============================================================ */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(18px) saturate(1.3);
    -webkit-backdrop-filter: blur(18px) saturate(1.3);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.5);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, var(--purple), var(--purple-dark));
    color: #fff;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.1rem;
    padding: 16px 40px;
    border: none;
    border-radius: 60px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    box-shadow: 0 0 30px rgba(138, 46, 255, 0.25);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 60px;
    padding: 2px;
    background: linear-gradient(135deg, var(--cyan), var(--purple), var(--blue));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: var(--transition);
}

.btn-primary:hover::before {
    opacity: 1;
}
.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 0 60px rgba(138, 46, 255, 0.45), 0 0 120px rgba(44, 168, 255, 0.15);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1rem;
    padding: 14px 34px;
    border-radius: 60px;
    cursor: pointer;
    transition: var(--transition);
    letter-spacing: 0.03em;
    text-transform: uppercase;
}
.btn-secondary:hover {
    background: rgba(138, 46, 255, 0.20);
    border-color: var(--purple);
    box-shadow: 0 0 40px rgba(138, 46, 255, 0.20);
    transform: translateY(-2px);
}

.btn-glow {
    position: relative;
}
.btn-glow::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 60px;
    background: radial-gradient(circle at 30% 30%, rgba(138, 46, 255, 0.4), transparent 70%);
    filter: blur(20px);
    z-index: -1;
    opacity: 0;
    transition: var(--transition);
}
.btn-glow:hover::after {
    opacity: 1;
}

/* ============================================================
   HEADER
   ============================================================ */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 14px 0;
    background: rgba(9, 11, 18, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(138, 46, 255, 0.10);
    transition: var(--transition);
}
.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 1.3rem;
}
.logo__icon {
    color: var(--cyan);
    font-size: 1.6rem;
}
.logo__text {
    background: linear-gradient(135deg, var(--cyan), var(--purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav__list {
    display: flex;
    gap: 22px;
    font-size: 0.9rem;
    font-weight: 500;
}
.nav__link {
    color: rgba(255, 255, 255, 0.6);
    transition: var(--transition);
    position: relative;
    padding: 4px 0;
}
.nav__link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--purple);
    transition: var(--transition);
    box-shadow: 0 0 20px var(--purple);
}
.nav__link:hover,
.nav__link.active {
    color: #fff;
}
.nav__link:hover::after,
.nav__link.active::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
}
.hamburger span {
    display: block;
    width: 26px;
    height: 2px;
    background: #fff;
    border-radius: 4px;
    transition: var(--transition);
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 100px 0 60px;
    overflow: hidden;
}
.hero__canvas {
    position: absolute;
    inset: 0;
    z-index: 0;
}
.hero__content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}
.hero__text {
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.hero__title {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(2.8rem, 8vw, 5.5rem);
    line-height: 1.05;
    text-transform: uppercase;
}
.hero__title--glow {
    color: var(--white);
    text-shadow: 0 0 60px rgba(138, 46, 255, 0.4), 0 0 120px rgba(44, 168, 255, 0.15);
}
.hero__title--blue {
    color: var(--cyan);
    text-shadow: 0 0 60px rgba(44, 168, 255, 0.3);
}
.hero__subtitle {
    font-family: var(--font-display);
    font-size: 1.4rem;
    color: var(--purple);
    letter-spacing: 0.15em;
    text-shadow: 0 0 40px rgba(138, 46, 255, 0.3);
}
.hero__desc {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.7);
    max-width: 500px;
}
.hero__buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 8px;
}
.hero__visual {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 380px;
}
#hero-sphere {
    width: 100%;
    height: 100%;
    min-height: 380px;
}
.particles-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

/* ============================================================
   SERVER INFO
   ============================================================ */
.server-info {
    padding: 40px 0 60px;
    position: relative;
    z-index: 2;
}
.server-info__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
}
.server-info__card {
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: var(--transition);
}
.server-info__card:hover {
    transform: translateY(-4px);
    border-color: rgba(138, 46, 255, 0.4);
    box-shadow: 0 0 40px rgba(138, 46, 255, 0.10);
}
.server-info__label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.5);
}
.server-info__value {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.3rem;
    margin-top: 4px;
}
.server-info__ip {
    flex-direction: row;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}
.btn-copy {
    background: rgba(138, 46, 255, 0.2);
    border: 1px solid rgba(138, 46, 255, 0.3);
    color: #fff;
    padding: 6px 14px;
    border-radius: 30px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
}
.btn-copy:hover {
    background: var(--purple);
    box-shadow: 0 0 30px rgba(138, 46, 255, 0.3);
}

/* ============================================================
   SEZIONI GENERICHE
   ============================================================ */
section {
    padding: 70px 0;
}
.modalita {
    background: radial-gradient(ellipse at 30% 20%, rgba(90, 29, 150, 0.06), transparent 60%);
}
.crates {
    background: radial-gradient(ellipse at 70% 80%, rgba(44, 168, 255, 0.05), transparent 50%);
}
.community {
    background: radial-gradient(ellipse at 50% 50%, rgba(138, 46, 255, 0.04), transparent 60%);
}

.section-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2rem, 4vw, 2.8rem);
    text-align: center;
    margin-bottom: 48px;
    background: linear-gradient(135deg, var(--cyan), var(--purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================================
   MODALITÀ
   ============================================================ */
.modalita__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 28px;
}
.modalita__card {
    padding: 32px 24px;
    text-align: center;
    transition: var(--transition);
    cursor: default;
    position: relative;
    overflow: hidden;
}
.modalita__card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: rgba(138, 46, 255, 0.5);
    box-shadow: 0 0 60px rgba(138, 46, 255, 0.15);
}
.modalita__icon {
    font-size: 3.8rem;
    margin-bottom: 12px;
    display: block;
}
.modalita__card h3 {
    font-family: var(--font-display);
    font-size: 1.4rem;
    margin-bottom: 8px;
}
.modalita__desc {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    line-height: 1.5;
}
.modalita__card--soon {
    opacity: 0.6;
    border-style: dashed;
}

/* ============================================================
   MINIGAMES
   ============================================================ */
.minigames__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}
.minigames__item {
    padding: 24px 16px;
    text-align: center;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1px solid rgba(138, 46, 255, 0.08);
    transition: var(--transition);
    font-weight: 600;
    font-size: 1.1rem;
}
.minigames__item:hover {
    transform: scale(1.05) translateY(-4px);
    border-color: var(--purple);
    box-shadow: 0 0 50px rgba(138, 46, 255, 0.10);
}
.minigames__item span {
    display: block;
    font-size: 0.7rem;
    font-weight: 400;
    color: var(--cyan);
    margin-top: 6px;
    letter-spacing: 0.06em;
}

/* ============================================================
   CRATES — colori personalizzati per rarità
   ============================================================ */
.crates__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 24px;
}

.crates__card {
    position: relative;
    padding: 32px 16px;
    text-align: center;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 20px;
    border: 2px solid rgba(138, 46, 255, 0.15);
    transition: var(--transition);
    cursor: default;
    overflow: hidden;
}

.crates__card:hover {
    transform: translateY(-10px) scale(1.03);
}

.crates__glow {
    position: absolute;
    inset: 0;
    border-radius: 20px;
    opacity: 0;
    transition: var(--transition);
    background: radial-gradient(circle at 50% 30%, rgba(138, 46, 255, 0.10), transparent 70%);
}

.crates__card:hover .crates__glow {
    opacity: 1;
}

.crates__rarity {
    font-family: var(--font-display);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
}

.crates__box {
    font-size: 3.6rem;
    margin: 12px 0 4px;
    filter: drop-shadow(0 0 20px rgba(138, 46, 255, 0.2));
    transition: var(--transition);
}

.crates__card:hover .crates__box {
    transform: scale(1.15) rotate(-8deg);
}

.crates__label {
    font-size: 0.75rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 6px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    transition: var(--transition);
}

.crates__card:hover .crates__label {
    color: rgba(255, 255, 255, 0.9);
}

/* ----- COLORI PER RARITÀ ----- */
/* Common → Verde */
.crates__card[data-rarity="common"] {
    border-color: rgba(0, 230, 118, 0.30);
}
.crates__card[data-rarity="common"] .crates__rarity {
    color: #00E676;
}
.crates__card[data-rarity="common"] .crates__box {
    filter: drop-shadow(0 0 20px rgba(0, 230, 118, 0.4));
}
.crates__card[data-rarity="common"]:hover {
    box-shadow: 0 0 40px rgba(0, 230, 118, 0.15);
}

/* Rare → Blu */
.crates__card[data-rarity="rare"] {
    border-color: rgba(41, 121, 255, 0.30);
}
.crates__card[data-rarity="rare"] .crates__rarity {
    color: #2979FF;
}
.crates__card[data-rarity="rare"] .crates__box {
    filter: drop-shadow(0 0 20px rgba(41, 121, 255, 0.4));
}
.crates__card[data-rarity="rare"]:hover {
    box-shadow: 0 0 40px rgba(41, 121, 255, 0.15);
}

/* Epic → Viola */
.crates__card[data-rarity="epic"] {
    border-color: rgba(170, 0, 255, 0.30);
}
.crates__card[data-rarity="epic"] .crates__rarity {
    color: #AA00FF;
}
.crates__card[data-rarity="epic"] .crates__box {
    filter: drop-shadow(0 0 20px rgba(170, 0, 255, 0.4));
}
.crates__card[data-rarity="epic"]:hover {
    box-shadow: 0 0 40px rgba(170, 0, 255, 0.15);
}

/* Legendary → Giallo */
.crates__card[data-rarity="legendary"] {
    border-color: rgba(255, 214, 0, 0.30);
}
.crates__card[data-rarity="legendary"] .crates__rarity {
    color: #FFD600;
}
.crates__card[data-rarity="legendary"] .crates__box {
    filter: drop-shadow(0 0 20px rgba(255, 214, 0, 0.4));
}
.crates__card[data-rarity="legendary"]:hover {
    box-shadow: 0 0 40px rgba(255, 214, 0, 0.15);
}

/* Mythic → Rosso */
.crates__card[data-rarity="mythic"] {
    border-color: rgba(255, 23, 68, 0.30);
}
.crates__card[data-rarity="mythic"] .crates__rarity {
    color: #FF1744;
}
.crates__card[data-rarity="mythic"] .crates__box {
    filter: drop-shadow(0 0 20px rgba(255, 23, 68, 0.4));
}
.crates__card[data-rarity="mythic"]:hover {
    box-shadow: 0 0 40px rgba(255, 23, 68, 0.15);
}

/* ============================================================
   COMMUNITY
   ============================================================ */
.community__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 28px;
}
.community__card {
    padding: 32px 24px;
    text-align: center;
    transition: var(--transition);
}
.community__card:hover {
    transform: translateY(-8px);
    border-color: rgba(138, 46, 255, 0.4);
    box-shadow: 0 0 60px rgba(138, 46, 255, 0.10);
}
.community__icon {
    font-size: 2.8rem;
    display: block;
    margin-bottom: 10px;
}
.community__card h3 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    margin-bottom: 6px;
}
.community__card p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}
.community__btn {
    display: inline-block;
    margin-top: 14px;
    font-weight: 600;
    color: var(--cyan);
    transition: var(--transition);
}
.community__card:hover .community__btn {
    color: var(--purple);
}

/* ============================================================
   STAFF
   ============================================================ */
.staff__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 24px;
}
.staff__card {
    padding: 28px 16px;
    text-align: center;
    transition: var(--transition);
}
.staff__card:hover {
    transform: translateY(-8px);
    border-color: rgba(138, 46, 255, 0.4);
    box-shadow: 0 0 50px rgba(138, 46, 255, 0.10);
}
.staff__avatar {
    font-size: 3.2rem;
    margin-bottom: 8px;
}
.staff__card h3 {
    font-family: var(--font-display);
    font-size: 1rem;
    letter-spacing: 0.04em;
}
.staff__card p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
    padding: 40px 0 30px;
    border-top: 1px solid rgba(138, 46, 255, 0.06);
    margin-top: 20px;
}
.footer__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}
.footer__brand .logo__text {
    font-size: 1.2rem;
}
.footer__copy {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.3);
    margin-top: 6px;
}
.footer__social {
    display: flex;
    gap: 24px;
}
.footer__social a {
    color: rgba(255, 255, 255, 0.4);
    transition: var(--transition);
    font-weight: 500;
}
.footer__social a:hover {
    color: var(--cyan);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
    .hero__content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hero__desc {
        margin: 0 auto;
    }
    .hero__buttons {
        justify-content: center;
    }
    #hero-sphere {
        min-height: 280px;
    }
}
@media (max-width: 768px) {
    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--bg-primary);
        padding: 80px 30px 30px;
        transition: var(--transition);
        border-left: 1px solid rgba(138, 46, 255, 0.10);
        z-index: 999;
    }
    .nav.open {
        right: 0;
    }
    .nav__list {
        flex-direction: column;
        gap: 18px;
        font-size: 1.1rem;
    }
    .hamburger {
        display: flex;
    }
    .header__actions .btn-primary {
        padding: 8px 18px;
        font-size: 0.75rem;
    }
    .server-info__grid {
        grid-template-columns: 1fr 1fr;
    }
    .modalita__grid {
        grid-template-columns: 1fr 1fr;
    }
    .footer__inner {
        flex-direction: column;
        text-align: center;
    }
}
@media (max-width: 480px) {
    .server-info__grid {
        grid-template-columns: 1fr;
    }
    .modalita__grid {
        grid-template-columns: 1fr;
    }
    .hero__title {
        font-size: 2.4rem;
    }
    .crates__grid {
        grid-template-columns: 1fr 1fr;
    }
    .staff__grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* ============================================================
   HERO — Bedrock Badge
   ============================================================ */
.hero__bedrock {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
    padding: 10px 20px 10px 18px;
    background: rgba(21, 27, 47, 0.40);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(44, 168, 255, 0.15);
    border-radius: 60px;
    transition: var(--transition);
    cursor: default;
}

.hero__bedrock:hover {
    border-color: rgba(44, 168, 255, 0.35);
    box-shadow: 0 0 30px rgba(44, 168, 255, 0.05);
    transform: translateY(-2px);
}

.hero__bedrock-icon {
    font-size: 1.2rem;
}

.hero__bedrock-text {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 400;
    letter-spacing: 0.02em;
}

.hero__bedrock-text strong {
    color: var(--cyan);
    font-weight: 700;
}

.hero__bedrock-text code {
    font-family: var(--font-display);
    font-size: 0.8rem;
    background: rgba(44, 168, 255, 0.10);
    padding: 2px 10px;
    border-radius: 20px;
    color: var(--white);
    border: 1px solid rgba(44, 168, 255, 0.10);
    letter-spacing: 0.04em;
}

.hero__bedrock-badge {
    display: inline-block;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 2px 12px;
    border-radius: 30px;
    background: linear-gradient(135deg, rgba(138, 46, 255, 0.25), rgba(44, 168, 255, 0.15));
    color: var(--cyan);
    border: 1px solid rgba(44, 168, 255, 0.15);
    margin-left: 4px;
}

/* Responsive */
@media (max-width: 768px) {
    .hero__bedrock {
        flex-wrap: wrap;
        padding: 12px 16px;
        border-radius: 20px;
        justify-content: center;
        text-align: center;
    }
    .hero__bedrock-text {
        font-size: 0.75rem;
    }
    .hero__bedrock-text code {
        font-size: 0.7rem;
        display: inline-block;
        margin: 2px 0;
    }
    .hero__bedrock-badge {
        display: inline-block;
        margin-top: 2px;
    }
}

@media (max-width: 480px) {
    .hero__bedrock {
        flex-direction: column;
        gap: 6px;
        padding: 14px 16px;
    }
    .hero__bedrock-icon {
        font-size: 1.4rem;
    }
}