/* Roboto Font */
@font-face {
    font-family: 'Roboto';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/static/fonts/roboto-400.woff2') format('woff2'),
         url('/static/fonts/roboto-400.ttf') format('truetype');
}

@font-face {
    font-family: 'Roboto';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('/static/fonts/roboto-700.woff2') format('woff2'),
         url('/static/fonts/roboto-700.ttf') format('truetype');
}

/* Orbitron Font */
@font-face {
    font-family: 'Orbitron';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('/static/fonts/orbitron-700.woff2') format('woff2'),
         url('/static/fonts/orbitron-700.ttf') format('truetype');
}

:root {
    --starwars-yellow: #FFE81F;
    --saber-blue: #4db8ff;
    --dark-bg: #111111;
    --content-bg: #1c1c1c;
    --text-color: #cccccc;
    --text-bright: #f0f0f0;
}

/* 3D Planet Scene Background */
#planet-scene {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

body {
    background-color: var(--dark-bg);
    color: var(--text-color);
    font-family: 'Roboto', sans-serif;
    line-height: 1.7;
    margin: 0;
    padding: 20px;
}

.container {
    margin: 2rem auto;
    max-width: 800px;
    padding: 2rem 3rem;
    background-color: rgba(28, 28, 28, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(51, 51, 51, 0.8);
    border-radius: 8px;
    box-shadow: 0 0 25px rgba(255, 232, 31, 0.1);
    box-sizing: border-box;
}

h1, h2 {
    font-family: 'Orbitron', sans-serif;
    color: var(--starwars-yellow);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

h1 {
    text-align: center;
    font-size: 2.5em;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: 1.5em;
    margin-top: 2.5em;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--saber-blue);
}

p {
    margin-bottom: 1.2em;
    text-align: justify;
}

strong {
    font-weight: 700;
}

em {
    color: var(--text-bright);
    font-style: italic;
}

a {
    text-decoration: none;
    color: var(--saber-blue);
    font-weight: 700;
    font-size: 1.1em;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--starwars-yellow);
}

ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

li {
    margin: 0.25rem 0;
}

footer {
    margin-top: 2rem;
    text-align: center;
    font-size: 0.9em;
    color: #888;
}

/* Countdown Wrapper */
.countdown-wrapper {
    margin: 2rem 0 3rem 0;
}

/* Countdown Section */
.countdown-section {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(255, 232, 31, 0.08), rgba(77, 184, 255, 0.08));
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 2px solid var(--saber-blue);
    border-radius: 12px;
    box-shadow: 0 0 30px rgba(77, 184, 255, 0.3);
}

.next-episode-title {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 2em;
    color: var(--starwars-yellow);
}

.episode-datetime {
    font-size: 0.85em;
    color: #999;
    margin-top: 0;
    margin-bottom: 1.5rem;
    font-weight: 400;
    text-align: center;
}

.countdown {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 80px;
}

.countdown-value {
    font-family: 'Orbitron', sans-serif;
    font-size: 3em;
    font-weight: 700;
    color: var(--saber-blue);
    text-shadow: 0 0 15px rgba(77, 184, 255, 0.8);
    line-height: 1;
    margin-bottom: 0.3rem;
}

.countdown-label {
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-color);
    font-weight: 400;
}

/* Countdown Status Messages */
.countdown-status {
    font-family: 'Orbitron', sans-serif;
    font-size: 2em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    padding: 1rem 0;
}

.countdown-status.status-running {
    color: #4dff4d;
    text-shadow: 0 0 20px rgba(77, 255, 77, 0.8), 0 0 40px rgba(77, 255, 77, 0.4);
    animation: pulse-glow 2s ease-in-out infinite;
}

.countdown-status.status-finished {
    color: #888;
    text-shadow: none;
}

@keyframes pulse-glow {
    0%, 100% {
        text-shadow: 0 0 20px rgba(77, 255, 77, 0.8), 0 0 40px rgba(77, 255, 77, 0.4);
    }
    50% {
        text-shadow: 0 0 30px rgba(77, 255, 77, 1), 0 0 60px rgba(77, 255, 77, 0.6);
    }
}

/* Auxiliary Events Section - Tab style */
.auxiliary-events {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: -2px;
}

.auxiliary-event {
    text-align: center;
    padding: 0.75rem 1.25rem;
    background: linear-gradient(180deg, rgba(28, 28, 28, 0.75), rgba(17, 17, 17, 0.8));
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 2px solid var(--saber-blue);
    border-top: none;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 4px 15px rgba(77, 184, 255, 0.2);
}

.auxiliary-event-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.85em;
    color: var(--starwars-yellow);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 0 0.2rem 0;
    border-bottom: none;
}

.auxiliary-event-datetime {
    font-size: 0.65em;
    color: #777;
    margin: 0 0 0.5rem 0;
    text-align: center;
}

.auxiliary-countdown {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.auxiliary-countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 28px;
}

.auxiliary-countdown-value {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1em;
    font-weight: 700;
    color: var(--saber-blue);
    text-shadow: 0 0 8px rgba(77, 184, 255, 0.5);
    line-height: 1;
    margin-bottom: 0.15rem;
}

.auxiliary-countdown-label {
    font-size: 0.6em;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #666;
    font-weight: 400;
}

/* Auxiliary Countdown Status Messages */
.auxiliary-countdown-status {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.8em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0.25rem 0;
}

.auxiliary-countdown-status.status-running {
    color: #4dff4d;
    text-shadow: 0 0 10px rgba(77, 255, 77, 0.6);
}

.auxiliary-countdown-status.status-finished {
    color: #666;
    text-shadow: none;
}

/* Characters Section */
.characters-section {
    margin: 3rem 0;
}

.characters-section h2 {
    text-align: center;
    margin-bottom: 2rem;
}

.character-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
    perspective: 1000px;
}

.character-card {
    background: rgba(10, 10, 10, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 2px solid var(--saber-blue);
    border-radius: 12px;
    padding: 0;
    overflow: hidden;
    transition: transform 0.6s ease, box-shadow 0.6s ease;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5), 0 4px 20px rgba(77, 184, 255, 0.3), inset 0 0 30px rgba(77, 184, 255, 0.05);
    transform: rotateY(-3deg) rotateX(2deg);
    transform-style: preserve-3d;
    position: relative;
}

.character-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.08),
        rgba(255, 255, 255, 0.15),
        rgba(255, 255, 255, 0.08),
        transparent
    );
    transform: skewX(-15deg);
    z-index: 10;
    pointer-events: none;
    transition: left 0s ease;
}

.character-card.highlight {
    transform: rotateY(0deg) rotateX(0deg) translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 8px 30px rgba(77, 184, 255, 0.4), inset 0 0 30px rgba(77, 184, 255, 0.08);
}

.character-card.highlight::before {
    left: 150%;
    transition: left 0.7s ease;
}


.character-card-content {
    padding: 1rem;
    background: rgba(28, 28, 28, 0.4);
}

.character-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-bottom: 2px solid var(--saber-blue);
    display: block;
    margin: 0;
    background: #000;
}

.character-name {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1em;
    color: var(--starwars-yellow);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 0 0.2rem 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.character-subtitle {
    color: var(--saber-blue);
    font-size: 0.9em;
    margin: 0 0 0.5rem 0;
    font-weight: 400;
}

.character-obligations {
    margin-top: 0.75rem;
}

.obligation-badge {
    display: inline-block;
    background: rgba(77, 184, 255, 0.15);
    border: 2px solid var(--saber-blue);
    border-radius: 4px;
    padding: 0.3rem 0.75rem;
    margin: 0.25rem 0.25rem 0 0;
    font-size: 0.85em;
    color: var(--text-bright);
    font-weight: 700;
    box-shadow: 0 0 10px rgba(77, 184, 255, 0.3);
}

/* Episode Banner */
.episode-banner {
    position: relative;
    max-width: 800px;
    margin: 2rem auto 0 auto;
    height: 350px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border: 1px solid #333;
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    box-shadow: 0 0 25px rgba(255, 232, 31, 0.1);
    box-sizing: border-box;
}

.episode-banner-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem 3rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.5) 50%, transparent 100%);
}

.episode-banner-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.2em;
    color: var(--starwars-yellow);
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.9), 0 0 20px rgba(255, 232, 31, 0.3);
    margin: 0 0 0.5rem 0;
    text-align: left;
}

.episode-banner-subtitle {
    font-family: 'Roboto', sans-serif;
    font-size: 1.2em;
    color: var(--saber-blue);
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.8);
    margin: 0;
    font-style: italic;
}

.episode-container {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    border-top: none;
    margin-top: 0;
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .container {
        padding: 1.5rem 1rem;
    }

    .episode-banner {
        height: 250px;
        margin-top: 1rem;
    }

    .episode-banner-overlay {
        padding: 1.5rem 1rem;
    }

    .episode-banner-title {
        font-size: 1.4em;
    }

    .episode-banner-subtitle {
        font-size: 1em;
    }

    .countdown-section {
        padding: 1.5rem 1rem;
    }

    .countdown {
        gap: 1rem;
    }

    .countdown-item {
        min-width: 60px;
    }

    .countdown-value {
        font-size: 2em;
    }

    .countdown-status {
        font-size: 1.4em;
        letter-spacing: 2px;
    }

    .next-episode-title {
        font-size: 1.5em;
    }

    .auxiliary-event {
        padding: 0.6rem 1rem;
    }

    .auxiliary-event-title {
        font-size: 0.75em;
    }

    .auxiliary-countdown-value {
        font-size: 1em;
    }

    .character-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        perspective: 800px;
    }

    .character-card {
        transform: rotateY(-2deg) rotateX(1deg);
    }

    .character-card-content {
        padding: 0.875rem;
    }

    .character-image {
        height: 150px;
    }

    .character-name {
        font-size: 1em;
    }

    .character-subtitle {
        font-size: 0.85em;
    }
}

/* Episode Navigation */
.episode-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #333;
    gap: 1rem;
}

.episode-nav-link {
    color: #ffd700;
    text-decoration: none;
    font-size: 0.95em;
    font-weight: 400;
}

.episode-nav-link:hover {
    color: var(--saber-blue);
}

.episode-nav-prev,
.episode-nav-next {
    flex: 1;
}

.episode-nav-prev {
    text-align: left;
}

.episode-nav-next {
    text-align: right;
}

.episode-nav-home {
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .episode-nav {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }

    .episode-nav-prev,
    .episode-nav-next {
        text-align: center;
    }
}

/* Fact Footer */
.fact-footer {
    margin: 0 auto 2rem auto;
    padding: 2rem 3rem;
    max-width: 800px;
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.75) 0%, rgba(22, 33, 62, 0.75) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(51, 51, 51, 0.8);
    border-top: 2px solid var(--starwars-yellow);
    border-radius: 8px;
    box-shadow: 0 0 25px rgba(255, 232, 31, 0.1);
    box-sizing: border-box;
    text-align: center;
}

.fact-content {
    max-width: 700px;
    margin: 0 auto;
}

.fact-category {
    display: inline-block;
    background: rgba(255, 232, 31, 0.15);
    border: 1px solid var(--starwars-yellow);
    border-radius: 4px;
    padding: 0.25rem 0.75rem;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.75em;
    font-weight: 700;
    color: var(--starwars-yellow);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.75rem;
}

.fact-text {
    font-size: 0.95em;
    font-style: italic;
    color: var(--text-color);
    line-height: 1.6;
    margin: 0;
    text-align: center;
}

@media (max-width: 768px) {
    .fact-footer {
        padding: 1.5rem 1rem;
    }

    .fact-text {
        font-size: 0.9em;
    }
}

/* Notable Locations */
.locations-section h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2em;
    color: var(--starwars-yellow);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin: 2rem 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--saber-blue);
}

.location-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.location-item {
    background: rgba(10, 10, 10, 0.5);
    border: 1px solid rgba(77, 184, 255, 0.4);
    border-left: 3px solid var(--saber-blue);
    border-radius: 0 6px 6px 0;
    padding: 1rem 1.25rem;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.location-item:hover {
    border-color: var(--saber-blue);
    background: rgba(77, 184, 255, 0.05);
}

.location-name {
    font-family: 'Orbitron', sans-serif;
    font-size: 1em;
    color: var(--starwars-yellow);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 0 0.5rem 0;
}

.location-description {
    font-size: 0.95em;
    color: var(--text-color);
    margin: 0 0 0.5rem 0;
    line-height: 1.5;
    text-align: left;
}

.location-episodes {
    font-size: 0.85em;
    color: #888;
    margin: 0;
}

.location-episodes a {
    font-size: 0.85em;
    font-weight: 400;
}

@media (max-width: 768px) {
    .location-item {
        padding: 0.875rem 1rem;
    }

    .location-name {
        font-size: 0.9em;
    }

    .location-description {
        font-size: 0.9em;
    }
}
