/* ============================================================
   Rocket Talk - style.css
   ============================================================ */

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

body {
    font-family: 'Calibri', 'Gill Sans', 'Trebuchet MS', sans-serif;
    background: #ffffff;
    color: #1a1a2e;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* --- Loading Screen --- */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loading-screen.fade-out {
    opacity: 0;
    pointer-events: none;
}

.loading-rocket {
    font-size: 3rem;
    animation: bounce-rocket 1s ease-in-out infinite;
}

@keyframes bounce-rocket {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.loading-screen p {
    margin-top: 1rem;
    font-size: 1rem;
    color: #666;
}

/* --- Launches Container --- */
#launches-container {
    width: 100%;
    max-width: 700px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* --- Launch Card --- */
.launch-card {
    background: #f5f5f5;
    border-radius: 12px;
    border: 2px solid #1a1a2e;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.launch-card-content {
    padding: 1rem 1.25rem 1.25rem;
}

.mission-name {
    font-size: 1.3rem;
    margin-bottom: 0.25rem;
    color: #1a1a2e;
}

.rocket-name {
    font-size: 1rem;
    color: #444;
    margin-bottom: 0.5rem;
}

.launch-detail {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
    color: #333;
}

/* --- Launch Image --- */
.launch-image {
    width: 100%;
    max-height: 300px;
    overflow: hidden;
    background: #e0e0e0;
    display: block;
}

.launch-image img {
    width: 100%;
    max-height: 300px;
    object-fit: contain;
    display: block;
}

/* --- Status Badges --- */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.5rem;
}

.status-go,
.status-success {
    background: #2e7d32;
}

.status-tbd {
    background: #f57c00;
}

.status-hold,
.status-failure {
    background: #c62828;
}

.status-tbc {
    background: #0288d1;
}

.status-inflight {
    background: #283593;
}

/* --- Countdown --- */
.countdown-container {
    background: #e8eaf6;
    border-radius: 8px;
    padding: 0.75rem;
    text-align: center;
    margin: 0.75rem 0;
}

.countdown-label {
    display: block;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.countdown-value {
    display: block;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.countdown-dormant .countdown-value {
    color: #666;
    font-size: 1.2rem;
}

.countdown-active .countdown-value {
    color: #c62828;
    font-size: 1.6rem;
}

.countdown-launched .countdown-value {
    color: #2e7d32;
    font-size: 1.4rem;
}

/* --- Headline Banner --- */
.cms-headline {
    background: linear-gradient(135deg, #c62828, #b71c1c);
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
    text-align: center;
    padding: 0.6rem 1rem;
}

/* --- Dropdown Base --- */
.dropdown {
    margin-top: 0.75rem;
    border-radius: 8px;
    overflow: hidden;
}

.dropdown summary {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    font-weight: 700;
    font-size: 0.95rem;
    color: #fff;
    border-radius: 8px;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.dropdown summary::-webkit-details-marker {
    display: none;
}

.dropdown summary::before {
    content: '▸';
    display: inline-block;
    font-size: 0.85rem;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.dropdown[open] summary::before {
    transform: rotate(90deg);
}

.dropdown-content {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-top: 0;
}

.dropdown-content p {
    margin-bottom: 0.5rem;
}

.dropdown-content p:last-child {
    margin-bottom: 0;
}

/* --- Viewing Guide (Green) --- */
.viewing-guide-dropdown summary {
    background: linear-gradient(135deg, #2e7d32, #1b5e20);
}

.viewing-guide-dropdown .dropdown-content {
    background: #e8f5e9;
}

.viewing-guide-link {
    display: block;
    color: #2e7d32;
    font-weight: 600;
    font-size: 1.1rem;
    text-decoration: none;
    margin-top: 0.5rem;
}

.viewing-guide-link:hover {
    text-decoration: underline;
}

/* --- Rocket Talk LIVE! (Purple) --- */
.rocket-talk-dropdown summary {
    background: linear-gradient(135deg, #7b1fa2, #4a148c);
}

.rocket-talk-dropdown .dropdown-content {
    background: #f3e5f5;
}

.rocket-talk-link {
    display: block;
    color: #7b1fa2;
    font-weight: 600;
    font-size: 1.1rem;
    text-decoration: none;
    margin-top: 0.5rem;
}

.rocket-talk-link:hover {
    text-decoration: underline;
}

/* --- Chris Says (Orange) --- */
.chris-says-dropdown summary {
    background: linear-gradient(135deg, #f57c00, #e65100);
}

.chris-says-dropdown .dropdown-content {
    background: #fff8e1;
}

.chris-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

/* --- Mission Info (Blue) --- */
.mission-info-dropdown summary {
    background: linear-gradient(135deg, #1565c0, #0d47a1);
}

.mission-info-dropdown .dropdown-content {
    background: #e3f2fd;
}

/* --- Livestream Links (Red) --- */
.livestream-dropdown summary {
    background: linear-gradient(135deg, #c62828, #b71c1c);
}

.livestream-dropdown .dropdown-content {
    background: #ffebee;
}

.livestream-link {
    display: block;
    color: #c62828;
    font-weight: 600;
    font-size: 1.1rem;
    text-decoration: none;
    margin-top: 0.5rem;
}

.livestream-link:first-child {
    margin-top: 0;
}

.livestream-link:hover {
    text-decoration: underline;
}

/* --- Filmstrip (Page Footer) --- */
.filmstrip-section {
    width: calc(100% - 2rem);
    max-width: 700px;
    margin: 2rem auto 0;
    box-sizing: border-box;
}

.filmstrip-container {
    overflow: hidden;
    border-radius: 8px;
}

.filmstrip {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 0.5rem 0;
    -webkit-overflow-scrolling: touch;
}

.filmstrip img {
    height: 120px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.filmstrip img:hover {
    transform: scale(1.05);
}

.gallery-link {
    display: block;
    text-align: center;
    padding: 12px 20px;
    margin: 16px auto;
    width: calc(100% - 2rem);
    max-width: 700px;
    box-sizing: border-box;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    color: #ffd54f;
    font-size: 1.1rem;
    font-weight: 700;
    text-decoration: none;
    border-radius: 10px;
    letter-spacing: 0.5px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gallery-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    color: #ffe082;
}

.gallery-link:active {
    transform: translateY(0);
}


/* --- Footer --- */
.footer-divider {
    width: 100%;
    max-width: 700px;
    border: none;
    border-top: 1px solid #ddd;
    margin: 2rem auto 1rem;
}

.disclaimer {
    width: 100%;
    max-width: 700px;
    padding: 0 1rem;
    font-size: 0.7rem;
    color: #999;
    text-align: center;
    line-height: 1.4;
    margin-bottom: 1rem;
}

.footer-bar {
    width: 100%;
    max-width: 700px;
    background: #333333;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 8px;
}

.footer-bar img {
    max-width: 280px;
    height: auto;
}

.site-footer {
    width: 100%;
    max-width: 700px;
    text-align: center;
    font-size: 0.75rem;
    color: #999;
    padding: 0.5rem 1rem 2rem;
}

.site-footer a {
    color: #666;
    text-decoration: none;
}

.site-footer a:hover {
    text-decoration: underline;
}

/* --- Responsive --- */
@media (max-width: 600px) {
    .mission-name {
        font-size: 1.15rem;
    }

    .countdown-active .countdown-value {
        font-size: 1.4rem;
    }

    .dropdown summary {
        font-size: 0.9rem;
        padding: 0.5rem 0.85rem;
    }

    .filmstrip img {
        height: 90px;
    }
}
/* Floating back button */
.back-button {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 10000;
  width: 40px;
  height: 40px;
  background: #1a1a2e;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: background 0.2s, transform 0.2s;
}

.back-button:hover {
  background: #c62828;
  transform: scale(1.1);
}
/* Load More button */
.load-more-button {
    display: block;
    margin: 24px auto;
    padding: 14px 32px;
    background: #1a1a2e;
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.2);
    transition: background 0.2s, transform 0.2s;
}

.load-more-button:hover {
    background: #c62828;
    transform: scale(1.05);
}

/* No imminent launches message */
.no-imminent-message {
    text-align: center;
    padding: 32px 16px;
    color: #666;
    font-size: 1.1rem;
    font-style: italic;
}
