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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0c1445 0%, #1e3c72 50%, #2a5298 100%);
    min-height: 100vh;
    color: #fff;
    overflow-x: hidden;
}

/* Bouton Labs en haut à gauche */
.labs-btn {
    position: fixed;
    top: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.labs-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    text-align: center;
    margin-bottom: 40px;
    padding: 20px;
}

header h1 {
    font-size: 3rem;
    font-weight: 300;
    margin-bottom: 10px;
    text-shadow: 0 2px 20px rgba(255, 193, 7, 0.3);
}

header p {
    font-size: 1.2rem;
    opacity: 0.8;
    font-weight: 300;
}

main {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 40px;
    align-items: start;
}

.sun-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 500px;
    position: relative;
}

.sun {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: radial-gradient(circle, #ffd700 0%, #ff8c00 50%, #ff6347 100%);
    position: relative;
    box-shadow: 
        0 0 50px rgba(255, 215, 0, 0.8),
        0 0 100px rgba(255, 140, 0, 0.6),
        0 0 150px rgba(255, 99, 71, 0.4);
    animation: sunPulse 3s ease-in-out infinite alternate;
    transition: all 0.3s ease;
}

.sun-rays {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: conic-gradient(
        from 0deg,
        transparent 0deg,
        rgba(255, 215, 0, 0.3) 45deg,
        transparent 90deg,
        rgba(255, 215, 0, 0.3) 135deg,
        transparent 180deg,
        rgba(255, 215, 0, 0.3) 225deg,
        transparent 270deg,
        rgba(255, 215, 0, 0.3) 315deg,
        transparent 360deg
    );
    animation: rotate 20s linear infinite;
}

.controls {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.control-group {
    margin-bottom: 25px;
}

.control-group label {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 10px;
    font-weight: 500;
}

input[type="range"] {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.2);
    outline: none;
    appearance: none;
    margin-bottom: 10px;
    cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ffd700;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(255, 215, 0, 0.5);
    transition: all 0.2s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.8);
}

input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ffd700;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 10px rgba(255, 215, 0, 0.5);
}

.value {
    font-weight: bold;
    color: #ffd700;
    font-size: 1rem;
}

.preset-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 25px 0;
}

.preset {
    padding: 12px 15px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.preset:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: #ffd700;
    transform: translateY(-2px);
}

.preset.active {
    background: rgba(255, 215, 0, 0.2);
    border-color: #ffd700;
    color: #ffd700;
}

.session-controls {
    display: flex;
    gap: 15px;
    margin: 25px 0;
}

.primary-btn, .secondary-btn {
    flex: 1;
    padding: 15px;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.primary-btn {
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    color: #333;
}

.primary-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.4);
}

.secondary-btn {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.secondary-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.2);
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.timer {
    margin-top: 20px;
    text-align: center;
    display: none;
}

.timer.active {
    display: block;
}

.timer-display {
    font-size: 2rem;
    font-weight: 300;
    margin-bottom: 15px;
    color: #ffd700;
}

.timer-progress {
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    overflow: hidden;
}

.timer-bar {
    height: 100%;
    background: linear-gradient(90deg, #ffd700, #ff8c00);
    width: 0%;
    transition: width 1s linear;
}

footer {
    text-align: center;
    padding: 20px;
    margin-top: 40px;
    opacity: 0.7;
    font-weight: 300;
}

@keyframes sunPulse {
    0% {
        transform: scale(1);
        box-shadow: 
            0 0 50px rgba(255, 215, 0, 0.8),
            0 0 100px rgba(255, 140, 0, 0.6),
            0 0 150px rgba(255, 99, 71, 0.4);
    }
    100% {
        transform: scale(1.05);
        box-shadow: 
            0 0 60px rgba(255, 215, 0, 1),
            0 0 120px rgba(255, 140, 0, 0.8),
            0 0 180px rgba(255, 99, 71, 0.6);
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    main {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    header h1 {
        font-size: 2.5rem;
    }
    
    .sun {
        width: 150px;
        height: 150px;
    }
    
    .sun-rays {
        width: 225px;
        height: 225px;
        top: -37.5%;
        left: -37.5%;
    }
    
    .controls {
        order: -1;
        margin-bottom: 20px;
    }
    
    .preset-buttons {
        grid-template-columns: 1fr;
    }
    
    .session-controls {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 15px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    header p {
        font-size: 1rem;
    }
    
    .controls {
        padding: 20px;
    }
    
    .sun {
        width: 120px;
        height: 120px;
    }
    
    .sun-rays {
        width: 180px;
        height: 180px;
        top: -30%;
        left: -30%;
    }
}

/* Dark mode adaptations */
@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .controls {
        background: rgba(0, 0, 0, 0.8);
        border: 2px solid #fff;
    }
    
    .preset {
        border: 2px solid #fff;
        background: rgba(0, 0, 0, 0.5);
    }
}

/* Animation preferences */
@media (prefers-reduced-motion: reduce) {
    .sun {
        animation: none;
    }
    
    .sun-rays {
        animation: none;
    }
    
    * {
        transition: none !important;
    }
}