* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    overflow-y: auto;
    position: relative;
}

/* Ballons flottants */
.balloons {
    position: fixed;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.balloon {
    position: absolute;
    font-size: 3rem;
    animation: float 6s ease-in-out infinite;
    opacity: 0.7;
}

.balloon1 {
    left: 10%;
    animation-delay: 0s;
    animation-duration: 5s;
}

.balloon2 {
    left: 25%;
    animation-delay: 1s;
    animation-duration: 6s;
}

.balloon3 {
    left: 40%;
    animation-delay: 2s;
    animation-duration: 5.5s;
}

.balloon4 {
    left: 60%;
    animation-delay: 0.5s;
    animation-duration: 6.5s;
}

.balloon5 {
    left: 75%;
    animation-delay: 1.5s;
    animation-duration: 5s;
}

.balloon6 {
    left: 90%;
    animation-delay: 2.5s;
    animation-duration: 6s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(100vh) rotate(0deg);
    }
    50% {
        transform: translateY(-20vh) rotate(10deg);
    }
}

/* Confettis */
.confetti-container {
    position: fixed;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #f0f;
    top: -10%;
    animation: confetti-fall 3s linear infinite;
}

.confetti:nth-child(1) {
    left: 10%;
    background: #ff0;
    animation-delay: 0s;
}

.confetti:nth-child(2) {
    left: 20%;
    background: #0ff;
    animation-delay: 0.5s;
}

.confetti:nth-child(3) {
    left: 30%;
    background: #f0f;
    animation-delay: 1s;
}

.confetti:nth-child(4) {
    left: 40%;
    background: #0f0;
    animation-delay: 1.5s;
}

.confetti:nth-child(5) {
    left: 50%;
    background: #f00;
    animation-delay: 2s;
}

.confetti:nth-child(6) {
    left: 60%;
    background: #00f;
    animation-delay: 0.3s;
}

.confetti:nth-child(7) {
    left: 70%;
    background: #ff0;
    animation-delay: 0.8s;
}

.confetti:nth-child(8) {
    left: 80%;
    background: #0ff;
    animation-delay: 1.3s;
}

.confetti:nth-child(9) {
    left: 90%;
    background: #f0f;
    animation-delay: 1.8s;
}

.confetti:nth-child(10) {
    left: 95%;
    background: #0f0;
    animation-delay: 2.3s;
}

@keyframes confetti-fall {
    to {
        transform: translateY(110vh) rotate(360deg);
    }
}

/* Container principal */
.login-container,
.home-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 450px;
    padding: 20px;
}

/* Carte de login */
.login-card,
.welcome-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 25px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header */
.birthday-header {
    text-align: center;
    margin-bottom: 30px;
}

.birthday-header h1 {
    color: #764ba2;
    font-size: 2rem;
    margin-bottom: 10px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.subtitle {
    color: #666;
    font-size: 1rem;
}

/* Alertes */
.alert {
    padding: 12px 15px;
    margin-bottom: 20px;
    border-radius: 10px;
    text-align: center;
}

.alert-error {
    background: #fee;
    color: #c00;
    border: 1px solid #fcc;
}

/* Formulaire */
.login-form {
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: flex;
    align-items: center;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.form-group label .icon {
    margin-right: 8px;
    font-size: 1.2rem;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #fff;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-control::placeholder {
    color: #aaa;
}

/* Bouton de connexion */
.btn-login {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.6);
}

.btn-login:active {
    transform: translateY(0);
}

/* Emojis de gâteau */
.cake-emoji {
    text-align: center;
    font-size: 2rem;
    margin-top: 20px;
    animation: bounce 1s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Page d'accueil - Nouvelle version */
.home-page-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    min-height: 100vh;
}

/* Section Explication */
.explanation-section {
    margin-bottom: 50px;
}

.explanation-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 25px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    animation: slideIn 0.5s ease-out;
}

.congrats-header {
    text-align: center;
    margin-bottom: 30px;
}

.congrats-header h1 {
    color: #764ba2;
    font-size: 2.5rem;
    margin-bottom: 15px;
    animation: pulse 2s ease-in-out infinite;
}

.trophy-emoji {
    font-size: 4rem;
    animation: bounce 1s ease-in-out infinite;
}

.explanation-content {
    text-align: center;
}

.main-text {
    font-size: 1.3rem;
    color: #333;
    font-weight: 600;
    margin-bottom: 15px;
    line-height: 1.6;
}

.secondary-text {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 30px;
    font-style: italic;
}

.challenge-intro {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-radius: 15px;
    padding: 25px;
    margin: 30px 0;
    border: 2px solid rgba(102, 126, 234, 0.3);
}

.challenge-intro h2 {
    color: #667eea;
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.challenge-intro p {
    color: #555;
    font-size: 1.1rem;
    line-height: 1.8;
    text-align: center;
}

.motivation-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #ffd89b 0%, #19547b 100%);
    border-radius: 15px;
    margin-top: 30px;
}

.motivation-box p {
    color: white;
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
}

.emoji-large {
    font-size: 2.5rem;
    animation: bounce 1s ease-in-out infinite;
}

/* Section Challenges */
.challenges-section {
    margin-top: 50px;
}

.section-title {
    text-align: center;
    color: white;
    font-size: 2.5rem;
    margin-bottom: 40px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    animation: pulse 2s ease-in-out infinite;
}

.challenges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.challenge-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    animation: slideIn 0.6s ease-out;
}

.challenge-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.challenge-card:nth-child(1) {
    animation-delay: 0.1s;
}

.challenge-card:nth-child(2) {
    animation-delay: 0.2s;
}

.challenge-card:nth-child(3) {
    animation-delay: 0.3s;
}

.challenge-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 30px 20px;
    position: relative;
    text-align: center;
}

.challenge-number {
    position: absolute;
    top: 10px;
    right: 15px;
    background: rgba(255, 255, 255, 0.3);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
}

.challenge-icon {
    font-size: 4rem;
    animation: float-small 3s ease-in-out infinite;
}

@keyframes float-small {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.challenge-body {
    padding: 25px 20px;
}

.challenge-body h3 {
    color: #333;
    font-size: 1.5rem;
    margin-bottom: 15px;
    text-align: center;
}

.challenge-description {
    color: #666;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 20px;
    text-align: center;
}

.challenge-description.locked {
    color: #999;
    font-style: italic;
    opacity: 0.7;
    min-height: 60px;
}

.challenge-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 20px;
    border-radius: 10px;
    font-weight: 600;
    margin-top: 15px;
}

.challenge-status.locked {
    background: rgba(255, 193, 7, 0.1);
    color: #f57c00;
    border: 2px solid rgba(255, 193, 7, 0.3);
}

.challenge-status.unlocked {
    background: rgba(76, 175, 80, 0.1);
    color: #2e7d32;
    border: 2px solid rgba(76, 175, 80, 0.3);
}

.challenge-status.completed {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    border: 2px solid rgba(102, 126, 234, 0.3);
}

.status-icon {
    font-size: 1.3rem;
}

.status-text {
    font-size: 1rem;
}

.challenge-reward {
    background: linear-gradient(135deg, #ffd89b 0%, #19547b 100%);
    padding: 20px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.reward-icon {
    font-size: 1.8rem;
    animation: bounce 1s ease-in-out infinite;
}

.reward-text {
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
}

/* Challenge Input */
.challenge-input-container {
    margin: 20px 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.challenge-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #fff;
}

.challenge-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn-submit {
    width: 100%;
    padding: 12px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.btn-submit:active {
    transform: translateY(0);
}

/* Challenge Result Messages */
.challenge-result {
    margin: 15px 0;
    text-align: center;
}

.success-message {
    color: #2e7d32;
    font-size: 1.1rem;
    font-weight: 700;
    padding: 15px;
    background: rgba(76, 175, 80, 0.1);
    border-radius: 10px;
    border: 2px solid rgba(76, 175, 80, 0.3);
    animation: bounceIn 0.5s ease-out;
}

.error-message {
    color: #c62828;
    font-size: 1rem;
    font-weight: 600;
    padding: 12px;
    background: rgba(244, 67, 54, 0.1);
    border-radius: 10px;
    border: 2px solid rgba(244, 67, 54, 0.3);
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-10px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(10px);
    }
}

@keyframes explode {
    to {
        transform: translate(
            calc((var(--x, 0) - 50) * 3px),
            calc((var(--y, 0) - 50) * 3px)
        ) rotate(720deg);
        opacity: 0;
    }
}

@keyframes confettiExplosion {
    0% {
        transform: translate(0, 0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translate(var(--tx), var(--ty)) rotate(720deg);
        opacity: 0;
    }
}

@keyframes zoomIn {
    from {
        transform: scale(0.3);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Section Récompense Finale */
.final-reward-section {
    margin-top: 80px;
    padding: 40px 20px 80px 20px;
    position: relative;
    z-index: 10;
}

.final-reward-card {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border-radius: 30px;
    padding: 60px 40px;
    text-align: center;
    box-shadow: 0 25px 70px rgba(245, 87, 108, 0.5);
    animation: pulse 2s ease-in-out infinite;
    border: 3px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.congrats-title {
    color: white;
    font-size: 2.8rem;
    margin-bottom: 25px;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.4);
    font-weight: 800;
    letter-spacing: 2px;
}

.congrats-text {
    color: white;
    font-size: 1.4rem;
    margin-bottom: 40px;
    line-height: 2;
    font-weight: 500;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

.btn-reveal-gift {
    background: white;
    color: #f5576c;
    padding: 25px 60px;
    font-size: 1.6rem;
    font-weight: 800;
    border: none;
    border-radius: 60px;
    cursor: pointer;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    transition: all 0.4s ease;
    animation: bounce 1.5s ease-in-out infinite;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.btn-reveal-gift:hover {
    transform: scale(1.15) translateY(-5px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    background: linear-gradient(135deg, #ffffff 0%, #ffe6f0 100%);
}

.btn-reveal-gift:active {
    transform: scale(1.05);
}

/* Modal de la carte cadeau */
.gift-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
}

.gift-modal-content {
    background: white;
    border-radius: 25px;
    padding: 0;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.close-modal {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 2rem;
    font-weight: bold;
    color: #333;
    cursor: pointer;
    z-index: 10001;
    transition: color 0.3s ease;
}

.close-modal:hover {
    color: #f5576c;
}

.gift-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 30px;
    border-radius: 25px 25px 0 0;
    text-align: center;
}

.gift-header h2 {
    color: white;
    font-size: 2rem;
    margin: 0;
}

.gift-body {
    padding: 40px;
}

.amazon-gift-card {
    text-align: center;
}

.amazon-logo-text {
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.amazon-logo-img {
    width: 250px;
    height: auto;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.15));
}

.gift-code {
    background: linear-gradient(135deg, #ffd89b 0%, #19547b 100%);
    padding: 30px;
    border-radius: 15px;
    margin-top: 20px;
}

.gift-code-label {
    color: white;
    font-size: 1.2rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.gift-code-value {
    color: white;
    font-size: 2rem;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    letter-spacing: 3px;
    background: rgba(0, 0, 0, 0.2);
    padding: 15px;
    border-radius: 10px;
    margin: 20px 0;
}

.gift-instructions {
    color: white;
    font-size: 1rem;
    margin-top: 15px;
    font-style: italic;
}

/* Responsive */
@media (max-width: 768px) {
    .challenges-grid {
        grid-template-columns: 1fr;
    }
    
    .congrats-header h1 {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .challenge-intro p {
        text-align: center;
    }
    
    .congrats-title {
        font-size: 2rem;
    }
    
    .congrats-text {
        font-size: 1.2rem;
    }
    
    .btn-reveal-gift {
        font-size: 1.2rem;
        padding: 20px 40px;
    }
    
    .final-reward-card {
        padding: 40px 25px;
    }
}

@media (max-width: 480px) {
    .login-card,
    .welcome-card,
    .explanation-card {
        padding: 30px 20px;
    }
    
    .birthday-header h1,
    .congrats-header h1 {
        font-size: 1.5rem;
    }
    
    .balloon {
        font-size: 2rem;
    }
    
    .home-page-container {
        padding: 20px 10px;
    }
    
    .trophy-emoji {
        font-size: 3rem;
    }
    
    .main-text {
        font-size: 1.1rem;
    }
    
    .challenge-intro h2 {
        font-size: 1.5rem;
    }
    
    .motivation-box {
        flex-direction: column;
        gap: 10px;
    }
}

