*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* --- Theming and Global Styles --- */

:root {
    --bg-color: #EEFF89;
    --text-color: #2C281C;
    --card-bg-color: rgba(242, 253, 181, 1);
    --cursor-ring-color: rgba(255, 255, 255, 1);
    --cursor-ring-hover-color: rgba(255, 255, 255, 1);
    --button-text-color: #eeff89;
    --menu-hover-bg: rgba(44, 40, 28, 0.05);
}

::selection {
    color: var(--text-color);
    background: var(--cursor-ring-color);
}

:root.dark {
    --bg-color: #1E1B16;
    --text-color: #EEFF89;
    --card-bg-color: rgba(48, 46, 32, 1);
    --cursor-ring-color: rgba(255, 255, 255, 1);
    --cursor-ring-hover-color: rgba(255, 255, 255, 1);
    --button-text-color: #000000;
    --menu-hover-bg: rgba(240, 250, 209, 0.12);
}

body {
    font-family: 'Work Sans', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.3s ease, color 0.3s ease;
}

@media (pointer: fine) {
    html, body, a, button {
        cursor: none;
    }

    #cursor-dot, #cursor-ring {
        display: block;
    }
}

@media (pointer: coarse) {
    #cursor-dot, #cursor-ring {
        display: none;
    }
}

/* --- Layout Containers --- */
.container {
    width: 100%;
    max-width: 64rem; 
    margin-left: auto;
    margin-right: auto;
    padding: 1rem; 
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* --- Component Styles --- */

header {
    text-align: center;
    width: 100%;
    padding-top: 4rem; 
    padding-bottom: 3rem; 
}

.theme-toggle-container {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

#theme-toggle {
    display: grid;
    place-items: center;
    border-radius: 9999px;
    padding: 0.5rem; 
    border: none;
    background: none;
    color: var(--text-color);
}
#theme-toggle:focus {
    outline: 2px solid transparent;
    outline-offset: 2px;
    box-shadow: 0 0 0 2px var(--bg-color), 0 0 0 4px var(--text-color);
}

.logo-container {
    max-width: 42rem; 
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 2rem;
}
.logo-container svg {
    width: 100%;
    height: auto;
}
#logo-path {
    fill: var(--text-color);
    transition: fill 0.3s ease;
}

header p {
    max-width: 42rem; 
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 2.5rem; 
    line-height: 1.625; 
}

/* --- Platform Menu --- */
.platform-menu-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 1rem;
}

.platform-menu {
    position: absolute;
    top: 100%; 
    margin-top: 0.75rem;
    background-color: var(--card-bg-color); 
    border-radius: 1rem;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
    padding: 0.5rem;
    width: 280px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    opacity: 0;
    transform-origin: top center; 
    transform: translateY(-10px) scale(0.95);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
}

.platform-menu.open-upward {
    top: auto;
    bottom: 100%;
    margin-top: 0;
    margin-bottom: 0.75rem;
    transform-origin: bottom center;
}

.platform-menu.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.platform-menu a {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    text-decoration: none;
    font-weight: 400; /* CHANGED: Initial font weight */
    color: var(--text-color);
    transition: background-color 0.2s ease, transform 0.2s ease, font-weight 0.2s ease; /* ADDED: font-weight transition */
}

.platform-menu a:hover {
    background-color: var(--menu-hover-bg);
    text-decoration: none;
    transform: scale(1.02);
    font-weight: 600;
}

.platform-menu a .material-symbols-outlined {
    font-size: 1.5rem; 
}

#platform-menu-btn,
.all-episodes-btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--text-color);
    color: var(--bg-color);
    font-weight: 600;
    padding: 1.25rem 2.5rem; /* Unified padding */
    border-radius: 9999px;
    border: none;
    font-size: 1.25rem; /* Unified font size */
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: all 0.2s ease-in-out;
}

:root.dark #platform-menu-btn,
:root.dark .all-episodes-btn {
     color: var(--button-text-color);
}

#platform-menu-btn:hover,
.all-episodes-btn:hover {
     box-shadow: 0 6px 15px -3px rgba(0,0,0,0.2);
     transform: translateY(-2px);
}

.all-episodes-btn {
    margin-top: -2.5rem;
}

.episodes-section {
    width: 100%;
    margin-top: 4rem; 
    padding-bottom: 4rem; 
}
.episodes-section h2 {
    font-size: 1.875rem; 
    font-weight: 700; 
    text-align: center;
    margin-bottom: 3rem; 
}

.episodes-list {
    display: flex;
    flex-direction: column;
    gap: 3rem; 
    max-width: 48rem; 
    margin-left: auto;
    margin-right: auto;
}

.episode-card {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem; 
    background-color: var(--card-bg-color);
    padding: 1.5rem;
    border-radius: 1rem; 
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.episode-card .cover-art-container {
    width: 25%;
    flex-shrink: 0;
}
.episode-card .cover-art {
    width: 100%;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

:root.dark .episode-card .cover-art {
    opacity: 72%;
}

.episode-card .episode-details {
    width: 75%;
    flex-grow: 1;
}
.episode-card h3 {
    font-size: 1.5rem; 
    font-weight: 700; 
    margin-bottom: 0.5rem;
}
.episode-card p {
    opacity: 0.8;
    margin-bottom: 1rem;
    font-size: 1rem; 
    line-height: 1.625; 
}

.episode-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem; 
    margin-top: 1rem; 
    font-size: 0.875rem; 
    font-weight: 500; 
}

.episode-links a {
    color: inherit;
    text-decoration: none;
}
.episode-links a:hover {
    text-decoration: underline;
}

.all-episodes-container {
    text-align: center;
    margin-top: 4rem;
}

@media (max-width: 768px) {
    .episode-card {
        flex-direction: column;
    }
    .episode-card .cover-art-container,
    .episode-card .episode-details {
        width: 100%;
    }
}

.font-main-body {
    font-size: clamp(1.125rem, 1rem + 0.5vw, 1.25rem);
}

/* UPDATED: Icon initial state */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 200, 'GRAD' 0, 'opsz' 24; /* CHANGED: Initial weight */
    font-size: clamp(2rem, 1.5rem + 1.5vw, 2.5rem);
    transition: font-variation-settings 0.3s ease; /* More specific transition */
}

#theme-toggle:hover .material-symbols-outlined,
.platform-menu a:hover .material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 600, 'GRAD' 0, 'opsz' 24; /* CHANGED: Hover weight */
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

#cursor-dot, #cursor-ring {
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 9999;
    border-radius: 50%;
}

#cursor-dot {
    width: 8px;
    height: 8px;
    background-color: #fff;
    mix-blend-mode: difference;
    transition: background-color 0.3s ease;
}

#cursor-ring {
    width: 40px;
    height: 40px;
    background-color: var(--cursor-ring-color);
    mix-blend-mode: difference;
    transition: background-color 0.3s ease;
}

audio {
    width: 100%;
    margin-top: 1rem;
    border-radius: 9999px;
    filter: saturate(0.8) contrast(1.1); /* Light theme audio filter */
}

:root.dark audio {
    filter: invert(1) hue-rotate(180deg) saturate(0.6) brightness(1.1); /* Dark theme audio filter */
}

#theme-toggle .moon-icon { opacity: 1; }
#theme-toggle .sun-icon { opacity: 0; }
:root.dark #theme-toggle .moon-icon { opacity: 0; }
:root.dark #theme-toggle .sun-icon { opacity: 1; }