@import url('https://fonts.googleapis.com/css2?family=Special+Elite&display=swap');

/* Common styles for all pages */
:root {
    /* Light theme variables */
    --bg-overlay: none;
    --text-color: #000;
    --list-bg: white;
    --link-color: #2c3e50;
    --link-hover-bg: #f8f9fa;
    --link-hover-color: #1a252f;
    --border-color: #eee;
    --muted-color: gray;
}

[data-theme="dark"] {
    /* Dark theme variables */
    --bg-overlay: linear-gradient(rgba(237, 221, 195, 0.4), rgba(237, 221, 195, 0.4));
    --text-color: #271B08;
    --list-bg: #EDDDC3;
    --link-color: #271B08;
    --link-hover-bg: #746556;
    --link-hover-color: #746556;
    --border-color: #746556;
    --muted-color: #746556;
}

[data-theme="dark"] .episode-list .episode-link:hover {
    color: #EDDDC3;
}

[data-theme="dark"] .episode-list .episode-link:hover .episode-date {
    color: #EDDDC3;
}

body {
    background: var(--bg-overlay), url('../img/background.jpeg') repeat-y center top;
    background-size: cover;
    color: var(--text-color);
    font-family: 'Special Elite', monospace;
    margin: 0;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

h1,
h2,
h3,
.script-content,
.footer,
.disclaimer {
    color: var(--text-color);
}

.container {
    max-width: 800px;
    width: 100%;
    padding: 20px;
    border-radius: 8px;
    box-sizing: border-box;
    margin: 0 auto;
}

h1,
h2 {
    text-align: center;
    /* color: black; */
}

/* Logo styles */
.logo-container {
    text-align: center;
    margin: 20px 0;
}

.sainfeld-logo {
    max-width: 300px;
    width: 100%;
    height: auto;
}

/* Responsive logo for different screen sizes */
@media screen and (max-width: 600px) {
    .sainfeld-logo {
        max-width: 80%;
    }
}

@media screen and (max-width: 400px) {
    .sainfeld-logo {
        max-width: 90%;
    }
}

/* Episode list styles */
.episode-list {
    display: flex;
    flex-direction: column;
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.episode-link {
    position: relative;
    display: block;
    padding: 10px;
    margin: 5px 0;
    color: #2c3e50;
    text-decoration: none;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s ease;
    padding-right: 100px;
}

.episode-link-text {
    display: block;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.episode-link:hover {
    background-color: #f8f9fa;
    color: #1a252f;
}

.episode-date {
    position: absolute;
    font-size: small;
    right: 10px;
    top: 10px;
    color: gray;
    white-space: nowrap;
}

.timestamp {
    text-align: right;
    font-size: 14px;
    color: gray;
    margin: 10px 0 20px;
}

/* Story detail page specific styles */
.script-container {
    max-width: 40em;
    width: 100%;
    padding: 20px;
    margin: 0 auto;
    box-sizing: border-box;
}

.script-content {
    white-space: pre-line;
    font-family: 'Special Elite', monospace;
    line-height: 1.5;
    font-size: 16px;
    text-align: left;
    /* color: black; */
}

.script-timestamp {
    text-align: right;
    font-size: 14px;
    margin-bottom: 20px;
}

h3 {
    margin-top: 2em;
    margin-bottom: 1em;
    font-size: 1.2em;
    text-align: center;
}

.script-content p {
    margin-bottom: 1em;
    line-height: 1.6;
}

.script-content em {
    color: gray;
}

/* Footer styles */
.footer {
    text-align: center;
    margin-top: 20px;
    padding: 10px;
    /* color: black; */
}

.footer a {
    font-size: 14px;
    text-decoration: none;
    color: #2c3e50;
    margin: 5px;
}

.footer a:hover {
    color: #1a252f;
    text-decoration: underline;
}

/* Disclaimer styles */
.disclaimer {
    text-align: center;
    font-size: 14px;
    margin-top: 20px;
    /* color: black; */
}

.disclaimer p {
    margin: 10px 0;
}

.disclaimer a {
    text-decoration: none;
    color: #2c3e50;
    margin: 5px;
}

.disclaimer a:hover {
    color: #1a252f;
    text-decoration: underline;
}

/* Theme switch styles */
.theme-switch-wrapper {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin: 20px 0;
    width: 100%;
}

.theme-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.theme-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #746556;
    transition: 0.4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "🌕";
    display: flex;
    align-items: center;
    justify-content: center;
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: #271B08;
}

input:checked+.slider:before {
    transform: translateX(26px);
    content: "🌑";
    background-color: #EDDDC3;
}

h1,
h2,
h3,
.script-content,
.footer,
.disclaimer {
    color: #271B08;
}

.episode-list {
    background-color: var(--list-bg);
}

.episode-link {
    color: var(--link-color);
    border-bottom-color: var(--border-color);
}

.episode-link:hover {
    background-color: var(--link-hover-bg);
    color: var(--link-hover-color);
}

.episode-date,
.timestamp,
.script-timestamp,
.script-content em {
    color: var(--muted-color);
}

.footer a,
.disclaimer a {
    color: var(--link-color);
}

.footer a:hover,
.disclaimer a:hover {
    color: var(--link-hover-color);
}