:root {
    /* Theme variables */
    --primary: #4D9FFF;
    --secondary: #1A1A1A;
    --accent: #00B4FF;
    --background: #0A0A2A;
    --text: #E0E0E0;
    --card-bg: #1A1A3A;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background-color: var(--background);
    position: relative;
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

/* Animated stars */
@keyframes starfield {
    0% { 
        transform: translateX(100vw); 
        opacity: 0; 
    }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { 
        transform: translateX(-100vw); 
        opacity: 0; 
    }
}

@keyframes starfield2 {
    0% { 
        transform: translateX(100vw); 
        opacity: 0; 
    }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { 
        transform: translateX(-100vw); 
        opacity: 0; 
    }
}

.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    opacity: 1;
    overflow: hidden;
}

.star {
    position: absolute;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    box-shadow: 0 0 4px rgba(255, 255, 255, 0.7),
                0 0 8px rgba(255, 255, 255, 0.5),
                0 0 12px rgba(255, 255, 255, 0.3);
    animation: starfield 20s linear infinite;
    pointer-events: none;
    transform: translateX(100vw);
    opacity: 0;
}

/* Random sizes and positions for stars */
.star:nth-child(1) { width: 1px; height: 1px; top: 7%; animation-delay: 0s; animation-duration: 18s; }
.star:nth-child(2) { width: 2px; height: 2px; top: 23%; animation-delay: 2s; animation-duration: 22s; }
.star:nth-child(3) { width: 1px; height: 1px; top: 37%; animation-delay: 4s; animation-duration: 25s; }
.star:nth-child(4) { width: 2px; height: 2px; top: 52%; animation-delay: 6s; animation-duration: 20s; }
.star:nth-child(5) { width: 1px; height: 1px; top: 68%; animation-delay: 8s; animation-duration: 28s; }
.star:nth-child(6) { width: 2px; height: 2px; top: 83%; animation-delay: 10s; animation-duration: 24s; }
.star:nth-child(7) { width: 1px; height: 1px; top: 15%; animation-delay: 12s; animation-duration: 26s; }
.star:nth-child(8) { width: 2px; height: 2px; top: 31%; animation-delay: 14s; animation-duration: 23s; }
.star:nth-child(9) { width: 1px; height: 1px; top: 45%; animation-delay: 16s; animation-duration: 27s; }
.star:nth-child(10) { width: 2px; height: 2px; top: 59%; animation-delay: 18s; animation-duration: 21s; }

/* Second layer with different animation */
.star:nth-child(11) { width: 1px; height: 1px; top: 12%; animation: starfield2 30s linear infinite; animation-delay: 0s; }
.star:nth-child(12) { width: 2px; height: 2px; top: 28%; animation: starfield2 32s linear infinite; animation-delay: 3s; }
.star:nth-child(13) { width: 1px; height: 1px; top: 42%; animation: starfield2 28s linear infinite; animation-delay: 6s; }
.star:nth-child(14) { width: 2px; height: 2px; top: 56%; animation: starfield2 34s linear infinite; animation-delay: 9s; }
.star:nth-child(15) { width: 1px; height: 1px; top: 72%; animation: starfield2 29s linear infinite; animation-delay: 12s; }
.star:nth-child(16) { width: 2px; height: 2px; top: 86%; animation: starfield2 31s linear infinite; animation-delay: 15s; }
.star:nth-child(17) { width: 1px; height: 1px; top: 8%; animation: starfield2 33s linear infinite; animation-delay: 18s; }
.star:nth-child(18) { width: 2px; height: 2px; top: 24%; animation: starfield2 27s linear infinite; animation-delay: 21s; }
.star:nth-child(19) { width: 1px; height: 1px; top: 38%; animation: starfield2 30s linear infinite; animation-delay: 24s; }
.star:nth-child(20) { width: 2px; height: 2px; top: 52%; animation: starfield2 32s linear infinite; animation-delay: 27s; }

/* Third layer with varying speeds */
.star:nth-child(21) { width: 1px; height: 1px; top: 17%; animation: starfield 35s linear infinite; animation-delay: 0s; }
.star:nth-child(22) { width: 2px; height: 2px; top: 33%; animation: starfield 38s linear infinite; animation-delay: 4s; }
.star:nth-child(23) { width: 1px; height: 1px; top: 47%; animation: starfield 36s linear infinite; animation-delay: 8s; }
.star:nth-child(24) { width: 2px; height: 2px; top: 61%; animation: starfield 39s linear infinite; animation-delay: 12s; }
.star:nth-child(25) { width: 1px; height: 1px; top: 75%; animation: starfield 37s linear infinite; animation-delay: 16s; }
.star:nth-child(26) { width: 2px; height: 2px; top: 89%; animation: starfield 40s linear infinite; animation-delay: 20s; }
.star:nth-child(27) { width: 1px; height: 1px; top: 13%; animation: starfield 35s linear infinite; animation-delay: 24s; }
.star:nth-child(28) { width: 2px; height: 2px; top: 27%; animation: starfield 38s linear infinite; animation-delay: 28s; }
.star:nth-child(29) { width: 1px; height: 1px; top: 41%; animation: starfield 36s linear infinite; animation-delay: 32s; }
.star:nth-child(30) { width: 2px; height: 2px; top: 55%; animation: starfield 39s linear infinite; animation-delay: 36s; }

/* Space background with nebula effects */
@keyframes nebulaFlow {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(2%, 1%) scale(1.1); }
    100% { transform: translate(0, 0) scale(1); }
}

@keyframes nebulaPulse {
    0% { opacity: 0.3; }
    50% { opacity: 0.5; }
    100% { opacity: 0.3; }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    background-color: rgba(26, 26, 58, 0.8);
    color: white;
    padding: 60px 0;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary);
    text-shadow: 0 0 10px rgba(77, 159, 255, 0.3);
}

header p {
    font-size: 1.2rem;
    opacity: 0.9;
    color: var(--text);
}

main {
    padding: 40px 0;
}

.lab-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    padding: 20px 0;
    max-width: 1200px;
    margin: 0 auto;
}

.lab-card {
    background-color: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
    color: var(--text);
    overflow: hidden;
    max-width: 400px;
    margin: 0 auto;
    width: 100%;
}

.lab-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

.lab-content {
    padding: 20px;
}

.lab-content h2 {
    color: var(--primary);
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.lab-content p {
    margin-bottom: 15px;
    color: #B0B0B0;
}

.difficulty {
    display: inline-block;
    padding: 4px 12px;
    background-color: var(--accent);
    color: white;
    border-radius: 16px;
    font-size: 0.9rem;
}

footer {
    background-color: var(--secondary);
    color: white;
    padding: 20px 0;
    text-align: center;
    margin-top: auto;
    position: sticky;
    bottom: 0;
    width: 100%;
}

/* Responsive design */
@media (max-width: 768px) {
    header {
        padding: 40px 0;
    }

    header h1 {
        font-size: 2rem;
    }

    .lab-grid {
        grid-template-columns: 1fr;
    }
}

.header-content {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.theme-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 8px 16px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.theme-icon {
    font-size: 1.2rem;
}

.theme-text {
    font-size: 0.9rem;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        /* Purple nebula */
        radial-gradient(circle at 30% 30%, rgba(147, 51, 234, 0.3) 0%, transparent 70%),
        radial-gradient(circle at 70% 70%, rgba(147, 51, 234, 0.3) 0%, transparent 70%),
        /* Blue nebula */
        radial-gradient(circle at 20% 80%, rgba(59, 130, 246, 0.3) 0%, transparent 70%),
        radial-gradient(circle at 80% 20%, rgba(59, 130, 246, 0.3) 0%, transparent 70%),
        /* Pink nebula */
        radial-gradient(circle at 50% 50%, rgba(236, 72, 153, 0.3) 0%, transparent 70%);
    background-size: 100% 100%;
    z-index: -1;
    opacity: 1;
    animation: nebulaFlow 20s ease-in-out infinite;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        /* Teal nebula */
        radial-gradient(circle at 40% 60%, rgba(45, 212, 191, 0.2) 0%, transparent 70%),
        /* Indigo nebula */
        radial-gradient(circle at 60% 40%, rgba(99, 102, 241, 0.2) 0%, transparent 70%),
        /* Rose nebula */
        radial-gradient(circle at 50% 50%, rgba(244, 63, 94, 0.2) 0%, transparent 70%);
    background-size: 100% 100%;
    z-index: -1;
    opacity: 1;
    animation: nebulaPulse 15s ease-in-out infinite;
}

.lab-card {
    background-color: var(--card-bg);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.lab-card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

.lab-content h2 {
    color: var(--primary);
}

.lab-content p {
    color: #B0B0B0;
}

.button-container {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
}

.community-button, .contact-button {
    display: inline-block;
    background-color: var(--primary);
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.community-button:hover, .contact-button:hover {
    background-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
} 