/**
 * Nexus Clicker - League of Legends Style
 * LeBelgeDuFutur
 */

/* =============================================
   CSS Variables - LoL Color Palette
   ============================================= */
:root {
    /* Gold colors */
    --lol-gold: #c89b3c;
    --lol-gold-light: #f0e6d2;
    --lol-gold-dark: #785a28;
    --lol-gold-glow: rgba(200, 155, 60, 0.6);

    /* Blue colors */
    --lol-blue-dark: #010a13;
    --lol-blue: #0a1428;
    --lol-blue-light: #1e2328;
    --lol-blue-accent: #0ac8b9;
    --lol-blue-glow: rgba(10, 200, 185, 0.5);

    /* Other colors */
    --lol-grey: #5b5a56;
    --lol-text: #a09b8c;
    --lol-text-light: #f0e6d2;
    --lol-red: #c8124f;
    --lol-purple: #8b5cf6;

    /* Gradients */
    --gradient-gold: linear-gradient(180deg, #f0e6d2 0%, #c89b3c 50%, #785a28 100%);
    --gradient-blue: linear-gradient(180deg, #0ac8b9 0%, #0397ab 100%);
    --gradient-dark: linear-gradient(180deg, #1e2328 0%, #010a13 100%);

    /* Borders */
    --border-gold: 2px solid var(--lol-gold);
    --border-blue: 1px solid rgba(10, 200, 185, 0.3);

    /* Shadows */
    --shadow-gold: 0 0 20px var(--lol-gold-glow);
    --shadow-blue: 0 0 20px var(--lol-blue-glow);
}

/* =============================================
   Base Styles
   ============================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--lol-blue-dark);
    color: var(--lol-text-light);
    cursor: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32"><circle cx="16" cy="16" r="8" fill="%23c89b3c"/></svg>') 16 16, auto;
}

::selection {
    background: var(--lol-gold);
    color: var(--lol-blue-dark);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--lol-blue);
}

::-webkit-scrollbar-thumb {
    background: var(--lol-gold-dark);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--lol-gold);
}

/* =============================================
   Background Effects
   ============================================= */
.game-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(10, 200, 185, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 0% 100%, rgba(200, 155, 60, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 100% 100%, rgba(139, 92, 246, 0.1) 0%, transparent 50%),
        var(--lol-blue-dark);
}

.particles {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--lol-gold);
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
}

/* =============================================
   Top Bar
   ============================================= */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: linear-gradient(180deg, rgba(30, 35, 40, 0.95) 0%, rgba(10, 20, 40, 0.9) 100%);
    border-bottom: var(--border-gold);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 100;
}

.back-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: transparent;
    border: 1px solid var(--lol-gold-dark);
    color: var(--lol-gold);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}

.back-btn:hover {
    background: rgba(200, 155, 60, 0.1);
    border-color: var(--lol-gold);
    color: var(--lol-gold-light);
    box-shadow: var(--shadow-gold);
}

.game-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
    font-weight: 900;
    letter-spacing: 4px;
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px var(--lol-gold-glow);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.title-icon {
    font-size: 1.5rem;
    -webkit-text-fill-color: initial;
}

.top-actions {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(200, 155, 60, 0.1);
    border: 1px solid var(--lol-gold-dark);
    color: var(--lol-gold);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}

.action-btn:hover {
    background: rgba(200, 155, 60, 0.2);
    border-color: var(--lol-gold);
    box-shadow: var(--shadow-gold);
    transform: scale(1.05);
}

/* Bouton save caché par défaut (affiché via JS si connecté) */
#saveBtn {
    display: none;
}

/* =============================================
   Main Game Container
   ============================================= */
.game-container {
    display: grid;
    grid-template-columns: 300px 1fr 350px;
    gap: 1rem;
    padding: 1rem;
    height: calc(100vh - 80px);
    max-height: calc(100vh - 80px);
}

/* =============================================
   Panels (Left & Right)
   ============================================= */
.panel {
    background: linear-gradient(180deg, rgba(30, 35, 40, 0.9) 0%, rgba(10, 20, 40, 0.95) 100%);
    border: 1px solid rgba(200, 155, 60, 0.3);
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-gold);
}

.panel-section {
    padding: 1rem;
    border-bottom: 1px solid rgba(200, 155, 60, 0.2);
}

.panel-section:last-child {
    border-bottom: none;
    flex: 1;
    overflow-y: auto;
}

.panel-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--lol-gold);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-title span {
    font-family: 'Poppins', sans-serif;
    font-size: 0.75rem;
    color: var(--lol-text);
}

/* Rank Section */
.rank-display {
    text-align: center;
}

.rank-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    filter: drop-shadow(0 0 10px var(--lol-gold-glow));
    animation: rankFloat 3s ease-in-out infinite;
}

@keyframes rankFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.rank-name {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--lol-gold-light);
    margin-bottom: 0.75rem;
}

.rank-progress {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.progress-bar {
    height: 8px;
    background: var(--lol-blue);
    border: 1px solid var(--lol-gold-dark);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-blue);
    width: 0%;
    transition: width 0.5s ease;
    box-shadow: 0 0 10px var(--lol-blue-glow);
}

.progress-text {
    font-size: 0.75rem;
    color: var(--lol-text);
}

/* Stats Section */
.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(200, 155, 60, 0.1);
}

.stat-item:last-child {
    border-bottom: none;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--lol-text);
}

.stat-value {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    color: var(--lol-gold);
}

/* Achievements Section */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.5rem;
}

.achievement {
    width: 100%;
    aspect-ratio: 1;
    background: var(--lol-blue);
    border: 1px solid var(--lol-gold-dark);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    opacity: 0.3;
    transition: all 0.3s ease;
    cursor: help;
    position: relative;
}

.achievement.unlocked {
    opacity: 1;
    border-color: var(--lol-gold);
    box-shadow: inset 0 0 10px var(--lol-gold-glow);
}

.achievement:hover {
    transform: scale(1.1);
    z-index: 10;
}

.achievement-tooltip {
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--lol-blue-dark);
    border: 1px solid var(--lol-gold);
    padding: 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 100;
}

.achievement:hover .achievement-tooltip {
    opacity: 1;
}

/* =============================================
   Center Area - Nexus
   ============================================= */
.center-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    gap: 2rem;
}

/* No Save Warning Banner */
.no-save-warning {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1.25rem;
    background: linear-gradient(90deg, rgba(200, 75, 50, 0.2) 0%, rgba(200, 100, 50, 0.15) 100%);
    border: 1px solid rgba(255, 150, 100, 0.4);
    border-radius: 8px;
    font-size: 0.85rem;
    color: #ffaa80;
    animation: warningPulse 3s ease-in-out infinite;
}

.no-save-warning.hidden {
    display: none;
}

.no-save-warning i {
    font-size: 1.1rem;
    color: #ff9966;
}

.warning-login-btn {
    background: linear-gradient(135deg, #c89b3c 0%, #785a28 100%);
    border: none;
    padding: 0.35rem 0.85rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.warning-login-btn:hover {
    background: linear-gradient(135deg, #f0e6d2 0%, #c89b3c 100%);
    color: #0a1428;
    transform: scale(1.05);
}

@keyframes warningPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Gold Display */
.gold-display {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 3rem;
    background: linear-gradient(180deg, rgba(30, 35, 40, 0.9) 0%, rgba(10, 20, 40, 0.95) 100%);
    border: var(--border-gold);
    clip-path: polygon(20px 0, calc(100% - 20px) 0, 100% 50%, calc(100% - 20px) 100%, 20px 100%, 0 50%);
    position: relative;
}

.gold-display::before {
    content: '';
    position: absolute;
    inset: 2px;
    background: var(--lol-blue-dark);
    clip-path: polygon(20px 0, calc(100% - 20px) 0, 100% 50%, calc(100% - 20px) 100%, 20px 100%, 0 50%);
    z-index: -1;
}

.gold-icon {
    font-size: 2.5rem;
    filter: drop-shadow(0 0 10px var(--lol-gold-glow));
}

.gold-amount {
    font-family: 'Orbitron', sans-serif;
    font-size: 3rem;
    font-weight: 900;
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    min-width: 200px;
    text-align: center;
}

.gold-label {
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    color: var(--lol-gold);
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Nexus Container */
.nexus-container {
    position: relative;
    width: 300px;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nexus-glow {
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, var(--lol-blue-glow) 0%, transparent 70%);
    animation: nexusGlow 2s ease-in-out infinite alternate;
}

@keyframes nexusGlow {
    0% { opacity: 0.5; transform: scale(1); }
    100% { opacity: 1; transform: scale(1.1); }
}

.nexus-ring {
    position: absolute;
    border: 2px solid var(--lol-blue-accent);
    border-radius: 50%;
    opacity: 0.3;
}

.ring-1 {
    width: 280px;
    height: 280px;
    animation: ringRotate 20s linear infinite;
}

.ring-2 {
    width: 240px;
    height: 240px;
    animation: ringRotate 15s linear infinite reverse;
}

.ring-3 {
    width: 200px;
    height: 200px;
    animation: ringRotate 10s linear infinite;
}

@keyframes ringRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Nexus Button */
.nexus {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%,
        #0ac8b9 0%,
        #0397ab 30%,
        #065a82 60%,
        #0a1428 100%
    );
    border: 4px solid var(--lol-blue-accent);
    cursor: pointer;
    position: relative;
    transition: all 0.1s ease;
    box-shadow:
        0 0 30px var(--lol-blue-glow),
        inset 0 0 30px rgba(10, 200, 185, 0.3);
    z-index: 10;
}

.nexus:hover {
    transform: scale(1.05);
    box-shadow:
        0 0 50px var(--lol-blue-glow),
        inset 0 0 40px rgba(10, 200, 185, 0.5);
}

.nexus:active {
    transform: scale(0.95);
}

.nexus-inner {
    position: absolute;
    inset: 20px;
    border-radius: 50%;
    background: radial-gradient(circle at 40% 40%,
        rgba(255, 255, 255, 0.8) 0%,
        rgba(10, 200, 185, 0.6) 30%,
        transparent 60%
    );
}

.nexus-core {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: radial-gradient(circle, #fff 0%, var(--lol-blue-accent) 100%);
    border-radius: 50%;
    box-shadow: 0 0 30px #fff;
    animation: corePulse 1s ease-in-out infinite;
}

@keyframes corePulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    50% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.8; }
}

/* Click Effects Container */
.click-effects {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 20;
}

.click-number {
    position: absolute;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--lol-gold);
    text-shadow: 0 0 10px var(--lol-gold-glow);
    pointer-events: none;
    z-index: 100;
}

.click-particle {
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--lol-gold);
    border-radius: 50%;
    pointer-events: none;
}

/* Multiplier Display */
.multiplier-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.multiplier-label {
    font-size: 0.8rem;
    color: var(--lol-text);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.multiplier-value {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--lol-blue-accent);
    text-shadow: 0 0 10px var(--lol-blue-glow);
}

/* Active Boosts */
.active-boosts {
    position: absolute;
    bottom: 1rem;
    display: flex;
    gap: 0.5rem;
}

.boost-indicator {
    padding: 0.5rem 1rem;
    background: rgba(10, 200, 185, 0.2);
    border: 1px solid var(--lol-blue-accent);
    border-radius: 4px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: boostPulse 2s ease-in-out infinite;
}

@keyframes boostPulse {
    0%, 100% { box-shadow: 0 0 5px var(--lol-blue-glow); }
    50% { box-shadow: 0 0 15px var(--lol-blue-glow); }
}

/* =============================================
   Right Panel - Shop
   ============================================= */
.right-panel {
    position: relative;
}

.shop-tabs {
    display: flex;
    border-bottom: 1px solid rgba(200, 155, 60, 0.3);
}

.shop-tab {
    flex: 1;
    padding: 1rem;
    background: transparent;
    border: none;
    color: var(--lol-text);
    font-family: 'Orbitron', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.shop-tab::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--lol-gold);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.shop-tab:hover {
    color: var(--lol-gold-light);
    background: rgba(200, 155, 60, 0.05);
}

.shop-tab.active {
    color: var(--lol-gold);
}

.shop-tab.active::after {
    transform: scaleX(1);
}

.shop-content {
    flex: 1;
    overflow: hidden;
}

.shop-tab-content {
    display: none;
    height: 100%;
    overflow-y: auto;
    padding: 0.5rem;
}

.shop-tab-content.active {
    display: block;
}

.shop-items {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Shop Item */
.shop-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: rgba(10, 20, 40, 0.5);
    border: 1px solid rgba(200, 155, 60, 0.2);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.shop-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(200, 155, 60, 0.1), transparent);
    transition: left 0.5s ease;
}

.shop-item:hover::before {
    left: 100%;
}

.shop-item:hover {
    border-color: var(--lol-gold);
    background: rgba(200, 155, 60, 0.1);
}

.shop-item.affordable {
    border-color: var(--lol-gold-dark);
}

.shop-item.affordable:hover {
    box-shadow: var(--shadow-gold);
}

.shop-item.locked {
    opacity: 0.5;
    cursor: not-allowed;
}

.shop-item-icon {
    width: 48px;
    height: 48px;
    border-radius: 4px;
    border: 2px solid var(--lol-gold-dark);
    background: var(--lol-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    overflow: hidden;
}

.shop-item-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.shop-item-info {
    flex: 1;
    min-width: 0;
}

.shop-item-name {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--lol-gold-light);
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.shop-item-desc {
    font-size: 0.7rem;
    color: var(--lol-text);
    line-height: 1.3;
}

.shop-item-stats {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.shop-item-bonus {
    font-size: 0.7rem;
    color: var(--lol-blue-accent);
}

.shop-item-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
}

.shop-item-price {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    color: var(--lol-gold);
}

.shop-item-owned {
    font-size: 0.7rem;
    color: var(--lol-text);
}

/* =============================================
   Modals
   ============================================= */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: linear-gradient(180deg, #1e2328 0%, #010a13 100%);
    border: var(--border-gold);
    border-radius: 4px;
    width: 90%;
    max-width: 400px;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal.active .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(200, 155, 60, 0.3);
}

.modal-header h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
    color: var(--lol-gold);
}

.modal-close {
    background: none;
    border: none;
    color: var(--lol-text);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: var(--lol-gold);
}

.modal-body {
    padding: 1.5rem;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
}

.setting-item label {
    color: var(--lol-text-light);
}

.setting-item.danger label {
    color: var(--lol-red);
}

/* Toggle Switch */
.toggle {
    position: relative;
    width: 50px;
    height: 26px;
    cursor: pointer;
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    inset: 0;
    background: var(--lol-blue);
    border: 1px solid var(--lol-gold-dark);
    border-radius: 13px;
    transition: all 0.3s ease;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: var(--lol-text);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.toggle input:checked + .toggle-slider {
    background: rgba(10, 200, 185, 0.3);
    border-color: var(--lol-blue-accent);
}

.toggle input:checked + .toggle-slider::before {
    transform: translateX(24px);
    background: var(--lol-blue-accent);
}

.btn-danger {
    padding: 0.5rem 1rem;
    background: rgba(200, 18, 79, 0.2);
    border: 1px solid var(--lol-red);
    color: var(--lol-red);
    font-family: 'Orbitron', sans-serif;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-danger:hover {
    background: var(--lol-red);
    color: white;
}

/* =============================================
   Auth Modal
   ============================================= */
.auth-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.auth-btn .auth-username {
    display: none;
    font-size: 0.75rem;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.auth-btn.logged-in {
    width: auto;
    padding: 0 1rem;
    background: rgba(10, 200, 185, 0.2);
    border-color: var(--lol-blue-accent);
    color: var(--lol-blue-accent);
}

.auth-btn.logged-in .auth-username {
    display: block;
}

.auth-modal-content {
    max-width: 400px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.85rem;
    color: var(--lol-gold);
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input {
    padding: 0.75rem 1rem;
    background: var(--lol-blue);
    border: 1px solid var(--lol-gold-dark);
    border-radius: 4px;
    color: var(--lol-text-light);
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--lol-gold);
    box-shadow: 0 0 10px var(--lol-gold-glow);
}

.form-group input::placeholder {
    color: var(--lol-grey);
}

.auth-error {
    color: var(--lol-red);
    font-size: 0.85rem;
    min-height: 1.2rem;
    text-align: center;
}

.auth-submit {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(180deg, var(--lol-gold) 0%, var(--lol-gold-dark) 100%);
    border: none;
    border-radius: 4px;
    color: var(--lol-blue-dark);
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
}

.auth-submit:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-gold);
}

.auth-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.logout-btn {
    background: linear-gradient(180deg, var(--lol-red) 0%, #8b0a35 100%);
    color: white;
}

.auth-switch {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--lol-gold-dark);
}

.auth-switch span {
    color: var(--lol-text);
    font-size: 0.85rem;
}

.auth-switch button {
    background: none;
    border: none;
    color: var(--lol-blue-accent);
    font-family: 'Poppins', sans-serif;
    font-size: 0.85rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.auth-switch button:hover {
    color: var(--lol-gold);
}

.logged-in-view {
    text-align: center;
    padding: 1rem 0;
}

.user-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    font-size: 1.2rem;
    color: var(--lol-gold);
    margin-bottom: 1rem;
}

.user-info i {
    font-size: 2rem;
    color: var(--lol-blue-accent);
}

.sync-info {
    color: var(--lol-blue-accent);
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
}

.sync-info i {
    margin-right: 0.5rem;
}

/* =============================================
   Popups
   ============================================= */
.achievement-popup {
    position: fixed;
    top: 100px;
    right: -400px;
    background: linear-gradient(180deg, #1e2328 0%, #010a13 100%);
    border: var(--border-gold);
    border-radius: 4px;
    padding: 1rem 1.5rem;
    z-index: 1000;
    transition: right 0.5s ease;
}

.achievement-popup.show {
    right: 20px;
}

.achievement-popup-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.achievement-popup-icon {
    font-size: 2.5rem;
    filter: drop-shadow(0 0 10px var(--lol-gold-glow));
}

.achievement-popup-title {
    font-size: 0.75rem;
    color: var(--lol-gold);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.achievement-popup-name {
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    color: var(--lol-gold-light);
}

.rankup-popup {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.rankup-popup.show {
    opacity: 1;
    visibility: visible;
}

.rankup-content {
    text-align: center;
    transform: scale(0.5);
    transition: transform 0.5s ease;
}

.rankup-popup.show .rankup-content {
    transform: scale(1);
}

.rankup-icon {
    font-size: 6rem;
    margin-bottom: 1rem;
    animation: rankupBounce 0.5s ease;
}

@keyframes rankupBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.rankup-text {
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    color: var(--lol-gold);
    letter-spacing: 4px;
    margin-bottom: 0.5rem;
}

.rankup-rank {
    font-family: 'Orbitron', sans-serif;
    font-size: 3rem;
    font-weight: 900;
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* =============================================
   Responsive
   ============================================= */
@media (max-width: 1200px) {
    .game-container {
        grid-template-columns: 250px 1fr 300px;
    }
}

@media (max-width: 992px) {
    .game-container {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr auto;
    }

    .left-panel {
        display: none;
    }

    .center-area {
        min-height: 400px;
    }

    .nexus-container {
        width: 200px;
        height: 200px;
    }

    .nexus {
        width: 120px;
        height: 120px;
    }

    .ring-1 { width: 180px; height: 180px; }
    .ring-2 { width: 160px; height: 160px; }
    .ring-3 { width: 140px; height: 140px; }
}

/* =============================================
   Floating Numbers & Effects
   ============================================= */
.floating-number {
    position: absolute;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--lol-gold);
    text-shadow:
        0 0 10px var(--lol-gold-glow),
        2px 2px 0 var(--lol-gold-dark);
    pointer-events: none;
    z-index: 100;
    white-space: nowrap;
}

@keyframes floatUp {
    0% { opacity: 1; transform: translateY(0) scale(1); }
    100% { opacity: 0; transform: translateY(-80px) scale(1.5); }
}

.click-particle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    background: var(--lol-gold);
    border-radius: 50%;
    pointer-events: none;
    box-shadow: 0 0 6px var(--lol-gold-glow);
}

/* Background Particles */
.bg-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--lol-gold);
    border-radius: 50%;
    opacity: 0.3;
    animation: bgFloat linear infinite;
}

@keyframes bgFloat {
    0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
    10% { opacity: 0.3; }
    90% { opacity: 0.3; }
    100% { transform: translateY(-100vh) rotate(720deg); opacity: 0; }
}

/* Purchase Notification */
.purchase-notification {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    padding: 1rem 2rem;
    background: linear-gradient(180deg, rgba(30, 35, 40, 0.95) 0%, rgba(10, 20, 40, 0.95) 100%);
    border: var(--border-gold);
    border-radius: 4px;
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    color: var(--lol-gold);
    z-index: 1000;
    box-shadow: var(--shadow-gold);
}

/* Active Boosts Display */
.active-boost {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(10, 200, 185, 0.2);
    border: 1px solid var(--lol-blue-accent);
    border-radius: 4px;
    animation: boostPulse 2s ease-in-out infinite;
}

.active-boost .boost-icon {
    font-size: 1.2rem;
    display: flex;
    align-items: center;
}

.active-boost .boost-spell-icon {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    border: 1px solid var(--lol-gold-dark);
}

.active-boost .boost-timer {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    color: var(--lol-blue-accent);
}

/* Shop Item Image */
.shop-item-image {
    width: 48px;
    height: 48px;
    border-radius: 4px;
    border: 2px solid var(--lol-gold-dark);
    background: var(--lol-blue);
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}

.shop-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.shop-item-image .item-owned {
    position: absolute;
    bottom: -2px;
    right: -2px;
    background: var(--lol-gold);
    color: var(--lol-blue-dark);
    font-family: 'Orbitron', sans-serif;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 1px 4px;
    border-radius: 2px;
}

/* Tier Badges */
.tier-badge {
    position: absolute;
    top: -4px;
    left: -4px;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.55rem;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 3px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    z-index: 2;
}

.tier-Splus {
    background: linear-gradient(135deg, #ff6b6b 0%, #ffd93d 100%);
    color: #1a1a2e;
    box-shadow: 0 0 8px rgba(255, 107, 107, 0.6);
    animation: tierGlow 1.5s ease-in-out infinite;
}

.tier-S {
    background: linear-gradient(135deg, #ffd93d 0%, #ff9f43 100%);
    color: #1a1a2e;
    box-shadow: 0 0 6px rgba(255, 217, 61, 0.5);
}

.tier-A {
    background: linear-gradient(135deg, #0ac8b9 0%, #0397ab 100%);
    color: #fff;
}

.tier-B {
    background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
    color: #fff;
}

.tier-C {
    background: linear-gradient(135deg, #636e72 0%, #b2bec3 100%);
    color: #fff;
}

.tier-D {
    background: linear-gradient(135deg, #2d3436 0%, #636e72 100%);
    color: #dfe6e9;
}

@keyframes tierGlow {
    0%, 100% { box-shadow: 0 0 8px rgba(255, 107, 107, 0.6); }
    50% { box-shadow: 0 0 15px rgba(255, 217, 61, 0.8); }
}

.shop-item-image.boost-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    background: linear-gradient(180deg, rgba(10, 200, 185, 0.3) 0%, var(--lol-blue) 100%);
}

.shop-item-effect {
    font-size: 0.7rem;
    color: var(--lol-blue-accent);
    margin-top: 0.25rem;
}

.shop-item-cost {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.85rem;
    color: var(--lol-gold);
    margin-top: 0.25rem;
}

.shop-item-cost .gold-icon {
    font-size: 1rem;
}

.shop-item-cost.expensive {
    color: #ff6b6b;
    text-shadow: 0 0 8px rgba(255, 107, 107, 0.5);
}

.shop-item.disabled {
    opacity: 1;
    cursor: not-allowed;
}

.shop-item.disabled .shop-item-image {
    opacity: 0.4;
    filter: grayscale(50%);
}

.shop-item.disabled .shop-item-cost {
    color: #ff6b6b;
    font-weight: 700;
    text-shadow: 0 0 8px rgba(255, 107, 107, 0.4);
}

.shop-item.disabled .shop-item-name {
    color: #d4c8a8;
}

.shop-item.disabled .shop-item-effect {
    color: #8fa8c2;
}

.shop-item.disabled .tier-badge {
    opacity: 0.7;
}

.shop-item.disabled:hover {
    border-color: rgba(200, 155, 60, 0.2);
    background: rgba(10, 20, 40, 0.5);
    box-shadow: none;
}

/* Owned Item Style */
.shop-item.owned {
    background: linear-gradient(180deg, rgba(10, 200, 100, 0.15) 0%, rgba(10, 20, 40, 0.5) 100%);
    border-color: rgba(10, 200, 100, 0.4);
    cursor: default;
}

.shop-item.owned:hover {
    border-color: rgba(10, 200, 100, 0.5);
    box-shadow: 0 0 15px rgba(10, 200, 100, 0.2);
}

.shop-item.owned .shop-item-image {
    opacity: 1;
    filter: none;
}

.owned-check {
    background: linear-gradient(135deg, #10c864 0%, #0a8040 100%) !important;
    color: #fff !important;
    font-weight: 700;
    font-size: 0.9rem !important;
}

.shop-item-cost.owned-text {
    color: #10c864;
    font-weight: 600;
    text-shadow: 0 0 8px rgba(10, 200, 100, 0.4);
}

/* Boost Item Special Style */
.boost-item {
    background: linear-gradient(180deg, rgba(10, 200, 185, 0.1) 0%, rgba(10, 20, 40, 0.5) 100%);
}

.boost-item:hover {
    border-color: var(--lol-blue-accent);
    background: rgba(10, 200, 185, 0.2);
}

/* Modal Show State */
.modal.show {
    opacity: 1;
    visibility: visible;
}

.modal.show .modal-content {
    transform: scale(1);
}

/* Save Button Animation */
.action-btn.saved {
    background: rgba(10, 200, 185, 0.3);
    border-color: var(--lol-blue-accent);
}

.action-btn.saved i {
    color: var(--lol-blue-accent);
}

/* Loading State */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: var(--lol-text);
}

.loading::after {
    content: '';
    width: 24px;
    height: 24px;
    margin-left: 1rem;
    border: 2px solid var(--lol-gold-dark);
    border-top-color: var(--lol-gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* =============================================
   Leaderboard
   ============================================= */
.leaderboard-modal-content {
    max-width: 500px;
}

.leaderboard-container {
    min-height: 200px;
}

.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
}

.leaderboard-row {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(200, 155, 60, 0.2);
    transition: all 0.3s ease;
}

.leaderboard-row:last-child {
    border-bottom: none;
}

.leaderboard-row:hover {
    background: rgba(200, 155, 60, 0.1);
}

.leaderboard-row.top-1 {
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.15) 0%, transparent 100%);
}

.leaderboard-row.top-2 {
    background: linear-gradient(90deg, rgba(192, 192, 192, 0.15) 0%, transparent 100%);
}

.leaderboard-row.top-3 {
    background: linear-gradient(90deg, rgba(205, 127, 50, 0.15) 0%, transparent 100%);
}

.leaderboard-rank {
    width: 40px;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    text-align: center;
}

.leaderboard-rank.gold { color: #ffd700; text-shadow: 0 0 10px rgba(255, 215, 0, 0.5); }
.leaderboard-rank.silver { color: #c0c0c0; text-shadow: 0 0 10px rgba(192, 192, 192, 0.5); }
.leaderboard-rank.bronze { color: #cd7f32; text-shadow: 0 0 10px rgba(205, 127, 50, 0.5); }
.leaderboard-rank.normal { color: var(--lol-text); }

.leaderboard-medal {
    font-size: 1.5rem;
    margin-right: 0.5rem;
}

.leaderboard-player {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}

.leaderboard-name {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--lol-gold-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.leaderboard-stats {
    font-size: 0.75rem;
    color: var(--lol-text);
    display: flex;
    gap: 1rem;
}

.leaderboard-gold {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    color: var(--lol-gold);
}

.leaderboard-gold .gold-icon {
    font-size: 1rem;
}

.leaderboard-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--lol-text);
}

.leaderboard-empty i {
    font-size: 3rem;
    color: var(--lol-gold-dark);
    margin-bottom: 1rem;
    display: block;
}

.leaderboard-boost-active {
    display: inline-block;
    font-size: 0.7rem;
    padding: 2px 6px;
    background: rgba(10, 200, 185, 0.3);
    border: 1px solid var(--lol-blue-accent);
    border-radius: 4px;
    color: var(--lol-blue-accent);
    margin-left: 0.5rem;
    animation: boostPulse 2s ease-in-out infinite;
}

/* =============================================
   Responsive (continued)
   ============================================= */
@media (max-width: 576px) {
    .top-bar {
        padding: 0.75rem 1rem;
    }

    .game-title {
        font-size: 1.2rem;
    }

    .title-icon {
        display: none;
    }

    .gold-display {
        padding: 0.75rem 1.5rem;
    }

    .gold-amount {
        font-size: 2rem;
        min-width: 120px;
    }

    .gold-icon {
        font-size: 1.5rem;
    }
}
