:root {
    --bg-dark: #050505;
    --text-white: #ffffff;
    --nasa-red: #E03C31;
    --card-bg: #1a1a1a;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-white);
    line-height: 1.6;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    background: rgba(0, 0, 0, 0.9);
    position: fixed;
    width: 100%;
    z-index: 1000;
}

.logo img { height: 40px; }

.nav-links { display: flex; list-style: none; }
.nav-links li a {
    color: white;
    text-decoration: none;
    margin: 0 15px;
    font-weight: 500;
    transition: var(--transition);
}
.nav-links li a:hover { color: var(--nasa-red); }

.search-box { display: flex; background: #333; border-radius: 5px; padding: 5px; }
.search-box input { background: none; border: none; color: white; padding: 5px; outline: none; }
.search-box button { background: none; border: none; color: white; cursor: pointer; }

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    text-align: center;
    overflow: hidden;
}

.back-video {
    position: absolute;
    min-width: 100%; min-height: 100%;
    z-index: -1;
    object-fit: cover;
}

.hero-content h1 {
    font-size: 4rem;
    margin-bottom: 20px;
    text-transform: uppercase;
    font-weight: 800;
}

.btn-cta {
    background: var(--nasa-red);
    color: white;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 30px;
    font-weight: bold;
    display: inline-block;
    transition: var(--transition);
}
.btn-cta:hover { transform: scale(1.05); background: #b32d25; }

/* Stats Row */
.stats-row {
    display: flex;
    justify-content: space-around;
    padding: 50px 10%;
    background: #111;
}

.stat-item { text-align: center; }
.stat-item h2 { font-size: 2.5rem; color: var(--nasa-red); }

/* Cards & Grid */
.section { padding: 80px 10%; }
.section-title { text-align: center; margin-bottom: 40px; font-size: 2.5rem; }

.mission-grid, .news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.mission-card, .news-card {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 15px;
    transition: var(--transition);
    border-bottom: 3px solid transparent;
}

.mission-card:hover, .news-card:hover {
    transform: translateY(-10px);
    border-color: var(--nasa-red);
}

.mission-card img { width: 100%; border-radius: 10px; margin-bottom: 15px; }

/* Live & APOD Section */
.live-apod { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.video-container { position: relative; padding-bottom: 56.25%; height: 0; }
.video-container iframe { position: absolute; width: 100%; height: 100%; border-radius: 10px; }

#apod-content img { width: 100%; border-radius: 10px; margin-top: 15px; }

/* Footer */
footer { background: #000; padding: 50px 10% 20px; border-top: 2px solid #222; }
.footer-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 30px; }
.social-icons i { font-size: 1.5rem; margin-right: 15px; cursor: pointer; }
.copyright { text-align: center; margin-top: 40px; color: #777; font-size: 0.9rem; }

/* Mobile Responsive */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .hero-content h1 { font-size: 2.5rem; }
    .live-apod { grid-template-columns: 1fr; }
}