:root {
    --ice-blue: #dbeafe; 
    --dark-text: #1e293b;
}

body {
    background: 
        radial-gradient(circle at 20% 80%, #2c1346 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, #0e1d42 0%, transparent 50%),
        linear-gradient(to top, #050813, #121a3a);
    height: 100vh;
    margin: 0;
    overflow: hidden; 
    font-family: 'Nunito', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: url('https://cdn-icons-png.flaticon.com/32/2069/2069759.png'), auto;
}

.main-card {
    background: var(--ice-blue);
    color: var(--dark-text);
    padding: 40px;
    border-radius: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    text-align: center;
    max-width: 420px;
    z-index: 10;
    border: 4px solid #bfdbfe;
    position: relative;
}

h1 {
    font-family: 'Fredoka One', cursive;
    color: #0984e3;
    font-size: 2em;
    margin-bottom: 20px;
    text-shadow: 2px 2px 0px #bae1ff;
}

img.main-gif {
    width: 100%;
    border-radius: 15px;
    border: 4px solid #b2ebf2;
    margin-bottom: 20px;
}

.btn-group {
    display: flex;
    justify-content: center;
    gap: 20px;
    position: relative;
    min-height: 60px;
}

button {
    padding: 15px 30px;
    font-size: 1.2rem;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-family: 'Fredoka One', cursive;
    transition: transform 0.1s; 
    box-shadow: 0 6px 0 rgba(0,0,0,0.2);
}

.btn-oui {
    background-color: #00cec9;
    color: white;
    box-shadow: 0 6px 0 #00b894;
    z-index: 20;
}
.btn-oui:active { 
    transform: translateY(6px); 
    box-shadow: none; 
}

.btn-non {
    background-color: #ff4757; 
    color: white;
    box-shadow: 0 6px 0 #cf3442; 
}

.popup-window {
    position: absolute;
    width: 300px;
    background: var(--ice-blue);
    color: var(--dark-text);
    border: 3px solid #0984e3;
    border-radius: 12px;
    box-shadow: 10px 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 100;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: bounceIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    user-select: none;
}

.popup-header {
    background: #0984e3;
    color: white;
    padding: 8px 12px;
    font-family: 'Fredoka One';
    font-size: 0.9em;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: grab;
}

.popup-header:active {
    cursor: grabbing;
}

.close-btn {
    cursor: pointer;
    padding: 0 5px;
    transition: color 0.2s;
}
.close-btn:hover {
    color: #ff7675; 
}

.popup-body {
    padding: 30px 20px;
    text-align: center;
    font-weight: 700;
    color: var(--dark-text);
    font-size: 1.1em;
}

@keyframes bounceIn {
    0% { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

#stars-container {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none; 
    z-index: 1; 
    overflow: hidden;
}

.star {
    position: absolute;
    background: #ffd700;
    opacity: 0.8;
    clip-path: polygon(50% 0%, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0% 50%, 40% 40%);
    --tx: 0px;
    --ty: 0px;
    transform: translate(var(--tx), var(--ty));
    transition: transform 0.3s ease-out, opacity 0.3s; 
    animation: twinkle 2s infinite ease-in-out alternate;
    filter: drop-shadow(0 0 3px #ffd700);
}

@keyframes twinkle {
    0% { opacity: 0.3; transform: translate(var(--tx), var(--ty)) scale(0.7); }
    100% { opacity: 1; transform: translate(var(--tx), var(--ty)) scale(1.3); }
}

.moon {
    position: absolute;
    top: 50px; right: 50px;
    width: 80px; height: 80px;
    border-radius: 50%;
    background: transparent;
    box-shadow: -15px 10px 0 0 #ffd700; 
    filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.6));
    z-index: 5;
    cursor: grab;
    transform: rotate(-10deg); 
}
.moon:active {
    cursor: grabbing;
}

#victory-screen {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 999;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    overflow: hidden;
    
    background: linear-gradient(-45deg, #4a1c1c, #d35400, #e67e22, #f1c40f);
	background-size: 400% 400%;
	animation: warmGradientAnim 10s ease infinite;
}

@keyframes warmGradientAnim {
	0% { background-position: 0% 50%; }
	50% { background-position: 100% 50%; }
	100% { background-position: 0% 50%; }
}

.victory-sun {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 500px; height: 500px;
    background: radial-gradient(circle, #fff, #ffd700);
    border-radius: 50%;
    box-shadow: 0 0 80px #ff8c00, 0 0 150px #ff4500;
    z-index: 1; 
    animation: sunPulse 4s infinite alternate;
}

@keyframes sunPulse {
    from { opacity: 0.8; transform: translate(-50%, -50%) scale(1); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
}

#clouds-container {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none;
    z-index: 2; 
}


.cloud {
    position: absolute;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    filter: blur(60px); 
    --tx: 0px;
    --ty: 0px;
    transform: translate(var(--tx), var(--ty));
    transition: transform 1s ease-out; 
}

.victory-content {
    z-index: 10; 
    position: relative;
    animation: fadeContent 1.5s ease-out;
}

@keyframes fadeContent {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}