* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    min-height: 100vh;
    color: #e2e8f0;
    overflow-x: hidden;
}

.container {
    max-width: 100%;
    margin: 0;
    padding: 10px;
    height: 100vh;
    overflow: hidden;
}

.header {
    text-align: center;
    margin-bottom: 15px;
    padding: 0 10px;
}

.header h1 {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    color: #3b82f6;
    text-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
    margin-bottom: 5px;
}

.main-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    align-items: start;
    height: calc(100vh - 120px);
    overflow: hidden;
}

@media (min-width: 1024px) {
    .main-content {
        grid-template-columns: 320px 1fr;
        gap: 15px;
    }
}

.settings-panel {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid #334155;
    border-radius: 10px;
    padding: 15px;
    backdrop-filter: blur(10px);
    height: 100%;
    overflow-y: scroll;
}

/* Styles personnalisés pour la scrollbar */
.settings-panel::-webkit-scrollbar {
    width: 8px;
}

.settings-panel::-webkit-scrollbar-track {
    background: rgba(51, 65, 85, 0.3);
    border-radius: 4px;
}

.settings-panel::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.6);
    border-radius: 4px;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.settings-panel::-webkit-scrollbar-thumb:hover {
    background: rgba(59, 130, 246, 0.8);
}

/* Styles pour Firefox et autres navigateurs */
.settings-panel {
    scrollbar-width: thin;
    scrollbar-color: rgba(59, 130, 246, 0.6) rgba(51, 65, 85, 0.3);
}

.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    cursor: pointer;
    padding: 10px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 8px;
    transition: background 0.3s ease;
}

.settings-header:hover {
    background: rgba(59, 130, 246, 0.2);
}

.settings-header h3 {
    color: #3b82f6;
    font-size: 1.2rem;
}

.toggle-icon {
    transition: transform 0.3s ease;
}

.settings-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.settings-content.open {
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 8px;
}

.element-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    padding: 10px;
    background: rgba(51, 65, 85, 0.3);
    border-radius: 8px;
    transition: background 0.3s ease;
}

.element-item:hover {
    background: rgba(51, 65, 85, 0.5);
}

.element-item input[type="checkbox"] {
    margin-right: 10px;
    transform: scale(1.2);
}

.element-item label {
    flex: 1;
    cursor: pointer;
}

.wheel-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    justify-content: center;
    height: 100%;
}

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

.wheel {
    width: clamp(280px, 40vw, 420px);
    height: clamp(280px, 40vw, 420px);
    border-radius: 50%;
    border: 4px solid #3b82f6;
    position: relative;
    transition: transform 3s cubic-bezier(0.23, 1, 0.32, 1);
    box-shadow: 
        0 0 30px rgba(59, 130, 246, 0.3),
        inset 0 0 30px rgba(59, 130, 246, 0.1);
}

.wheel-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
    z-index: 10;
}

.spin-btn {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(59, 130, 246, 0.3);
}

.spin-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

.spin-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Styles pour la modale de résultat */
.result-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}

.result-modal.show {
    display: flex;
}

.result-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.result-modal-content {
    position: relative;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border: 2px solid #3b82f6;
    border-radius: 20px;
    min-width: 400px;
    max-width: 90vw;
    max-height: 90vh;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 40px rgba(59, 130, 246, 0.3);
    animation: modalAppear 0.3s ease-out;
}

@keyframes modalAppear {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.result-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #334155;
}

.result-modal-header h2 {
    color: #3b82f6;
    margin: 0;
    font-size: 1.5rem;
    text-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
}

.result-modal-close {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.result-modal-close:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    transform: scale(1.1);
}

.result-modal-body {
    padding: 30px 25px;
    text-align: center;
    color: #e2e8f0;
}

.result-modal-footer {
    padding: 15px 25px;
    border-top: 1px solid #334155;
    text-align: center;
}

.modal-winner-display {
    margin: 20px 0;
    padding: 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    color: white;
    text-align: center;
    animation: winnerPulse 0.6s ease-in-out;
}

.modal-winner-text {
    font-size: 18px;
    margin-bottom: 15px;
    opacity: 0.9;
}

.modal-winner-name {
    font-size: 2.2rem;
    font-weight: bold;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    animation: winnerGlow 2s ease-in-out infinite alternate;
}

@keyframes winnerGlow {
    from { text-shadow: 2px 2px 4px rgba(0,0,0,0.3); }
    to { text-shadow: 2px 2px 4px rgba(0,0,0,0.3), 0 0 20px rgba(255,255,255,0.3); }
}

.youtube-embed {
    margin: 15px 0;
    border-radius: 10px;
    overflow: hidden;
}

.youtube-embed iframe {
    width: 100%;
    height: 200px;
    border: none;
}

/* Toolbar au-dessus de la vidéo */
/* (supprimé) .video-toolbar plus utilisée */

/* Overlay vidéo élargi */
.video-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
}

.video-overlay-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(2px);
}

.video-overlay-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90vw;
    height: 90vh;
    max-width: 1200px;
    max-height: 90vh;
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    padding: 16px;
    display: flex;
    flex-direction: column;
}

.video-overlay-close {
    align-self: flex-end;
}

.video-overlay-frame {
    flex: 1;
    border-radius: 8px;
    overflow: hidden;
}

.video-overlay-frame iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.edit-form {
    margin-top: 20px;
    padding: 20px;
    background: rgba(51, 65, 85, 0.3);
    border-radius: 10px;
    display: none;
}

.edit-form.show {
    display: block;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #94a3b8;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid #334155;
    border-radius: 8px;
    color: #e2e8f0;
    font-size: 14px;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    margin: 5px;
}

.btn-primary {
    background: #3b82f6;
    color: white;
}

.btn-primary:hover {
    background: #2563eb;
}

.btn-secondary {
    background: #6b7280;
    color: white;
}

.btn-secondary:hover {
    background: #4b5563;
}

.wheel-pointer {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-top: 30px solid #f59e0b;
    z-index: 5;
}

/* Styles pour le timer sous la roue */
.wheel-timer-display {
    margin-top: 20px;
    padding: 15px 20px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9) 0%, rgba(30, 41, 59, 0.9) 100%);
    border: 1px solid #334155;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    min-width: 300px;
}

.wheel-timer-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 10px;
}

.wheel-timer-icon {
    font-size: 18px;
    margin-right: 8px;
}

.wheel-timer-label {
    color: #94a3b8;
    font-size: 16px;
    font-weight: 500;
}

.wheel-timer-value {
    color: #3b82f6;
    font-size: 24px;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
    min-width: 40px;
    text-align: center;
}

.wheel-timer-unit {
    color: #94a3b8;
    font-size: 14px;
}

.wheel-timer-progress {
    width: 100%;
    height: 6px;
    background: rgba(51, 65, 85, 0.5);
    border-radius: 3px;
    overflow: hidden;
}

.wheel-timer-progress-bar {
    height: 100%;
    background: #3b82f6;
    border-radius: 3px;
    transition: width 1s linear, background-color 0.3s ease;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.4);
}

/* États du timer */
.wheel-timer-display.state-not-started {
    border-color: #64748b;
}

.wheel-timer-display.state-not-started .wheel-timer-icon {
    color: #64748b;
}

.wheel-timer-display.state-not-started .wheel-timer-label {
    color: #64748b;
}

.wheel-timer-display.state-running {
    border-color: #3b82f6;
    animation: pulse-running 2s ease-in-out infinite alternate;
}

.wheel-timer-display.state-running .wheel-timer-icon {
    color: #3b82f6;
}

.wheel-timer-display.state-manual {
    border-color: #f59e0b;
}

.wheel-timer-display.state-manual .wheel-timer-icon {
    color: #ef4444;
    animation: blink 1s ease-in-out infinite;
}

.wheel-timer-display.state-manual .wheel-timer-label {
    color: #f59e0b;
}

.wheel-timer-display.state-finished {
    border-color: #22c55e;
}

.wheel-timer-display.state-finished .wheel-timer-icon {
    color: #22c55e;
}

.wheel-timer-display.state-finished .wheel-timer-label {
    color: #22c55e;
}

@keyframes pulse-running {
    from { box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2), 0 0 20px rgba(59, 130, 246, 0.2); }
    to { box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2), 0 0 30px rgba(59, 130, 246, 0.4); }
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.5; }
}

@media (max-width: 1023px) {
    .settings-panel {
        order: 2;
    }
    
    .wheel-container {
        order: 1;
    }
    
    .wheel-timer-display {
        min-width: 250px;
        margin-top: 15px;
        padding: 12px 15px;
    }
    
    .wheel-timer-content {
        gap: 6px;
    }
    
    .wheel-timer-label {
        font-size: 14px;
    }
    
    .wheel-timer-value {
        font-size: 20px;
    }
    
    .wheel-timer-unit {
        font-size: 12px;
    }
}


