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

:root {
    --primary-color: #05063f;
    --secondary-color: #0a0e71;
    --accent-color: #00d0ff;
    --text-color: #ffffff;
    --card-bg-color: rgba(10, 14, 113, 0.7);
    --card-border-color: rgba(0, 208, 255, 0.5);
    --mercury-color: #7a7a7a;
    --venus-color: #e39e1c;
    --earth-color: #2a92ed;
    --mars-color: #d14e33;
    --jupiter-color: #e8ae68;
    --saturn-color: #f7f3cb;
    --uranus-color: #b2dfe3;
    --neptune-color: #4169e1;
    --sun-color: #FDB813;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--primary-color);
    color: var(--text-color);
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* Stars Background */
.stars-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: radial-gradient(ellipse at bottom, #1b2735 0%, #090a0f 100%);
    overflow: hidden;
}

.stars-container::before,
.stars-container::after {
    content: "";
    position: absolute;
    width: 3px;
    height: 3px;
    background: transparent;
    box-shadow: 
        974px 844px #fff, 658px 698px #fff, 509px 1244px #fff, 1222px 174px #fff,
        1910px 412px #fff, 1525px 541px #fff, 1488px 442px #fff, 879px 1581px #fff,
        1297px 1625px #fff, 747px 1145px #fff, 1671px 1346px #fff, 509px 570px #fff,
        939px 1168px #fff, 1, 171px 1147px #fff, 1272px 114px #fff, 1380px 759px #fff,
        124px 375px #fff, 142px 814px #fff, 1254px 1109px #fff, 488px 244px #fff,
        928px 1757px #fff, 1078px 967px #fff, 1213px 747px #fff, 989px 12px #fff,
        725px 1354px #fff, 1503px 1555px #fff, 1445px 1371px #fff, 1243px 1687px #fff,
        45px 1596px #fff, 366px 1956px #fff, 83px 210px #fff, 1526px 1228px #fff,
        1960px 332px #fff, 1981px 1471px #fff, 1227px 1654px #fff, 1567px 527px #fff;
    animation: sparkle 10s linear infinite;
}

.stars-container::after {
    box-shadow: 
        1037px 711px #fff, 675px 668px #fff, 1519px 1094px #fff, 1454px 631px #fff,
        1440px 532px #fff, 228px 1573px #fff, 422px 1767px #fff, 1218px 532px #fff,
        1865px 471px #fff, 1453px 1270px #fff, 844px 1292px #fff, 1807px 1288px #fff,
        1203px 1562px #fff, 1971px 1113px #fff, 41px 712px #fff, 863px 635px #fff,
        1952px 722px #fff, 41px 294px #fff, 522px 1223px #fff, 1175px 245px #fff,
        1292px 1168px #fff, 83px 1782px #fff, 661px 1532px #fff, 1630px 1578px #fff,
        1203px 70px #fff, 1747px 1521px #fff, 1186px 1915px #fff, 1851px 1090px #fff,
        769px 44px #fff, 97px 1045px #fff, 85px 344px #fff, 1294px 1760px #fff;
    animation-delay: 5s;
}

@keyframes sparkle {
    0% {
        opacity: 0.3;
    }
    50% {
        opacity: 0.8;
    }
    100% {
        opacity: 0.3;
    }
}

/* Header Styles */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background-color: rgba(5, 6, 63, 0.9);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 100;
    flex-wrap: wrap;
}

.logo h1 {
    font-family: 'Space Mono', monospace;
    font-size: 1.5rem;
    color: var(--accent-color);
    text-shadow: 0 0 10px rgba(0, 208, 255, 0.5);
}

.search-container {
    display: flex;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 0.3rem 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin: 0 1rem;
    flex: 1;
    max-width: 400px;
}

#search-input {
    background: transparent;
    border: none;
    color: var(--text-color);
    padding: 0.5rem;
    font-family: 'Montserrat', sans-serif;
    width: 100%;
    outline: none;
}

#search-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

#search-button {
    background: transparent;
    border: none;
    color: var(--accent-color);
    cursor: pointer;
    padding: 0.5rem;
}

.main-nav ul {
    display: flex;
    list-style: none;
}

.main-nav ul li {
    margin-left: 1.5rem;
}

.main-nav ul li a {
    color: var(--text-color);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.main-nav ul li a:hover,
.main-nav ul li a.active {
    background-color: var(--accent-color);
    color: var(--primary-color);
}

.mobile-menu {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--accent-color);
}

/* Main Content Styles */
main {
    padding: 2rem;
    min-height: calc(100vh - 180px);
}

.view {
    display: none;
}

.active-view {
    display: block;
}

.section-title {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
    color: var(--accent-color);
    text-shadow: 0 0 10px rgba(0, 208, 255, 0.5);
}

/* Solar System View */
.solar-system-container {
    position: relative;
    width: 100%;
    max-width: 1000px;
    height: 600px;
    margin: 0 auto;
}

.sun {
    position: absolute;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background-color: var(--sun-color);
    background-image: radial-gradient(circle, #ffdc8a, #FDB813, #ff8400);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 50px rgba(253, 184, 19, 0.8);
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
}

.sun:hover {
    box-shadow: 0 0 80px rgba(253, 184, 19, 0.9);
}

.orbit {
    position: absolute;
    border: 1px dashed rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.mercury-orbit {
    width: 160px;
    height: 160px;
}

.venus-orbit {
    width: 220px;
    height: 220px;
}

.earth-orbit {
    width: 280px;
    height: 280px;
}

.mars-orbit {
    width: 340px;
    height: 340px;
}

.jupiter-orbit {
    width: 420px;
    height: 420px;
}

.saturn-orbit {
    width: 500px;
    height: 500px;
}

.uranus-orbit {
    width: 580px;
    height: 580px;
}

.neptune-orbit {
    width: 660px;
    height: 660px;
}

.planet {
    position: absolute;
    border-radius: 50%;
    cursor: pointer;
    top: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
    z-index: 5;
}

.planet:hover {
    transform: translate(-50%, -50%) scale(1.2);
    z-index: 20;
}

.mercury {
    width: 15px;
    height: 15px;
    background-color: var(--mercury-color);
    left: 0;
    animation: orbit 8s linear infinite;
}

.venus {
    width: 22px;
    height: 22px;
    background-color: var(--venus-color);
    left: 0;
    animation: orbit 12s linear infinite;
}

.earth {
    width: 25px;
    height: 25px;
    background-color: var(--earth-color);
    left: 0;
    animation: orbit 15s linear infinite;
}

.mars {
    width: 20px;
    height: 20px;
    background-color: var(--mars-color);
    left: 0;
    animation: orbit 20s linear infinite;
}

.jupiter {
    width: 40px;
    height: 40px;
    background-color: var(--jupiter-color);
    left: 0;
    animation: orbit 30s linear infinite;
}

.saturn {
    width: 35px;
    height: 35px;
    background-color: var(--saturn-color);
    left: 0;
    animation: orbit 40s linear infinite;
    box-shadow: 0 0 0 5px rgba(247, 243, 203, 0.2);
}

.uranus {
    width: 30px;
    height: 30px;
    background-color: var(--uranus-color);
    left: 0;
    animation: orbit 50s linear infinite;
}

.neptune {
    width: 28px;
    height: 28px;
    background-color: var(--neptune-color);
    left: 0;
    animation: orbit 60s linear infinite;
}

@keyframes orbit {
    0% {
        left: 100%;
        z-index: 10;
    }
    25% {
        z-index: 5;
    }
    50% {
        left: 0%;
        z-index: 1;
    }
    75% {
        z-index: 5;
    }
    100% {
        left: 100%;
        z-index: 10;
    }
}

/* Planet Info Card */
.planet-info-card {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: var(--card-bg-color);
    border: 2px solid var(--card-border-color);
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    max-height: 600px;
    overflow-y: auto;
    padding: 1.5rem;
    box-shadow: 0 0 30px rgba(0, 208, 255, 0.3);
    z-index: 100;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    color: var(--text-color);
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.close-btn:hover {
    color: var(--accent-color);
}

#planet-name {
    text-align: center;
    margin-bottom: 1rem;
    color: var(--accent-color);
    font-size: 1.8rem;
}

.planet-image-container {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.planet-image {
    width: 120px;
    height: 120px;
    border-radius: 50%;
}

.planet-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.planet-fact {
    display: flex;
    flex-direction: column;
}

.fact-label {
    font-size: 0.9rem;
    opacity: 0.7;
    margin-bottom: 0.2rem;
}

.fact-value {
    font-weight: bold;
}

.planet-description h3, .planet-fun-facts h3 {
    margin-bottom: 0.8rem;
    color: var(--accent-color);
}

.planet-description p {
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.planet-fun-facts ul {
    padding-left: 1.5rem;
}

.planet-fun-facts ul li {
    margin-bottom: 0.8rem;
    line-height: 1.4;
}

/* Planets List View */
.planets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
    padding: 1rem;
}

.planet-card {
    background-color: var(--card-bg-color);
    border: 2px solid var(--card-border-color);
    border-radius: 10px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.planet-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

.planet-card-image {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin: 0 auto 1rem;
}

.planet-card h3 {
    margin-bottom: 0.8rem;
    color: var(--accent-color);
}

.planet-card p {
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.planet-card .view-details {
    display: inline-block;
    background-color: var(--accent-color);
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
}

.planet-card .view-details:hover {
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(0, 208, 255, 0.7);
}

/* About View */
.about-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    background-color: var(--card-bg-color);
    border: 2px solid var(--card-border-color);
    border-radius: 15px;
}

.about-content p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.feature-list, .creator-info {
    margin-top: 2rem;
}

.feature-list h3, .creator-info h3 {
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.feature-list ul {
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.feature-list ul li {
    margin-bottom: 0.5rem;
}

/* Search Results */
.search-results {
    display: none;
    position: absolute;
    top: 70px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 600px;
    max-height: 400px;
    overflow-y: auto;
    background-color: var(--card-bg-color);
    border: 2px solid var(--card-border-color);
    border-radius: 10px;
    z-index: 101;
    padding: 1rem;
}

.search-item {
    padding: 0.8rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-item:last-child {
    border-bottom: none;
}

.search-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.search-item h3 {
    color: var(--accent-color);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.search-item p {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Footer Styles */
footer {
    background-color: rgba(5, 6, 63, 0.9);
    padding: 1.5rem 2rem;
    text-align: center;
    margin-top: 2rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-icon {
    color: var(--text-color);
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.social-icon:hover {
    color: var(--accent-color);
}

/* Responsive Styles */
@media (max-width: 992px) {
    .solar-system-container {
        height: 500px;
    }
    
    .planets-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

@media (max-width: 768px) {
    header {
        padding: 1rem;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .logo {
        margin-bottom: 1rem;
    }
    
    .search-container {
        width: 100%;
        max-width: none;
        margin: 0.5rem 0;
    }
    
    .mobile-menu {
        display: block;
        position: absolute;
        top: 1rem;
        right: 1rem;
    }
    
    .main-nav {
        display: none;
        width: 100%;
        margin-top: 1rem;
    }
    
    .main-nav.active {
        display: block;
    }
    
    .main-nav ul {
        flex-direction: column;
    }
    
    .main-nav ul li {
        margin: 0.5rem 0;
    }
    
    .solar-system-container {
        height: 400px;
    }
    
    .planet-info-card {
        width: 95%;
    }
    
    .planet-details {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .logo h1 {
        font-size: 1.2rem;
    }
    
    main {
        padding: 1rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .solar-system-container {
        height: 300px;
    }
    
    .sun {
        width: 60px;
        height: 60px;
    }
    
    .mercury-orbit {
        width: 100px;
        height: 100px;
    }
    
    .venus-orbit {
        width: 140px;
        height: 140px;
    }
    
    .earth-orbit {
        width: 180px;
        height: 180px;
    }
    
    .mars-orbit {
        width: 220px;
        height: 220px;
    }
    
    .jupiter-orbit {
        width: 260px;
        height: 260px;
    }
    
    .saturn-orbit {
        width: 300px;
        height: 300px;
    }
    
    .uranus-orbit {
        width: 340px;
        height: 340px;
    }
    
    .neptune-orbit {
        width: 380px;
        height: 380px;
    }
    
    .planet {
        transform: translate(-50%, -50%) scale(0.8);
    }
    
    .planet:hover {
        transform: translate(-50%, -50%) scale(1);
    }
    
    .planets-grid {
        grid-template-columns: 1fr;
    }
}
