@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Rajdhani:wght@300;400;600;700&display=swap');

:root {
    --space-black: #0a0e1a;
    --deep-space: #121829;
    --nebula-purple: #6b4b9e;
    --cosmic-blue: #2d4a7c;
    --star-white: #e8f1ff;
    --accent-cyan: #00d9ff;
    --accent-orange: #ff6b35;
    --warning-red: #ff4757;
    --success-green: #26de81;
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-border: rgba(255, 255, 255, 0.1);
    --glow-cyan: 0 0 20px rgba(0, 217, 255, 0.5);
    --glow-orange: 0 0 20px rgba(255, 107, 53, 0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Rajdhani', sans-serif;
    background: var(--space-black);
    color: var(--star-white);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Animated starfield background */
.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, #eee, transparent),
        radial-gradient(2px 2px at 60px 70px, #fff, transparent),
        radial-gradient(1px 1px at 50px 50px, #ddd, transparent),
        radial-gradient(1px 1px at 130px 80px, #fff, transparent),
        radial-gradient(2px 2px at 90px 10px, #eee, transparent);
    background-repeat: repeat;
    background-size: 200px 200px;
    animation: stars-move 180s linear infinite;
}

.stars::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, transparent 0%, var(--space-black) 100%);
}

@keyframes stars-move {
    from { transform: translateY(0); }
    to { transform: translateY(-200px); }
}

/* ============ LOGIN PAGE ============ */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.login-container {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    width: 100%;
}

.logo {
    text-align: center;
    margin-bottom: 60px;
    animation: glow-pulse 3s ease-in-out infinite;
}

.logo h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 900;
    letter-spacing: 8px;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-orange));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: var(--glow-cyan);
    margin-bottom: 10px;
}

.tagline {
    font-size: 1.2rem;
    letter-spacing: 4px;
    color: var(--accent-cyan);
    text-transform: uppercase;
    opacity: 0.8;
}

@keyframes glow-pulse {
    0%, 100% { filter: drop-shadow(var(--glow-cyan)); }
    50% { filter: drop-shadow(var(--glow-orange)); }
}

.login-box {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 50px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    margin-bottom: 40px;
}

.login-box h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    margin-bottom: 15px;
    color: var(--accent-cyan);
}

.login-box p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.twitch-btn {
    background: #9146ff;
    color: white;
    border: none;
    padding: 18px 40px;
    font-size: 1.2rem;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
    font-family: 'Rajdhani', sans-serif;
    letter-spacing: 1px;
    text-transform: uppercase;
    box-shadow: 0 5px 15px rgba(145, 70, 255, 0.4);
}

.top-spacer {
    height: 60px;
    width: 100%;
}

.twitch-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(145, 70, 255, 0.6);
    background: #a970ff;
}

.twitch-btn svg {
    width: 24px;
    height: 24px;
}

.info-text {
    margin-top: 20px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.feature {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--card-border);
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s ease;
}

.feature:hover {
    border-color: var(--accent-cyan);
    transform: translateY(-5px);
    box-shadow: var(--glow-cyan);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.feature h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.3rem;
    color: var(--accent-cyan);
    margin-bottom: 10px;
}

.feature p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
}

/* ============ DASHBOARD PAGE ============ */
.dashboard-page {
    padding-top: 80px;
}

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(10, 14, 26, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--card-border);
    z-index: 100;
    padding: 15px 0;
}

.nav-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-orange));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Navigation Links */
.nav-links {
    display: flex;
    gap: 15px;
    margin-left: 50px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.1), rgba(139, 92, 246, 0.1));
    border: 2px solid rgba(20, 184, 166, 0.3);
    border-radius: 12px;
    color: white;
    text-decoration: none;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    font-size: 1.05rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.nav-link:hover::before {
    left: 100%;
}

.nav-link span {
    font-size: 1.3rem;
    filter: drop-shadow(0 0 5px rgba(20, 184, 166, 0.5));
}

.nav-link:hover {
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.2), rgba(139, 92, 246, 0.2));
    border-color: var(--accent-cyan);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(20, 184, 166, 0.4);
}

.nav-link.active {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    color: white;
    border-color: transparent;
    box-shadow: 0 8px 30px rgba(20, 184, 166, 0.6);
    transform: translateY(-2px);
}

.nav-link.active span {
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.8));
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.profile-pic {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--accent-cyan);
}

.user-info span {
    font-weight: 600;
    color: var(--star-white);
}

.logout-btn {
    background: rgba(255, 71, 87, 0.2);
    color: var(--warning-red);
    border: 1px solid var(--warning-red);
    padding: 8px 20px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: var(--warning-red);
    color: white;
    transform: translateY(-2px);
}

.dashboard-container {
    max-width: 1600px; /* Increased from 1400px */
    margin: 0 auto;
    padding: 40px 30px;
    position: relative;
    z-index: 1;
}

/* Twitch Embed */
.twitch-embed-container {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 15px;
    margin-bottom: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    position: relative;
    transition: all 0.3s ease;
}

.twitch-embed-container.hidden {
    padding: 15px;
}

.stream-toggle-btn {
    position: absolute;
    top: 25px;
    right: 25px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    z-index: 10;
    transition: all 0.3s ease;
}

.stream-toggle-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    border-color: var(--accent-cyan);
    transform: translateY(-2px);
}

.twitch-embed-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: 10px;
    background: #18181b; /* Twitch dark background */
    min-height: 500px; /* Minimum height */
}

/* On larger screens, make it even bigger */
@media (min-width: 1200px) {
    .twitch-embed-wrapper {
        padding-bottom: 50%; /* Wider on big screens */
        min-height: 600px;
    }
}

.twitch-embed-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.loading, .error-message {
    text-align: center;
    padding: 100px 20px;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(0, 217, 255, 0.1);
    border-top-color: var(--accent-cyan);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.error-message h2 {
    font-family: 'Orbitron', sans-serif;
    color: var(--accent-orange);
    margin-bottom: 15px;
}

.stats-grid-top {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    margin-bottom: 25px;
}

.stats-grid-bottom {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-bottom: 50px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 1200px) {
    .stats-grid-top {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stats-grid-bottom {
        grid-template-columns: repeat(3, 1fr);
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .stats-grid-top,
    .stats-grid-bottom {
        grid-template-columns: 1fr;
    }
}

.stat-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 35px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-orange));
}

.stat-card:hover {
    border-color: var(--accent-cyan);
    transform: translateY(-5px);
    box-shadow: var(--glow-cyan);
}

.stat-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.stat-value {
    font-family: 'Orbitron', sans-serif;
    font-size: 3rem;
    font-weight: 900;
    color: var(--accent-cyan);
    margin-bottom: 10px;
    text-shadow: var(--glow-cyan);
}

.stat-label {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.upgrades-section {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 50px;
    margin-top: 40px;
}

/* Prestige Cards */
.prestige-card {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.05), rgba(255, 215, 0, 0.02));
    border-color: rgba(255, 215, 0, 0.3);
}

.prestige-card:hover {
    border-color: #ffd700;
    box-shadow: 0 5px 20px rgba(255, 215, 0, 0.3);
}

.prestige-requirements {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
}

.requirement-text {
    font-weight: 700;
    color: var(--accent-cyan);
    margin-bottom: 8px;
}

.prestige-requirements p {
    color: rgba(255, 255, 255, 0.9);
    margin: 5px 0;
    font-size: 0.95rem;
}

.prestige-btn-main {
    width: 100%;
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #000;
    border: none;
    padding: 15px;
    font-size: 1.2rem;
    font-weight: 900;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 3px 15px rgba(255, 215, 0, 0.3);
}

.prestige-btn-main:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(255, 215, 0, 0.5);
}

.prestige-btn-main:disabled {
    background: rgba(255, 215, 0, 0.2);
    color: rgba(255, 255, 255, 0.3);
    cursor: not-allowed;
    box-shadow: none;
}

.prestige-warning-text {
    color: var(--warning-red);
    font-weight: 600;
    font-size: 0.9rem;
    text-align: center;
    margin-top: 10px;
}

.prestige-rewards-card, .prestige-benefits-card {
    background: rgba(255, 255, 255, 0.02);
}

.prestige-rewards-list {
    padding: 10px 0;
}

.reward-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.reward-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.reward-text strong {
    color: var(--accent-cyan);
    font-size: 1.1rem;
    display: block;
    margin-bottom: 5px;
}

.reward-text p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    margin: 0;
}

.prestige-benefits-list {
    padding: 10px 0;
}

.prestige-benefits-list p {
    color: rgba(255, 255, 255, 0.85);
    margin: 15px 0;
    padding: 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    line-height: 1.5;
}

.prestige-benefits-list strong {
    color: var(--accent-cyan);
}

/* Prestige Section - Legacy (remove old styles) */
.prestige-section {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 50px;
    margin-top: 40px;
}

.prestige-section h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.5rem;
    color: #ffd700;
    margin-bottom: 10px;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.prestige-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin: 30px 0;
}

.prestige-requirement, .prestige-rewards {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    padding: 25px;
    text-align: left;
}

.prestige-requirement h3, .prestige-rewards h3 {
    font-family: 'Orbitron', sans-serif;
    color: var(--accent-cyan);
    margin-bottom: 15px;
}

.prestige-requirement p, .prestige-rewards p {
    color: rgba(255, 255, 255, 0.9);
    margin: 8px 0;
    font-size: 1.1rem;
}

.prestige-btn {
    width: 100%;
    max-width: 500px;
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #000;
    border: none;
    padding: 20px;
    font-size: 1.5rem;
    font-weight: 900;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 20px auto;
    display: block;
    box-shadow: 0 5px 20px rgba(255, 215, 0, 0.4);
}

.prestige-btn:hover:not(:disabled) {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 30px rgba(255, 215, 0, 0.6);
}

.prestige-btn:disabled {
    background: rgba(255, 215, 0, 0.2);
    color: rgba(255, 255, 255, 0.3);
    cursor: not-allowed;
    box-shadow: none;
}

.prestige-warning {
    color: var(--warning-red);
    font-weight: 700;
    font-size: 1.1rem;
    margin-top: 15px;
}

.upgrades-section h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.5rem;
    color: var(--accent-orange);
    margin-bottom: 10px;
}

.section-desc {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 40px;
    font-size: 1.1rem;
}

.upgrades-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.upgrade-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 30px;
    transition: all 0.3s ease;
}

.upgrade-card:hover {
    border-color: var(--accent-cyan);
    box-shadow: 0 5px 20px rgba(0, 217, 255, 0.2);
}

.upgrade-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.upgrade-icon {
    font-size: 2.5rem;
}

.upgrade-header h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    color: var(--star-white);
}

.upgrade-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
}

.current-level, .upgrade-cost {
    font-size: 1.1rem;
    font-weight: 600;
}

.current-level span, .upgrade-cost span {
    color: var(--accent-cyan);
    font-family: 'Orbitron', sans-serif;
}

.upgrade-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--accent-cyan), var(--cosmic-blue));
    color: white;
    border: none;
    padding: 15px;
    font-size: 1.2rem;
    font-weight: 700;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Rajdhani', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.upgrade-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--glow-cyan);
}

.upgrade-btn:disabled {
    background: rgba(255, 255, 255, 0.1);
    cursor: not-allowed;
    opacity: 0.5;
}

.upgrade-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.upgrade-btn-point {
    width: 100%;
    background: linear-gradient(135deg, var(--accent-orange), #ff8c5a);
    color: white;
    border: none;
    padding: 12px;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Rajdhani', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.upgrade-btn-point:hover {
    transform: translateY(-2px);
    box-shadow: var(--glow-orange);
}

.upgrade-btn-point:disabled {
    background: rgba(255, 107, 53, 0.2);
    cursor: not-allowed;
    opacity: 0.5;
}

.upgrade-desc {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Responsive */
@media (max-width: 768px) {
    .login-box {
        padding: 30px 20px;
    }
    
    .logo h1 {
        font-size: 3rem;
        letter-spacing: 4px;
    }
    
    .upgrades-section {
        padding: 30px 20px;
    }
    
    .upgrades-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   LEADERBOARD STYLES
   ============================================ */

.leaderboard-header {
    text-align: center;
    margin-bottom: 40px;
}

.leaderboard-header h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 3rem;
    background: linear-gradient(135deg, #ffd700, #ff6b35);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.leaderboard-toggles {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.toggle-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.7);
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.toggle-btn span {
    font-size: 1.3rem;
}

.toggle-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-color: var(--accent-cyan);
    transform: translateY(-2px);
}

.toggle-btn.active {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    color: white;
    border-color: transparent;
    box-shadow: 0 5px 20px rgba(20, 184, 166, 0.4);
}

.leaderboard-container {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 30px;
    margin-top: 20px;
}

.leaderboard-table {
    overflow-x: auto;
}

.leaderboard-header-row,
.leaderboard-row {
    display: grid !important;
    grid-template-columns: 80px 200px 150px 100px 100px 100px 120px 120px !important;
    gap: 15px;
    padding: 15px 20px;
    align-items: center;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.leaderboard-header-row {
    background: rgba(255, 255, 255, 0.05);
    font-weight: 700;
    color: var(--accent-cyan);
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    text-transform: uppercase;
    margin-bottom: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.leaderboard-row {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 8px;
}

.leaderboard-row:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent-cyan);
    transform: translateX(5px);
}

.leaderboard-row.current-user {
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.2), rgba(139, 92, 246, 0.2));
    border-color: var(--accent-cyan);
    box-shadow: 0 0 20px rgba(20, 184, 166, 0.3);
}

.rank-col {
    text-align: center;
    font-weight: 900;
    font-size: 1.2rem;
}

.rank-1 {
    color: #ffd700;
    font-size: 1.5rem;
}

.rank-2 {
    color: #c0c0c0;
    font-size: 1.4rem;
}

.rank-3 {
    color: #cd7f32;
    font-size: 1.3rem;
}

.player-col {
    font-weight: 600;
    color: white;
}

.prestige-col {
    font-size: 0.9rem;
}

.stats-col,
.total-col,
.credits-col {
    text-align: center;
    font-family: 'Rajdhani', sans-serif;
}

.total-col {
    color: var(--accent-cyan);
    font-size: 1.1rem;
}

.your-position {
    margin-top: 30px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.1), rgba(139, 92, 246, 0.1));
    border: 2px solid var(--accent-cyan);
    border-radius: 15px;
    text-align: center;
}

.your-position h3 {
    font-family: 'Orbitron', sans-serif;
    color: var(--accent-cyan);
    margin-bottom: 10px;
}

.your-position p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
}

@media (max-width: 1200px) {
    .leaderboard-header-row,
    .leaderboard-row {
        grid-template-columns: 60px 150px 120px 80px 80px 80px 100px 100px;
        gap: 10px;
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .leaderboard-header-row,
    .leaderboard-row {
        grid-template-columns: 1fr;
        gap: 8px;
        text-align: left;
    }
    
    .leaderboard-header-row {
        display: none;
    }
    
    .leaderboard-row > div::before {
        content: attr(data-label);
        font-weight: bold;
        margin-right: 10px;
        color: var(--accent-cyan);
    }
}

/* ============================================
   SKINS PAGE STYLES
   ============================================ */

.skins-header {
    text-align: center;
    margin-bottom: 50px;
}

.skins-header h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 3rem;
    background: linear-gradient(135deg, #14b8a6, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
}

.credits-display {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 215, 0, 0.1));
    border: 2px solid #ffd700;
    padding: 15px 30px;
    border-radius: 15px;
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 20px;
}

.credits-icon {
    font-size: 2rem;
}

.current-skin-section {
    margin-bottom: 40px;
}

.current-skin-section h2 {
    font-family: 'Orbitron', sans-serif;
    color: var(--accent-cyan);
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.skin-card-large {
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.1), rgba(139, 92, 246, 0.1));
    border: 2px solid var(--accent-cyan);
    border-radius: 20px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 25px;
    box-shadow: 0 10px 40px rgba(20, 184, 166, 0.3);
    max-width: 600px;
}

.skin-icon-large {
    width: 120px;
    height: 120px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    border: 3px solid;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.5);
    flex-shrink: 0;
    background: rgba(0, 0, 0, 0.5);
    overflow: hidden;
    position: relative;
}

.skin-details-large h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
    color: white;
    margin-bottom: 10px;
}

.equipped-text {
    color: var(--accent-cyan);
    font-weight: 700;
    font-size: 1rem;
    margin-top: 10px;
}

.skins-section {
    margin-bottom: 60px;
}

.tier-header {
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.tier-icon {
    font-size: 2.5rem;
}

.tier-desc {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.tier-starter { color: #ffffff; }
.tier-common { color: #4ade80; }
.tier-rare { color: #3b82f6; }
.tier-epic { color: #a855f7; }
.tier-legendary { color: #f97316; }

.skins-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}

.skin-card {
    background: var(--card-bg);
    border: 2px solid var(--card-border);
    border-radius: 15px;
    padding: 15px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.skin-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(20, 184, 166, 0.3);
    border-color: var(--accent-cyan);
}

.skin-card.skin-equipped {
    border-color: var(--accent-cyan);
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.1), rgba(139, 92, 246, 0.1));
    box-shadow: 0 5px 20px rgba(20, 184, 166, 0.4);
}

.skin-preview {
    position: relative;
    margin-bottom: 12px;
}

.skin-icon {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid;
    background: rgba(0, 0, 0, 0.5);
    overflow: hidden;
    position: relative;
}

.skin-image {
    width: 90%;
    height: 90%;
    object-fit: contain;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.skin-icon-large .skin-image {
    width: 90%;
    height: 90%;
    object-fit: contain;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.rarity-starter {
    border-color: #9ca3af;
    background: linear-gradient(135deg, rgba(156, 163, 175, 0.2), rgba(156, 163, 175, 0.1));
}

.rarity-common {
    border-color: #4ade80;
    background: linear-gradient(135deg, rgba(74, 222, 128, 0.2), rgba(74, 222, 128, 0.1));
}

.rarity-rare {
    border-color: #3b82f6;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(59, 130, 246, 0.1));
}

.rarity-epic {
    border-color: #a855f7;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.2), rgba(168, 85, 247, 0.1));
}

.rarity-legendary {
    border-color: #f97316;
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.2), rgba(249, 115, 22, 0.1));
    animation: legendary-glow 2s ease-in-out infinite;
}

@keyframes legendary-glow {
    0%, 100% { box-shadow: 0 0 10px rgba(249, 115, 22, 0.5); }
    50% { box-shadow: 0 0 25px rgba(249, 115, 22, 0.8); }
}

.equipped-badge, .owned-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--accent-cyan);
    color: white;
    padding: 5px 12px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.75rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.owned-badge {
    background: rgba(255, 255, 255, 0.2);
}

.skin-info {
    flex: 1;
    text-align: center;
    margin-bottom: 12px;
}

.skin-info h4 {
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.1rem;
    color: white;
    margin-bottom: 6px;
}

.rarity-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.rarity-badge.rarity-starter { background: #6b7280; color: white; }
.rarity-badge.rarity-common { background: #22c55e; color: white; }
.rarity-badge.rarity-rare { background: #3b82f6; color: white; }
.rarity-badge.rarity-epic { background: #a855f7; color: white; }
.rarity-badge.rarity-legendary { background: #f97316; color: white; }

.skin-cost {
    font-family: 'Rajdhani', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: #ffd700;
}

.skin-cost.purchased {
    color: var(--accent-cyan);
}

.skin-btn {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 8px;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.skin-btn-equip {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    color: white;
}

.skin-btn-equip:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(20, 184, 166, 0.5);
}

.skin-btn-buy {
    background: linear-gradient(135deg, #ffd700, #ff6b35);
    color: #000;
}

.skin-btn-buy:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.5);
}

.skin-btn-unlock {
    background: linear-gradient(135deg, #22c55e, #10b981);
    color: white;
}

.skin-btn-unlock:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(34, 197, 94, 0.5);
}

.skin-btn-equipped {
    background: rgba(20, 184, 166, 0.2);
    color: var(--accent-cyan);
    border: 2px solid var(--accent-cyan);
    cursor: default;
}

.skin-btn:disabled {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.3);
    cursor: not-allowed;
}