* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body {
    background:
        radial-gradient(circle at 15% 15%, rgba(255, 255, 255, 0.22), transparent 30%),
        linear-gradient(160deg, #ffe15a 0%, #ffd447 55%, #ffc928 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

#game-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    height: 100vh;
    max-height: 600px;
    background: linear-gradient(180deg, #8fe8ff 0%, #67d8ff 55%, #4ec9ff 100%);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

.screen {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    width: 100%;
    padding: 20px;
    box-sizing: border-box;
    background-color: rgba(0, 0, 0, 0.7);
    position: absolute;
    top: 0;
    left: 0;
    transition: all 0.3s ease;
    z-index: 10;
}

.hidden {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

h1 {
    font-size: 2.5rem;
    color: #FFCC00;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    text-align: center;
}

form {
    display: flex;
    flex-direction: column;
    width: 80%;
    max-width: 300px;
}

input {
    padding: 12px;
    margin-bottom: 15px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
}

button {
    padding: 12px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #45a049;
}

a {
    color: #FFCC00;
    cursor: pointer;
    text-decoration: underline;
}

#game-ui {
    background-color: transparent;
    pointer-events: none;
    padding: 0;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 15;
}

#score-display {
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
    text-shadow: 1px 1px 1px rgba(255, 255, 255, 0.5);
    background: linear-gradient(145deg, #FFEB3B, #FFC107);
    padding: 8px 15px 8px 35px;
    border-radius: 8px;
    border: 1px solid #FFC107;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

#score-display::before {
    content: "🏆";
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.4rem;
    color: #FFA000;
}

#level-timer-display {
    position: absolute;
    top: 10px;
    right: 10px;
    text-shadow: none;
    background: linear-gradient(145deg, #FFEB3B, #FFC107);
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid #FFC107;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
    pointer-events: auto;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Styles for elements inside the level/timer display */
#level-timer-display .icon {
    font-size: 1.2rem;
    color: #FFA000;
    line-height: 1;
}

#level-timer-display .value {
    font-size: 1.3rem;
    font-weight: bold;
    color: #333;
    text-shadow: 1px 1px 1px rgba(255, 255, 255, 0.5);
    line-height: 1;
}

#level-timer-display .unit {
    font-size: 0.9rem;
    font-weight: bold;
    color: #333;
    text-shadow: 1px 1px 1px rgba(255, 255, 255, 0.5);
    margin-left: -3px;
    line-height: 1;
}

/* Animation for Level Transition Text */
@keyframes sparkle-text-effect {
  0%, 100% {
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5), 0 0 5px #fff, 0 0 10px #fff, 0 0 15px #FFEB3B, 0 0 20px #FFEB3B;
    transform: scale(1);
  }
  50% {
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5), 0 0 10px #fff, 0 0 20px #FFEB3B, 0 0 30px #FFC107, 0 0 40px #FFC107;
    transform: scale(1.05);
  }
}

.level-text-animate {
  animation: sparkle-text-effect 1.5s ease-in-out infinite;
}

.collection-button {
    position: absolute;
    bottom: 15px;
    right: 10px;
    background-color: #FFCC00;
    color: #333;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 20;
    pointer-events: auto;
    border: 2px solid #e6b800;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    cursor: pointer;
}

.collection-button i {
    font-size: 1.1em;
}

.sound-button {
    position: absolute;
    bottom: 15px;
    left: 15px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    border: 2px solid #ccc;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.4);
    z-index: 20;
    pointer-events: auto;
}

.sound-button:hover,
.collection-button:hover {
    opacity: 0.9;
}

.sound-button:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: #fff;
}

.collection-button:hover {
    background-color: #FFD700;
    border-color: #cca300;
}

@media (max-width: 768px) {
    #score-display {
        top: 10px;
        left: 10px;
        font-size: 22px;
        padding: 8px 15px;
        min-width: 120px;
    }
    
    .collection-button {
        padding: 8px 12px;
        font-size: 0.9rem;
        gap: 5px;
    }

    .sound-button {
        bottom: 10px;
        left: 10px;
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    #score-display {
        top: 8px;
        left: 8px;
        font-size: 18px; 
        padding: 6px 10px;
        min-width: 100px;
        border-width: 2px;
    }
    
     #score-display::before {
        font-size: 0.8em;
        margin-right: 5px;
    }
    
    .collection-button {
        padding: 6px 10px;
        font-size: 0.8rem;
        gap: 4px;
    }

    .sound-button {
        bottom: 8px;
        left: 8px;
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
}

#collection-screen {
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    flex-direction: column;
    height: 100vh;
    max-height: 100vh;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 30;
}

#collection-screen h2 {
    color: #FFCC00;
    font-size: 2rem;
    position: sticky;
    top: 0;
    background-color: rgba(0, 0, 0, 0.95);
    padding: 15px 0;
    z-index: 10;
    width: 100%;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    flex-shrink: 0;
}

#collection-grid-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    width: 100%;
    display: flex;
    justify-content: center;
}

#collection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
    width: 100%;
    max-width: 600px;
    align-self: flex-start;
}

.capibara-card {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    transition: transform 0.3s;
}

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

.capibara-card img {
    width: 100px;
    height: 100px;
    object-fit: contain;
    margin-bottom: 10px;
}

.capibara-card h3 {
    color: #FFCC00;
    margin-bottom: 5px;
}

.capibara-card p {
    color: #fff;
    font-size: 0.9rem;
}

.back-button {
    margin-top: 20px;
    background-color: #888;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 12px 25px;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    max-width: 200px;
    width: auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.back-button:hover {
    background-color: #666;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

#game-over {
    text-align: center;
    background-color: rgba(0, 0, 0, 0.9) !important;
    z-index: 1000 !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
}

#game-over h2 {
    font-size: 2rem;
    color: #FFCC00;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    margin-top: 0;
}

#game-over p {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: white;
}

.button-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    max-width: 300px;
    margin-top: 10px;
}

#restart-button {
    margin-top: 10px;
    padding: 15px 30px;
    font-size: 1.2rem;
}

.whatsapp-button {
    background-color: #25D366;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 1.2rem;
    padding: 15px 30px;
    border-radius: 5px;
}

.whatsapp-button:hover {
    background-color: #128C7E;
}

.whatsapp-button i {
    font-size: 1.4rem;
}

/* Estilos responsive para dispositivos móviles */
@media (max-width: 768px) {
    #game-container {
        width: 100%;
        height: 100vh;
        max-height: none;
        margin: 0;
    }
    
    h1 {
        font-size: 2rem;
        margin-bottom: 20px;
    }
    
    input, button {
        padding: 10px;
        font-size: 14px;
    }
    
    #score-display {
        font-size: 18px;
        padding: 8px 16px;
        position: fixed;
        top: 10px;
        left: 10px;
        z-index: 15;
    }
    
    .collection-button {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
    
    #collection-grid-container {
        padding: 15px;
    }
    
    #collection-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 15px;
    }
    
    .capibara-card img {
        width: 80px;
        height: 80px;
    }
    
    #game-over h2 {
        font-size: 1.8rem;
    }
    
    #game-over p {
        font-size: 1.2rem;
    }
    
    #restart-button, .whatsapp-button {
        padding: 12px 24px;
        font-size: 1rem;
    }
    
    .button-container {
        max-width: 250px;
    }
}

/* Estilo adicional para dispositivos muy pequeños */
@media (max-width: 360px) {
    h1 {
        font-size: 1.8rem;
    }
    
    form {
        width: 95%;
    }
    
    #score-display {
        font-size: 16px;
        padding: 6px 12px;
    }
    
    .collection-button {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    
    #collection-grid-container {
        padding: 10px;
    }
    
    #collection-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 10px;
    }
    
    .capibara-card img {
        width: 60px;
        height: 60px;
    }
    
    .button-container {
        max-width: 220px;
    }
}

/* Estilos específicos para modo vertical */
@media (orientation: portrait) {
    #game-container {
        height: 100vh;
        width: 100%;
        max-width: none;
    }
}

.notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: #FFCC00;
    padding: 15px 30px;
    border-radius: 5px;
    font-size: 1.2rem;
    z-index: 1000;
    animation: slideDown 0.3s ease-out;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

@keyframes slideDown {
    from {
        transform: translate(-50%, -100%);
    }
    to {
        transform: translate(-50%, 0);
    }
}

/* Estilos responsive para notificaciones */
@media (max-width: 768px) {
    .notification {
        font-size: 1rem;
        padding: 12px 24px;
        width: 90%;
        max-width: 300px;
    }
}

@media (max-width: 360px) {
    .notification {
        font-size: 0.9rem;
        padding: 10px 20px;
        width: 95%;
    }
}

.auth-buttons {
    display: flex;
    flex-direction: column;
    gap: 25px;
    width: 100%;
    max-width: 300px;
    margin-bottom: 20px;
    align-items: center;
}

.play-button {
    background: linear-gradient(135deg, #ff8a00 0%, #ff3d5a 45%, #ff5f6d 100%);
    color: #fff;
    padding: 20px 40px;
    font-size: 1.5rem;
    font-weight: bold;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 10px 26px rgba(255, 95, 109, 0.45);
}

.play-button:hover {
    background: linear-gradient(135deg, #ff9e2b 0%, #ff4a67 50%, #ff717f 100%);
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(255, 95, 109, 0.55);
}

.auth-links {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 5px;
}

.auth-link {
    background: none;
    border: none;
    color: #FFCC00;
    font-size: 1rem;
    cursor: pointer;
    padding: 5px 10px;
    transition: color 0.3s ease;
}

.auth-link:hover {
    color: #FFD700;
    text-decoration: underline;
}

.separator {
    color: #FFCC00;
    font-size: 1.2rem;
}

/* Estilos responsive para los nuevos elementos */
@media (max-width: 768px) {
    .auth-buttons {
        max-width: 250px;
        gap: 20px;
    }
    
    .play-button {
        padding: 15px 30px;
        font-size: 1.3rem;
    }
}

@media (max-width: 360px) {
    .auth-buttons {
        max-width: 220px;
        gap: 15px;
    }
    
    .play-button {
        padding: 12px 24px;
        font-size: 1.1rem;
    }
    
    .auth-link {
        font-size: 0.8rem;
    }
    
    .separator {
        font-size: 1rem;
    }
}

.guest-message {
    color: #FFCC00;
    font-size: 1.2rem;
    margin: 15px 0;
    text-align: center;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 5px;
}

@media (max-width: 768px) {
    .guest-message {
        font-size: 1.1rem;
        margin: 12px 0;
        padding: 8px;
    }
}

@media (max-width: 360px) {
    .guest-message {
        font-size: 1rem;
        margin: 10px 0;
        padding: 6px;
    }
}

.guest-message-gameover {
    color: #FFCC00;
    font-size: 1.1rem;
    margin: 15px 0 20px 0;
    text-align: center;
    padding: 10px 15px;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px dashed #FFCC00;
    border-radius: 8px;
    line-height: 1.4;
    max-width: 90%;
}

@media (max-width: 768px) {
    .guest-message-gameover {
        font-size: 1rem;
        margin: 12px 0 18px 0;
        padding: 8px 12px;
    }
}

@media (max-width: 480px) {
    .guest-message-gameover {
        font-size: 0.9rem;
        margin: 10px 0 15px 0;
        padding: 6px 10px;
    }
}

.portada-container {
    width: 100%;
    max-width: 400px;
    margin: 0 auto 25px;
    overflow: hidden;
    border-radius: 18px;
    border: 2px solid rgba(255, 212, 82, 0.7);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4);
}

.portada-img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.portada-img:hover {
    transform: scale(1.02);
}

@media (max-width: 768px) {
    .portada-container {
        max-width: 320px;
        margin-bottom: 20px;
    }
}

@media (max-width: 480px) {
    .portada-container {
        max-width: 250px;
        margin-bottom: 15px;
    }
}

#login-container {
    background:
        radial-gradient(circle at 18% 18%, rgba(255, 193, 7, 0.24), transparent 36%),
        radial-gradient(circle at 82% 15%, rgba(255, 255, 255, 0.18), transparent 34%),
        linear-gradient(165deg, rgba(17, 124, 184, 0.22) 0%, rgba(46, 174, 255, 0.14) 55%, rgba(255, 255, 255, 0.08) 100%);
    padding-top: 30px;
    padding-bottom: 30px;
}

#login-container h1 {
    color: #FFCC00;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    margin-top: 0;
    margin-bottom: 25px;
    font-size: 2.5rem;
    text-align: center;
}

.info-message {
    color: #ffe38c;
    text-align: center;
    margin-top: 20px;
    font-size: 1.1rem;
    max-width: 400px;
    line-height: 1.4;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    background-color: rgba(7, 24, 39, 0.55);
    padding: 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 212, 82, 0.4);
}

@media (max-width: 768px) {
    #login-container h1 {
        font-size: 2rem;
        margin-bottom: 20px;
    }
    
    .info-message {
        font-size: 1rem;
        max-width: 300px;
        padding: 0 15px;
    }
}

@media (max-width: 480px) {
    #login-container h1 {
        font-size: 1.8rem;
        margin-bottom: 15px;
    }
    
    .info-message {
        font-size: 0.9rem;
        max-width: 250px;
        padding: 0 10px;
    }
}

/* Ajustes para orientación horizontal */
@media (orientation: landscape) {
    html, body {
        margin: 0;
        padding: 0;
        overflow: hidden;
        display: flex;
        justify-content: center;
        align-items: center;
        height: 100%;
        width: 100%;
    }
    
    #game-container {
        margin: 0;
        height: 100vh;
        width: 100%;
        max-width: 100%;
        max-height: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        box-shadow: none;
    }
    
    .screen {
        padding: 0;
        height: 100vh;
        min-height: 0;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    
    #login-container {
        padding: 0;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        min-height: 0;
        height: 100%;
        width: 100%;
        background:
            radial-gradient(circle at 20% 20%, rgba(255, 193, 7, 0.24), transparent 35%),
            radial-gradient(circle at 80% 18%, rgba(255, 255, 255, 0.18), transparent 33%),
            linear-gradient(165deg, rgba(17, 124, 184, 0.22) 0%, rgba(46, 174, 255, 0.14) 55%, rgba(255, 255, 255, 0.08) 100%);
    }
    
    .portada-container {
        max-width: 350px;
        margin: 0 0 25px 0;
        height: auto;
    }
    
    #login-container .portada-container {
        margin-right: 0;
        margin-bottom: 25px;
        flex: 0 0 auto;
        max-width: 250px;
        margin-top: 0;
    }
    
    #login-container .auth-content {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        min-width: 300px;
        padding: 10px;
    }
    
    #login-container h1 {
        margin-top: 0;
        margin-bottom: 15px;
        font-size: 2rem;
    }
    
    .info-message {
        margin-top: 15px;
        max-width: 300px;
        font-size: 1.1rem;
        background-color: rgba(0, 0, 0, 0.3);
        padding: 8px;
        border-radius: 5px;
    }
    
    .auth-buttons {
        margin-bottom: 10px;
    }
    
    .play-button {
        padding: 15px 30px;
    }
}

/* Ajustes específicos para pantallas más pequeñas en horizontal */
@media (orientation: landscape) and (max-height: 500px) {
    #login-container {
        padding: 0;
    }
    
    .portada-container {
        max-width: 160px;
        margin-bottom: 15px;
    }
    
    #login-container .portada-container {
        max-width: 130px;
        margin-bottom: 15px;
    }
    
    #login-container .auth-content {
        min-width: 250px;
        padding: 5px;
    }
    
    #login-container h1 {
        font-size: 1.5rem;
        margin-bottom: 5px;
    }
    
    .auth-buttons {
        gap: 8px;
        margin-bottom: 5px;
    }
    
    .play-button {
        padding: 6px 12px;
        font-size: 1rem;
    }
    
    .info-message {
        font-size: 0.75rem;
        margin-top: 3px;
        line-height: 1.2;
    }
}

#info-screen {
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.7));
    padding: 20px;
    max-width: 100%;
    margin: 0;
    color: #fff;
    border-radius: 0;
    height: 100%;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    position: relative;
    overflow: hidden;
}

#info-screen::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 70px; /* Altura suficiente para el botón */
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0) 70%);
    z-index: 2;
    pointer-events: none; /* Permite hacer clic a través del gradiente */
}

#info-screen h2 {
    color: #FFCC00;
    text-align: center;
    margin: 20px 0;
    font-size: 2rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    position: sticky;
    top: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.7));
    width: 100%;
    padding: 10px 0;
    z-index: 5;
}

.info-content {
    margin-bottom: 10px;
    width: 100%;
    padding: 0 15px;
    overflow-y: auto;
    max-height: calc(75vh - 120px);
}

.info-content section {
    margin-bottom: 20px;
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.info-content h3 {
    color: #FFCC00;
    margin-bottom: 15px;
    font-size: 1.4rem;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
    border-bottom: 1px solid rgba(255, 204, 0, 0.3);
    padding-bottom: 8px;
}

.info-content p {
    margin-bottom: 12px;
    line-height: 1.6;
    font-size: 1.05rem;
}

.info-content a {
    color: #4CAF50;
    text-decoration: underline;
    transition: color 0.3s;
}

.info-content a:hover {
    color: #FFCC00;
}

.info-content ul {
    padding-left: 20px;
}

.info-content li {
    margin-bottom: 5px;
}

#more-info-link {
    color: #79ffd8;
    text-decoration: underline;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.15rem;
    padding: 5px;
    display: inline-block;
    transition: all 0.3s ease;
}

#more-info-link:hover {
    color: #ffd452;
    transform: scale(1.05);
}

@media (max-width: 768px) {
    #info-screen {
        padding: 15px;
        max-height: 100%;
    }
    
    #info-screen h2 {
        font-size: 1.8rem;
        margin: 15px 0;
    }
    
    .info-content {
        padding: 0 10px;
        max-height: calc(70vh - 110px);
    }
    
    .info-content section {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .info-content h3 {
        font-size: 1.2rem;
        margin-bottom: 10px;
    }
    
    .info-content p {
        font-size: 1rem;
        line-height: 1.5;
    }

    #info-screen .back-button {
        margin-top: 5px;
        margin-bottom: 5px;
        font-size: 0.9rem;
        padding: 10px 20px;
    }
}

@media (max-width: 480px) {
    #info-screen {
        max-height: 100%;
        padding: 10px;
    }
    
    #info-screen h2 {
        font-size: 1.6rem;
        margin: 10px 0;
        padding: 8px 0;
    }
    
    .info-content {
        max-height: calc(75vh - 100px);
        margin-bottom: 5px;
    }
    
    .info-content section {
        padding: 12px;
        margin-bottom: 12px;
    }
    
    #info-screen .back-button {
        padding: 8px 15px;
        font-size: 0.85rem;
    }
}

#login-form-container, #register-form-container {
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.7));
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    max-width: 1200px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#login-form-container h2, #register-form-container h2 {
    color: #FFCC00;
    text-align: center;
    margin-bottom: 25px;
    font-size: 2rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

#login-form, #register-form {
    width: 100%;
    max-width: 320px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.input-container {
    position: relative;
    width: 100%;
    margin-bottom: 15px;
}

.input-icon {
    position: absolute;
    left: 12px;
    top: 15px;
    color: #4CAF50;
    font-size: 1.2rem;
}

#login-form input, #register-form input {
    background-color: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 5px;
    padding: 15px 15px 15px 45px;
    font-size: 1rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    width: 100%;
}

#login-form input:focus, #register-form input:focus {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(76, 175, 80, 0.3);
    outline: none;
}

#login-form input::placeholder, #register-form input::placeholder {
    color: #777;
}

#login-form button, #register-form button {
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 15px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 5px;
    box-shadow: 0 4px 8px rgba(76, 175, 80, 0.3);
}

#login-form button:hover, #register-form button:hover {
    background-color: #45a049;
    box-shadow: 0 6px 12px rgba(76, 175, 80, 0.4);
    transform: translateY(-2px);
}

#info-screen .back-button {
    margin-top: 10px;
    position: relative;
    z-index: 10;
    margin-bottom: 10px;
    background-color: #888;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 12px 25px;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    max-width: 200px;
    width: auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
}

#info-screen .back-button:hover {
    background-color: #666;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    #login-form-container, #register-form-container {
        padding: 25px;
    }
    
    #login-form-container h2, #register-form-container h2 {
        font-size: 1.8rem;
        margin-bottom: 20px;
    }
    
    #login-form input, #register-form input, 
    #login-form button, #register-form button {
        padding: 12px;
        font-size: 1rem;
    }
    
    .input-icon {
        top: 12px;
        font-size: 1.1rem;
    }
    
    #login-form input, #register-form input {
        padding: 12px 12px 12px 38px;
    }
    
    .form-footer {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    #login-form-container, #register-form-container {
        padding: 20px;
    }
    
    #login-form-container h2, #register-form-container h2 {
        font-size: 1.6rem;
        margin-bottom: 15px;
    }
    
    #login-form input, #register-form input, 
    #login-form button, #register-form button {
        padding: 10px;
        font-size: 0.9rem;
    }
    
    .input-icon {
        top: 10px;
        font-size: 1rem;
        left: 10px;
    }
    
    #login-form input, #register-form input {
        padding: 10px 10px 10px 35px;
    }
    
    .form-footer {
        font-size: 0.85rem;
    }
}

.form-footer {
    margin-top: 20px;
    text-align: center;
    color: #fff;
    font-size: 0.95rem;
    width: 100%;
    max-width: 320px;
}

.form-footer p {
    margin: 0;
    padding: 0;
    white-space: normal;
    word-break: break-word;
}

.form-footer a {
    color: #FFCC00;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s;
}

.form-footer a:hover {
    color: #FFF;
    text-decoration: underline;
}

.button-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 10px 0;
    position: sticky;
    bottom: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.7));
    z-index: 5;
    margin-top: 0px;
    margin-bottom: 0;
}

#info-screen .button-wrapper .back-button {
    margin: 0;
}

.collection-message,
.collection-error {
    background-color: rgba(0, 0, 0, 0.8);
    border-radius: 10px;
    padding: 20px;
    margin: 20px auto;
    max-width: 80%;
    text-align: center;
    color: #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.collection-message h3,
.collection-error h3 {
    color: #FFD700;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.collection-error h3 {
    color: #FF6347;
}

.collection-message p,
.collection-error p {
    margin-bottom: 10px;
    line-height: 1.5;
}

#collection-screen .back-button {
    position: sticky;
    bottom: 20px;
    margin: 0 auto;
    z-index: 10;
    background-color: #4CAF50;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

#collection-screen .back-button:hover {
    background-color: #45a049;
}

/* Estilo para el contenedor del botón */
.button-container-fixed {
    position: sticky;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 15px 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 1), rgba(0, 0, 0, 0.8), transparent);
    z-index: 20;
    display: flex;
    justify-content: center;
    flex-shrink: 0;
}

#collection-screen .back-button {
    margin: 0 auto;
    background-color: #4CAF50;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    padding: 12px 30px;
    font-size: 1.1rem;
    font-weight: bold;
}

#collection-screen .back-button:hover {
    background-color: #45a049;
    transform: translateY(-2px);
}

/* Ajustes para móviles */
@media (max-width: 768px) {
    #collection-screen {
        padding-bottom: 70px;
    }
    
    #collection-grid-container {
        padding: 15px;
    }
    
    #collection-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 15px;
    }
    
    .button-container-fixed {
        padding: 10px 0;
    }
    
    #collection-screen .back-button {
        padding: 10px 25px;
        font-size: 1rem;
    }
}

.guest-auth-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    width: 100%;
    max-width: 300px;
}

.guest-auth-buttons p {
    color: #ccc;
    font-size: 1rem;
    margin-bottom: 5px;
}

.auth-button-secondary {
    background-color: transparent;
    border: 2px solid #FFCC00;
    color: #FFCC00;
    padding: 10px 20px;
    font-size: 1rem;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.auth-button-secondary:hover {
    background-color: rgba(255, 204, 0, 0.1);
    color: #fff;
    border-color: #fff;
}

/* Ocultar inicialmente */
.guest-auth-buttons.hidden {
    display: none;
}

/* Estilos responsive */
@media (max-width: 768px) {
    .guest-auth-buttons {
        max-width: 250px;
        gap: 8px;
        margin-top: 15px;
        padding-top: 10px;
    }
    
    .auth-button-secondary {
        padding: 8px 15px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .guest-auth-buttons {
        max-width: 220px;
    }
    
    .auth-button-secondary {
        padding: 7px 12px;
        font-size: 0.85rem;
    }
}

#instruction-arrows {
    position: absolute;
    bottom: 100px; /* Ajustar según la posición del jugador */
    left: 50%;
    transform: translateX(-50%);
    width: 200px; /* Ancho del área de las flechas */
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 50;
    pointer-events: none; /* No interferir con el juego */
}

.arrow {
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.6);
    animation: pulse-arrow 1.5s infinite ease-in-out;
}

.arrow-left {
    /* Posicionamiento relativo si es necesario */
}

.arrow-right {
    /* Posicionamiento relativo si es necesario */
}

/* Ocultar flechas inicialmente */
#instruction-arrows.hidden {
    display: none;
}

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

/* Media Queries para ajustar posición y tamaño */
@media (max-width: 768px) {
    #instruction-arrows {
        bottom: 80px;
        width: 180px;
    }
    .arrow {
        font-size: 2.5rem;
    }
}

@media (max-width: 480px) {
    #instruction-arrows {
        bottom: 60px;
        width: 150px;
    }
    .arrow {
        font-size: 2rem;
    }
}

/* Credits Footer Styles */
#credits-footer {
    position: absolute;
    bottom: 5px; /* Position slightly above the bottom */
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px; /* Space between image and text */
    padding: 5px 10px;
    background-color: rgba(0, 0, 0, 0.6); /* Semi-transparent background */
    border-radius: 5px;
    z-index: 5; /* Below game UI elements */
}

#credits-footer img {
    width: 25px; /* Adjust size as needed */
    height: auto;
    vertical-align: middle; /* Align image nicely with text */
}

#credits-footer p {
    margin: 0;
    color: #ccc; /* Light grey text */
    font-size: 0.8rem;
}

#credits-footer a {
    color: #eee; /* Lighter grey for link */
    text-decoration: none;
    font-weight: bold;
}

#credits-footer a:hover {
    color: #fff; /* White on hover */
    text-decoration: underline;
}

/* Instruction Screen Styles */
#instruction-screen {
    background: linear-gradient(180deg, rgba(20, 20, 40, 0.95) 0%, rgba(40, 40, 80, 0.95) 100%);
}

.instruction-content {
    text-align: center;
    color: white;
    animation: fadeIn 0.5s ease;
}

.instruction-content h2 {
    font-size: 2.5rem;
    color: #FFCC00;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.instruction-main {
    font-size: 1.4rem;
    color: #ff6b6b;
    margin-bottom: 30px;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.instruction-demo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.demo-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.demo-item img {
    width: 70px;
    height: 70px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    padding: 5px;
}

.demo-item span {
    font-size: 1rem;
}

.demo-obstacle {
    border: 3px solid #ff4444;
}

.demo-good {
    border: 3px solid #44ff44;
}

.demo-capibara {
    border: 3px solid #FFD700;
}

.demo-danger {
    background: rgba(255, 0, 0, 0.2);
    padding: 10px;
    border-radius: 10px;
}

.demo-row {
    display: flex;
    justify-content: center;
    gap: 40px;
    width: 100%;
}

.demo-text {
    font-size: 0.9rem;
    color: #aaa;
    margin-top: 5px;
}

.instruction-timer {
    font-size: 1.2rem;
    color: #aaa;
}

#countdown {
    color: #FFCC00;
    font-weight: bold;
    font-size: 1.5rem;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
} 
