@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap');

:root {
    --color-bg: #f0f4f8;
    --color-text: #333;
    --color-primary: #0078d4;
    --frustration-low: #3498db;
    --frustration-medium: #f1c40f;
    --frustration-high: #e74c3c;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--color-bg);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

#game-container {
    width: 100%;
    max-width: 900px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    height: 700px;
}

/* --- Modales --- */
.modal-overlay {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.85);
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    z-index: 1000; color: white; text-align: center; padding: 20px;
}
.modal-content { max-width: 600px; }
.modal-content button {
    background: var(--color-primary); color: white; border: none;
    padding: 12px 25px; font-size: 1.1em; border-radius: 5px; cursor: pointer; margin-top: 20px;
}
.hidden { display: none; }

/* --- Interfaz de Juego --- */
.game-header { padding: 10px 20px; background: #f1f1f1; border-bottom: 1px solid #ccc; }
.frustration-container { width: 100%; }
.frustration-bar { background: #e0e0e0; border-radius: 10px; padding: 3px; }
#frustration-level {
    height: 18px;
    width: 0%;
    background: var(--frustration-low);
    border-radius: 7px;
    transition: width 0.3s ease-in-out, background-color 0.5s;
}

.desktop-area {
    flex-grow: 1;
    position: relative;
    overflow: hidden;
    background-image: url('https://i.imgur.com/S2i4Gms.jpg'); /* Fondo de pantalla tipo Bliss de WinXP */
    background-size: cover;
    background-position: center;
}

.desktop-icon {
    position: absolute;
    top: 30px;
    left: 30px;
    width: 100px;
    color: white;
    text-shadow: 1px 1px 2px black;
    text-align: center;
    cursor: pointer;
    z-index: 1;
}
.desktop-icon span { font-size: 4em; }

/* --- Pop-ups --- */
.popup-ad {
    position: absolute;
    width: 300px;
    height: 200px;
    background: #f0f0f0;
    border: 1px solid #777;
    box-shadow: 5px 5px 15px rgba(0,0,0,0.4);
    display: flex;
    flex-direction: column;
    animation: zoom-in 0.3s ease-out;
    z-index: 10;
}
@keyframes zoom-in { from { transform: scale(0.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.popup-header {
    background: linear-gradient(to right, #0058d0, #6aa2e4);
    color: white;
    padding: 5px 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
}
.popup-close {
    background: #d84a38;
    color: white;
    border: 1px solid #f0f0f0;
    font-weight: bold;
    cursor: pointer;
    width: 22px;
    height: 22px;
}
/* ¡La trampa! El botón falso tiene un borde ligeramente diferente */
.popup-close.fake {
    border: 1px solid #a0a0a0;
}
.popup-body {
    flex-grow: 1;
    padding: 15px;
    text-align: center;
    font-size: 1.2em;
    font-weight: 600;
    color: var(--color-text);
}

.back-button {
    display: inline-block;
    padding: 10px 15px;
    margin-top: 10px;
    background-color: #6c757d;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
}