:root {
    --bg-dark: #0f172a;
    --discord-blue: #5865F2;
}

body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: #fff;
    overflow: hidden;
}

#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-dark);
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 1.5s ease;
}

#aurora-image {
    position: absolute;
    top: 50% !important;
    left: 50% !important;
    width: 160%;
    max-width: 1800px;
    height: auto;
    z-index: 5;
    pointer-events: none;
    opacity: 0;
    transform: translate3d(-50%, -50%, 0) scale(0.8);
    transition: opacity 1.2s ease-out, transform 1.2s ease-out;
    will-change: opacity, transform;
}

#aurora-image.show {
    opacity: 0.7;
    transform: translate3d(-50%, -50%, 0) scale(1.0);
}

#aurora-text {
    font-size: 10rem;
    font-weight: 900;
    display: inline-block;
    line-height: 1;
    position: relative;
    z-index: 10;
    color: #ffffff;
    transition: transform 1.2s cubic-bezier(0.7, 0, 0.3, 1), opacity 0.8s ease, letter-spacing 1.5s ease;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0);
    will-change: transform, opacity;
}

#aurora-text.glow {
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.6), 0 0 40px rgba(0, 242, 255, 0.3);
    letter-spacing: 0.4em;
}

#aurora-text.zoom-out {
    transform: scale(20) !important;
    opacity: 0 !important;
    text-shadow: none !important;
}

#marquee-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 35px;
    background: rgba(15, 23, 42, 0.95);
    border-bottom: 2px solid var(--discord-blue);
    color: #fff;
    display: flex;
    align-items: center;
    z-index: 10005;
    font-size: 1rem;
    font-weight: 700;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease;
    will-change: opacity;
}

#marquee-container.visible {
    opacity: 1;
    visibility: visible;
}

.megaphone {
    padding: 0 15px;
    font-size: 1.3rem;
    background: var(--discord-blue);
    height: 100%;
    display: flex;
    align-items: center;
    z-index: 2;
    box-shadow: 3px 0 10px rgba(0, 0, 0, 0.5);
}

#marquee-text {
    flex-grow: 1;
    padding-right: 15px;
    letter-spacing: 1px;
    margin: 0;
    line-height: 35px;
    transform: translateZ(0);
}

#main-content {
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 1.5s ease, transform 1.5s ease;
    height: 100vh;
    overflow-y: hidden;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    will-change: transform, opacity;
}

#main-content.active {
    opacity: 1;
    transform: scale(1);
    overflow-y: auto;
}

.section {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-size: cover;
    background-position: center;
    position: relative;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    opacity: 0;
    transform: scale(0.98);
    transition: opacity 0.8s ease, transform 0.8s ease;
    will-change: opacity, transform;
}

.section.active {
    opacity: 1;
    transform: scale(1);
}

.section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.slide-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 2s ease-in-out;
    z-index: 0;
    will-change: opacity;
}

.slide-bg.active {
    opacity: 1;
}

.content-box {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 85vh;
    justify-content: center;
    padding-top: 20px;
}

h1 {
    font-size: 4.5rem;
    margin: 0 0 20px 0;
    letter-spacing: 3px;
}

.menu-toggle {
    position: fixed;
    top: 55px;
    right: 30px;
    width: 40px;
    height: 40px;
    z-index: 10002;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 8px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease;
    will-change: opacity;
}

.menu-toggle.visible {
    opacity: 1;
    visibility: visible;
}

.bar {
    width: 35px;
    height: 2px;
    background-color: #fff;
    transition: 0.3s ease;
    will-change: transform;
}

.menu-toggle.active .bar:nth-child(1) {
    transform: translateY(5px) rotate(45deg);
}

.menu-toggle.active .bar:nth-child(2) {
    transform: translateY(-5px) rotate(-45deg);
}

#lang-btn {
    position: fixed;
    top: 55px;
    right: 90px;
    z-index: 10002;
    cursor: pointer;
    font-size: 1.5rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease;
    background: none;
    padding: 5px 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    user-select: none;
    border: none;
    will-change: opacity;
}

#lang-btn.visible {
    opacity: 1;
    visibility: visible;
}

#lang-dropdown {
    position: fixed;
    top: 100px;
    right: 90px;
    background: rgba(15, 23, 42, 0.95);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    z-index: 10002;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    will-change: opacity, visibility;
}

#lang-dropdown.active {
    opacity: 1;
    visibility: visible;
}

.lang-option {
    padding: 12px 25px;
    cursor: pointer;
    font-weight: 700;
    color: #fff;
    transition: background 0.2s ease;
    text-align: center;
    letter-spacing: 1px;
}

.lang-option:hover {
    background: var(--discord-blue);
}

#menu-overlay {
    position: fixed;
    inset: 0;
    background-size: cover;
    background-position: center;
    z-index: 10001;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease-out, visibility 0.2s ease-out;
    display: flex;
    justify-content: center;
    align-items: center;
    will-change: opacity, visibility;
}

#menu-overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.85);
    z-index: 0;
}

#menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.menu-links {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 25px;
    text-align: center;
    background: rgba(15, 23, 42, 0.95);
    padding: 50px 80px;
    border-radius: 20px;
    border: 1px solid rgba(88, 101, 242, 0.5);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    min-width: 300px;
    max-width: 85vw;
}

.menu-links a {
    color: #fff;
    text-decoration: none;
    font-family: 'Arial Black', Impact, sans-serif;
    font-size: 3rem;
    font-weight: 900;
    letter-spacing: 3px;
    display: block;
    background-size: 200% auto;
    transition: transform 0.2s ease-out, color 0.2s ease;
    will-change: transform;
}

.menu-links a:hover {
    transform: scale(1.1);
    background-image: linear-gradient(90deg, #f5f3ff, #d8b4fe, #a855f7, #7e22ce, #a855f7, #d8b4fe, #f5f3ff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: purpleRainbow 2s linear infinite;
}

@keyframes purpleRainbow {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

.admin-list-container, .info-board, .ranking-board {
    margin: 0 auto;
    background: #0f172a;
    border-radius: 15px;
    padding: 30px;
    border: 1px solid rgba(88, 101, 242, 0.3);
    width: 90vw;
    max-width: 800px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    text-align: left;
}

.admin-list-container, .info-board {
    height: 65vh;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.admin-list-container::-webkit-scrollbar, .info-board::-webkit-scrollbar, .widgets-wrapper::-webkit-scrollbar {
    width: 8px;
}

.admin-list-container::-webkit-scrollbar-track, .info-board::-webkit-scrollbar-track, .widgets-wrapper::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.admin-list-container::-webkit-scrollbar-thumb, .info-board::-webkit-scrollbar-thumb, .widgets-wrapper::-webkit-scrollbar-thumb {
    background: var(--discord-blue);
    border-radius: 4px;
}

.info-title {
    text-align: center;
    color: #fff;
    margin-top: 0;
    border-bottom: 2px solid var(--discord-blue);
    padding-bottom: 15px;
    margin-bottom: 25px;
    font-size: 1.8rem;
    letter-spacing: 2px;
}

.info-block {
    margin-bottom: 25px;
}

.info-block h3 {
    color: #fff;
    background: var(--discord-blue);
    display: inline-block;
    padding: 5px 15px;
    border-radius: 20px;
    margin: 0 0 15px 0;
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(88, 101, 242, 0.4);
}

.info-block ul, .rule-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.info-block li, .rule-list li {
    background: rgba(0, 0, 0, 0.5);
    margin-bottom: 10px;
    padding: 15px 20px;
    border-radius: 10px;
    font-size: 1rem;
    border-left: 4px solid var(--discord-blue);
    transition: transform 0.2s ease, background 0.2s ease;
}

.info-block li {
    display: flex;
    align-items: center;
}

.rule-list li {
    display: block;
    border-left: 3px solid #4ade80;
    line-height: 1.6;
    font-size: 0.95rem;
}

.info-block li:hover, .rule-list li:hover {
    background: rgba(88, 101, 242, 0.15);
    transform: translateX(4px);
}

.rule-list li:hover {
    background: rgba(74, 222, 128, 0.15);
}

.info-label {
    font-weight: 900;
    color: #94a3b8;
    margin-right: 15px;
    min-width: 150px;
    letter-spacing: 1px;
}

.info-value {
    font-weight: 700;
    color: #fff;
}

.rule-subtext {
    color: #94a3b8;
    font-size: 0.85rem;
    display: block;
    margin-top: 5px;
}

.discord-channel {
    background: rgba(88, 101, 242, 0.3);
    color: #cbd5e1;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    cursor: pointer;
    transition: background 0.2s ease;
}

.discord-channel:hover {
    background: rgba(88, 101, 242, 0.6);
    color: #fff;
}

.discord-mention {
    background: rgba(88, 101, 242, 0.3);
    color: #c7d2fe;
    padding: 1px 6px;
    border-radius: 4px;
    font-weight: 700;
}

.discord-link {
    color: #0ea5e9;
    text-decoration: none;
}

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

.badge-required {
    background: #ef4444;
    color: #fff;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-right: 8px;
    vertical-align: middle;
}

.rule-notes {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    font-size: 0.9rem;
    line-height: 1.6;
}

.rule-credit {
    text-align: right;
    font-style: italic;
    color: #64748b;
    margin-top: 15px;
}

.widgets-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    height: 50vh;
    overflow-y: auto;
    padding-right: 10px;
    overscroll-behavior: contain;
    will-change: scroll-position;
}

.discord-widget-container {
    width: 100%;
    height: 350px;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.6);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
}

.join-btn {
    display: inline-block;
    margin-top: 2rem;
    padding: 1.3rem 3.5rem;
    background-color: var(--discord-blue);
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    border-radius: 99px;
    font-size: 1.6rem;
    box-shadow: 0 10px 25px rgba(88, 101, 242, 0.4);
    border: none;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.join-btn:hover {
    transform: scale(1.05);
    background-color: #4752c4;
}

.admin-list-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.admin-item {
    display: flex;
    align-items: flex-start;
    background: rgba(0, 0, 0, 0.5);
    padding: 15px;
    border-radius: 10px;
    transition: background 0.2s ease;
}

.admin-item:hover {
    background: rgba(88, 101, 242, 0.2);
}

.admin-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin-right: 20px;
    border: 2px solid var(--discord-blue);
    object-fit: cover;
    flex-shrink: 0;
}

.admin-info {
    display: flex;
    flex-direction: column;
    text-align: left;
    flex: 1;
    min-width: 0;
}

.admin-displayname {
    font-weight: 900;
    font-size: 1.4rem;
    color: #fff;
}

.admin-username {
    font-size: 0.9rem;
    color: #94a3b8;
    margin-bottom: 5px;
}

.admin-roles-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.admin-role {
    font-size: 0.7rem;
    color: #fff;
    padding: 2px 10px;
    border-radius: 10px;
    font-weight: 700;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    white-space: nowrap;
}

.nav-buttons {
    position: fixed;
    top: 55px;
    left: 30px;
    z-index: 10002;
    display: flex;
    flex-direction: column;
    gap: 12px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease;
}

.nav-buttons.visible {
    opacity: 1;
    visibility: visible;
}

.nav-btn {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: 700;
    backdrop-filter: blur(5px);
    transition: background 0.2s ease, transform 0.2s ease;
    user-select: none;
    will-change: transform;
}

.nav-btn:hover {
    background: var(--discord-blue);
    transform: scale(1.1);
}

.tier-board-container {
    width: 95vw;
    max-width: 1400px;
    height: 70vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.tier-wrapper {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding: 10px;
    align-items: flex-start;
    width: 100%;
    height: 100%;
    will-change: transform;
}

.tier-wrapper::-webkit-scrollbar {
    height: 10px;
}

.tier-wrapper::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 5px;
}

.tier-wrapper::-webkit-scrollbar-thumb {
    background: var(--discord-blue);
    border-radius: 5px;
}

.tier-column {
    background: #111827;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    min-width: 280px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    contain: content;
}

.tier-header {
    flex-shrink: 0;
    padding: 16px;
    text-align: center;
    font-weight: 900;
    font-size: 1.4rem;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 2;
}

.tier-list-content {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.2);
    flex-grow: 1;
    padding-bottom: 10px;
    overscroll-behavior: contain;
    contain: content;
}

.tier-list-content::-webkit-scrollbar {
    width: 6px;
}

.tier-list-content::-webkit-scrollbar-track {
    background: transparent;
}

.tier-list-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.tier-member {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.2s ease, transform 0.2s ease;
    will-change: transform;
}

.tier-member:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(4px);
}

.member-avatar {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    margin-right: 15px;
    background-color: rgba(0, 0, 0, 0.5);
    image-rendering: pixelated;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    object-fit: cover;
    contain: strict;
}

.member-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: #e2e8f0;
    flex-grow: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rank-icon {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 700;
}

.made-by {
    position: absolute;
    bottom: 20px;
    width: 100%;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 2px;
    z-index: 1;
}

@media(max-width: 768px) {
    #aurora-text { font-size: 4rem; letter-spacing: 0.2em; }
    #aurora-text.glow { letter-spacing: 0.3em; }
    #aurora-image { width: 100%; height: auto; max-width: none; }
    h1 { font-size: 2.2rem; }
    .menu-links a { font-size: 2.5rem; }
    .discord-widget-container { height: 300px; }
    .admin-icon { width: 50px; height: 50px; margin-right: 15px; }
    .admin-displayname { font-size: 1.2rem; }
    .admin-list-container, .info-board, .ranking-board { width: 95vw; padding: 15px; }
    .info-title { font-size: 1.3rem; }
    .info-block li { flex-direction: column; align-items: flex-start; gap: 5px; }
    .info-label { min-width: auto; }
    .tier-column { min-width: 240px; }
}
