/* --- Variables & General --- */
:root {
    --primary: #8093f1;
    --primary-dark: #6275d3;
    --secondary: #1a2035;
    --accent: #e63946;
    --accent-soft: #ff6b7a;
    --text-primary: #e0e7ff;
    --text-secondary: #ffffff;
    --text-light: #a0aec0;
    --background: #121826;
    --card-bg: rgba(26, 32, 53, 0.7);
    --shadow: rgba(128, 147, 241, 0.1);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', sans-serif;
    background: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* --- Navbar --- */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(18, 24, 38, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(128, 147, 241, 0.1);
}
.navbar.scrolled { background: rgba(18, 24, 38, 0.95); box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2); }
.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}
.logo-container, .logo-link { display: flex; align-items: center; gap: 1rem; }
.logo-link { text-decoration: none; }
.logo { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; }
.logo img.logo-img { height: 40px; width: auto; display: block; }
.logo-text { font-family: 'Poppins', sans-serif; font-weight: 600; font-size: 1.4rem; color: var(--text-secondary); }
.nav-links { display: flex; gap: 2.5rem; align-items: center; }
.nav-link {
    text-decoration: none;
    color: var(--text-light);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
    position: relative;
}
.nav-link:hover { color: var(--text-secondary); }
.nav-link.active { color: var(--primary); }
.server-status { display: flex; align-items: center; gap: 0.6rem; margin-left: 1.5rem; }
.server-status span { font-size: 0.9rem; font-weight: 500; color: var(--text-light); }
.status-dot { width: 10px; height: 10px; border-radius: 50%; }
.server-status.online .status-dot { background-color: #2ecc71; border: 2px solid rgba(46, 204, 113, 0.4); }
.server-status.offline .status-dot { background-color: #e74c3c; border: 2px solid rgba(231, 76, 60, 0.4); }

/* --- Side bar --- */
.social-sidebar { position: fixed; top: 50%; left: 20px; z-index: 999; display: flex; flex-direction: column; gap: 10px; padding: 12px; backdrop-filter: blur(10px) saturate(120%); -webkit-backdrop-filter: blur(10px) saturate(120%); background-color: rgba(17, 25, 40, 0.3); border-radius: 24px; border: 1px solid rgba(255, 255, 255, 0.125); opacity: 0; visibility: hidden; transform: translateY(-50%) translateX(-100%); transition: all 0.5s ease; }
.social-sidebar.visible { opacity: 1; visibility: visible; transform: translateY(-50%) translateX(0); }
.social-icon { position: relative; display: flex; align-items: center; justify-content: center; width: 50px; height: 50px; text-decoration: none; background-color: transparent; border-radius: 12px; }
.social-icon i { color: var(--text-light); font-size: 26px; transition: all 0.3s ease; }
.social-icon:hover i { color: var(--text-secondary); transform: scale(1.15); }
.social-tooltip { position: absolute; left: calc(100% + 1.5rem); top: 50%; transform: translateY(-50%) translateX(-10px); padding: 8px 16px; color: var(--text-secondary); font-weight: 500; white-space: nowrap; backdrop-filter: blur(10px) saturate(90%); -webkit-backdrop-filter: blur(10px) saturate(90%); background-color: rgba(17, 25, 40, 0.75); border-radius: 8px; border: 1px solid rgba(255, 255, 255, 0.125); opacity: 0; visibility: hidden; transition: all 0.3s ease; }
.social-icon:hover .social-tooltip { opacity: 1; visibility: visible; transform: translateY(-50%) translateX(0); }

/* --- Hero Section --- */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(18, 24, 38, 0.8) 0%, rgba(26, 32, 53, 0.8) 100%), url('../assets/bg.png');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMDAiIGhlaWdodD0iMzAwIj48ZmlsdGVyIGlkPSJub2lzZSI+PGZlVHVyYnVsZW5jZSB0eXBlPSJmcmFjdGFsTm9pc2UiIGJhc2VGcmVxdWVuY3k9IjAuODUiIG51bU9jdGF2ZXM9IjEwIiBzdGl0Y-hUaWxlcz0ic3RpdGNoIi8+PGZlRGlmZnVzZUxpZ2h0aW5nIGxpZ2h0aW5nLWNvbG9yPSIjZmZmZmZmIiBzdXJmYWNlU2NhbGU9IjE1IiA+PGZlRGlzdGFudExpZ2h0IGF6aW11dGg9IjQ1IiBlbGV2YXRpb249IjgwIiAvPjwvZmVMaWdodGluZz48L2ZpbHRlcj48cmVjdCB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiBmaWx0ZXI9InVybCgjbm9pc2UpIiBvcGFjaXR5PSIwLjAyNSIvPjwvc3ZnPg==');
    z-index: 1;
}
.hero-content { text-align: center; z-index: 2; animation: fadeInUp 1s ease-out; }
.hero-logo { margin: 0 auto 2rem; display: flex; align-items: center; justify-content: center; animation: float 3s ease-in-out infinite; }
.hero-logo img { height: 200px; width: auto; filter: drop-shadow(0 10px 25px rgba(0, 0, 0, 0.3)); }
.hero h1 { font-family: 'Poppins', sans-serif; font-size: 3.5rem; font-weight: 700; color: var(--text-secondary); margin-bottom: 1rem; text-shadow: 0 2px 20px rgba(0, 0, 0, 0.2); }
.hero-subtitle { font-size: 1.2rem; color: var(--text-light); margin-bottom: 2.5rem; max-width: 600px; margin-left: auto; margin-right: auto; }
.hero-buttons { display: flex; gap: 1.5rem; justify-content: center; flex-wrap: wrap; }
.btn { padding: 1rem 2rem; border: none; border-radius: 50px; font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 0.5rem; transition: all 0.3s ease; cursor: pointer; font-size: 1rem; backdrop-filter: blur(10px) saturate(90%); -webkit-backdrop-filter: blur(10px) saturate(90%); }
.btn-primary { background-color: rgba(128, 147, 241, 0.5); border: 1px solid rgba(128, 147, 241, 0.3); color: white; box-shadow: 0 8px 32px rgba(128, 147, 241, 0.15); }
.btn-primary:hover { background-color: rgba(128, 147, 241, 0.8); border: 1px solid rgba(128, 147, 241, 0.5); transform: translateY(-3px); box-shadow: 0 12px 40px rgba(128, 147, 241, 0.25); }
.btn-secondary { background-color: rgba(17, 25, 40, 0.3); border: 1px solid rgba(255, 255, 255, 0.125); color: var(--primary); }
.btn-secondary:hover { background-color: rgba(17, 25, 40, 0.8); border: 1px solid rgba(255, 255, 255, 0.25); color: white; transform: translateY(-3px); }
.scroll-down-arrow { position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); font-size: 1.5rem; color: var(--text-light); animation: bounce 2s infinite; transition: opacity 0.4s ease-in-out; z-index: 10;}
.scroll-down-arrow:hover { color: var(--primary); }
#particles-canvas { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1; }

/* --- Content Sections --- */
.features, .gamemodes, .gallery, .wiki-section, .map-section, .rules-section { padding: 6rem 0; position: relative; width: 100%; overflow-x: hidden; }
.features { background: var(--background); }
.gamemodes { background: var(--secondary); }
.gallery { background: var(--background); }
.container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
.section-title {
    text-align: center;
    font-family: 'Poppins', sans-serif;
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 4rem;
    position: relative;
}
.section-title::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: -1;
    width: 15%;
    height: 40px;
    background: linear-gradient(90deg, #5100fd 0%, #fb0097 100%);
    filter: blur(65px);
    opacity: 0.3;
}

/* --- Grids & Cards --- */
.bento-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; margin-top: 3rem; }
.bento-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(128, 147, 241, 0.15);
    border-radius: 20px;
    padding: 2.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
.bento-card:hover { transform: translateY(-10px); border-color: var(--primary); }
.bento-icon { width: 60px; height: 60px; background: linear-gradient(135deg, var(--primary), var(--primary-dark)); border-radius: 15px; display: flex; align-items: center; justify-content: center; margin-bottom: 1.5rem; color: white; font-size: 1.5rem; }
.bento-card h3 { font-family: 'Poppins', sans-serif; font-size: 1.3rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 1rem; }
.bento-card p { color: var(--text-light); line-height: 1.6; }
.gamemode-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 2rem; margin-top: 3rem; }
.gamemode-card {
    background: var(--card-bg);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(128, 147, 241, 0.15);
    position: relative;
}
.gamemode-card:hover { transform: translateY(-10px); border-color: var(--primary); }
.gamemode-image { height: 200px; background-size: cover; background-position: center; }
.gamemode-survival .gamemode-image { background-image: url('../assets/royal.jpg'); }
.gamemode-skyblock .gamemode-image { background-image: url('../assets/abyss.jpg'); }
.gamemode-boxpvp .gamemode-image { background-image: url('../assets/abyss.jpg'); }
.gamemode-content { padding: 2rem; }
.gamemode-content h3 { font-family: 'Poppins', sans-serif; font-size: 1.4rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 1rem; }
.bento-card::after, .gamemode-card::after {
    content: '';
    position: absolute;
    z-index: -1;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 20px;
    background: linear-gradient(90deg, #5100fd 0%, #fb0097 100%);
    filter: blur(25px);
    opacity: 0;
    transition: opacity 0.4s ease;
}
.bento-card:hover::after, .gamemode-card:hover::after { opacity: 0.6; }

/* --- Carousel --- */
.carousel-container { position: relative; max-width: 900px; margin: 3rem auto 0; overflow: hidden; border-radius: 20px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2); }
.carousel { display: flex; transition: transform 0.5s ease; }
.carousel-slide { min-width: 100%; height: 450px; background: var(--secondary); position: relative; overflow: hidden; }
.carousel-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.carousel-nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(18, 24, 38, 0.8); border: 1px solid rgba(128, 147, 241, 0.15); width: 50px; height: 50px; border-radius: 50%; cursor: pointer; font-size: 1.2rem; color: var(--text-secondary); transition: all 0.3s ease; }
.carousel-nav:hover { background: var(--primary); transform: translateY(-50%) scale(1.1); }
.carousel-prev { left: 20px; }
.carousel-next { right: 20px; }
.carousel-indicators { display: flex; justify-content: center; gap: 1rem; margin-top: 2rem; }
.carousel-dot { width: 12px; height: 12px; border-radius: 50%; background: rgba(128, 147, 241, 0.2); cursor: pointer; transition: all 0.3s ease; }
.carousel-dot.active { background: var(--primary); transform: scale(1.2); }

/* --- Footer --- */
.footer { background: #0c0f1a; color: rgba(224, 231, 255, 0.7); padding: 3rem 0 2rem; }
.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 2rem;
}
.footer-section h3 { font-family: 'Poppins', sans-serif; font-weight: 600; margin-bottom: 1rem; color: white; }
.footer-section:last-child { text-align: right; }
.social-links { display: flex; gap: 1rem; justify-content: flex-end; }
.social-link { width: 40px; height: 40px; background: rgba(255, 255, 255, 0.05); border-radius: 10px; display: flex; align-items: center; justify-content: center; color: white; text-decoration: none; transition: all 0.3s ease; }
.social-link:hover { background: var(--primary); transform: translateY(-2px); }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.1); padding-top: 2rem; text-align: center; color: rgba(224, 231, 255, 0.5); }
.footer-bottom a { color: rgba(224, 231, 255, 0.65); text-decoration: none; transition: color 0.3s ease; }
.footer-bottom a:hover { color: var(--primary); }

/* --- Animations & Responsive --- */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes float { 0%, 100% { transform: translateY(0px); } 50% { transform: translateY(-20px); } }
@keyframes bounce { 0%, 20%, 50%, 80%, 100% { transform: translate(-50%, 0); } 40% { transform: translate(-50%, -20px); } 60% { transform: translate(-50%, -10px); } }
.fade-in { opacity: 0; transform: translateY(30px); transition: all 0.8s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

@media (max-width: 768px) {
    .fade-in { opacity: 1 !important; transform: none !important; }
    .nav-container { padding: 0 1rem; }
    .nav-links { gap: 0.5rem; }
    .nav-link { font-size: 0.8rem; padding: 0.5rem; }
    .logo-container .logo-text, .logo-container .server-status { display: none; }
    .hero h1 { font-size: 2.8rem; }
    .hero-subtitle { font-size: 1rem; padding: 0 1rem; }
    .hero-buttons { flex-direction: column; align-items: center; }
    .container { padding: 0 1.5rem; }
    .section-title { font-size: 2.2rem; }
    .bento-grid, .gamemode-grid { grid-template-columns: 1fr; }
    .rules-content { padding: 2rem 1.5rem; }
    .rules-content h2 { font-size: 1.5rem; }
    .rules-content h3 { font-size: 1.1rem; }
    .rules-content ol li { font-size: 0.9rem; line-height: 1.6; word-wrap: break-word; }
    .map-switcher button { padding: 0.6rem 1rem; font-size: 0.9rem; }
    .accordion-header { padding: 1rem; font-size: 1rem; }
    .accordion-content-inner { padding: 1rem; }
    .social-sidebar { display: none; }
    .tariff-content { padding: 2rem 1.5rem; }
}

/* --- Page-Specific Sections --- */
.wiki-section, .map-section, .rules-section { padding-top: 120px; padding-bottom: 6rem; background: var(--background); min-height: 100vh; }
.map-section { background: var(--secondary); }
.container-map { max-width: 1600px; }
.iframe-container { position: relative; width: 100%; height: 85vh; margin-top: 2rem; border-radius: 20px; overflow: hidden; border: 1px solid rgba(128, 147, 241, 0.15); }
.iframe-container iframe { width: 100%; height: 100%; }
.map-switcher { display: flex; justify-content: center; margin: 0 auto 2rem; background: rgba(0, 0, 0, 0.2); border-radius: 50px; padding: 0.5rem; width: fit-content; }
.map-switcher button { background: transparent; border: none; color: var(--text-light); padding: 0.75rem 1.5rem; border-radius: 40px; font-weight: 600; cursor: pointer; transition: all 0.3s ease; font-size: 1rem; }
.map-switcher button.active { background: var(--primary); color: var(--text-secondary); box-shadow: 0 4px 15px rgba(128, 147, 241, 0.2); }
.rules-content { background: var(--secondary); padding: 3rem; border-radius: 20px; border: 1px solid rgba(128, 147, 241, 0.15); margin-top: 2rem; }
.rules-content h2 { font-family: 'Poppins', sans-serif; color: var(--text-secondary); font-size: 1.8rem; margin-top: 2rem; margin-bottom: 1.5rem; padding-bottom: 0.5rem; border-bottom: 2px solid var(--primary-dark); }
.rules-content h2:first-child { margin-top: 0; }
.rules-content h3 { font-family: 'Poppins', sans-serif; color: var(--text-primary); font-size: 1.3rem; margin-top: 2rem; margin-bottom: 1rem; }
.rules-content ol { list-style-type: none; counter-reset: rules-counter; padding-left: 0; }
.rules-content ol li { counter-increment: rules-counter; position: relative; padding-left: 2rem; margin-bottom: 1rem; color: var(--text-light); line-height: 1.7; }
.rules-content ol li::before { content: counter(rules-counter) "."; position: absolute; left: 0; top: 0; color: var(--primary); font-weight: 600; font-size: 1rem; width: 1.5rem; text-align: left; }
.last-update {
    backdrop-filter: blur(10px) saturate(90%);
    -webkit-backdrop-filter: blur(10px) saturate(90%);
    background-color: rgba(26, 32, 53, 0.2);
    border: 1px solid rgba(128, 147, 241, 0.15);
    color: var(--text-light);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    margin: -2rem auto 2.5rem;
    text-align: center;
    max-width: max-content;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}
.last-update:hover { box-shadow: 0 0 15px rgba(128, 147, 241, 0.02), 0 0 25px rgba(128, 147, 241, 0.02); border-color: rgba(128, 147, 241, 0.3); }
.accordion { display: flex; flex-direction: column; gap: 1rem; }
.accordion-item { background: var(--secondary); border: 1px solid rgba(128, 147, 241, 0.15); border-radius: 12px; overflow: hidden; transition: all 0.3s ease; }
.accordion-item:hover { border-color: rgba(128, 147, 241, 0.3); }
.accordion-header { display: flex; justify-content: space-between; align-items: center; padding: 1.5rem; cursor: pointer; font-size: 1.1rem; font-weight: 600; color: var(--text-primary); user-select: none; }
.accordion-header:hover { background-color: rgba(128, 147, 241, 0.05); }
.accordion-icon { transition: transform 0.3s ease; font-family: 'Poppins', sans-serif; font-weight: bold; font-size: 1.2rem; transform: rotate(90deg); }
.accordion-item.active .accordion-icon { transform: rotate(270deg); }
.accordion-content { max-height: 0; overflow: hidden; transition: max-height 0.4s ease-out, padding 0.3s ease-out; color: var(--text-light); }
.accordion-content-inner { padding: 1.5rem; border-top: 1px solid rgba(128, 147, 241, 0.1); }
.accordion-content-inner h3 { color: var(--text-primary); font-size: 1.15rem; font-weight: 600; margin-top: 1.5rem; margin-bottom: 1rem; }
.accordion-content-inner h3:first-child { margin-top: 0; }
.accordion-content-inner ol { list-style-type: none; counter-reset: rules-counter; padding-left: 0; }
.accordion-content-inner ol li { counter-increment: rules-counter; position: relative; padding-left: 2rem; margin-bottom: 1rem; color: var(--text-light); line-height: 1.7; }
.accordion-content-inner ol li::before { content: counter(rules-counter) "."; position: absolute; left: 0; top: 0; color: var(--primary); font-weight: 600; font-size: 1rem; width: 1.5rem; text-align: left; }
.tariff-content { background: var(--secondary); padding: 3rem; border-radius: 20px; border: 1px solid rgba(128, 147, 241, 0.15); margin-top: 2rem; }
.tariff-content h2 { font-family: 'Poppins', sans-serif; color: var(--text-secondary); font-size: 1.8rem; margin-bottom: 1.5rem; padding-bottom: 0.5rem; border-bottom: 2px solid var(--primary-dark); }
.general-rules { list-style: none; padding: 0; margin-bottom: 1.5rem; }
.general-rules li { color: var(--text-light); margin-bottom: 0.5rem; font-size: 1.1rem; }
.general-rules li strong { color: var(--text-primary); }
.disclaimer { color: var(--text-light); font-style: italic; font-weight: 600; text-align: center; margin-bottom: 3rem;}
.tariff-list { display: flex; flex-direction: column; gap: 1.5rem; }
.tariff-item { background-color: var(--background); padding: 1.5rem; border-radius: 12px; border: 1px solid rgba(128, 147, 241, 0.1); }
.tariff-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 0.75rem; }
.rule-number { background-color: var(--primary-dark); color: var(--text-secondary); padding: 0.25rem 0.75rem; border-radius: 6px; font-weight: 600; font-size: 1rem; }
.rule-name { color: var(--text-primary); font-size: 1.1rem; font-weight: 500; }
.tariff-penalty { background-color: rgba(128, 147, 241, 0.05); border: 1px solid rgba(128, 147, 241, 0.1); padding: 0.75rem 1rem; border-radius: 8px; color: var(--primary); font-weight: 600; letter-spacing: 0.5px; word-break: break-word; }
.tariff-note { color: var(--text-light); margin-top: 0.75rem; font-size: 0.9rem; font-style: italic; padding-left: 0.5rem; }