@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

:root {
    --primary-color: #4CAF50;
    --primary-dark: #388E3C;
    --secondary-color: #2196F3;
    --text-color: #ffffff;
    --text-muted: #e0e0e0;
    
    /* Glassmorphism Variables */
    --glass-bg: rgba(20, 20, 20, 0.4);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --glass-blur: blur(12px);
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 85px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.25) #0c171e;
    background-color: #0f191e;
}

/* Custom Scrollbar for Chrome, Edge, Safari */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #0c171e;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    border: 2px solid #0c171e;
}

::-webkit-scrollbar-thumb:hover {
    background: #4CAF50;
}

::-webkit-scrollbar-button {
    display: none;
    width: 0;
    height: 0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

button, a {
    touch-action: manipulation;
}

body {
    background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    min-height: 100dvh;
    position: relative;
    overflow-x: hidden;
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
    -webkit-font-smoothing: antialiased;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Glass Element Class (can be applied anywhere) */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: 20px;
}

/* Top Navbar */
.top-navbar {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(15, 25, 30, 0.75);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.3s ease;
    padding-top: env(safe-area-inset-top, 0px);
}

.navbar-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0.7rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #fff;
    transition: transform 0.2s ease;
}

.nav-brand:hover {
    transform: scale(1.03);
}

.nav-logo {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.nav-title {
    font-weight: 700;
    font-size: 1.15rem;
    background: linear-gradient(to right, #4CAF50, #81C784);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 0.5px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links li a {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 500;
    transition: all 0.25s ease;
    padding: 6px 12px;
    border-radius: 8px;
}

.nav-links li a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.nav-links li a.active {
    color: #4CAF50;
    background: rgba(76, 175, 80, 0.18);
    border: 1px solid rgba(76, 175, 80, 0.4);
    font-weight: 600;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-btn-launcher {
    text-decoration: none;
    background: linear-gradient(45deg, #4CAF50, #2E7D32);
    color: #fff;
    padding: 0.5rem 1.1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
    transition: all 0.3s ease;
    display: inline-block;
    white-space: nowrap;
}

.nav-btn-launcher:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(76, 175, 80, 0.5);
}

.nav-btn-kofi {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: linear-gradient(135deg, #FF5E5B, #FF2A6D);
    color: #ffffff !important;
    padding: 0.5rem 1.15rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(255, 94, 91, 0.35);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.nav-btn-kofi:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 6px 20px rgba(255, 94, 91, 0.6);
    background: linear-gradient(135deg, #ff716e, #ff1761);
}

.nav-btn-kofi svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
    flex-shrink: 0;
}

.nav-btn-kofi::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(60deg, transparent 40%, rgba(255, 255, 255, 0.35) 50%, transparent 60%);
    transform: rotate(25deg);
    animation: kofi-shine 4s infinite;
    pointer-events: none;
}

@keyframes kofi-shine {
    0% { transform: translateX(-150%) rotate(25deg); }
    25%, 100% { transform: translateX(150%) rotate(25deg); }
}

@media (max-width: 768px) {
    .nav-title {
        display: none;
    }
    .nav-links {
        gap: 0.3rem;
    }
    .nav-links li a {
        font-size: 0.8rem;
        padding: 4px 6px;
    }
    .nav-actions {
        gap: 0.4rem;
    }
    .nav-btn-launcher, .nav-btn-kofi {
        padding: 0.4rem 0.75rem;
        font-size: 0.75rem;
    }
    .navbar-container {
        padding: 0.6rem 0.8rem;
    }
}

@media (max-width: 580px) {
    .nav-btn-kofi .kofi-text {
        display: none;
    }
    .nav-btn-kofi {
        padding: 0.45rem 0.6rem;
    }
}

/* Header & Hero */
.hero {
    padding: 3.5rem 1rem 4rem;
    text-align: center;
    position: relative;
    z-index: 10;
}

.hero-content {
    max-width: 1050px;
    width: 95%;
    margin: 0 auto;
    padding: 3.5rem 3rem;
}

.logo {
    width: 130px;
    height: 130px;
    border-radius: 25px;
    margin-bottom: 1.5rem;
    box-shadow: 0 10px 20px rgba(0,0,0,0.4);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.logo:hover {
    transform: scale(1.05) rotate(3deg);
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: 2px;
    text-shadow: 0 4px 15px rgba(0,0,0,0.5);
    background: linear-gradient(to right, #4CAF50, #81C784);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-size: 1.3rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    font-weight: 300;
}

/* Server Status */
.server-status {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.6rem 1.5rem;
    margin-bottom: 2.5rem;
    font-weight: 600;
    border-radius: 30px;
    transition: all 0.3s ease;
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    position: relative;
}

.status-indicator::after {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.status-indicator.loading { background-color: #FFC107; }
.status-indicator.online { background-color: #4CAF50; box-shadow: 0 0 15px #4CAF50; }
.status-indicator.online::after { border: 2px solid rgba(76, 175, 80, 0.5); }
.status-indicator.offline { background-color: #F44336; box-shadow: 0 0 15px #F44336; }
.status-indicator.offline::after { border: 2px solid rgba(244, 67, 54, 0.5); animation: none; }

@keyframes pulse {
    0% { transform: scale(0.8); opacity: 0.5; }
    100% { transform: scale(1.5); opacity: 0; }
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #fff;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
    opacity: 0.8;
}

.btn.primary::before { background: linear-gradient(45deg, #4CAF50, #2E7D32); }
.btn.secondary::before { background: linear-gradient(45deg, #2196F3, #1565C0); }

.btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.4);
    border-color: rgba(255,255,255,0.4);
}
.btn:hover::before { opacity: 1; }

.btn:active { transform: translateY(0); }

/* Sections */
section {
    padding: 5rem 1rem;
    max-width: 1100px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 10;
}

section h2 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.about p, .cta p {
    font-size: 1.15rem;
    margin-bottom: 1.5rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2rem;
}

.feature-card {
    padding: 2.5rem 1.5rem;
    transition: all 0.4s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
    background: rgba(40, 40, 40, 0.5);
    border-color: rgba(255,255,255,0.3);
}

.feature-card h3 {
    margin-bottom: 1.2rem;
    font-size: 1.3rem;
    color: #fff;
}

/* Carousel */
.carousel-container {
    position: relative;
    max-width: 1050px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 20px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 30px rgba(76, 175, 80, 0.15);
    background: #000;
}

.carousel-slide {
    display: none;
    width: 100%;
    position: relative;
    animation: fadeSlide 0.7s cubic-bezier(0.25, 1, 0.5, 1);
}

.carousel-slide.active {
    display: block;
}

@keyframes fadeSlide {
    from { opacity: 0; transform: scale(1.02); }
    to { opacity: 1; transform: scale(1); }
}

.carousel-img {
    width: 100%;
    height: 540px;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.carousel-container:hover .carousel-img {
    transform: scale(1.02);
}

.carousel-caption {
    position: absolute;
    bottom: 25px;
    left: 25px;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 10px 22px;
    border-radius: 30px;
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    pointer-events: none;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(8px);
    color: white;
    border: 1px solid rgba(255,255,255,0.25);
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.6rem;
    border-radius: 50%;
    transition: all 0.3s ease;
    z-index: 10;
}

.carousel-btn:hover {
    background: rgba(76, 175, 80, 0.85);
    border-color: #4CAF50;
    transform: translateY(-50%) scale(1.15);
    box-shadow: 0 0 25px rgba(76, 175, 80, 0.7);
}

.carousel-btn.prev { left: 20px; }
.carousel-btn.next { right: 20px; }

.carousel-dots {
    position: absolute;
    bottom: 25px;
    right: 25px;
    display: flex;
    gap: 10px;
    z-index: 10;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background: #4CAF50;
    width: 26px;
    border-radius: 10px;
    box-shadow: 0 0 12px #4CAF50;
}

.dot:hover:not(.active) {
    background: rgba(255, 255, 255, 0.7);
}

@media (max-width: 768px) {
    .carousel-img {
        height: 320px;
    }
    .carousel-caption {
        font-size: 0.85rem;
        bottom: 15px;
        left: 15px;
        padding: 6px 14px;
    }
    .carousel-dots {
        bottom: 15px;
        right: 15px;
        padding: 6px 12px;
    }
    .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    .carousel-btn.prev { left: 10px; }
    .carousel-btn.next { right: 10px; }
}

/* Footer */
footer {
    padding: 3rem 1rem calc(3rem + env(safe-area-inset-bottom, 0px));
    text-align: center;
    margin-top: 4rem;
    border-top: none;
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

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

.kofi-link {
    color: #FF5E5B;
    text-decoration: none;
    font-weight: 700;
    transition: text-shadow 0.3s;
}

.kofi-link:hover {
    text-shadow: 0 0 10px rgba(255, 94, 91, 0.6);
}

.infra-note {
    font-size: 0.9rem;
    color: var(--text-muted);
    opacity: 0.8;
}

/* Background Blobs for Glass Effect */
.bg-blobs {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    min-height: 100dvh;
    z-index: 1;
    overflow: hidden;
    pointer-events: none;
}

/* Interactive Minecraft XP & Spores Particles Canvas */
#minecraft-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

.blob {
    position: absolute;
    filter: blur(80px);
    border-radius: 50%;
    opacity: 0.6;
    animation: float 20s infinite alternate;
}

.blob-1 {
    top: -10%; left: -10%;
    width: 500px; height: 500px;
    background: #4CAF50;
    animation-delay: 0s;
}

.blob-2 {
    bottom: -20%; right: -10%;
    width: 600px; height: 600px;
    background: #2196F3;
    animation-delay: -5s;
}

.blob-3 {
    top: 40%; left: 60%;
    width: 400px; height: 400px;
    background: #9C27B0;
    animation-delay: -10s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(50px, -50px) scale(1.1); }
    66% { transform: translate(-30px, 30px) scale(0.9); }
    100% { transform: translate(0, 0) scale(1); }
}

/* Modal Whitelist */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(5px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    padding: 2rem;
    animation: modalPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalPop {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Whitelist Players Showcase & Marquee */
.marquee-wrapper {
    overflow: hidden;
    position: relative;
    width: 100%;
    padding: 8px 0;
    mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
}

.marquee-content {
    display: flex;
    gap: 15px;
    width: max-content;
    animation: marquee-scroll 25s linear infinite;
}

.marquee-wrapper:hover .marquee-content {
    animation-play-state: paused;
}

@keyframes marquee-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.player-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    white-space: nowrap;
    transition: all 0.25s ease;
    cursor: default;
}

.player-badge:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(76, 175, 80, 0.6);
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.2);
}

.player-badge img {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    image-rendering: pixelated;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.player-badge .player-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #e0e0e0;
}

/* =========================================
   MOBILE RESPONSIVE FIXES
   ========================================= */
@media (max-width: 768px) {
    /* Top Navbar */
    .top-navbar {
        padding-top: max(8px, env(safe-area-inset-top, 0px)) !important;
    }
    .nav-links { display: none !important; }
    .navbar-container { padding: 0.5rem 1rem; }
    .nav-actions { gap: 0.5rem; }

    /* Hero Section */
    .hero { padding: 2rem 0.5rem 2rem; }
    .hero-content { padding: 2rem 1.5rem; width: 100%; border-radius: 15px; }
    .hero h1 { font-size: 2.2rem; }
    .subtitle { font-size: 1.1rem; margin-bottom: 0.5rem !important; }
    .hero-content p { font-size: 0.95rem !important; margin-bottom: 1.2rem !important; }
    .logo { width: 90px; height: 90px; margin-bottom: 1rem; }

    /* Sections and Typography */
    section { padding: 3rem 1rem; }
    section h2 { font-size: 1.8rem; margin-bottom: 2rem; }

    /* Buttons */
    .btn { padding: 0.8rem 1.5rem; font-size: 1rem; display: block; width: 100%; text-align: center; box-sizing: border-box; }
    #btn-download { width: 100%; }
    
    /* Features Grid */
    .features-grid { grid-template-columns: 1fr; gap: 1.2rem; }
    .feature-card { padding: 1.5rem; }

    /* Carousel */
    .carousel-img { height: 250px; }
    .carousel-caption { font-size: 0.8rem; padding: 5px 10px; }
    .carousel-btn { width: 35px; height: 35px; font-size: 1rem; }

    /* Modals */
    .modal-content { padding: 1.5rem; }
    .modal-content h2 { font-size: 1.5rem; }
    #whitelist-form input, #whitelist-form textarea { padding: 0.6rem; }

    /* Footer */
    footer { padding: 2rem 1rem calc(2rem + env(safe-area-inset-bottom, 0px)); }
    .kofi-link { display: inline-block; padding: 0.5rem; }
}

@media (max-width: 480px) {
    .nav-btn-launcher, .nav-btn-kofi { padding: 0.4rem 0.5rem; font-size: 0.7rem; }
    .hero h1 { font-size: 1.9rem; }
    .logo { width: 75px; height: 75px; }
    .carousel-img { height: 200px; }
}
