:root {
    --space-dark: #0a0e27;
    --space-blue: #1a1f3a;
    --cosmic-purple: #6366f1;
    --stellar-pink: #ec4899;
    --nebula-cyan: #06b6d4;
    --star-gold: #fbbf24;
}

body {
    background: linear-gradient(135deg, var(--space-dark), var(--space-blue));
    color: #e2e8f0;
    min-height: 100vh;
}


#stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.star-decoration {
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    animation: twinkle 2.5s infinite;
    z-index: -1;
    /* Place behind content */
    pointer-events: none;
    /* Allow clicks to pass through */
}

@keyframes twinkle {
    0%, 100% { opacity: 0.1;}
    50% { opacity: 1;}
}

.custom-cosmic {
    background: linear-gradient(45deg, var(--cosmic-purple), var(--stellar-pink));
    border: none;
    color: white;
    padding: 10px 30px;
    border-radius: 25px;
    transition: transform 0.3s, box-shadow 0.3s;
    text-decoration: none;
}

.custom-cosmic:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(99, 102, 241, 0.5);
    color: white;
    cursor: pointer;
}


.navbar {
    background: rgba(26, 31, 58, 0.8) !important;
    backdrop-filter: blur(20px); /* remove stars behind navbar */
    border-bottom: 1px solid rgba(99, 102, 241, 0.3);
    user-select: none;
}

.logo {
    font-size: 1.75rem;
    font-weight: bold;
    color: var(--stellar-pink);
}

.board-title {
    text-shadow:
        0 0 5px rgba(255, 215, 0, 0.9),
        0 0 10px rgba(255, 223, 0, 0.7),
        0 0 20px rgba(218, 165, 32, 0.5),
        0 0 40px rgba(184, 134, 11, 0.3);
    animation: shimmer 3s ease-in-out infinite;
}

.board-subtitle {
    text-shadow:
        0 0 8px rgba(6, 182, 212, 0.6),
        0 0 15px rgba(6, 182, 212, 0.4);
}


.leaderboard-section {
    min-height: 100vh;
    padding: 120px 0 80px;
    position: relative;
}

@keyframes shimmer {
    0%, 100% {
        filter: brightness(1);
    }
    50% {
        filter: brightness(1.5);
    }
}

.filter-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.filter-label {
    font-size: 1.1rem;
    font-weight: 600;
    color: #e2e8f0;
}

.custom-input-group {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(26, 31, 58, 0.6);
    padding: 8px;
    border-radius: 30px;
    border: 1px solid rgba(99, 102, 241, 0.3);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.2);
}

.custom-input-group:focus-within {
    border-color: var(--cosmic-purple);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}

.custom-limit-input {
    background: transparent;
    border: none;
    color: white;
    padding: 8px 15px;
    width: 150px;
    font-weight: 600;
    outline: none;
}

.custom-limit-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.custom-apply-btn {
    background: linear-gradient(135deg, var(--cosmic-purple), var(--stellar-pink));
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease-in-out;
}

.custom-apply-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(99, 102, 241, 0.5);
}

.podium-container {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 20px;
    max-width: 900px;
    margin: 60px auto;
    animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.podium-item {
    position: relative;
    text-align: center;
    padding: 30px 20px;
    border-radius: 20px;
    backdrop-filter: blur(20px);
    border: 2px solid rgba(99, 102, 241, 0.3);
    width: 280px;
    transition: all 0.3s;
}

.podium-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 5px 10px rgba(99, 102, 241, 0.4);
}

.first-place {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.15), rgba(236, 72, 153, 0.15));
    border-color: var(--star-gold);
    order: 2;
    margin-bottom: 40px;
    animation: pulse-gold 2.5s ease-out infinite;
}

@keyframes pulse-gold {
    0%, 100% { box-shadow: 0 0 15px rgba(251, 191, 36, 0.3); transform: translateY(0); }
    50% { box-shadow: 0 0 30px rgba(251, 191, 36, 0.5); transform: translateY(-10px); }
}


.second-place {
    background: linear-gradient(135deg, rgba(192, 192, 192, 0.15), rgba(99, 102, 241, 0.15));
    border-color: #c0c0c0;
    order: 1;
}

.third-place {
    background: linear-gradient(135deg, rgba(205, 127, 50, 0.15), rgba(6, 182, 212, 0.15));
    border-color: #cd7f32;
    order: 3;
}

.podium-avatar {
    width: 100px;
    height: 100px;
    margin: 0 auto 15px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    background: linear-gradient(135deg, var(--cosmic-purple), var(--stellar-pink));
    border: 3px solid rgba(255, 255, 255, 0.2);
    color: white;
    box-shadow: 0 5px 20px rgba(99, 102, 241, 0.4);
}

.podium-avatar.champion {
    width: 120px;
    height: 120px;
    font-size: 5rem;
    border-color: var(--star-gold);
    box-shadow: 0 5px 30px rgba(251, 191, 36, 0.5);
}

.podium-username {
    font-size: 1.3rem;
    font-weight: 700;
    color: white;
    margin-bottom: 8px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.podium-points {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--nebula-cyan);
    margin-bottom: 15px;
}

.podium-rank {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.3);
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
}

.first-place .podium-rank {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.3), rgba(236, 72, 153, 0.3));
}

.podium-rank i {
    color: var(--star-gold);
}

/* User Dropdown Toggle */
.user-dropdown-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
    width: 45px;
    height: 45px;
}

.user-dropdown-toggle:hover {
    transform: scale(1.1);
}

.user-dropdown-toggle::after {
    display: none !important;
}

.user-icon {
    font-size: 1.8rem;
    color: var(--stellar-pink);
    margin: 0;
}

/* Cosmic Dropdown Menu */
.cosmic-dropdown {
    background: rgba(26, 31, 58, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 5px;
    padding: 0;
    min-width: 240px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.cosmic-dropdown .dropdown-header {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(236, 72, 153, 0.2));
    border-bottom: 2px solid rgba(99, 102, 241, 0.3);
    padding: 1rem 1.25rem;
    border-radius: 5px 5px 0 0;
}

.user-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.username-points {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dropdown-username {
    font-size: 1.1rem;
    font-weight: 600;
    color: #ffffff;
    transition: color 0.3s;
}

.dropdown-username:hover {
    color: var(--nebula-cyan);
}

.user-points {
    color: white;
    padding: 4px 12px;
    font-size: 0.9rem;
    font-weight: 600;
}

.user-points i {
    color: #c084fc;
    text-shadow: 0 0 8px rgba(168, 85, 247, 0.7);
}

.galaxy-info {
    font-size: 0.85rem;
    color: var(--nebula-cyan);
    font-weight: 500;
    padding: 4px 10px;
    margin-top: 12px;
    background: rgba(6, 182, 212, 0.1);
    border-radius: 5px;
    border: 1px solid rgba(6, 182, 212, 0.3);
    display: flex;
    flex-direction: column;
}

.cosmic-dropdown .dropdown-item {
    color: #e2e8f0;
    padding: 0.75rem 1.25rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cosmic-dropdown .dropdown-item:hover {
    background: linear-gradient(45deg, rgba(99, 102, 241, 0.2), rgba(236, 72, 153, 0.2));
    color: white;
    padding-left: 1.5rem;
}

.cosmic-dropdown .dropdown-item.text-danger {
    color: #ef4444 !important;
}

.cosmic-dropdown .dropdown-item.text-danger:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171 !important;
}

.cosmic-dropdown .dropdown-divider {
    border-color: rgba(99, 102, 241, 0.2);
    margin: 0;
}

/* Login Modal Form Styles */
.loginForm {
    background: rgba(26, 31, 58, 0.8) !important;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.loginForm .form-control {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: #e2e8f0;
    padding: 12px;
    border-radius: 8px;
}

.loginForm .form-control:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--cosmic-purple);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.3);
    color: #e2e8f0;
}

.loginForm .modal-label {
    color: var(--nebula-cyan);
    font-weight: 500;
    margin-bottom: 8px;
    display: block;
}

.signup-link {
    color: var(--cosmic-purple);
    transition: color 0.3s;
}

.signup-link:hover {
    color: var(--stellar-pink);
}