/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: #000;
    color: #fff;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

/* Twinkling Stars Background */
.stars-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.stars, .stars2, .stars3 {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
}

.stars {
    background-image: 
        radial-gradient(2px 2px at 20px 30px, #eee, transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(255,255,255,0.8), transparent),
        radial-gradient(1px 1px at 90px 40px, #fff, transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(255,255,255,0.6), transparent),
        radial-gradient(2px 2px at 160px 30px, #ddd, transparent);
    background-repeat: repeat;
    background-size: 200px 100px;
    animation: twinkle 3s linear infinite;
}

.stars2 {
    background-image: 
        radial-gradient(1px 1px at 40px 60px, #fff, transparent),
        radial-gradient(1px 1px at 120px 10px, rgba(255,255,255,0.7), transparent),
        radial-gradient(2px 2px at 170px 50px, #eee, transparent);
    background-repeat: repeat;
    background-size: 250px 120px;
    animation: twinkle 4s linear infinite;
}

.stars3 {
    background-image: 
        radial-gradient(1px 1px at 60px 90px, rgba(255,255,255,0.5), transparent),
        radial-gradient(2px 2px at 100px 20px, #fff, transparent),
        radial-gradient(1px 1px at 150px 70px, rgba(255,255,255,0.8), transparent);
    background-repeat: repeat;
    background-size: 300px 150px;
    animation: twinkle 5s linear infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* Sidebar Styles */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 320px;
    height: 100vh;
    background: rgba(15, 15, 30, 0.95);
    backdrop-filter: blur(10px);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    transform: translateX(0);
    transition: transform 0.3s ease-in-out;
    z-index: 1000;
    overflow-y: auto;
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.5);
}

.sidebar.hidden {
    transform: translateX(-100%);
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-header h2 {
    font-size: 1.2rem;
    color: #00d4ff;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

.sidebar-toggle {
    background: none;
    border: 2px solid #00d4ff;
    color: #00d4ff;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.sidebar-toggle:hover {
    background: #00d4ff;
    color: #000;
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.5);
}

.sidebar-content {
    padding: 20px;
}

.control-section {
    margin-bottom: 30px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.control-section h3 {
    color: #00d4ff;
    margin-bottom: 15px;
    font-size: 1.1rem;
    text-shadow: 0 0 5px rgba(0, 212, 255, 0.3);
}

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

.control-group label {
    display: block;
    margin-bottom: 5px;
    color: #ccc;
    font-size: 0.9rem;
}

.control-group select,
.control-group input[type="range"] {
    width: 100%;
    padding: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: #fff;
    font-size: 0.9rem;
}

.control-group select:focus,
.control-group input[type="range"]:focus {
    outline: none;
    border-color: #00d4ff;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

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

.preset-btn {
    padding: 10px;
    background: linear-gradient(45deg, #1a1a2e, #16213e);
    border: 1px solid #00d4ff;
    color: #00d4ff;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.preset-btn:hover {
    background: linear-gradient(45deg, #00d4ff, #0099cc);
    color: #000;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 212, 255, 0.3);
}

.external-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.external-links a {
    color: #00d4ff;
    text-decoration: none;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    font-size: 0.8rem;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.external-links a:hover {
    background: rgba(0, 212, 255, 0.1);
    border-color: #00d4ff;
    transform: translateX(5px);
}

/* Main Content */
.main-content {
    margin-left: 320px;
    min-height: 100vh;
    padding: 20px;
    transition: margin-left 0.3s ease-in-out;
}

.main-content.sidebar-hidden {
    margin-left: 0;
}

.sidebar-toggle-main {
    position: fixed;
    top: 20px;
    left: 20px;
    background: linear-gradient(45deg, #1a1a2e, #16213e);
    border: 2px solid #00d4ff;
    color: #00d4ff;
    padding: 12px 16px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.9rem;
    z-index: 999;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.sidebar-toggle-main:hover {
    background: linear-gradient(45deg, #00d4ff, #0099cc);
    color: #000;
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}

.main-header {
    text-align: center;
    margin: 60px 0 40px 0;
    padding: 20px;
}

.main-header h1 {
    font-size: 2.5rem;
    color: #00d4ff;
    text-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
    margin-bottom: 10px;
    background: linear-gradient(45deg, #00d4ff, #0099cc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.main-header p {
    font-size: 1.1rem;
    color: #ccc;
    opacity: 0.8;
}

.environments-container {
    display: flex;
    flex-direction: column;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.environment-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.environment-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 212, 255, 0.2);
}

.environment-card h2 {
    text-align: center;
    color: #00d4ff;
    font-size: 1.8rem;
    margin-bottom: 20px;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

/* Footer */
.main-footer {
    margin-top: 60px;
    padding: 40px 20px 20px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.02);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.footer-links a {
    color: #00d4ff;
    text-decoration: none;
    padding: 8px 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    font-size: 0.8rem;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.footer-links a:hover {
    background: rgba(0, 212, 255, 0.1);
    border-color: #00d4ff;
    transform: translateY(-2px);
}

.main-footer p {
    color: #666;
    font-size: 0.8rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        transform: translateX(-100%);
    }
    
    .sidebar.visible {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        padding: 15px;
    }
    
    .sidebar-toggle-main {
        top: 15px;
        left: 15px;
        padding: 10px 14px;
        font-size: 0.8rem;
    }
    
    .main-header h1 {
        font-size: 2rem;
    }
    
    .environment-card {
        padding: 20px;
    }
    
    .environment-card h2 {
        font-size: 1.5rem;
    }
    
    .footer-links {
        flex-direction: column;
        align-items: center;
    }
    
    .preset-buttons {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .main-header h1 {
        font-size: 1.8rem;
    }
    
    .main-header p {
        font-size: 1rem;
    }
    
    .environment-card {
        padding: 15px;
    }
    
    .sidebar-content {
        padding: 15px;
    }
    
    .control-section {
        padding: 12px;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .stars, .stars2, .stars3 {
        animation: none;
    }
    
    * {
        transition: none !important;
        animation: none !important;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .sidebar {
        background: rgba(0, 0, 0, 0.95);
        border-right: 2px solid #fff;
    }
    
    .environment-card {
        background: rgba(0, 0, 0, 0.8);
        border: 2px solid #00d4ff;
    }
}

