/* Efectos de sueño */
.sleeping {
    filter: brightness(0.4);
    transition: filter 0.5s ease;
}

.sleep-effect {
    position: relative;
}

/* Eliminar el efecto anterior de emoji único */
.sleep-effect::after {
    display: none;
}

/* Nuevos emojis flotantes */
.sleep-emoji-1,
.sleep-emoji-2,
.sleep-emoji-3 {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 34px;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
}

.sleep-emoji-1 {
    animation: float-zzz-1 4s infinite;
}

.sleep-emoji-2 {
    font-size: 64px;
    animation: float-zzz-2 4s infinite 1.33s;
}

.sleep-emoji-3 {
    font-size: 60px;
    animation: float-zzz-3 8s infinite 2.66s;
}

@keyframes float-zzz-1 {
    0%, 100% {
        transform: translate(-50%, -50%) translate(0, 0);
        opacity: 0;
    }
    20% {
        opacity: 1;
    }
    80% {
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) translate(100px, -100px);
        opacity: 0;
    }
}

@keyframes float-zzz-2 {
    0%, 100% {
        transform: translate(-50%, -50%) translate(0, 0);
        opacity: 0;
    }
    20% {
        opacity: 1;
    }
    80% {
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) translate(-100px, -100px);
        opacity: 0;
    }
}

@keyframes float-zzz-3 {
    0%, 100% {
        transform: translate(-50%, -50%) translate(0, 0);
        opacity: 0;
    }
    20% {
        opacity: 1;
    }
    80% {
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) translate(-100px, 100px);
        opacity: 0;
    }
}

/* Estilos para botones deshabilitados */
.control-btn[disabled],
.menu-btn[disabled],
.card-btn[disabled],
.background-btn[disabled],
.shop-btn[disabled] {
    transition: opacity 0.3s ease;
    cursor: not-allowed;
}

/* Efecto de transición para la imagen */
.character-image {
    transition: filter 0.5s ease;
}

.sleep-coins-indicator {
    position: absolute;
    top: -40px;
    right: -20px;
    background: rgba(0, 0, 0, 0.7);
    color: gold;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.9em;
    font-weight: bold;
    z-index: 2;
    transition: transform 0.2s ease;
}

.coin-bump {
    animation: coin-bump 0.3s ease;
}

.coins-earned-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.95);
    border: 2px solid var(--accent-color);
    border-radius: 20px;
    padding: 25px;
    z-index: 1000;
    max-width: 90%;
    width: 400px;
    color: white;
    text-align: center;
}

.coins-earned-message h3 {
    color: var(--accent-color);
    margin-bottom: 10px;
}

.button-container {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.ok-btn {
    background: linear-gradient(45deg, var(--accent-color), #00cc44);
    color: #000;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ok-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(0, 255, 57, 0.3);
}

.coins-earned-message.fade-out {
    animation: slide-up-out 0.5s ease forwards;
}

@keyframes slide-down-in {
    from {
        transform: translate(-50%, -200%);
        opacity: 0;
    }
    to {
        transform: translate(-50%, -50%);
        opacity: 1;
    }
}

@keyframes slide-up-out {
    from {
        transform: translate(-50%, -50%);
        opacity: 1;
    }
    to {
        transform: translate(-50%, -200%);
        opacity: 0;
    }
}

.coins-earned-content {
    position: relative;
    display: flex;
    align-items: center;
    gap: 15px;
    color: white;
    font-size: 1.2em;
    padding-right: 20px;
}

.coins-earned-icon {
    font-size: 1.5em;
}

.coins-earned-content small {
    display: block;
    font-size: 0.8em;
    opacity: 0.8;
    margin-top: 5px;
}

.coins-generation-indicator {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: gold;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    white-space: nowrap;
    border: 1px solid gold;
    animation: glow 2s infinite;
}

.bonus-info {
    color: gold;
    margin: 8px 0;
    display: block;
    font-size: 0.95em;
    text-align: left;
}

.energy-info {
    color: #00ffff;
    margin-top: 8px;
    display: block;
    font-size: 0.95em;
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px gold;
    }
    50% {
        box-shadow: 0 0 15px gold;
    }
}

/* Ajustar posición del botón de monedas para el indicador */
#coins-btn {
    position: relative;
}

.sleep-start-message {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid var(--accent-color);
    border-radius: 20px;
    padding: 20px 25px;
    z-index: 1000;
    animation: slide-up 0.5s ease;
    max-width: 90%;
    width: 400px;
}

.sleep-message-content {
    text-align: center;
    color: white;
}

.sleep-message-content span {
    font-size: 1.3em;
    display: block;
    margin-bottom: 10px;
}

.sleep-message-content small {
    opacity: 0.9;
    display: block;
    line-height: 1.4;
}

.sleep-time-counter {
    position: absolute;
    background: rgba(0, 0, 0, 0.8);
    color: #00ff39;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.9em;
    font-family: monospace;
    white-space: nowrap;
    border: 1px solid #00ff39;
    animation: glow-green 2s infinite;
    z-index: 100;
}

/* Para el contador sobre el personaje */
.character .sleep-time-counter {
    left: 50%;
    transform: translateX(-50%);
}

/* Para el texto DURMIENDO sobre el personaje */
.sleep-time-text {
    position: absolute;
    top: 30%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 1.3em;
    font-weight: bold;
    text-align: center;
    z-index: 1000;
}
/* Efectos de emojis de dormir flotando por toda la pantalla */
.sleep-emoji {
    position: absolute;
    top: 70%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2em;
    z-index: 1000;
}

/* Para el contador sobre el botón */
#sleep-btn .sleep-time-counter {
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
}

@keyframes glow-green {
    0%, 100% {
        box-shadow: 0 0 5px #00ff39;
    }
    50% {
        box-shadow: 0 0 15px #00ff39;
    }
}

.close-message-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    line-height: 1;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.close-message-btn:hover {
    opacity: 1;
}

@keyframes slide-up {
    from {
        transform: translate(-50%, 100%);
        opacity: 0;
    }
    to {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

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

.result-item {
    padding: 8px 12px;
    border-radius: 8px;
    text-align: center;
}

.result-item.gain {
    background: rgba(0, 255, 57, 0.1);
    color: #00ff39;
}

.result-item.loss {
    background: rgba(255, 57, 57, 0.1);
    color: #ff3939;
}

.result-item.normal {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
} 