/* ─── LOGIN MODAL ───────────────────────── */
.login-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(8, 12, 20, 0.85);
    backdrop-filter: blur(10px);
}

.login-modal.active {
    display: flex;
}

.login-card {
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 24px;
    width: 90%;
    max-width: 420px;
    padding: 40px;
    text-align: center;
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 20px rgba(59, 130, 246, 0.1);
}

.login-card h2 {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 8px;
    background: linear-gradient(to bottom, #fff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: block;
}

.login-card .subtitle {
    color: var(--clr-text-muted);
    margin-bottom: 32px;
    font-size: 0.95rem;
}

.btn-discord {
    background: #5865F2;
    color: #fff;
    width: 100%;
    padding: 14px;
    font-size: 1rem;
    border-radius: 12px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: 0.3s;
    text-decoration: none !important;
    font-weight: 600;
    border: none;
    cursor: pointer;
}

.btn-discord:hover {
    background: #4752c4;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(88, 101, 242, 0.3);
}

.login-footer {
    font-size: 0.85rem;
    color: var(--clr-text-dim);
}

.login-footer a {
    color: var(--clr-text-muted);
    text-decoration: underline;
}

.login-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: var(--clr-text-dim);
    cursor: pointer;
    padding: 5px;
    transition: 0.3s;
}

.login-close:hover {
    color: #fff;
    transform: rotate(90deg);
}

/* ─── USER PROFILE NAV ──────────────────── */
.user-nav-profile-wrapper {
    position: relative;
}

.user-nav-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 15px;
    background: var(--clr-card);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--transition);
}

.user-nav-profile:hover {
    background: var(--clr-card-hover);
    border-color: var(--clr-border-hover);
}

.user-nav-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid var(--clr-primary);
}

.user-nav-name {
    font-size: 0.9rem;
    font-weight: 600;
}

/* ─── DROPDOWN ─────────────────────────── */
.user-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: rgba(15, 23, 42, 0.98);
    border: 1px solid var(--clr-border);
    border-radius: 12px;
    width: 180px;
    display: none;
    flex-direction: column;
    padding: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 1001;
    backdrop-filter: blur(10px);
}

.user-dropdown.active {
    display: flex;
}

.user-dropdown a {
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: 0.2s;
    color: var(--clr-text-muted);
}

.user-dropdown a:hover {
    background: var(--clr-card);
    color: #fff;
}

/* ─── DASHBOARD LAYOUT ─────────────────── */
/* Pre-render hide to prevent flash */
.dashboard-active .hero,
.dashboard-active .features-section,
.dashboard-active .stats-section,
.dashboard-active .leaderboard-section,
.dashboard-active .servers-section,
.dashboard-active .commands-section,
.dashboard-active .team-section,
.dashboard-active .footer {
    display: none !important;
}

#dashboard-section {
    padding-bottom: 80px;
}

#dashboard-section .section-title .gradient-text {
    background: linear-gradient(to right, #3b82f6, #06b6d4) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
}

.guilds-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.guild-card {
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    min-height: 280px;
}

.guild-card:hover {
    transform: translateY(-8px);
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    background: #1e293b;
}

.guild-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 20px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    border: 3px solid rgba(255, 255, 255, 0.05);
}

.guild-name {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 25px;
    color: #fff;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.btn-manage,
.btn-setup {
    width: 100%;
    padding: 12px;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: 0.3s;
    text-align: center;
    font-size: 0.95rem;
}

.btn-manage {
    background: linear-gradient(135deg, #2563eb, #0891b2);
    color: #fff;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.2);
    border: none;
    cursor: pointer;
}

.btn-manage:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
    filter: brightness(1.1);
}

.btn-setup {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
}

.btn-setup:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* ─── DASHBOARD CATEGORIES ─────────────── */
.dashboard-category {
    margin-bottom: 60px;
    animation: fadeInUp 0.6s ease both;
}

.category-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.category-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.music-icon {
    background: linear-gradient(135deg, #10b981, #059669);
}

.manage-icon {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.add-icon {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
}

.category-title {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: var(--font-heading);
    color: #fff;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}