* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body::-webkit-scrollbar {
  width: 1px;
}

body {
    background: #0c0c0c;
    color: #ffffff;
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 80%;
    /* max-width: 1200px; */
    margin: 0 auto;
    padding: 40px 20px;
    text-align: center;
}

header {
    margin-bottom: 40px;
}

h1 {
    font-size: 3rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 1px;
}

#launches {
    display: grid;
    /* grid-template-columns: repeat(2, 1fr); */
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.launch-card {
    background: #1a1a1a;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 1px solid #333333;
}

.launch-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.7);
}

.launch-card h2 {
    font-size: 2rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 15px;
    letter-spacing: 0.5px;
}

.launch-card p {
    font-size: 1.1rem;
    color: #cccccc;
    margin-bottom: 10px;
}

.mission-image {
    width: 100%;
    max-height: 250px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 20px;
    border: 1px solid #333333;
}

.countdown {
    font-size: 1.8rem;
    font-weight: 700;
    color: #ffffff;
    background: #222222;
    padding: 12px 20px;
    border-radius: 8px;
    display: inline-block;
    margin-top: 15px;
    border: 1px solid #333333;
    position: relative;
    cursor: pointer;
}

.countdown:hover .tooltip {
    visibility: visible;
    opacity: 1;
}

.tooltip {
    visibility: hidden;
    opacity: 0;
    background: #333333;
    color: #ffffff;
    padding: 5px 10px;
    border-radius: 4px;
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.9rem;
    white-space: nowrap;
    transition: opacity 0.2s ease;
    z-index: 10;
}

.launch-time {
    font-size: 1rem;
    color: #cccccc;
    margin-top: 10px;
}

.launch-window {
    font-size: 1rem;
    color: #cccccc;
    margin-top: 10px;
}

.no-launches {
    display: none;
    font-size: 1.2rem;
    color: #cccccc;
    padding: 20px;
    background: #1a1a1a;
    border-radius: 10px;
    margin: 20px 0;
    border: 1px solid #333333;
    grid-column: 1 / -1;
}

.loading {
    display: none;
    font-size: 1.2rem;
    color: #cccccc;
    padding: 20px;
    background: #1a1a1a;
    border-radius: 10px;
    margin: 20px 0;
    border: 1px solid #333333;
    grid-column: 1 / -1;
    position: relative;
    text-align: center;
}

.rocket-loader {
    position: relative;
    width: 100px;
    height: 120px;
    margin: 0 auto 20px;
    background: radial-gradient(circle at center, #1c2526 0%, #0c0c0c 70%);
}

.stars {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    overflow: hidden;
}

.stars::before {
    content: '';
    position: absolute;
    width: 2px;
    height: 2px;
    background: #ffffff;
    border-radius: 50%;
    top: 20%;
    left: 30%;
    animation: twinkle 2s infinite;
}

.stars::after {
    content: '';
    position: absolute;
    width: 3px;
    height: 3px;
    background: #cccccc;
    border-radius: 50%;
    top: 60%;
    left: 70%;
    animation: twinkle 2.5s infinite 0.5s;
}

.rocket {
    position: absolute;
    top: 30px;
    left: 35px;
    width: 30px;
    height: 60px;
    animation: pulse 1.5s ease-in-out infinite;
}

.rocket-body {
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #ffffff 0%, #cccccc 100%);
    clip-path: polygon(50% 0%, 20% 30%, 20% 100%, 80% 100%, 80% 30%);
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.flame {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 20px;
    background: linear-gradient(180deg, #ff4500 0%, #ffa500 100%);
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    animation: flicker 0.3s ease-in-out infinite;
}

.loading-text {
    font-size: 1.2rem;
    color: #cccccc;
    margin-top: 10px;
    animation: textFade 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.9; }
}

@keyframes flicker {
    0%, 100% { transform: translateX(-50%) scale(1); opacity: 1; }
    50% { transform: translateX(-50%) scale(1.2); opacity: 0.7; }
}

@keyframes twinkle {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 1; }
}

@keyframes textFade {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

@media (max-width: 768px) {

    .container {
        max-width: 1200px;
    }

    #launches {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: 2.2rem;
    }

    .launch-card {
        padding: 20px;
    }

    .launch-card h2 {
        font-size: 1.6rem;
    }

    .launch-card p {
        font-size: 1rem;
    }

    .mission-image {
        max-height: 180px;
        object-fit: contain;
        width: auto;
        max-width: 100%;
    }

    .countdown {
        font-size: 1.4rem;
        padding: 10px 15px;
    }

    .launch-time {
        font-size: 0.9rem;
    }

    .launch-window {
        font-size: 0.9rem;
    }

    .loading-text {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 20px 10px;
    }

    h1 {
        font-size: 1.8rem;
    }

    .launch-card {
        padding: 15px;
    }

    .mission-image {
        max-height: 150px;
        object-fit: contain;
        width: auto;
        max-width: 100%;
    }

    .countdown {
        font-size: 1.2rem;
        padding: 8px 12px;
    }

    .launch-time {
        font-size: 0.8rem;
    }

    .launch-window {
        font-size: 0.8rem;
    }

    .rocket-loader {
        width: 80px;
        height: 100px;
    }

    .rocket {
        top: 25px;
        left: 25px;
        width: 25px;
        height: 50px;
    }

    .flame {
        bottom: -15px;
        width: 15px;
        height: 15px;
    }

    .loading-text {
        font-size: 0.9rem;
    }
}