:root {
    --primary-color: #28a745;
    --secondary-color: #1e7e34;
    --accent-color: #d4af37;
    --dark-color: #0a1a0f;
    --light-color: #f8f9fa;
    --tab-height: 80px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Montserrat', 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

body {
    background: url('../img/background.webp') no-repeat center center fixed;
    background-size: cover;
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-attachment: fixed;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
    -webkit-font-smoothing: antialiased;
}

/* Partículas doradas */
.particle {
    position: absolute;
    background: radial-gradient(
        circle, 
        rgba(241, 196, 15, 0.8) 0%, 
        rgba(243, 156, 18, 0.6) 50%, 
        transparent 70%
    );
    border-radius: 50%;
    z-index: 0;
    animation: shine 4s infinite alternate;
    opacity: 0;
}

@keyframes shine {
    0%, 100% {
        opacity: 0;
        transform: scale(0.5);
    }
    50% {
        opacity: 1;
        transform: scale(1);
    }
}

.header {
    color: var(--accent-color);
    padding: 15px;
    text-align: center;
    position: relative;
    z-index: 0;
}

.header h1 {
    font-size: 3em;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    letter-spacing: 1px;
    margin: 10px 0;
    padding: 0;
}

/* Ajuste del título del header para pantallas pequeñas */
@media (max-height: 640px) {
    .header h1 {
        font-size: 2.2em;
        margin: 5px 0;
    }
    
    .header {
        padding: 10px;
    }
}

.titulo-metallico {
    text-transform: uppercase;
    background: linear-gradient(
        45deg,
        #d4af37,
        #f9f295,
        #e6bc5c,
        #f9f295,
        #d4af37
    );
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    background-size: 300% 300%;
    animation: metallic-shine 3s ease infinite;
    text-shadow: 0 0 15px rgba(212, 175, 55, 0.7);
}

@keyframes metallic-shine {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 200% 50%;
    }
}

.content {
    position: relative;
    flex: 1;
    min-height: 100vh;
    overflow: hidden;
    overflow-y: auto;
    padding-bottom: calc(var(--tab-height) + 70px + constant(safe-area-inset-bottom));
    padding-bottom: calc(var(--tab-height) + 70px + env(safe-area-inset-bottom));
    justify-content: center;
    align-items: center;
}

.tab-bar {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    height: var(--tab-height);
    padding-top: 12px;
    display: flex;
    border-radius: 38px;
    z-index: 100;
    width: 95%;
    max-width: 500px;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    padding: 12px 10px 12px;
    margin-bottom: 10px;
}

.tab-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(
        circle at center,
        rgba(255, 255, 255, 0.4) 0%,
        rgba(255, 255, 255, 0.1) 70%
    );
    z-index: -1;
}

.tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--light-color);
    opacity: 0.7;
    text-decoration: none;
    font-size: 16px;
    transition: all 0.3s ease;
    padding-top: 5px;
    padding-bottom: 5px;
    position: relative;
    z-index: 2;
}

.tab span:first-child {
    margin-bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.tab span:last-child {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
    margin-top: 2px;
}

.tab.active span:last-child {
    color: var(--accent-color);
    text-shadow: 0 0 8px rgba(212, 175, 55, 0.5);
    font-weight: bold;
}

.tab.active {
    opacity: 1;
    transform: translateY(-6px);
}

.tab-icon {
    width: 28px;
    height: 28px;
    filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.5));
    transition: all 0.3s ease;
}

.page {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: calc(100% - var(--tab-height));
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    transition: all 0.4s ease;
    overflow-y: auto;
    z-index: 1;
}

.page.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
    z-index: 2;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.games-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin: 15px;
    margin-top: 20px;
}

.game-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
    transition: transform 0.2s;
    border: 1px solid rgba(212, 175, 55, 0.3);
    backdrop-filter: blur(2px);
}

.game-card:active {
    transform: scale(0.98);
}

.game-icon {
    width: 136px;
    height: 136px;
    filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.8));
    transition: transform 0.3s ease;
    object-fit: contain;
}

.game-card:hover .game-icon {
    transform: scale(1.05);
}

.game-icon path, .game-icon rect, .game-icon circle {
    transition: all 0.3s ease;
}

.game-card:hover .game-icon path,
.game-card:hover .game-icon rect,
.game-card:hover .game-icon circle {
    filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.9));
}

.game-image {
    position: relative;
    height: 140px;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
    overflow: hidden;
}

.game-info {
    padding: 12px;
}

.game-title {
    color: #eac757;
    font-weight: bold;
    margin-bottom: 5px;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.7);
}

.game-desc {
    color: var(--light-color);
    font-size: 12px;
}

.profile-header {
    text-align: center;
    margin-bottom: 20px;
    padding-top: 15px;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin: 0 auto 10px;
    background-color: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    overflow: hidden;
    border: 2px solid var(--accent-color);
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-name {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 5px;
    color: var(--accent-color);
}

.profile-username {
    color: var(--light-color);
    opacity: 0.8;
    margin-bottom: 15px;
}

.profile-stats {
    display: flex;
    justify-content: space-around;
    margin: 15px 0;
}

.stat {
    text-align: center;
    padding: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    min-width: 80px;
    border: 1px solid rgba(212, 175, 55, 0.3);
    backdrop-filter: blur(2px);
}

.stat-value {
    font-weight: bold;
    font-size: 18px;
    color: var(--accent-color);
}

.stat-label {
    font-size: 12px;
    color: var(--light-color);
    opacity: 0.8;
}

@keyframes glow {
    0% {
        text-shadow: 
            0 0 15px rgba(255, 215, 0, 0.9),
            0 0 30px rgba(255, 215, 0, 0.8);
    }
    100% {
        text-shadow: 
            0 0 25px rgba(255, 215, 0, 1),
            0 0 50px rgba(255, 215, 0, 0.9);
    }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

#home-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

/* Ajuste del padding del home-page para pantallas pequeñas */
@media (max-height: 640px) {
    #home-page {
        padding: 10px;
        padding-bottom: 100px;
    }
}

.welcome-container {
    position: absolute;
    top: 5%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    text-align: center;
    z-index: 1;
}

/* Ajuste del contenedor de bienvenida para pantallas pequeñas */
@media (max-height: 640px) {
    .welcome-container {
        top: 3%;
    }
}

.welcome-message {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    color: white;
    text-align: center;
    margin: 0 auto 25px;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.8);
    font-size: 1.9em;
    max-width: 90%;
    padding: 0 15px;
}

/* Ajuste del mensaje de bienvenida para pantallas pequeñas */
@media (max-height: 640px) {
    .welcome-message {
        font-size: 1.4em;
        margin: 0 auto 10px;
    }
}

/* Sistema de Novedades */
.news-container {
    width: 90%;
    max-width: 500px;
    margin: 15px auto;
    margin-top: 5vh;
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 15px;
    z-index: 1;
    padding: 10px 5px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(212, 175, 55, 0.6) rgba(255, 255, 255, 0.1);
}

/* Ajuste del contenedor de noticias para pantallas pequeñas */
@media (max-height: 640px) {
    .news-container {
        margin-top: 2vh;
        margin-bottom: 10px;
        gap: 10px;
        padding: 5px;
    }
}

.news-container::-webkit-scrollbar {
    height: 6px;
}

.news-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.news-container::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.6);
    border-radius: 3px;
}

.news-container::-webkit-scrollbar-thumb:hover {
    background: rgba(212, 175, 55, 0.8);
}

.news-item {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(212, 175, 55, 0.4);
    border-radius: 15px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    animation: newsSlideIn 0.6s ease;
    min-width: 280px;
    max-width: 280px;
    scroll-snap-align: center;
    flex-shrink: 0;
}

/* Ajuste de las tarjetas de noticias para pantallas pequeñas */
@media (max-height: 640px) {
    .news-item {
        padding: 10px;
        gap: 6px;
        min-width: 220px;
        max-width: 220px;
    }
    
    .news-icon {
        font-size: 1.8em !important;
    }
    
    .news-icon svg {
        width: 1.8em !important;
        height: 1.8em !important;
    }
    
    .news-title {
        font-size: 0.9em !important;
    }
    
    .news-description {
        font-size: 0.75em !important;
        line-height: 1.3;
    }
}

.news-item:nth-child(1) {
    animation-delay: 0.1s;
}

.news-item:nth-child(2) {
    animation-delay: 0.3s;
}

.news-item:nth-child(3) {
    animation-delay: 0.5s;
}

@keyframes newsSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.news-item:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(212, 175, 55, 0.6);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.3);
}

.news-icon {
    font-size: 2.5em;
    text-align: center;
    filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.6));
    animation: newsIconPulse 2s infinite alternate;
}

.news-icon svg {
    color: var(--accent-color);
    vertical-align: middle;
}

@keyframes newsIconPulse {
    0% {
        transform: scale(1);
    }
    100% {
        transform: scale(1.1);
    }
}

.news-content {
    flex: 1;
    text-align: center;
}

.news-title {
    color: var(--accent-color);
    font-size: 1em;
    font-weight: bold;
    margin-bottom: 8px;
    text-shadow: 0 0 8px rgba(212, 175, 55, 0.5);
    line-height: 1.3;
}

.news-description {
    color: var(--light-color);
    font-size: 0.85em;
    line-height: 1.4;
    opacity: 0.9;
}

@media (max-width: 480px) {
    .news-container {
        margin-top: 4vh;
        width: 95%;
    }
    
    .news-item {
        padding: 12px;
        gap: 8px;
        min-width: 250px;
        max-width: 250px;
    }
    
    .news-icon {
        font-size: 2em;
    }
    
    .news-icon svg {
        width: 1.2em !important;
        height: 1.2em !important;
    }
    
    .news-title {
        font-size: 0.95em;
    }
    
    .news-description {
        font-size: 0.8em;
    }
}

.button-container {
    display: flex;
    justify-content: center;
    margin-top: 5vh;
    width: 100%;
    padding-bottom: 20px;
}

/* Ajuste para pantallas pequeñas */
@media (max-height: 640px) {
    .button-container {
        margin-top: 2vh;
        padding-bottom: 10px;
    }
}

.metallic-border {
    position: relative;
    display: flex;
    justify-content: center;
    margin: 20px auto;
    align-items: center;
    border-radius: 57px;
    overflow: visible; /* CAMBIADO PARA PERMITIR QUE SE VEA EL PUNTO */
    z-index: 10;
    padding: 3px;
    background: linear-gradient(
        45deg,
        #d4af37,
        #f9f295,
        #e6bc5c,
        #f9f295,
        #d4af37
    );
    background-size: 300% 300%;
    animation: metallic-shine 3s ease infinite;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.7);
}

.start-button {
    position: relative;
    padding: 20px 50px;
    font-size: 1.8em;
    font-weight: bold;
    color: white;
    background: linear-gradient(to bottom, #115C3E, #07271A);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    outline: none;
    z-index: 10;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.95;
}

/* Ajuste del botón de misiones para pantallas pequeñas */
@media (max-height: 640px) {
    .start-button {
        padding: 14px 35px;
        font-size: 1.3em;
        letter-spacing: 1px;
    }
    
    .ranking-icon.missions-icon {
        width: 36px !important;
        height: 36px !important;
    }
}

.start-button span:not(.start-button-notification-dot) {
    position: relative;
    z-index: 2;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

/* Punto de notificación del botón de Misiones Diarias */
.button-container .metallic-border .start-button-notification-dot {
    position: absolute !important;
    top: -5px !important;
    left: 8px !important;
    width: 18px !important;
    height: 18px !important;
    background: #ff4444 !important;
    border: 2px solid white !important;
    border-radius: 50% !important;
    display: none;
    animation: pulse 2s infinite;
    box-shadow: 0 0 10px rgba(255, 68, 68, 0.8) !important;
    z-index: 30 !important;
    text-shadow: none !important;
}

.start-button-notification-dot[style*="display: block"] {
    display: block !important;
}

#logocintillo {
    margin: 20px;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 1px solid var(--accent-color);
    box-shadow: 
        0 0 20px rgba(255, 215, 0, 0.9),
        inset 0 0 15px rgba(255, 255, 255, 0.7);
    background: radial-gradient(
        circle, 
        rgba(255, 215, 0, 0.9) 0%,
        rgba(218, 165, 32, 0.9) 100%
    );
    transition: all 0.3s ease;
    cursor: pointer;
    animation: logoPulse 2s infinite alternate;
    filter: brightness(1.2);
}

#logocintillo:active {
    transform: scale(0.95);
}

/* Ajuste del logo para pantallas pequeñas - solo en home page */
@media (max-height: 640px) {
    body.on-home-page #logocintillo {
        width: 100px;
        height: 100px;
        margin: 10px;
    }
}

@keyframes logoPulse {
    0% {
        transform: scale(1);
        box-shadow: 
            0 0 20px rgba(255, 215, 0, 0.9),
            inset 0 0 15px rgba(255, 255, 255, 0.7);
    }
    100% {
        transform: scale(1.05);
        box-shadow: 
            0 0 30px rgba(255, 215, 0, 1),
            inset 0 0 20px rgba(255, 255, 255, 0.9);
    }
}

@keyframes logoSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.logo-loading {
    animation: logoSpin 1.5s linear infinite !important;
}

.rcoin-button {
    position: relative;
    padding: 12px 30px;
    font-size: 1.2em;
    font-weight: bold;
    color: white;
    background: linear-gradient(to bottom, #115C3E, #07271A);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    outline: none;
    z-index: 10;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    width: 100%;
    text-align: center;
    display: block;
    margin: auto;
    text-shadow: 0 0 5px rgba(0,0,0,0.5);
}

.rcoin-button span {
    position: relative;
    z-index: 2;
}

.rcoin-button:active {
    transform: scale(0.98);
}

.top-header {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
    position: relative;
}

.back-button {
    position: absolute;
    left: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.back-button:active {
    transform: scale(0.9);
}

.top-header h2 {
    flex: 1;
    text-align: center;
    margin: 0;
}

.top-container {
    padding: 15px;
}

.top-item {
    display: flex;
    align-items: center;
    padding: 15px;
    margin: 10px 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(212, 175, 55, 0.2);
    transition: transform 0.2s;
    position: relative; /* Añadido para posicionamiento relativo */
}

.top-item:active {
    transform: scale(0.98);
}

.top-rank {
    width: 30px;
    font-size: 18px;
    font-weight: bold;
    color: var(--accent-color);
    text-align: center;
    flex-shrink: 0; /* Evita que se reduzca */
}

.top-name {
    flex: 1;
    color: var(--light-color);
    font-size: 16px;
    margin-left: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Nuevo estilo para las puntuaciones */
.top-marks {
    min-width: 80px; /* Ancho mínimo para alinear verticalmente */
    text-align: right;
    font-weight: bold;
    color: var(--accent-color);
    margin-right: 10px;
    flex-shrink: 0; /* Evita que se reduzca */
}

/* Ajustar el espacio para los primeros 3 puestos que tienen iconos */
.top-gold .top-marks,
.top-silver .top-marks,
.top-bronze .top-marks {
    margin-right: 5px; /* Menos espacio antes del icono */
}

.top-gold {
    background: linear-gradient(
        135deg, 
        rgba(212, 175, 55, 0.3) 0%, 
        rgba(212, 175, 55, 0.15) 100%
    );
    border: 2px solid rgba(255, 215, 0, 0.7);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

.top-silver {
    background: linear-gradient(
        135deg, 
        rgba(192, 192, 192, 0.3) 0%, 
        rgba(192, 192, 192, 0.15) 100%
    );
    border: 2px solid rgba(192, 192, 192, 0.7);
    box-shadow: 0 0 15px rgba(192, 192, 192, 0.5);
}

.top-bronze {
    background: linear-gradient(
        135deg, 
        rgba(205, 127, 50, 0.3) 0%, 
        rgba(205, 127, 50, 0.15) 100%
    );
    border: 2px solid rgba(205, 127, 50, 0.7);
    box-shadow: 0 0 15px rgba(205, 127, 50, 0.5);
}

.top-gold, .top-silver, .top-bronze {
    animation: topPulse 2s infinite alternate;
}

@keyframes topPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
    }
    100% {
        transform: scale(1.02);
        box-shadow: 0 0 25px rgba(255, 215, 0, 0.8);
    }
}

.top-icon {
    margin-left: 5px;
    font-size: 20px;
    animation: shineIcon 2s infinite alternate;
    flex-shrink: 0; /* Evita que se reduzca */
}

@keyframes shineIcon {
    0% {
        text-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
    }
    100% {
        text-shadow: 0 0 15px rgba(255, 255, 255, 1);
    }
}

.medal-icon, .trophy-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.8));
}

.top-icon img {
    width: 30px;
    height: 30px;
    animation: shineIcon 2s infinite alternate;
}

.banka-user-info {
    display: flex;
    padding: 20px;
    align-items: center;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

.user-details {
    flex: 1;
    padding: 0 15px;
}

.user-balances {
    text-align: right;
    min-width: 120px;
}

.balance-item {
    margin-bottom: 5px;
    font-size: 14px;
    color: white;
    font-weight: bold;
}

.balance-label {
    font-weight: bold;
    color: var(--accent-color);
}

.balance-value {
    font-weight: bold;
    color: white;
    display: inline-flex;
    align-items: center;
}

.balance-gain {
    color: #28a745;
    font-size: 0.9em;
    font-weight: bold;
    display: block;
    margin-top: 5px;
    margin-left: 5px;
}

.currency-icon {
    width: 16px;
    height: 16px;
    margin-right: 5px;
    vertical-align: middle;
    filter: drop-shadow(0 0 3px rgba(212, 175, 55, 0.7));
}

.banka-actions {
    display: flex;
    justify-content: space-around;
    padding: 20px;
}

.action-button {
    padding: 15px 25px;
    font-size: 1.1em;
    font-weight: bold;
    color: white;
    background: linear-gradient(to bottom, #115C3E, #07271A);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    width: 45%;
    text-align: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.banka-bundles {
    display: flex;
    justify-content: space-around;
    padding: 0 15px 20px;
}

.bundle {
    width: 30%;
    text-align: center;
    padding: 15px 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.bundle-amount {
    font-size: 1.8em;
    font-weight: bold;
    color: var(--accent-color);
    margin-bottom: 5px;
}

.bundle-label {
    font-size: 0.9em;
}

.expandable-section {
    position: fixed;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(10, 26, 15, 0.98);
    padding: 20px;
    border: 3px solid var(--accent-color);
    border-radius: 15px;
    z-index: 1000;
    display: none;
    width: 90%;
    max-width: 400px;
    max-height: 90vh;/*70vh*/
    overflow-y: auto;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
}

.expandable-section.active {
    display: block;
    animation: fadeIn 0.3s ease;
    max-height: 90vh;/*70vh*/
}

.expandable-title {
    text-align: center;
    font-size: 1.4em;
    color: var(--accent-color);
    margin-bottom: 10px;
    font-weight: bold;
}

.balance-info {
    text-align: center;
    margin-bottom: 15px;
    font-size: 1em;
    font-weight: bold;
    color: white;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 5px;
}

.amount-control {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 15px 0;
    gap: 15px;
}

.amount-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--accent-color);
    color: white;
    font-size: 1.5em;
    font-weight: bold;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
}

.amount-btn:active {
    transform: scale(0.95);
}

.amount-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.amount-input {
    width: 120px;
    height: 60px;
    text-align: center;
    font-size: 2em;
    font-weight: bold;
    background: rgba(255, 255, 255, 0.1);
    border: 3px solid var(--accent-color);
    border-radius: 15px;
    color: var(--accent-color);
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
    -moz-appearance: textfield;
}

.amount-input::-webkit-outer-spin-button,
.amount-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.amount-input:focus {
    outline: none;
    border-color: #ffd700;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

.expandable-actions {
    display: flex;
    justify-content: space-around;
    position: relative;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(10, 26, 15, 0.95);
    padding: 10px 0;
    z-index: 1001;
    margin-top: 15px;
    border-top: 1px solid rgba(212, 175, 55, 0.3);
}

.action-cancel, .action-ok {
    padding: 12px 25px;
    font-size: 1.1em;
    border-radius: 30px;
    border: none;
    cursor: pointer;
    flex: 1;
    transition: all 0.2s ease;
}

.action-cancel {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.action-ok {
    background: linear-gradient(to bottom, #28a745, #1e7e34);
    color: white;
}

.jackpot-indicator {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.9), rgba(184, 134, 11, 0.9));
    border: 2px solid gold;
    border-radius: 8px;
    padding: 5px 8px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    z-index: 5;
}

.jackpot-label {
    display: block;
    font-size: 10px;
    font-weight: bold;
    color: #2c1b0a;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.jackpot-value {
    display: block;
    font-size: 12px;
    font-weight: bold;
    color: white;
    text-shadow: 0 0 3px rgba(0, 0, 0, 0.7);
}

.jackpot-indicator::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        45deg,
        transparent 0%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 100%
    );
    border-radius: 6px;
}

.season-counter {
    border-radius: 10px;
    padding: 8px 12px;
    margin: 8px 15px;
    margin-top: 5px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

.season-counter::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent, 
        var(--accent-color), 
        transparent);
    animation: seasonShine 3s infinite;
}

@keyframes seasonShine {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

.season-compact {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.season-expanded {
    display: none;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(212, 175, 55, 0.3);
}

.season-counter.expanded {
    padding: 12px;
}

.season-counter.expanded .season-expanded {
    display: block;
}

.season-counter.expanded .expand-icon {
    transform: rotate(360deg);
}

.expand-icon {
    font-size: 0.8rem;
    color: var(--accent-color);
    transition: transform 0.3s ease;
    margin-left: 5px;
}

.season-info {
    margin-bottom: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
}

.season-label {
    font-size: 0.75rem;
    color: var(--light-color);
    opacity: 0.8;
}

.season-name {
    font-size: 0.85rem;
    font-weight: bold;
    color: var(--accent-color);
    text-shadow: 0 0 5px rgba(212, 175, 55, 0.4);
}

.countdown-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.countdown-label {
    font-size: 0.75rem;
    color: var(--light-color);
    opacity: 0.8;
    margin-bottom: 8px;
}

.countdown-timer {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.time-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 40px;
}

.time-value {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--accent-color);
    text-shadow: 0 0 6px rgba(212, 175, 55, 0.5);
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    padding: 3px;
    width: 35px;
    text-align: center;
    line-height: 1.2;
}

.time-label {
    font-size: 0.6rem;
    color: var(--light-color);
    opacity: 0.8;
    margin-top: 3px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.countdown-timer.urgent .time-value {
    animation: blink 1.5s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.page:not(#games-page) .season-counter {
    display: none;
}

.exchange-rate-info {
    text-align: center;
    margin-bottom: 10px;
    padding: 5px;
    background: rgba(212, 175, 55, 0.1);
    border-radius: 5px;
    border: 1px solid rgba(212, 175, 55, 0.3);
    color: #d4af37;
    font-weight: bold;
}

.rcoin-button.with-ranking-icon {
    position: relative;
    padding-right: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rcoin-button.with-ranking-icon span:first-child {
    flex: 1;
    text-align: center;
}

.ranking-icon {
    position: absolute;
    top: -1px;
    right: 3px;
    width: 46px;
    height: 46px;
    filter: drop-shadow(0 0 3px rgba(212, 175, 55, 0.7));
    transition: all 0.3s ease;
}

.ranking-icon.missions-icon {
    width: 46px;
    height: 46px;
    color: var(--accent-color);
}

.ranking-icon.missions-icon path {
    fill: var(--accent-color);
}

.rcoin-button.with-ranking-icon:active .ranking-icon {
    transform: scale(0.9);
}

body:not(.on-home-page) .header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 5px 15px;
    height: 60px;
}

body:not(.on-home-page) #logocintillo {
    width: 35px;
    height: 35px;
    transition: all 0.3s ease;
    margin-right: 10px;
}

body:not(.on-home-page) .header h1 {
    display: none;
}

body.shrink-logo #logocintillo {
    animation: shrinkLogo 0.3s ease forwards;
}

body.grow-logo #logocintillo {
    animation: growLogo 0.3s ease forwards;
}

@keyframes shrinkLogo {
    from {
        width: 140px;
        height: 140px;
    }
    to {
        width: 35px;
        height: 35px;
    }
}

@keyframes growLogo {
    from {
        width: 35px;
        height: 35px;
    }
    to {
        width: 140px;
        height: 140px;
    }
}

/* Ajuste de animaciones para pantallas pequeñas */
@media (max-height: 640px) {
    @keyframes shrinkLogo {
        from {
            width: 100px;
            height: 100px;
        }
        to {
            width: 35px;
            height: 35px;
        }
    }
    
    @keyframes growLogo {
        from {
            width: 35px;
            height: 35px;
        }
        to {
            width: 100px;
            height: 100px;
        }
    }
}

/* Ajuste de animaciones para pantallas muy pequeñas */
@media (max-height: 600px) and (max-width: 400px) {
    @keyframes shrinkLogo {
        from {
            width: 80px;
            height: 80px;
        }
        to {
            width: 35px;
            height: 35px;
        }
    }
    
    @keyframes growLogo {
        from {
            width: 35px;
            height: 35px;
        }
        to {
            width: 80px;
            height: 80px;
        }
    }
}

.sobretodo {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: none;
}

.dialog-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 1001;
    width: 90%;
    max-width: 400px;
    display: none;
}

.dialog-title {
    margin-top: 0;
    color: #333;
}

.dialog-message {
    color: black;
    margin-bottom: 20px;
}

.dialog-input {
    width: 100%;
    padding: 8px;
    margin-bottom: 15px;
    box-sizing: border-box;
}

.dialog-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.dialog-button {
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.dialog-button-primary {
    background-color: #4CAF50;
    color: white;
}

.dialog-button-secondary {
    background-color: #f44336;
    color: white;
}

body.section-expanded::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: -1000;
    display: block;
}

body.keyboard-visible {
    position: fixed;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

body.keyboard-visible .header,
body.keyboard-visible .tab-bar,
body.keyboard-visible .banka-actions,
body.keyboard-visible .banka-bundles,
body.keyboard-visible .banka-user-info,
body.keyboard-visible .top-header {
    display: none !important;
}

@supports (-webkit-overflow-scrolling: touch) {
    body.keyboard-visible .expandable-section.active {
        position: fixed;
        height: 100%;
        max-height: 60vh;
        bottom: 36vh;
    }
    
    .amount-input {
        font-size: 16px !important;
    }
}

@media (max-width: 768px) {
    .expandable-section.active {
        position: fixed;
    }
    
    .amount-input {
        font-size: 16px !important;
    }
}

@media (max-width: 480px) {
    .welcome-message {
        font-size: 1.5em;
        margin-bottom: 15px;
    }
}

/* Media queries combinadas para pantallas muy pequeñas como Samsung A3 */
@media (max-height: 600px) and (max-width: 400px) {
    .header h1 {
        font-size: 1.8em !important;
    }
    
    body.on-home-page #logocintillo {
        width: 80px !important;
        height: 80px !important;
        margin: 8px !important;
    }
    
    .welcome-message {
        font-size: 1.2em !important;
        margin-bottom: 8px !important;
    }
    
    .news-container {
        margin-top: 1vh !important;
        margin-bottom: 5px !important;
    }
    
    .news-item {
        padding: 8px !important;
        min-width: 200px !important;
        max-width: 200px !important;
    }
    
    .news-icon {
        font-size: 1.5em !important;
    }
    
    .news-icon svg {
        width: 1.5em !important;
        height: 1.5em !important;
    }
    
    .news-title {
        font-size: 0.85em !important;
    }
    
    .news-description {
        font-size: 0.7em !important;
    }
    
    .button-container {
        margin-top: 1vh !important;
        padding-bottom: 5px !important;
    }
    
    .start-button {
        padding: 12px 28px !important;
        font-size: 1.1em !important;
    }
    
    .ranking-icon.missions-icon {
        width: 32px !important;
        height: 32px !important;
    }
    
    #home-page {
        padding: 5px !important;
        padding-bottom: 110px !important;
    }
}

@media (max-width: 400px) {
    .game-card {
        min-width: 130px;
    }
    .stat {
        min-width: 70px;
    }
}

@media (max-width: 350px) {
    .tab span:last-child {
        font-size: 12px;
    }
}

@media (max-height: 700px) {
    .content {
        padding-bottom: calc(var(--tab-height) + 90px + constant(safe-area-inset-bottom));
        padding-bottom: calc(var(--tab-height) + 90px + env(safe-area-inset-bottom));
    }
}

@media (max-height: 640px) {
    .content {
        padding-bottom: calc(var(--tab-height) + 100px + constant(safe-area-inset-bottom));
        padding-bottom: calc(var(--tab-height) + 100px + env(safe-area-inset-bottom));
    }
}

@media (max-height: 600px) {
    .content {
        padding-bottom: calc(var(--tab-height) + 110px + constant(safe-area-inset-bottom));
        padding-bottom: calc(var(--tab-height) + 110px + env(safe-area-inset-bottom));
    }
}

@media (max-height: 500px) {
    .expandable-section {
        max-height: 85vh;
        padding: 15px;
    }
    
    .expandable-section.active {
        top: 45% !important; /*45%*/
    }
}

@media (max-width: 350px) {
    .expandable-section {
        width: 100%; /*95*/
        padding: 2px;/*15px*/
    }
    
    .amount-input {
        width: 100px;
        height: 100px;/*50px*/
        font-size: 1.8em;
    }
    
    .amount-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2em;
    }
}

@media (max-width: 480px) {
    .season-counter {
        padding: 6px 10px;
        margin: 6px 10px;
    }
    
    .season-counter.expanded {
        padding: 10px;
    }
    
    .countdown-timer {
        gap: 5px;
    }
    
    .time-unit {
        min-width: 35px;
    }
    
    .time-value {
        font-size: 1.1rem;
        width: 30px;
        padding: 2px;
    }
    
    .time-label {
        font-size: 0.55rem;
    }
    
    .season-label {
        font-size: 0.7rem;
    }
    
    .season-name {
        font-size: 0.8rem;
    }
}

@media (max-width: 350px) {
    .season-compact {
        flex-direction: column;
        gap: 3px;
    }
    
    .countdown-timer {
        gap: 4px;
    }
    
    .time-unit {
        min-width: 32px;
    }
    
    .time-value {
        font-size: 1rem;
        width: 28px;
    }
    
    .time-label {
        font-size: 0.5rem;
    }
}

@media (max-width: 400px) {
    .jackpot-indicator {
        padding: 4px 6px;
    }
    
    .jackpot-label {
        font-size: 9px;
    }
    
    .jackpot-value {
        font-size: 11px;
    }
}

@media (min-width: 400px) {
    .balance-info {
        flex-direction: row;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .dialog-buttons {
        flex-direction: column;
    }
    .dialog-button {
        width: 100%;
    }
}

/* Botón de misiones en el header */
.missions-button {
    position: absolute;
    right: 20px;
    top: 10px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(212, 175, 55, 0.2);
    border: 1px solid var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.missions-button svg {
    width: 20px;
    height: 20px;
    color: var(--accent-color);
}

.missions-button:active {
    transform: scale(0.95);
}

/* Punto de notificación */
.mission-notification-dot {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 12px;
    height: 12px;
    background: #ff4444;
    border: 2px solid var(--dark-color);
    border-radius: 50%;
    display: none;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

/* Modal de misiones */
.missions-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    backdrop-filter: blur(5px);
}

.missions-modal.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.missions-content {
    background: linear-gradient(135deg, rgba(10, 26, 15, 0.95), rgba(30, 126, 52, 0.1));
    border: 3px solid var(--accent-color);
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    position: relative;
}

.missions-header {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
}

.missions-header h2 {
    font-size: 1.8em;
    margin: 0;
}

.close-missions {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--accent-color);
    cursor: pointer;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-missions:hover {
    background: rgba(212, 175, 55, 0.2);
}

/* Lista de misiones */
.missions-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.mission-item {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 12px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.mission-item.completed {
    background: rgba(40, 167, 69, 0.2);
    border-color: rgba(40, 167, 69, 0.5);
}

.mission-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.mission-info {
    flex: 1;
}

.mission-title {
    color: var(--accent-color);
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 1.1em;
}

.mission-description {
    color: var(--light-color);
    font-size: 0.9em;
    opacity: 0.9;
}

.mission-reward {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--accent-color);
    font-weight: bold;
    white-space: nowrap;
}

.reward-icon {
    width: 20px;
    height: 20px;
    filter: drop-shadow(0 0 3px rgba(212, 175, 55, 0.7));
}

.mission-progress {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    overflow: hidden;
}

.mission-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-color), #ffd700);
    border-radius: 3px;
    transition: width 0.5s ease;
    width: 0%;
}

.mission-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mission-status {
    font-size: 0.85em;
    color: var(--light-color);
}

.mission-claim-btn {
    padding: 8px 20px;
    background: linear-gradient(to bottom, #28a745, #1e7e34);
    color: white;
    border: none;
    border-radius: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.6;
    pointer-events: none;
}

.mission-claim-btn.available {
    opacity: 1;
    pointer-events: all;
    box-shadow: 0 0 10px rgba(40, 167, 69, 0.5);
}

.mission-claim-btn:active {
    transform: scale(0.95);
}

.mission-claim-btn.claimed {
    background: linear-gradient(to bottom, #6c757d, #495057);
    opacity: 0.7;
    cursor: not-allowed;
}

.missions-footer {
    text-align: center;
    padding-top: 15px;
    border-top: 1px solid rgba(212, 175, 55, 0.3);
}

.missions-reset-time {
    color: var(--light-color);
    font-size: 0.85em;
    opacity: 0.8;
    margin: 0;
}

/* Ajustes responsivos */
@media (max-width: 480px) {
    .missions-content {
        padding: 15px;
        width: 95%;
    }
    
    .mission-header {
        flex-direction: column;
        gap: 10px;
    }
    
    .mission-reward {
        align-self: flex-end;
    }
}

body:not(.on-home-page) .missions-button {
    right: 55px;
    top: 12px;
}

/* ========================================== */
/* SISTEMA DE LOGROS */
/* ========================================== */

/* Modal de logros */
.achievements-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.achievements-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.achievements-content {
    background: linear-gradient(135deg, rgba(10, 26, 15, 0.95), rgba(30, 126, 52, 0.95));
    border: 2px solid var(--accent-color);
    border-radius: 20px;
    padding: 20px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
}

.achievements-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(212, 175, 55, 0.3);
}

.achievements-header h2 {
    margin: 0;
    font-size: 1.8em;
}

.close-achievements {
    background: none;
    border: none;
    color: var(--accent-color);
    font-size: 2em;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-achievements:hover {
    background: rgba(212, 175, 55, 0.2);
    transform: rotate(90deg);
}

/* Categorías de logros */
.achievements-categories {
    display: flex;
    gap: 5px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 10px 0;
    margin-bottom: 15px;
    scrollbar-width: thin;
    scrollbar-color: rgba(212, 175, 55, 0.6) rgba(255, 255, 255, 0.1);
    -webkit-overflow-scrolling: touch;
}

.achievements-categories::-webkit-scrollbar {
    height: 4px;
}

.achievements-categories::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

.achievements-categories::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.6);
    border-radius: 2px;
}

.category-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 12px;
    color: var(--light-color);
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    min-width: 70px;
    flex-shrink: 0;
}

.category-tab:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(212, 175, 55, 0.5);
}

.category-tab.active {
    background: linear-gradient(to bottom, rgba(212, 175, 55, 0.3), rgba(212, 175, 55, 0.1));
    border-color: var(--accent-color);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

.category-icon {
    font-size: 1.5em;
    filter: drop-shadow(0 0 5px rgba(212, 175, 55, 0.5));
}

.category-tab span:last-child {
    font-size: 0.75em;
    font-weight: 500;
}

/* Lista de logros */
.achievements-list {
    overflow-y: auto;
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
    padding: 10px 5px;
    scrollbar-width: thin;
    scrollbar-color: rgba(212, 175, 55, 0.6) rgba(255, 255, 255, 0.1);
}

.achievements-list::-webkit-scrollbar {
    width: 6px;
}

.achievements-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.achievements-list::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.6);
    border-radius: 3px;
}

/* Tarjeta de logro */
.achievement-card {
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(212, 175, 55, 0.3);
    border-radius: 12px;
    padding: 12px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: visible;
    min-height: 200px;
}

.achievement-card:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(212, 175, 55, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.achievement-card.unlocked {
    border-color: var(--accent-color);
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.15), rgba(255, 215, 0, 0.05));
}

.achievement-card.locked {
    opacity: 0.7;
    filter: grayscale(0.6);
}

.achievement-card.locked .achievement-icon {
    opacity: 0.5;
}

/* Cinta de desbloqueado */
.achievement-card.unlocked::before {
    content: '✓';
    position: absolute;
    top: 6px;
    right: 6px;
    background: var(--accent-color);
    color: var(--dark-color);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.75em;
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.7);
    z-index: 10;
}

.achievement-icon {
    font-size: 2.2em;
    filter: drop-shadow(0 0 6px rgba(212, 175, 55, 0.6));
    transition: all 0.3s ease;
    flex-shrink: 0;
    line-height: 1;
}

.achievement-card:hover .achievement-icon {
    transform: scale(1.08);
}

.achievement-info {
    text-align: center;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.achievement-title {
    color: var(--accent-color);
    font-weight: bold;
    font-size: 0.85em;
    margin: 0;
    line-height: 1.2;
    min-height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.achievement-description {
    color: var(--light-color);
    font-size: 0.7em;
    opacity: 0.85;
    line-height: 1.25;
    margin: 0;
    min-height: 28px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.achievement-reward {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--accent-color);
    font-weight: bold;
    font-size: 0.8em;
    margin: 4px 0;
    flex-shrink: 0;
}

.achievement-reward-icon {
    width: 14px;
    height: 14px;
    filter: drop-shadow(0 0 3px rgba(212, 175, 55, 0.7));
    flex-shrink: 0;
}

.achievement-progress {
    width: 100%;
    margin-top: auto;
    padding-top: 6px;
}

.achievement-progress-text {
    font-size: 0.65em;
    color: var(--light-color);
    opacity: 0.8;
    margin-bottom: 4px;
    text-align: center;
    font-weight: 500;
}

.achievement-progress-bar {
    width: 100%;
    height: 5px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    overflow: hidden;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.achievement-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-color), #ffd700);
    border-radius: 2px;
    transition: width 0.5s ease;
    box-shadow: 0 0 5px rgba(212, 175, 55, 0.5);
}

/* Footer del modal */
.achievements-footer {
    text-align: center;
    padding-top: 15px;
    border-top: 2px solid rgba(212, 175, 55, 0.3);
    margin-top: 15px;
}

.achievements-progress {
    color: var(--light-color);
    font-size: 0.9em;
    opacity: 0.9;
    margin: 0;
}

.achievements-progress span {
    color: var(--accent-color);
    font-weight: bold;
}

/* Ajustes responsivos */
@media (max-width: 480px) {
    .achievements-content {
        padding: 15px;
        width: 95%;
    }
    
    .achievements-list {
        grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
        gap: 10px;
        padding: 8px 3px;
    }
    
    .achievement-card {
        padding: 10px 8px;
        gap: 6px;
        min-height: 190px;
    }
    
    .achievement-icon {
        font-size: 2em;
    }
    
    .achievement-title {
        font-size: 0.8em;
        min-height: 30px;
    }
    
    .achievement-description {
        font-size: 0.65em;
        min-height: 26px;
    }
    
    .achievement-reward {
        font-size: 0.75em;
    }
    
    .achievement-reward-icon {
        width: 12px;
        height: 12px;
    }
    
    .category-tab {
        min-width: 60px;
        padding: 8px 12px;
    }
    
    .category-icon {
        font-size: 1.2em;
    }
}

/* Emoji como icono para el botón de logros */
.achievements-icon {
    font-size: 2em !important;
    filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.6));
    width: auto !important;
    height: auto !important;
    position: absolute !important;
    top: 50% !important;
    right: 10px !important;
    transform: translateY(-50%) !important;
    line-height: 1 !important;
    left: auto !important;
}

/* ========================================== */
/* SISTEMA DE AYUDA */
/* ========================================== */

/* Botón de ayuda en el header */
.help-button {
    position: absolute;
    right: 65px;
    top: 10px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(212, 175, 55, 0.2);
    border: 1px solid var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.help-button svg {
    width: 20px;
    height: 20px;
    color: var(--accent-color);
}

.help-button:active {
    transform: scale(0.95);
}

body:not(.on-home-page) .help-button {
    right: 100px;
    top: 12px;
}

/* Ajustar posición del botón de misiones cuando no está en home */
body:not(.on-home-page) .missions-button {
    right: 55px;
    top: 12px;
}

/* Modal de ayuda */
.help-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.help-modal.active {
    display: flex;
    opacity: 1;
    animation: fadeIn 0.3s ease;
}

.help-content {
    background: linear-gradient(135deg, rgba(10, 26, 15, 0.95), rgba(30, 126, 52, 0.95));
    border: 3px solid var(--accent-color);
    border-radius: 20px;
    width: 90%;
    max-width: 600px;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
}

.help-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 2px solid rgba(212, 175, 55, 0.3);
    flex-shrink: 0;
}

.help-header h2 {
    margin: 0;
    font-size: 1.8em;
}

.close-help {
    background: none;
    border: none;
    color: var(--accent-color);
    font-size: 2em;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-help:hover {
    background: rgba(212, 175, 55, 0.2);
    transform: rotate(90deg);
}

/* Categorías de ayuda */
.help-categories {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 15px;
    scrollbar-width: thin;
    scrollbar-color: rgba(212, 175, 55, 0.6) rgba(255, 255, 255, 0.1);
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

.help-categories::-webkit-scrollbar {
    height: 4px;
}

.help-categories::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

.help-categories::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.6);
    border-radius: 2px;
}

.help-category-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 12px;
    color: var(--light-color);
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    min-width: 85px;
    max-width: 85px;
    flex-shrink: 0;
    scroll-snap-align: start;
}

.help-category-tab:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(212, 175, 55, 0.5);
}

.help-category-tab.active {
    background: linear-gradient(to bottom, rgba(212, 175, 55, 0.3), rgba(212, 175, 55, 0.1));
    border-color: var(--accent-color);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

.help-category-tab .category-icon {
    font-size: 1.6em;
    filter: drop-shadow(0 0 5px rgba(212, 175, 55, 0.5));
}

.help-category-tab span:last-child {
    font-size: 0.75em;
    font-weight: 500;
    text-align: center;
}

/* Cuerpo del contenido de ayuda */
.help-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    scrollbar-width: thin;
    scrollbar-color: rgba(212, 175, 55, 0.6) rgba(255, 255, 255, 0.1);
}

.help-body::-webkit-scrollbar {
    width: 6px;
}

.help-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.help-body::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.6);
    border-radius: 3px;
}

.help-section-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.help-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 15px;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.help-section-title {
    color: var(--accent-color);
    font-size: 1.1em;
    font-weight: bold;
    margin: 0 0 10px 0;
    text-shadow: 0 0 8px rgba(212, 175, 55, 0.4);
}

.help-section-content {
    color: var(--light-color);
    line-height: 1.6;
    margin: 0 0 10px 0;
    font-size: 0.95em;
}

.help-section-list {
    list-style: none;
    padding: 0;
    margin: 10px 0 0 0;
}

.help-section-list li {
    color: var(--light-color);
    padding: 8px 0;
    padding-left: 10px;
    line-height: 1.5;
    font-size: 0.9em;
    border-left: 3px solid rgba(212, 175, 55, 0.3);
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 4px;
}

.help-section-list li strong {
    color: var(--accent-color);
}

.help-section-divider {
    height: 1px;
    background: linear-gradient(
        to right,
        transparent,
        rgba(212, 175, 55, 0.3),
        transparent
    );
    margin: 10px 0;
}

/* Ajustes responsivos para móviles */
@media (max-width: 480px) {
    .help-content {
        width: 95%;
        max-height: 90vh;
    }
    
    .help-header {
        padding: 15px;
    }
    
    .help-header h2 {
        font-size: 1.5em;
    }
    
    .help-categories {
        padding: 12px 10px;
        gap: 6px;
    }
    
    .help-category-tab {
        min-width: 75px;
        max-width: 75px;
        padding: 8px 12px;
    }
    
    .help-category-tab .category-icon {
        font-size: 1.4em;
    }
    
    .help-category-tab span:last-child {
        font-size: 0.7em;
    }
    
    .help-body {
        padding: 15px;
    }
    
    .help-section {
        padding: 12px;
    }
    
    .help-section-title {
        font-size: 1em;
    }
    
    .help-section-content {
        font-size: 0.9em;
    }
    
    .help-section-list li {
        font-size: 0.85em;
        padding-left: 8px;
    }
    
    .help-button {
        right: 65px;
    }
    
    body:not(.on-home-page) .help-button {
        right: 100px;
    }
}

/* Ajustes para pantallas muy pequeñas */
@media (max-width: 350px) {
    .help-category-tab {
        min-width: 70px;
        max-width: 70px;
        padding: 8px 10px;
    }
    
    .help-category-tab .category-icon {
        font-size: 1.2em;
    }
    
    .help-category-tab span:last-child {
        font-size: 0.65em;
    }
}

/* ============================================================================
   TOAST DE MISIÓN COMPLETADA
   ============================================================================ */

.mission-toast {
    position: fixed;
    top: -200px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 2px solid var(--accent-color);
    border-radius: 12px;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 8px 24px rgba(212, 175, 55, 0.3),
                0 4px 12px rgba(0, 0, 0, 0.5);
    z-index: 10001;
    max-width: 90%;
    width: 400px;
    transition: top 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55), opacity 0.3s;
    opacity: 0;
}

.mission-toast.show {
    top: 20px;
    opacity: 1;
}

.mission-toast-icon {
    font-size: 32px;
    flex-shrink: 0;
    animation: bounceIn 0.6s;
}

@keyframes bounceIn {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.mission-toast-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.mission-toast-title {
    font-size: 16px;
    font-weight: bold;
    color: var(--accent-color);
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

.mission-toast-mission {
    font-size: 14px;
    color: #fff;
}

.mission-toast-reward {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 15px;
    font-weight: bold;
    color: var(--accent-color);
    margin-top: 3px;
}

.mission-toast-coin {
    width: 20px;
    height: 20px;
    animation: coinSpin 1s ease-in-out;
}

@keyframes coinSpin {
    0% { transform: rotateY(0deg); }
    100% { transform: rotateY(720deg); }
}

/* Responsive para móviles */
@media (max-width: 480px) {
    .mission-toast {
        width: 90%;
        padding: 12px 15px;
    }
    
    .mission-toast-icon {
        font-size: 28px;
    }
    
    .mission-toast-title {
        font-size: 14px;
    }
    
    .mission-toast-mission {
        font-size: 13px;
    }
    
    .mission-toast-reward {
        font-size: 14px;
    }
}
