:root {
    --primary-purple: #a855f7;
    --dark-purple: #7c3aed;
    --light-purple: #c084fc;
    --neon-purple: #d946ef;
    --darker-bg: #0f0117;
    --dark-bg: #1a0033;
    --text-primary: #e0e0ff;
    --text-secondary: #b0b0ff;
    --glow-color: #a855f7;
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0f0117 0%, #1a0033 50%, #0f0117 100%);
    color: var(--text-primary);
    overflow-x: hidden;
    min-height: 100vh;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at center, rgba(168, 85, 247, 0.12), transparent 60%);
    animation: pulse 6s ease-in-out infinite;
    pointer-events: none;
}

@keyframes pulse {
    0%,
    100% {
        transform: scale(1);
        opacity: 0.4;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.7;
    }
}

.glowing-text {
    font-size: 3rem;
    font-weight: 800;
    text-align: center;
    color: var(--neon-purple);
    text-shadow: 0 0 5px var(--neon-purple), 0 0 10px rgba(168, 85, 247, 0.3);
    letter-spacing: 2px;
    animation: glow-pulse 3s ease-in-out infinite;

    /* 🔥 FIX */
    white-space: normal;
    overflow-wrap: anywhere;
    max-width: 100%;
}

@keyframes glow-pulse {
    0%,
    100% {
        text-shadow: 0 0 5px var(--neon-purple), 0 0 10px rgba(168, 85, 247, 0.3);
    }

    50% {
        text-shadow: 0 0 8px var(--neon-purple), 0 0 15px rgba(168, 85, 247, 0.5);
    }
}

.glow-line {
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--neon-purple), transparent);
    margin: 20px auto;
    box-shadow: 0 0 5px var(--neon-purple);
    animation: line-glow 2s ease-in-out infinite;
}

@keyframes line-glow {
    0%,
    100% {
        box-shadow: 0 0 5px var(--neon-purple);
    }

    50% {
        box-shadow: 0 0 10px var(--neon-purple);
    }
}

.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(15, 1, 23, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid var(--neon-purple);
    box-shadow: 0 0 8px rgba(217, 70, 239, 0.2);
    z-index: 1000;
    animation: navbar-slide 0.5s ease;
}

@keyframes navbar-slide {
    from {
        transform: translateY(-100%);
    }

    to {
        transform: translateY(0);
    }
}

.nav-container {
    display: flex;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

#home,
#info,
#servers,
#staff {
    scroll-margin-top: 80px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--neon-purple);
    text-shadow: 0 0 5px var(--neon-purple);
    animation: logo-glow 3s ease-in-out infinite;
}

@keyframes logo-glow {
    0%,
    100% {
        text-shadow: 0 0 5px var(--neon-purple);
        transform: scale(1);
    }

    50% {
        text-shadow: 0 0 8px var(--neon-purple);
        transform: scale(1.05);
    }
}

.logo-text {
    max-width: 70%;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    position: relative;
    transition: var(--transition);
    padding: 0.5rem 0;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--neon-purple), var(--primary-purple));
    box-shadow: 0 0 5px var(--neon-purple);
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: var(--neon-purple);
    text-shadow: 0 0 5px var(--neon-purple);
}

.nav-link:hover::before {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
    z-index: 1001;
    background: none;
    border: none;
    padding: 0;
    margin: 0;
     pointer-events: auto;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--neon-purple);
    border-radius: 3px;
    transition: var(--transition);
    box-shadow: 0 0 3px var(--neon-purple);
      transform-origin: center;
}

.hamburger.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

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

.hamburger.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* ===== SECTION HEADER ===== */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
    animation: fade-in-up 0.6s ease;
}

/* ===== HERO SECTION ===== */
.hero {
    margin-top: 80px;
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem 1rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(168, 85, 247, 0.1) 0%, transparent 70%);
    animation: pulse-radial 4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes pulse-radial {
    0%,
    100% {
        transform: scale(1);
        opacity: 0.5;
    }

    50% {
        transform: scale(1.1);
        opacity: 1;
    }
}

.hero-content {
    position: relative;
    z-index: 2;
    animation: fade-in-up 0.8s ease;
      max-width: 100%;
    width: 100%;
}

.hero-content h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    text-shadow: 0 0 10px rgba(168, 85, 247, 0.3);
    animation: fade-in-up 1s ease 0.2s both;
}

@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== INFO SECTION ===== */
.info-section {
    background: linear-gradient(180deg, rgba(168, 85, 247, 0.05) 0%, transparent 100%);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.info-card {
    padding: 2rem;
    background: rgba(124, 58, 237, 0.1);
    border: 2px solid var(--primary-purple);
    border-radius: 15px;
    text-align: center;
    transition: var(--transition);
    animation: card-slide-in 0.6s ease backwards;
    box-shadow: 0 0 5px rgba(168, 85, 247, 0.1);
}

.info-card:nth-child(1) {
    animation-delay: 0.1s;
}

.info-card:nth-child(2) {
    animation-delay: 0.2s;
}

.info-card:nth-child(3) {
    animation-delay: 0.3s;
}

.info-card:nth-child(4) {
    animation-delay: 0.4s;
}

@keyframes card-slide-in {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.info-card:hover {
    border-color: var(--neon-purple);
    box-shadow: 0 0 10px var(--neon-purple), 0 0 15px rgba(217, 70, 239, 0.2);
    transform: translateY(-10px);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: icon-float 3s ease-in-out infinite;
}

.info-card:nth-child(1) .card-icon {
    animation-delay: 0s;
}

.info-card:nth-child(2) .card-icon {
    animation-delay: 0.5s;
}

.info-card:nth-child(3) .card-icon {
    animation-delay: 1s;
}

.info-card:nth-child(4) .card-icon {
    animation-delay: 1.5s;
}

@keyframes icon-float {
    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}

.info-card h3 {
    color: var(--neon-purple);
    margin-bottom: 1rem;
    text-shadow: 0 0 5px var(--neon-purple);
}

.info-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ===== SERVERS SECTION ===== */

.servers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.server-card {
    padding: 2rem;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.15) 0%, rgba(217, 70, 239, 0.1) 100%);
    border: 2px solid var(--primary-purple);
    border-radius: 15px;
    text-align: center;
    transition: var(--transition);
    animation: card-slide-in 0.6s ease backwards;
    box-shadow: 0 0 5px rgba(168, 85, 247, 0.1);
}

.server-card:nth-child(1) {
    animation-delay: 0.1s;
}

.server-card:nth-child(2) {
    animation-delay: 0.2s;
}

.server-card:nth-child(3) {
    animation-delay: 0.3s;
}

.server-card:nth-child(4) {
    animation-delay: 0.4s;
}

.server-card:hover {
    border-color: var(--neon-purple);
    box-shadow: 0 0 12px var(--neon-purple), 0 0 20px rgba(217, 70, 239, 0.2);
    transform: translateY(-15px);
}

.server-card h3 {
    color: var(--neon-purple);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    text-shadow: 0 0 5px var(--neon-purple);
}

.server-status,
.server-desc {
    color: var(--text-secondary);
    margin: 0.5rem 0;
}

.online {
    color: #4ade80;
    text-shadow: 0 0 5px #4ade80;
    font-weight: bold;
}

.join-btn {
    margin-top: 1rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--neon-purple), var(--primary-purple));
    color: white;
    border: 2px solid var(--neon-purple);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 0 5px var(--neon-purple);
}

.join-btn:hover {
    box-shadow: 0 0 10px var(--neon-purple), 0 0 15px rgba(217, 70, 239, 0.2);
    transform: scale(1.05);
}

.staff-section {
    background: linear-gradient(180deg, transparent 0%, rgba(168, 85, 247, 0.05) 100%);
    margin-bottom: 20px;
}

#staff-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.staff-card {
    padding: 2rem;
    background: rgba(124, 58, 237, 0.1);
    border: 2px solid var(--primary-purple);
    border-radius: 15px;
    text-align: center;
    transition: var(--transition);
    animation: card-slide-in 0.6s ease backwards;
    box-shadow: 0 0 5px rgba(168, 85, 247, 0.1);
}

.staff-card:nth-child(1) {
    animation-delay: 0.1s;
}

.staff-card:nth-child(2) {
    animation-delay: 0.2s;
}

.staff-card:nth-child(3) {
    animation-delay: 0.3s;
}

.staff-card:nth-child(4) {
    animation-delay: 0.4s;
}

.staff-card:hover {
    border-color: var(--neon-purple);
    box-shadow: 0 0 10px var(--neon-purple), 0 0 15px rgba(217, 70, 239, 0.2);
    transform: translateY(-10px);
}

.staff-avatar img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin-bottom: 10px;
    border: 3px solid rgba(155, 77, 226, 0.5);
    transition: all 0.4s ease;
    box-shadow: 0 0 15px rgba(155, 77, 226, 0.3);
}

.staff-card h3 {
    color: var(--neon-purple);
    margin-bottom: 0.5rem;
    text-shadow: 0 0 5px var(--neon-purple);
}

.role {
    color: var(--light-purple);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.bio {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* ===== FOOTER ===== */
.footer {
    background: rgba(15, 1, 23, 0.8);
    border-top: 2px solid var(--neon-purple);
    padding: 2rem;
    text-align: center;
    color: var(--text-secondary);
    box-shadow: 0 -5px 8px rgba(217, 70, 239, 0.1);
}

.footer-content p {
    margin-bottom: 1rem;
}

.social-links {
    display: flex;
    gap: 2rem;
    justify-content: center;
}

.social-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.social-link:hover {
    color: var(--neon-purple);
    text-shadow: 0 0 5px var(--neon-purple);
}

@media (width <= 768px) {
    .nav-menu {
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        width: 250px;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        padding: 80px 20px; /* space for navbar */
        background: rgba(15, 1, 23, 0.98);
        backdrop-filter: blur(10px);
        transform: translateX(100%); /* slide from right */
        transition: transform 0.3s ease;
        box-shadow: -5px 0 15px rgba(217, 70, 239, 0.2);
        gap: 1.5rem;
    }

    .nav-menu.active {
        transform: translateX(0); /* visible */
    }

    .hamburger {
        display: flex;
    }

    .glowing-text {
        font-size: 2rem;
    }

    .hero {
        margin-top: 60px;
    }

    .info-grid,
    .servers-grid,
    #staff-grid {
        grid-template-columns: 1fr;
    }

    .social-links {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-link {
        font-size: 1.1rem;
        padding: 1rem;
    }

    .subtitle {
        font-size: 1.1rem;
    }

    .carousel {
        height: 360px;
    }
}

@media (width <= 480px) {
    .nav-container {
        padding: 1rem;
    }

    .glowing-text {
        font-size: 1.5rem;
    }

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

    .apply-form {
        padding: 1.5rem;
    }

    .info-card,
    .server-card,
    .staff-card {
        padding: 1.5rem;
    }

    .carousel {
        height: 220px;
    }
}

.carousel-container {
    width: 100%;
    overflow: hidden;
    margin-top: 20px;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(217, 70, 239, 0.3);
}

.carousel {
    display: flex;
    height: 720px;

    /* 🔥 key fix */
    width: fit-content;
    animation: scroll 25s linear infinite;
    will-change: transform;
    transform: translate3d(0, 0, 0);
}

.carousel img {
    height: 100%;
    width: auto;
    flex-shrink: 0;
    object-fit: cover;
    margin-right: 10px;

    /* 🔥 reduces decode pressure on mobile */
    content-visibility: auto;
}

@keyframes scroll {
    0% {
        transform: translate3d(0, 0, 0);
    }

    100% {
        transform: translate3d(-50%, 0, 0);
    }
}

.countdown-section {
    margin: 30px 0;
    text-align: center;
}

.countdown-title {
    font-size: 1.2rem;
    color: var(--neon-purple);
    font-weight: 600;
    margin-bottom: 15px;
    text-shadow: 0 0 10px rgba(217, 70, 239, 0.5);
}

.countdown {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(168, 85, 247, 0.1);
    border: 2px solid var(--neon-purple);
    border-radius: 10px;
    padding: 15px 20px;
    min-width: 80px;
    box-shadow: 0 0 10px rgba(217, 70, 239, 0.2);
    transition: all 0.3s ease;
}

.countdown-item:hover {
    background: rgba(168, 85, 247, 0.2);
    box-shadow: 0 0 20px rgba(217, 70, 239, 0.4);
    transform: translateY(-5px);
}

.countdown-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--neon-purple);
    line-height: 1;
}

.countdown-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ===== DYNAMIC ANIMATIONS ===== */
@keyframes fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ===== STATE CLASSES ===== */
.loaded {
    opacity: 1;
    animation: fade-in 0.5s ease;
}



main section:not(#home) {
    opacity: 0;
    transform: translateY(30px);
}

.visible {
    animation: fade-in-up 0.6s ease forwards;
}

.navbar.scrolled {
    box-shadow: 0 0 12px rgba(217, 70, 239, 0.3);
}

/* ===== HOVER STATES ===== */
.glowing-text:hover {
    text-shadow: 0 0 8px var(--neon-purple), 0 0 15px rgba(168, 85, 247, 0.5);
}

.info-card.hovered,
.server-card.hovered,
.staff-card.hovered {
    transform: translateY(-10px) scale(1.02);
}

.server-card.hovered {
    transform: translateY(-15px);
}


.footer-link {
    color: var(--light-purple);
    margin-left: 10px;
    text-decoration: none;
}

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