/* Quantum Cookie Clicker - Eclipse Effect */

:root {
  --gradient-bottom: #01090d;
  --orbitron: 'Orbitron', monospace;
  --light-color: #95e9f0;
  --shine-color: rgba(149,233,240,0.05);
  --gradient-shine: rgba(149,233,240,0.1);
  --green-color: #60f060;
  --shine-green: rgba(96,240,96,0.05);
  --gradient-shine-green: rgba(96,240,96,0.1);
  --red-color: #ff846e;
  --shine-red: rgba(255,132,110,0.05);
  --gradient-shine-red: rgba(255,132,110,0.1);
}

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

body {
    font-family: var(--orbitron);
    background: #000000;
    color: var(--light-color);
    overflow: hidden;
    height: 100vh;
    position: relative;
    width: 100%;
}

html {
    overflow: hidden;
}

/* Eclipse Canvas - covers screen below header */
#glcanvas {
    position: fixed;
    top: 40px; /* Ajustado para la curva elíptica */
    left: 0;
    width: 100vw;
    height: calc(100vh - 40px); /* Altura disponible ajustada */
    z-index: 1;
    pointer-events: none;
}

@media (max-width: 768px) {
    #glcanvas {
        top: 35px;
        height: calc(100vh - 35px);
    }
}

@media (max-width: 480px) {
    #glcanvas {
        top: 30px;
        height: calc(100vh - 30px);
    }
}

/* Game Interface */
.hidden {
    display: none !important;
}

.game-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 10;
    pointer-events: none;
}

/* Game Header */
.game-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: transparent;
    z-index: 1000;
    pointer-events: all;
    min-height: 80px;
}

@media (max-width: 768px) {
    .game-header {
        height: 70px;
        min-height: 70px;
        padding: 10px 15px;
        flex-wrap: wrap;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .game-header {
        height: 70px;
        min-height: 70px;
        padding: 10px 15px;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

.game-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: -40px;
    background: #000000;
    clip-path: ellipse(100% 100% at 50% 0%);
    box-shadow: 
        inset 0 0 0 1px #ffffff,
        inset 1px 0 0 0 transparent,
        inset -1px 0 0 0 transparent,
        inset 0 -1px 0 0 transparent,
        inset 0 1px 0 0 transparent;
    z-index: -1;
}

@media (max-width: 768px) {
    .game-header::before {
        bottom: -35px;
    }
}

@media (max-width: 480px) {
    .game-header::before {
        bottom: -30px;
    }
}

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

/* Language Selector */
.language-selector {
    display: flex;
    align-items: center;
}

.header-language {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 1000;
}

.login-language-selector {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.language-select {
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid #95e9f0;
    border-radius: 8px;
    color: #95e9f0;
    padding: 6px 10px;
    font-size: 0.85em;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
    font-family: var(--orbitron);
}

.language-select:hover {
    background: rgba(149, 233, 240, 0.1);
    border-color: #ffffff;
}

.language-select:focus {
    border-color: #ffffff;
    box-shadow: 0 0 10px rgba(149, 233, 240, 0.5);
}

.language-select option {
    background: #000000;
    color: #95e9f0;
}

@media (max-width: 768px) {
    .user-info {
        gap: 15px;
    }
    
    .header-language {
        top: 10px;
        right: 10px;
    }
    
    .login-language-selector {
        top: 15px;
        right: 15px;
    }
    
    .language-select {
        font-size: 0.8em;
        padding: 5px 8px;
    }
}

@media (max-width: 480px) {
    .user-info {
        display: none; /* Ocultar user-info en móvil */
    }
    
    .header-language {
        top: 8px;
        right: 8px;
    }
    
    .login-language-selector {
        top: 10px;
        right: 10px;
    }
    
    .language-select {
        font-size: 0.75em;
        padding: 4px 6px;
    }
}

.logout-btn {
    padding: 8px 16px;
    background: #000000;
    border: 1px solid #ffffff;
    color: #ffffff;
    font-family: var(--orbitron);
    text-transform: uppercase;
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .logout-btn {
        padding: 6px 12px;
        font-size: 0.8em;
    }
}

@media (max-width: 480px) {
    .logout-btn {
        padding: 4px 8px;
        font-size: 0.7em;
    }
}

.logout-btn:hover {
    background: #ffffff;
    color: #000000;
}

.stats {
    display: flex;
    gap: 30px;
}

@media (max-width: 768px) {
    .stats {
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .stats {
        display: flex;
        gap: 5px;
        align-items: center;
        flex-direction: row;
        flex-wrap: nowrap;
        justify-content: flex-start;
        flex: 1;
    }
}

/* Botón de hamburguesa para móvil */
.hamburger-btn {
    display: none;
    background: #000000;
    border: 1px solid #ffffff;
    color: #ffffff;
    font-size: 1.2em;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 8px;
    width: 50px;
    height: 50px;
    align-items: center;
    justify-content: center;
}

@media (max-width: 480px) {
    .hamburger-btn {
        display: flex !important;
        width: 60px !important;
        height: 60px !important;
        font-size: 1.5em !important;
        position: fixed !important;
        right: 20px !important;
        top: 20px !important;
        z-index: 9999 !important;
        cursor: pointer !important;
        pointer-events: all !important;
        background: #000000 !important;
        border: 2px solid #ffffff !important;
        color: #ffffff !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: 0 !important;
    }
}

.hamburger-btn:hover {
    background: #ffffff !important;
    color: #000000 !important;
    transform: scale(1.1) !important;
}

@media (max-width: 480px) {
    .hamburger-btn:hover {
        background: #ffffff !important;
        color: #000000 !important;
        transform: scale(1.1) !important;
    }
}

/* Menú desplegable móvil */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #000000;
    z-index: 999;
    transform: translateY(-100%);
    opacity: 0;
    transition: all 0.3s ease;
    display: none;
}

@media (max-width: 480px) {
    .mobile-menu {
        display: block !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        z-index: 9999 !important;
    }
}

.mobile-menu.show {
    transform: translateY(0);
    opacity: 1;
}

.mobile-menu-content {
    padding: 80px 20px 20px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 30px;
    height: 100%;
    box-sizing: border-box;
}

.mobile-user-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 20px;
    border: 1px solid #ffffff;
    border-radius: 0;
    background: transparent;
    width: 100%;
    max-width: 350px;
}

.mobile-stats {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    max-width: 350px;
}

.mobile-ranking-title {
    font-size: 1.2em;
    font-weight: bold;
    color: #95e9f0;
    text-align: center;
    margin-bottom: 10px;
    border-bottom: 1px solid #ffffff;
    padding-bottom: 10px;
}

.mobile-ranking-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    max-width: 350px;
}

.mobile-ranking-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border: 1px solid #333333;
    border-radius: 0;
    background: transparent;
    font-size: 0.9em;
    gap: 8px;
}

.mobile-ranking-item.current-user {
    border-color: #95e9f0;
    background: rgba(149, 233, 240, 0.1);
}

.mobile-ranking-position {
    font-weight: bold;
    color: #95e9f0;
    min-width: 25px;
    text-align: center;
}

.mobile-ranking-position.first {
    color: #ffd700;
}

.mobile-ranking-position.second {
    color: #c0c0c0;
}

.mobile-ranking-position.third {
    color: #cd7f32;
}

.mobile-ranking-prize-container {
    display: flex;
    align-items: center;
    margin-left: 8px;
}

.mobile-ranking-prize {
    font-size: 0.7em;
    font-weight: bold;
    color: #ffd700;
    background: rgba(255, 215, 0, 0.4);
    padding: 2px 6px;
    border-radius: 3px;
    border: 2px solid #ffd700;
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.3);
}

.mobile-ranking-username {
    flex: 1;
    margin: 0 8px;
    color: #ffffff;
    font-weight: bold;
}

.mobile-ranking-planets {
    color: #95e9f0;
    font-weight: bold;
}

.mobile-stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    border: 1px solid #ffffff;
    border-radius: 0;
    background: transparent;
    font-size: 1.1em;
}

/* Botón de logout móvil */
.mobile-user-info .logout-btn {
    width: 100%;
    padding: 12px;
    font-size: 1.1em;
    border-radius: 0;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

@media (max-width: 480px) {
    .stat {
        flex-direction: row;
        gap: 5px;
        align-items: center;
    }
}

.stat-label {
    font-size: 0.9em;
    opacity: 0.8;
    display: flex;
    align-items: center;
    gap: 5px;
}

.header-icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
}

@media (max-width: 768px) {
    .stat-label {
        font-size: 0.8em;
    }
    
    .header-icon {
        width: 14px;
        height: 14px;
    }
}
}

@media (max-width: 480px) {
    .stat-label {
        font-size: 0.7em;
    }
    
    .header-icon {
        width: 12px;
        height: 12px;
    }
    }
}

.stat-value {
    font-size: 1.5em;
    font-weight: bold;
    color: #ffffff;
}

@media (max-width: 768px) {
    .stat-value {
        font-size: 1.2em;
    }
}

@media (max-width: 480px) {
    .stat-value {
        font-size: 0.9em;
    }
}

/* Stats Panel Fixed */
.stats-panel-fixed {
    position: fixed;
    top: 120px; /* Ajustado para la curva elíptica */
    left: 20px;
    width: 420px;
    background: #000000;
    border: 1px solid #ffffff;
    padding: 15px;
    z-index: 1000;
    pointer-events: all;
    transform: translateX(-100%);
    opacity: 0;
    transition: all 0.3s ease;
}

@media (max-width: 768px) {
    .stats-panel-fixed {
        top: 110px;
        left: 10px;
        width: 380px;
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .stats-panel-fixed {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        padding: 80px 20px 20px 20px !important;
        border: none !important;
        overflow-y: auto !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        box-sizing: border-box !important;
        z-index: 9999 !important;
        background: #000000 !important;
    }
}

.stats-panel-fixed.show {
    transform: translateX(0);
    opacity: 1;
}

.stats-panel-fixed h3 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.3em;
    color: #ffffff;
}

@media (max-width: 768px) {
    .stats-panel-fixed h3 {
        font-size: 1.2em;
        margin-bottom: 15px;
    }
}

@media (max-width: 480px) {
    .stats-panel-fixed h3 {
        font-size: 1.5em;
        margin-bottom: 30px;
        text-align: center;
        width: 100%;
    }
}

.stat-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #333333;
    color: #ffffff;
}

@media (max-width: 768px) {
    .stat-item {
        padding: 6px 0;
        font-size: 0.9em;
    }
}

@media (max-width: 480px) {
    .stat-item {
        padding: 12px 15px;
        font-size: 1.1em;
        flex-direction: row;
        gap: 10px;
        border: 1px solid #ffffff;
        border-radius: 0;
        background: transparent;
        margin-bottom: 10px;
        width: 100%;
        max-width: 350px;
        justify-content: space-between;
    }
}

.stat-item:last-child {
    border-bottom: none;
}

/* Ranking styles */
.season-info {
    font-size: 0.7em;
    color: #cccccc;
    text-align: center;
    margin-bottom: 10px;
    opacity: 0.8;
}

.mobile-season-info {
    font-size: 0.6em;
    color: #cccccc;
    text-align: center;
    margin-bottom: 10px;
    opacity: 0.8;
}

.ranking-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 400px;
}

.ranking-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid #333333;
    border-radius: 0;
    background: transparent;
    transition: all 0.3s ease;
    gap: 10px;
    min-width: 350px;
    width: 100%;
}

.ranking-item:hover {
    background: #111111;
    border-color: #ffffff;
}

.ranking-item.current-user {
    border-color: #95e9f0;
    background: rgba(149, 233, 240, 0.1);
}

.ranking-position {
    font-weight: bold;
    color: #95e9f0;
    min-width: 30px;
    text-align: center;
}

.ranking-position.top-3 {
    font-size: 1.2em;
}

.ranking-position.first {
    color: #ffd700;
}

.ranking-position.second {
    color: #c0c0c0;
}

.ranking-position.third {
    color: #cd7f32;
}

.ranking-prize-container {
    display: flex;
    align-items: center;
    margin-left: 10px;
}

.ranking-prize {
    font-size: 0.8em;
    font-weight: bold;
    color: #ffd700;
    background: rgba(255, 215, 0, 0.4);
    padding: 4px 8px;
    border-radius: 4px;
    border: 2px solid #ffd700;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.ranking-user-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin: 0 10px;
}

.ranking-username {
    font-weight: bold;
    color: #ffffff;
    font-size: 0.9em;
}

.ranking-stats {
    font-size: 0.8em;
    color: #cccccc;
}

.ranking-planets {
    font-weight: bold;
    color: #95e9f0;
    font-size: 1.1em;
}

.loading-ranking {
    text-align: center;
    color: #cccccc;
    padding: 20px;
    font-style: italic;
}

@media (max-width: 480px) {
    .ranking-item {
        padding: 12px 15px;
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }
    
    .ranking-position {
        align-self: flex-start;
    }
    
    .ranking-user-info {
        margin: 0;
        width: 100%;
    }
    
    .ranking-planets {
        align-self: flex-end;
        font-size: 1.2em;
    }
}

/* Clickable Sun Center */
.quantum-cookie {
    position: fixed;
    top: calc(52% + 20px); /* Ajustado para la curva elíptica */
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    cursor: pointer;
    pointer-events: all;
    z-index: 100;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 768px) {
    .quantum-cookie {
        top: calc(50% + 17px);
        width: 180px;
        height: 180px;
    }
}

@media (max-width: 480px) {
    .quantum-cookie {
        top: calc(50% + 15px);
        width: 150px;
        height: 150px;
    }
}

.quantum-cookie:active {
    transform: translate(-50%, -50%) scale(0.95);
}

.click-text {
    color: #ffffff;
    font-size: 1.2em;
    font-weight: bold;
    text-align: center;
    text-shadow: 0 0 10px #ffffff;
    pointer-events: none;
    animation: clickMePulse 2s ease-in-out infinite;
    font-family: var(--orbitron);
    margin: 0;
    padding: 0;
    line-height: 1;
}

@media (max-width: 768px) {
    .click-text {
        font-size: 1.1em;
    }
}

@media (max-width: 480px) {
    .click-text {
        font-size: 1em;
    }
}

@keyframes clickMePulse {
    0%, 100% {
        opacity: 0.8;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
}

.click-effects {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.click-effect {
    position: absolute;
    color: #ffffff;
    font-size: 2em;
    font-weight: bold;
    text-shadow: 0 0 10px #ffffff;
    animation: clickAnimation 1s ease-out forwards;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #ffffff;
    border-radius: 50%;
    pointer-events: none;
    animation: particleAnimation 2s ease-out forwards;
    box-shadow: 0 0 6px #ffffff;
}

.particle:nth-child(odd) {
    width: 3px;
    height: 3px;
}

.particle:nth-child(3n) {
    width: 2px;
    height: 2px;
}

@keyframes clickAnimation {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-100px) scale(1.5);
    }
}

@keyframes particleAnimation {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(var(--random-x, 0), var(--random-y, -100px)) scale(0);
    }
}

/* Upgrades Panel */
.upgrades-panel {
    position: fixed;
    top: 120px; /* Ajustado para la curva elíptica */
    right: 20px;
    width: 350px;
    background: #000000;
    border: 1px solid #ffffff;
    padding: 15px;
    overflow-y: auto;
    max-height: calc(100vh - 140px); /* Ajustado para la curva elíptica */
    z-index: 1000;
    pointer-events: all;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s ease;
}

@media (max-width: 768px) {
    .upgrades-panel {
        top: 110px;
        right: 10px;
        width: 320px;
        padding: 12px;
        max-height: calc(100vh - 130px);
    }
}

@media (max-width: 480px) {
    .upgrades-panel {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        max-height: none !important;
        padding: 80px 20px 20px 20px !important;
        border: none !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: flex-start !important;
        align-items: center !important;
        box-sizing: border-box !important;
        z-index: 9999 !important;
        background: #000000 !important;
        overflow-y: auto !important;
    }
}

.upgrades-panel.show {
    transform: translateX(0);
    opacity: 1;
}

.upgrades-panel h3 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.5em;
    color: #ffffff;
}

@media (max-width: 768px) {
    .upgrades-panel h3 {
        font-size: 1.3em;
        margin-bottom: 15px;
    }
}

@media (max-width: 480px) {
    .upgrades-panel h3 {
        font-size: 1.5em;
        margin-bottom: 30px;
        text-align: center;
        width: 100%;
    }
}

.upgrades-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

@media (max-width: 480px) {
    .upgrades-list {
        gap: 20px;
        width: 100%;
        max-width: 350px;
    }
}

.upgrade-item {
    background: #000000;
    border: 1px solid #ffffff;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

@media (max-width: 768px) {
    .upgrade-item {
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .upgrade-item {
        padding: 15px;
        margin-bottom: 10px;
        border-radius: 0;
        width: 100%;
        font-size: 1em;
    }
}

.upgrade-item:hover {
    background: #333333;
    border-color: #ffffff;
}

.upgrade-item.affordable {
    border-color: #ffffff;
    background: #111111;
}

.upgrade-item.affordable:hover {
    background: #333333;
}

.upgrade-item.owned {
    opacity: 0.5;
    cursor: not-allowed;
    background: #000000;
    border-color: #666666;
}

.upgrade-name {
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 5px;
    color: #ffffff;
}

@media (max-width: 768px) {
    .upgrade-name {
        font-size: 1.1em;
    }
}

@media (max-width: 480px) {
    .upgrade-name {
        font-size: 1em;
    }
}

.upgrade-description {
    font-size: 0.9em;
    opacity: 0.8;
    margin-bottom: 10px;
    color: #cccccc;
}

@media (max-width: 768px) {
    .upgrade-description {
        font-size: 0.85em;
    }
}

@media (max-width: 480px) {
    .upgrade-description {
        font-size: 0.8em;
    }
}

.upgrade-cost {
    font-size: 1.1em;
    color: #ffffff;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 5px;
}

.upgrade-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

@media (max-width: 768px) {
    .upgrade-cost {
        font-size: 1em;
    }
    
    .upgrade-icon {
        width: 18px;
        height: 18px;
    }
}
}

@media (max-width: 480px) {
    .upgrade-cost {
        font-size: 0.9em;
    }
    
    .upgrade-icon {
        width: 16px;
        height: 16px;
    }
}
}

.upgrade-level {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #000000;
    border: 1px solid #ffffff;
    padding: 5px 10px;
    font-size: 0.8em;
    color: #ffffff;
}

/* Modal de autenticación */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000000;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    z-index: 2000;
    padding: 20px;
    box-sizing: border-box;
    overflow-y: auto;
}

.landing-container {
    background: transparent;
    border: none;
    padding: 40px;
    max-width: 1400px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.landing-header {
    text-align: center;
    margin-bottom: 20px;
}

.logo {
    max-width: 300px;
    height: auto;
    display: block;
    margin: 0 auto;
    filter: drop-shadow(0 0 20px rgba(149, 233, 240, 0.5));
    object-fit: contain;
}

.landing-subtitle {
    font-size: 1.2em;
    color: #95e9f0;
    margin: 10px 0 0 0;
    opacity: 0.8;
}

.landing-grid-simple {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 50px;
    align-items: start;
    justify-content: center;
    max-width: 1000px;
    margin: 0 auto;
}

.ranking-panel {
    display: flex;
    justify-content: center;
    align-items: start;
}

.login-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

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

.info-box {
    background: #111111;
    border: 1px solid #333333;
    padding: 20px;
    transition: all 0.3s ease;
}

.info-box:hover {
    border-color: #95e9f0;
    box-shadow: 0 0 15px rgba(149, 233, 240, 0.1);
}

.info-box h3 {
    color: #95e9f0;
    margin: 0 0 10px 0;
    font-size: 1.2em;
    font-weight: 700;
}

.info-box p {
    color: #cccccc;
    margin: 0;
    line-height: 1.5;
    font-size: 0.95em;
}

.ranking-highlight {
    border-color: #ffd700 !important;
    background: rgba(255, 215, 0, 0.05) !important;
}

.ranking-highlight:hover {
    border-color: #ffd700 !important;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.2) !important;
}

.ranking-prizes {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 15px 0;
}

.prize-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid #ffd700;
    border-radius: 5px;
}

.prize-item.first {
    background: rgba(255, 215, 0, 0.2);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.prize-position {
    font-weight: bold;
    color: #ffd700;
    font-size: 1.1em;
}

.prize-amount {
    font-weight: bold;
    color: #ffd700;
    font-size: 1.2em;
    text-shadow: 0 0 5px #ffd700;
}

.landing-features {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #333333;
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: #95e9f0;
}

.feature-icon {
    font-size: 2em;
    text-shadow: 0 0 10px #95e9f0;
}

.feature-text {
    font-size: 0.9em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Responsive para Landing Simplificada */
@media (max-width: 1000px) {
    .landing-grid-simple {
        grid-template-columns: 1fr;
        gap: 30px;
        max-width: 600px;
    }
    
    .logo {
        max-width: 250px;
    }
    
    .ranking-panel {
        justify-content: center;
    }
    
    .info-box {
        max-width: 400px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .modal {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .landing-container {
        padding: 20px;
        gap: 20px;
        min-height: auto;
    }
    
    .logo {
        max-width: 200px;
    }
    
    .landing-grid-simple {
        gap: 25px;
        max-width: 500px;
    }
    
    .auth-container {
        padding: 20px;
        max-width: 400px;
        margin: 0 auto;
    }
    
    .auth-container h2 {
        font-size: 1.5em;
    }
    
    .discord-link {
        width: 40px;
        height: 40px;
        padding: 10px;
    }
    
    .discord-icon {
        width: 18px;
        height: 18px;
    }
    
    .info-box {
        max-width: 450px;
        margin: 0 auto;
    }
    
    .ranking-prizes {
        gap: 12px;
    }
    
    .prize-item {
        padding: 12px 15px;
    }
}

@media (max-width: 480px) {
    .modal {
        padding: 10px;
        align-items: flex-start;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .landing-container {
        padding: 20px 10px;
        gap: 20px;
        min-height: auto;
    }
    
    .logo {
        max-width: 160px;
        width: auto;
        height: auto;
        display: block;
        margin: 0 auto 20px auto;
    }
    
    .landing-grid-simple {
        gap: 20px;
        max-width: 100%;
    }
    
    .auth-container {
        padding: 15px;
        max-width: 100%;
        width: 100%;
    }
    
    .auth-container h2 {
        font-size: 1.3em;
        margin-bottom: 20px;
    }
    
    .discord-link {
        width: 36px;
        height: 36px;
        padding: 8px;
        margin: 10px 0;
    }
    
    .discord-icon {
        width: 16px;
        height: 16px;
    }
    
    .info-box {
        padding: 15px;
        max-width: 100%;
        width: 100%;
    }
    
    .info-box h3 {
        font-size: 1.1em;
        margin-bottom: 10px;
    }
    
    .info-box p {
        font-size: 0.9em;
        line-height: 1.4;
    }
    
    .ranking-prizes {
        gap: 10px;
        margin: 15px 0;
    }
    
    .prize-item {
        padding: 10px 12px;
        font-size: 0.9em;
    }
    
    .prize-position, .prize-amount {
        font-size: 1em;
    }
    
    /* Mejorar tabs en móvil */
    .auth-tabs {
        margin-bottom: 20px;
    }
    
    .tab-btn {
        padding: 8px 16px;
        font-size: 1em;
    }
    
    /* Mejorar inputs en móvil */
    .tab-content input {
        padding: 12px;
        font-size: 1em;
        margin-bottom: 15px;
    }
    
    .tab-content button {
        padding: 12px;
        font-size: 1em;
    }
    
    /* Asegurar que el header se muestre correctamente */
    .landing-header {
        margin-bottom: 30px;
        width: 100%;
    }
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 50px var(--shine-color); }
    50% { box-shadow: 0 0 80px var(--gradient-shine); }
}

.auth-container {
    background: #111111;
    border: 2px solid #95e9f0;
    padding: 30px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 0 30px rgba(149, 233, 240, 0.2);
}

.auth-container h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.8em;
    color: #95e9f0;
    text-shadow: 0 0 10px #95e9f0;
}

/* Discord Link */
.discord-link {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #5865f2;
    color: white;
    text-decoration: none;
    padding: 12px;
    border-radius: 50%;
    margin: 15px auto;
    width: 44px;
    height: 44px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(88, 101, 242, 0.3);
}

.discord-link:hover {
    background: #4752c4;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(88, 101, 242, 0.4);
}

.discord-icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.auth-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.tab-btn {
    background: none;
    border: none;
    border-bottom: 1px solid transparent;
    color: #ffffff;
    font-family: var(--orbitron);
    font-size: 1.2em;
    padding: 10px 20px;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.3s ease;
}

.tab-btn.active {
    opacity: 1;
    border-bottom-color: #ffffff;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.tab-content input {
    width: 100%;
    padding: 15px;
    margin-bottom: 20px;
    background: #000000;
    border: 1px solid #666666;
    color: #ffffff;
    font-family: var(--orbitron);
    font-size: 1em;
    transition: border-color 0.3s ease;
}

.tab-content input:focus {
    outline: none;
    border-color: #ffffff;
}

.tab-content button {
    width: 100%;
    padding: 15px;
    background: #000000;
    border: 1px solid #ffffff;
    color: #ffffff;
    font-family: var(--orbitron);
    text-transform: uppercase;
    font-size: 1.2em;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tab-content button:hover {
    background: #ffffff;
    color: #000000;
}

/* Estado de guardado */
.save-status {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #000000;
    border: 1px solid #ffffff;
    padding: 10px 20px;
    color: #ffffff;
    font-family: var(--orbitron);
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

.save-status.show {
    opacity: 1;
}

.save-status.success {
    background: #000000;
    border-color: #00ff00;
    color: #00ff00;
}

.save-status.error {
    background: #000000;
    border-color: #ff0000;
    color: #ff0000;
}

.save-status.auto-save {
    background: #000000;
    border-color: #ffffff;
    color: #ffffff;
}

/* Indicador de guardado */
.save-indicator {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: #000000;
    border: 1px solid #00ff00;
    padding: 10px 15px;
    color: #00ff00;
    font-family: var(--orbitron);
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

.save-indicator.show {
    opacity: 1;
}

/* Floating Menu */
.floating-menu {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    background: #000000;
    border: 1px solid #ffffff;
    padding: 8px;
    z-index: 1000;
}

@media (max-width: 768px) {
    .floating-menu {
        gap: 12px;
        padding: 10px;
    }
}

@media (max-width: 480px) {
    .floating-menu {
        gap: 15px;
        padding: 12px;
        bottom: 15px;
    }
}

.menu-btn {
    position: relative;
    min-width: 100px;
    height: 40px;
    border: 1px solid #ffffff;
    background: #000000;
    color: #ffffff;
    font-size: 0.9em;
    font-family: var(--orbitron);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    white-space: nowrap;
    border-radius: 6px;
}

@media (max-width: 768px) {
    .menu-btn {
        min-width: 85px;
        height: 35px;
        font-size: 0.8em;
        padding: 0 12px;
    }
}

@media (max-width: 480px) {
    .menu-btn {
        min-width: 75px;
        height: 30px;
        font-size: 0.7em;
        padding: 0 10px;
    }
}

.menu-btn:hover {
    background: #ffffff;
    color: #000000;
    transform: translateY(-2px);
}

.menu-btn:active {
    transform: translateY(0);
}

.menu-btn::before {
    content: attr(title);
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%);
    background: #000000;
    color: #ffffff;
    border: 1px solid #ffffff;
    padding: 4px 8px;
    font-size: 0.7em;
    font-family: var(--orbitron);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    white-space: nowrap;
}

.menu-btn:hover::before {
    opacity: 1;
}

.menu-btn.active {
    background: #ffffff;
    color: #000000;
    border-color: #ffffff;
}

/* Responsive */
@media (max-width: 1200px) {
    .upgrades-panel {
        width: 300px;
        right: 10px;
    }
    
    .stats-panel-fixed {
        width: 380px;
        left: 10px;
    }
    
    .quantum-cookie {
        width: 150px;
        height: 150px;
    }
    
    .floating-menu {
        bottom: 10px;
        gap: 8px;
        padding: 6px;
    }
    
    .menu-btn {
        min-width: 80px;
        height: 32px;
        font-size: 0.75em;
        padding: 0 11px;
    }
}

@media (max-width: 768px) {
    .game-header {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }
    
    .stats {
        flex-direction: column;
        gap: 10px;
    }
    
    .upgrades-panel {
        width: 250px;
        right: 5px;
        top: 120px;
        padding: 10px;
    }
    
    .stats-panel-fixed {
        width: 350px;
        left: 5px;
        top: 120px;
        padding: 10px;
    }
    
    .quantum-cookie {
        width: 120px;
        height: 120px;
    }
    
    .upgrades-panel h3 {
        font-size: 1.2em;
        margin-bottom: 15px;
    }
    
    .upgrade-item {
        padding: 10px;
    }
    
    .floating-menu {
        bottom: 5px;
        gap: 6px;
        padding: 5px;
    }
    
    .menu-btn {
        min-width: 70px;
        height: 28px;
        font-size: 0.65em;
        padding: 0 9px;
    }
}


/* Scrollbar personalizado */
.upgrades-panel::-webkit-scrollbar {
    width: 8px;
}

.upgrades-panel::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
}

.upgrades-panel::-webkit-scrollbar-thumb {
    background: rgba(149, 233, 240, 0.5);
    border-radius: 10px;
    transition: background 0.3s ease;
}

.upgrades-panel::-webkit-scrollbar-thumb:hover {
    background: rgba(149, 233, 240, 0.8);
}

/* Firefox scrollbar */
.upgrades-panel {
    scrollbar-width: thin;
    scrollbar-color: rgba(149, 233, 240, 0.5) rgba(0, 0, 0, 0.3);
}

/* ===== ANIMATED SPACE BACKGROUND ===== */
.space-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, #0f0f23 0%, #000000 100%);
    overflow: hidden;
    z-index: 1;
}

/* Stars Layer 1 - Large stars */
.stars {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, #eee, transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(255,255,255,0.8), transparent),
        radial-gradient(1px 1px at 90px 40px, #fff, transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(255,255,255,0.6), transparent),
        radial-gradient(2px 2px at 160px 30px, #eee, transparent);
    background-repeat: repeat;
    background-size: 200px 100px;
    animation: sparkle 20s linear infinite;
}

/* Stars Layer 2 - Medium stars */
.stars2 {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(1px 1px at 50px 20px, #fff, transparent),
        radial-gradient(1px 1px at 80px 60px, rgba(255,255,255,0.7), transparent),
        radial-gradient(1px 1px at 120px 10px, #eee, transparent),
        radial-gradient(1px 1px at 150px 90px, rgba(255,255,255,0.5), transparent),
        radial-gradient(1px 1px at 180px 50px, #fff, transparent);
    background-repeat: repeat;
    background-size: 250px 120px;
    animation: sparkle 15s linear infinite reverse;
}

/* Stars Layer 3 - Small stars */
.stars3 {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(0.5px 0.5px at 30px 40px, rgba(255,255,255,0.8), transparent),
        radial-gradient(0.5px 0.5px at 70px 80px, #fff, transparent),
        radial-gradient(0.5px 0.5px at 110px 20px, rgba(255,255,255,0.6), transparent),
        radial-gradient(0.5px 0.5px at 140px 70px, #eee, transparent),
        radial-gradient(0.5px 0.5px at 170px 30px, rgba(255,255,255,0.4), transparent);
    background-repeat: repeat;
    background-size: 300px 150px;
    animation: sparkle 25s linear infinite;
}

/* Meteors */
.meteor {
    position: absolute;
    top: 0;
    left: -100px;
    width: 2px;
    height: 2px;
    background: linear-gradient(45deg, transparent, #fff, transparent);
    border-radius: 50%;
    box-shadow: 0 0 10px #fff, 0 0 20px #fff, 0 0 30px #fff;
    animation: meteor1 8s linear infinite;
}

.meteor::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100px;
    height: 1px;
    background: linear-gradient(90deg, #fff, transparent);
    transform: rotate(45deg);
    transform-origin: left;
}

.meteor2 {
    position: absolute;
    top: 0;
    left: -150px;
    width: 1px;
    height: 1px;
    background: linear-gradient(45deg, transparent, #95e9f0, transparent);
    border-radius: 50%;
    box-shadow: 0 0 8px #95e9f0, 0 0 16px #95e9f0, 0 0 24px #95e9f0;
    animation: meteor2 12s linear infinite;
    animation-delay: 4s;
}

.meteor2::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 80px;
    height: 1px;
    background: linear-gradient(90deg, #95e9f0, transparent);
    transform: rotate(45deg);
    transform-origin: left;
}

/* Nebula */
.nebula {
    position: absolute;
    top: 20%;
    right: 10%;
    width: 300px;
    height: 200px;
    background: radial-gradient(ellipse at center, 
        rgba(138, 43, 226, 0.1) 0%, 
        rgba(75, 0, 130, 0.05) 30%, 
        transparent 70%);
    border-radius: 50%;
    animation: nebula 20s ease-in-out infinite;
    filter: blur(2px);
}

/* Animations */
@keyframes sparkle {
    0% { transform: translateY(0px) translateX(0px); }
    100% { transform: translateY(-100px) translateX(-50px); }
}

@keyframes meteor1 {
    0% {
        transform: translateX(-100px) translateY(-100px);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateX(100vw) translateY(100vh);
        opacity: 0;
    }
}

@keyframes meteor2 {
    0% {
        transform: translateX(-150px) translateY(-150px);
        opacity: 0;
    }
    15% {
        opacity: 1;
    }
    85% {
        opacity: 1;
    }
    100% {
        transform: translateX(100vw) translateY(100vh);
        opacity: 0;
    }
}

@keyframes nebula {
    0%, 100% {
        transform: scale(1) rotate(0deg);
        opacity: 0.3;
    }
    50% {
        transform: scale(1.2) rotate(180deg);
        opacity: 0.6;
    }
}

/* Ensure content is above background */
.landing-container {
    position: relative;
    z-index: 10;
}