/* ========== RESET & BASE ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --bg-dark: #2a1a00;
    --bg-card: #3d2400;
    --bg-input: #4a2e00;
    --primary: #fccf00;
    --secondary: #ff8c00;
    --accent: #ff6b00;
    --teal: #4bfede;
    --text: #fff8e1;
    --text-muted: #d4a85c;
    --success: #4bfede;
    --error: #ff4757;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: linear-gradient(135deg, var(--bg-dark) 0%, #1a0f00 100%);
    min-height: 100vh;
    color: var(--text);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

body.menu-open {
    overflow: hidden;
}

/* ========== LOADING SCREEN ========== */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.8s ease-out, visibility 0.8s;
}

#loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loading-logo {
    width: 80px;
    height: 80px;
    margin-bottom: 30px;
    position: relative;
}

.spinner {
    width: 100%;
    height: 100%;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: #00d4ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.spinner-inner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60%;
    height: 60%;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-bottom-color: #ff6b6b;
    border-radius: 50%;
    animation: spin-reverse 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes spin-reverse {
    to {
        transform: translate(-50%, -50%) rotate(-360deg);
    }
}

.loading-text {
    font-size: 18px;
    font-weight: 500;
    color: #e0e0e0;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
    transition: opacity 0.2s;
}

.loading-subtext {
    font-size: 14px;
    color: #888;
    margin-bottom: 30px;
    transition: opacity 0.2s;
}

.progress-container {
    width: 280px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #00d4ff, #7b2cbf);
    border-radius: 2px;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

.progress-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shine 2s infinite;
}

@keyframes shine {
    to {
        left: 100%;
    }
}

.ray-id {
    position: fixed;
    bottom: 20px;
    font-size: 11px;
    color: #555;
    font-family: monospace;
}

/* ========== MAIN CONTENT ========== */
#main-content {
    opacity: 0;
    filter: blur(10px);
    transition: opacity 1s ease-out, filter 1s ease-out;
}

#main-content.visible {
    opacity: 1;
    filter: blur(0);
}

/* ========== PARTICLES ========== */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--primary);
    border-radius: 50%;
    opacity: 0.3;
    animation: float 15s infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }

    10%,
    90% {
        opacity: 0.3;
    }

    100% {
        transform: translateY(-10vh) rotate(720deg);
        opacity: 0;
    }
}

/* ========== MENU OVERLAY ========== */
.menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 98;
    opacity: 0;
    transition: opacity 0.3s;
}

.menu-overlay.active {
    display: block;
    opacity: 1;
}

/* ========== MOBILE MENU ========== */
.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(42, 26, 0, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 99;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    padding: 80px 24px 40px;
}

.mobile-menu.active {
    opacity: 1;
    pointer-events: all;
}

.mobile-menu-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
}

.mobile-menu-header img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    filter: drop-shadow(0 4px 16px rgba(252, 207, 0, 0.3));
}

.mobile-menu-header span {
    font-size: 20px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.mobile-menu-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 100%;
    max-width: 300px;
}

.mobile-menu-nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 20px;
    font-weight: 700;
    padding: 16px 32px;
    border-radius: 12px;
    transition: all 0.3s;
    width: 100%;
    text-align: center;
}

.mobile-menu-nav a:hover,
.mobile-menu-nav a.active {
    color: var(--primary);
    background: rgba(252, 207, 0, 0.1);
}

.mobile-menu-footer {
    margin-top: auto;
    padding-top: 40px;
    text-align: center;
}

.mobile-menu-footer p {
    color: var(--text-muted);
    font-size: 13px;
}

/* ========== NAVBAR ========== */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(42, 26, 0, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(252, 207, 0, 0.1);
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-brand img {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.nav-brand span {
    font-size: 18px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    gap: 4px;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s;
    white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
    background: rgba(252, 207, 0, 0.1);
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 8px;
}

.server-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--success);
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    animation: pulse 2s infinite;
    flex-shrink: 0;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }
}

.btn-nav {
    padding: 8px 16px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #2a1a00;
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.btn-nav:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(252, 207, 0, 0.3);
}

/* ========== HAMBURGER ========== */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 8px;
    z-index: 101;
    background: none;
    border: none;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
    transition: all 0.3s;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

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

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ========== HERO ========== */
.hero {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 40px 16px 32px;
}

.hero-logo {
    width: 120px;
    height: 120px;
    object-fit: contain;
    margin-bottom: 16px;
    filter: drop-shadow(0 8px 32px rgba(252, 207, 0, 0.4));
    animation: bob 3s ease-in-out infinite;
}

@keyframes bob {

    0%,
    100% {
        transform: translateY(0);
    }

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

.hero h1 {
    font-size: 28px;
    font-weight: 900;
    margin-bottom: 10px;
    background: linear-gradient(135deg, var(--primary), var(--secondary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 60px rgba(252, 207, 0, 0.2);
    word-break: break-word;
}

.hero p {
    font-size: 15px;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 24px;
    line-height: 1.6;
    padding: 0 8px;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    max-width: 500px;
    margin: 24px auto 0;
}

.stat-box {
    background: rgba(61, 36, 0, 0.6);
    border: 1px solid rgba(252, 207, 0, 0.15);
    border-radius: 14px;
    padding: 14px 10px;
    text-align: center;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.stat-box .number {
    font-size: 24px;
    font-weight: 900;
    color: var(--primary);
    display: block;
}

.stat-box .label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 2px;
}

.server-ip-box {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(61, 36, 0, 0.8);
    border: 2px solid rgba(252, 207, 0, 0.2);
    border-radius: 14px;
    padding: 12px 20px;
    margin-top: 16px;
    cursor: pointer;
    transition: all 0.3s;
    max-width: 100%;
    flex-wrap: wrap;
    justify-content: center;
}

.server-ip-box:hover {
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(252, 207, 0, 0.2);
}

.server-ip-box .ip {
    font-size: 16px;
    font-weight: 800;
    color: var(--primary);
    font-family: 'SF Mono', monospace;
    word-break: break-all;
}

.server-ip-box .copy-hint {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
}

/* ========== SECTIONS ========== */
.section {
    position: relative;
    z-index: 1;
    padding: 40px 16px;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    margin-bottom: 28px;
}

.section-title h2 {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 6px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-title p {
    color: var(--text-muted);
    font-size: 14px;
}

/* ========== CARDS ========== */
.cards-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid rgba(252, 207, 0, 0.1);
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    opacity: 0;
    transition: opacity 0.3s;
}

.card:hover {
    transform: translateY(-3px);
    border-color: rgba(252, 207, 0, 0.3);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.card:hover::before {
    opacity: 1;
}

.card-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, rgba(252, 207, 0, 0.15), rgba(255, 140, 0, 0.15));
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 14px;
}

.card h3 {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text);
}

.card p {
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.6;
}

/* ========== VOTERS ========== */
.voters-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.voter-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-card);
    border-radius: 14px;
    padding: 14px 16px;
    border: 1px solid rgba(252, 207, 0, 0.1);
    transition: all 0.3s;
}

.voter-item:hover {
    border-color: rgba(252, 207, 0, 0.3);
    transform: translateX(3px);
}

.voter-rank {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 16px;
    flex-shrink: 0;
}

.rank-1 {
    background: linear-gradient(135deg, #ffd700, #ffaa00);
    color: #2a1a00;
}

.rank-2 {
    background: linear-gradient(135deg, #c0c0c0, #a0a0a0);
    color: #2a1a00;
}

.rank-3 {
    background: linear-gradient(135deg, #cd7f32, #b87333);
    color: #fff;
}

.rank-other {
    background: rgba(252, 207, 0, 0.1);
    color: var(--primary);
}

.voter-info {
    flex: 1;
    min-width: 0;
}

.voter-name {
    font-weight: 700;
    font-size: 15px;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.voter-votes {
    font-size: 12px;
    color: var(--text-muted);
}

.voter-badge {
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    background: rgba(75, 254, 222, 0.15);
    color: var(--teal);
    flex-shrink: 0;
}

/* ========== STAFF ========== */
.staff-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.staff-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 20px 14px;
    text-align: center;
    border: 1px solid rgba(252, 207, 0, 0.1);
    transition: all 0.3s;
}

.staff-card:hover {
    transform: translateY(-3px);
    border-color: rgba(252, 207, 0, 0.3);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.staff-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    margin: 0 auto 12px;
    border: 3px solid var(--primary);
    box-shadow: 0 0 16px rgba(252, 207, 0, 0.3);
    object-fit: cover;
}

.staff-name {
    font-size: 15px;
    font-weight: 800;
    margin-bottom: 4px;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.staff-role {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 8px;
}

.role-owner {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: #fff;
}

.role-admin {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #2a1a00;
}

.role-mod {
    background: linear-gradient(135deg, var(--teal), #00d2d3);
    color: #2a1a00;
}

.staff-desc {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ========== COMMUNITY LINKS ========== */
.links-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.link-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    background: var(--bg-card);
    border-radius: 16px;
    padding: 20px 12px;
    text-decoration: none;
    color: var(--text);
    border: 1px solid rgba(252, 207, 0, 0.1);
    transition: all 0.3s;
}

.link-card:hover {
    transform: translateY(-4px) scale(1.02);
    border-color: var(--primary);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.link-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.link-icon svg {
    width: 28px;
    height: 28px;
}

.link-discord {
    background: rgba(88, 101, 242, 0.15);
    color: #5865F2;
}

.link-card:hover .link-discord {
    background: rgba(88, 101, 242, 0.25);
    box-shadow: 0 0 20px rgba(88, 101, 242, 0.3);
}

.link-youtube {
    background: rgba(255, 0, 0, 0.15);
    color: #FF0000;
}

.link-card:hover .link-youtube {
    background: rgba(255, 0, 0, 0.25);
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.3);
}

.link-tiktok {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.link-card:hover .link-tiktok {
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

.link-instagram {
    background: linear-gradient(135deg, rgba(225, 48, 108, 0.15), rgba(88, 81, 219, 0.15));
    color: #E1306C;
}

.link-card:hover .link-instagram {
    background: linear-gradient(135deg, rgba(225, 48, 108, 0.25), rgba(88, 81, 219, 0.25));
    box-shadow: 0 0 20px rgba(225, 48, 108, 0.3);
}

.link-twitter {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.link-card:hover .link-twitter {
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

.link-web {
    background: rgba(252, 207, 0, 0.15);
    color: var(--primary);
}

.link-card:hover .link-web {
    background: rgba(252, 207, 0, 0.25);
    box-shadow: 0 0 20px rgba(252, 207, 0, 0.3);
}

.link-name {
    font-weight: 700;
    font-size: 14px;
    color: var(--text);
}

.link-count {
    font-size: 11px;
    color: var(--text-muted);
}

/* ========== FOOTER ========== */
.footer {
    text-align: center;
    padding: 32px 16px;
    color: var(--text-muted);
    font-size: 13px;
    border-top: 1px solid rgba(252, 207, 0, 0.1);
    margin-top: 20px;
}

.footer a {
    color: var(--primary);
    text-decoration: none;
}

/* ========== TOAST ========== */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--bg-card);
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 700;
    z-index: 1000;
    opacity: 0;
    transition: all 0.3s;
    font-size: 14px;
    white-space: nowrap;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ========== MOBILE RESPONSIVE ========== */
@media (max-width: 767px) {
    .hamburger {
        display: flex;
    }

    .nav-links {
        display: none;
    }

    .mobile-menu {
        display: flex;
    }
}

/* ========== DESKTOP RESPONSIVE ========== */
@media (min-width: 768px) {
    .navbar {
        padding: 16px 24px;
    }

    .nav-brand img {
        width: 40px;
        height: 40px;
    }

    .nav-brand span {
        font-size: 20px;
    }

    .nav-links {
        gap: 8px;
    }

    .nav-links a {
        padding: 8px 16px;
        font-size: 14px;
    }

    .btn-nav {
        padding: 8px 20px;
        font-size: 13px;
    }

    .hero {
        padding: 80px 20px 60px;
    }

    .hero-logo {
        width: 180px;
        height: 180px;
    }

    .hero h1 {
        font-size: 48px;
    }

    .hero p {
        font-size: 18px;
    }

    .hero-stats {
        display: flex;
        justify-content: center;
        gap: 20px;
        grid-template-columns: none;
    }

    .stat-box {
        padding: 20px 28px;
    }

    .stat-box .number {
        font-size: 32px;
    }

    .stat-box .label {
        font-size: 13px;
    }

    .server-ip-box {
        padding: 16px 28px;
    }

    .server-ip-box .ip {
        font-size: 20px;
    }

    .section {
        padding: 60px 24px;
    }

    .section-title h2 {
        font-size: 32px;
    }

    .section-title p {
        font-size: 16px;
    }

    .cards-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 20px;
    }

    .card {
        padding: 28px;
    }

    .card-icon {
        width: 56px;
        height: 56px;
        font-size: 28px;
    }

    .card h3 {
        font-size: 20px;
    }

    .card p {
        font-size: 14px;
    }

    .voter-item {
        padding: 16px 20px;
        gap: 16px;
    }

    .voter-rank {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .voter-name {
        font-size: 16px;
    }

    .voter-badge {
        padding: 4px 12px;
        font-size: 12px;
    }

    .staff-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 20px;
    }

    .staff-card {
        padding: 28px;
    }

    .staff-avatar {
        width: 80px;
        height: 80px;
    }

    .staff-name {
        font-size: 18px;
    }

    .staff-desc {
        font-size: 13px;
        -webkit-line-clamp: 3;
    }

    .links-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 16px;
    }

    .link-card {
        padding: 24px;
    }

    .link-icon {
        width: 60px;
        height: 60px;
    }

    .link-icon svg {
        width: 32px;
        height: 32px;
    }

    .link-name {
        font-size: 15px;
    }
}
