/* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #1a4d3a 0%, #2d8659 50%, #4ade80 100%);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Arrière-plan jungle animé */
.jungle-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(34, 197, 94, 0.4) 0%, transparent 60%),
        radial-gradient(circle at 80% 20%, rgba(251, 191, 36, 0.4) 0%, transparent 60%),
        radial-gradient(circle at 40% 40%, rgba(239, 68, 68, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 60% 80%, rgba(168, 85, 247, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 90% 60%, rgba(6, 182, 212, 0.3) 0%, transparent 50%);
    animation: jungleMove 25s ease-in-out infinite;
    z-index: -1;
}

/* Ajout d'éléments décoratifs jungle */
.jungle-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 15% 25%, rgba(34, 197, 94, 0.1) 0%, transparent 30%),
        radial-gradient(circle at 85% 75%, rgba(251, 191, 36, 0.1) 0%, transparent 30%),
        radial-gradient(circle at 50% 10%, rgba(239, 68, 68, 0.1) 0%, transparent 25%);
    animation: jungleMove 30s ease-in-out infinite reverse;
}

.jungle-background::after {
    content: '🌿 🦋 🌺 🐆 🌿 🦜 🌺 🦋 🌿 🐆 🌺 🦜';
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    height: 100%;
    font-size: 2rem;
    opacity: 0.1;
    animation: floatingElements 40s linear infinite;
    pointer-events: none;
    display: flex;
    align-items: center;
    white-space: nowrap;
}

@keyframes floatingElements {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(0%); }
}

@keyframes jungleMove {
    0%, 100% { transform: translateX(0) translateY(0) scale(1); }
    25% { transform: translateX(-20px) translateY(-10px) scale(1.05); }
    50% { transform: translateX(20px) translateY(10px) scale(0.95); }
    75% { transform: translateX(-10px) translateY(20px) scale(1.02); }
}

/* Header */
header {
    text-align: center;
    padding: 2rem 1rem;
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border-bottom: 3px solid #fbbf24;
}

.main-title {
    font-size: 3.5rem;
    font-weight: bold;
    background: linear-gradient(45deg, #fbbf24, #f59e0b, #ef4444, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    margin-bottom: 1rem;
    animation: titleGlow 3s ease-in-out infinite;
}

@keyframes titleGlow {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.2); }
}

.subtitle {
    font-size: 1.3rem;
    color: #ffffff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    font-weight: 500;
}

/* Container principal */
main {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    padding: 2rem;
}

.wheel-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.wheel-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

/* Canvas de la roue */
#wheelCanvas {
    border-radius: 50%;
    box-shadow: 
        0 0 40px rgba(251, 191, 36, 0.6),
        0 0 80px rgba(34, 197, 94, 0.4),
        0 0 120px rgba(239, 68, 68, 0.2),
        inset 0 0 30px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    background: conic-gradient(
        from 0deg,
        #ef4444 0deg 36deg,
        #f97316 36deg 72deg,
        #fbbf24 72deg 108deg,
        #22c55e 108deg 144deg,
        #06b6d4 144deg 180deg,
        #3b82f6 180deg 216deg,
        #8b5cf6 216deg 252deg,
        #ec4899 252deg 288deg,
        #f43f5e 288deg 324deg,
        #ef4444 324deg 360deg
    );
    position: relative;
}

#wheelCanvas:hover {
    transform: scale(1.05);
    box-shadow: 
        0 0 50px rgba(251, 191, 36, 0.8),
        0 0 100px rgba(34, 197, 94, 0.5),
        0 0 150px rgba(239, 68, 68, 0.3),
        inset 0 0 40px rgba(0, 0, 0, 0.4);
}

/* Effet de pulsation pour la roue */
@keyframes wheelPulse {
    0%, 100% { 
        box-shadow: 
            0 0 40px rgba(251, 191, 36, 0.6),
            0 0 80px rgba(34, 197, 94, 0.4),
            0 0 120px rgba(239, 68, 68, 0.2);
    }
    50% { 
        box-shadow: 
            0 0 60px rgba(251, 191, 36, 0.8),
            0 0 120px rgba(34, 197, 94, 0.6),
            0 0 180px rgba(239, 68, 68, 0.4);
    }
}

#wheelCanvas {
    animation: wheelPulse 4s ease-in-out infinite;
}

/* Pointeur de la roue */
.wheel-pointer {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-top: 30px solid #fbbf24;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    z-index: 10;
}

/* Bouton de rotation */
.spin-button {
    background: linear-gradient(45deg, #ef4444, #f97316, #fbbf24);
    border: none;
    border-radius: 50px;
    padding: 1rem 2rem;
    font-size: 1.2rem;
    font-weight: bold;
    color: white;
    cursor: pointer;
    box-shadow: 
        0 8px 20px rgba(239, 68, 68, 0.4),
        inset 0 2px 4px rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.spin-button:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 
        0 12px 25px rgba(239, 68, 68, 0.6),
        inset 0 2px 4px rgba(255, 255, 255, 0.3);
}

.spin-button:active {
    transform: translateY(-1px) scale(1.02);
}

.spin-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.button-icon {
    font-size: 1.5rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-5px); }
    60% { transform: translateY(-3px); }
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: linear-gradient(135deg, #1f2937 0%, #374151 100%);
    margin: 2% auto;
    padding: 0;
    border-radius: 20px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from { opacity: 0; transform: translateY(-50px) scale(0.9); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.close {
    color: #fbbf24;
    float: right;
    font-size: 2rem;
    font-weight: bold;
    padding: 1rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: #f59e0b;
}

.movie-details {
    display: flex;
    gap: 2rem;
    padding: 2rem;
    color: white;
}

.movie-poster {
    flex-shrink: 0;
}

.movie-poster img {
    width: 200px;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.movie-info {
    flex: 1;
}

.movie-info h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, #fbbf24, #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.movie-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #d1d5db;
}

.movie-meta span {
    background: rgba(251, 191, 36, 0.2);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    border: 1px solid #fbbf24;
}

.movie-actions {
    margin: 1.5rem 0;
}

.action-button {
    background: linear-gradient(45deg, #22c55e, #16a34a);
    border: none;
    border-radius: 25px;
    padding: 0.8rem 1.5rem;
    color: white;
    font-weight: bold;
    cursor: pointer;
    margin-right: 1rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.action-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(34, 197, 94, 0.4);
}

.trailer-btn {
    background: linear-gradient(45deg, #ef4444, #dc2626);
}

.trailer-btn:hover {
    box-shadow: 0 5px 15px rgba(239, 68, 68, 0.4);
}

.spin-again-btn {
    background: linear-gradient(45deg, #8b5cf6, #7c3aed);
    width: 100%;
    margin-top: 1rem;
}

.spin-again-btn:hover {
    box-shadow: 0 5px 15px rgba(139, 92, 246, 0.4);
}

.languages {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(34, 197, 94, 0.1);
    border-radius: 10px;
    border-left: 4px solid #22c55e;
}

.streaming-section {
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(251, 191, 36, 0.1);
    border-radius: 15px;
    border: 1px solid #fbbf24;
}

.streaming-section h3 {
    margin-bottom: 1rem;
    color: #fbbf24;
}

.streaming-platforms {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.platform {
    background: linear-gradient(45deg, #374151, #4b5563);
    padding: 0.8rem 1.2rem;
    border-radius: 10px;
    border: 1px solid #6b7280;
    text-align: center;
    min-width: 120px;
}

.platform-name {
    font-weight: bold;
    color: #fbbf24;
    display: block;
    margin-bottom: 0.3rem;
}

.platform-price {
    color: #22c55e;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .main-title {
        font-size: 2.5rem;
    }
    
    .subtitle {
        font-size: 1.1rem;
    }
    
    #wheelCanvas {
        width: 300px;
        height: 300px;
    }
    
    .movie-details {
        flex-direction: column;
        text-align: center;
    }
    
    .movie-poster img {
        width: 150px;
        margin: 0 auto;
    }
    
    .modal-content {
        width: 95%;
        margin: 5% auto;
    }
    
    .streaming-platforms {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .main-title {
        font-size: 2rem;
    }
    
    #wheelCanvas {
        width: 250px;
        height: 250px;
    }
    
    .spin-button {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
}

