body {
    background: linear-gradient(135deg, #090C15 0%, #0A0D18 50%, #0E0634 100%);
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

body.light-theme {
    background: linear-gradient(135deg, #f5f7fa 0%, #e8eaf0 50%, #d4d8e8 100%);
    color: #1a1a2e;
}

.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    contain: layout style paint;
}

.star {
    position: absolute;
    background: white;
    border-radius: 50%;
    animation: twinkle 3s infinite;
    will-change: opacity, transform;
    transition: transform 0.1s ease-out;
}

@keyframes twinkle {
    0%, 100% {
        opacity: 0.2;
        transform: scale(0.8);
    }
    50% {
        opacity: 0.9;
        transform: scale(1.1);
    }
}

@media (max-width: 768px) {
    .star {
        animation-duration: 4s;
    }

    @keyframes twinkle {
        0%, 100% {
            opacity: 0.3;
            transform: scale(0.9);
        }
        50% {
            opacity: 0.8;
            transform: scale(1.05);
        }
    }
}

@media (prefers-reduced-motion: reduce) {
    .star {
        animation: none;
        opacity: 0.5;
        transition: none;
    }
}