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

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #000;
    color: #fff;
    line-height: 1.4;
    -webkit-tap-highlight-color: transparent;
}

#app {
    height: 100%;
}

.hidden {
    display: none !important;
}

/* Loading & Error */
#loading, #error {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    padding: 20px;
    color: #999;
}

#error {
    color: #f66;
}

/* Player Container */
#player-container {
    position: relative;
    height: 100%;
    overflow: hidden;
}

/* Episode Slide */
.episode-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease-out;
}

.episode-slide.prev {
    transform: translateX(-100%);
}

.episode-slide.next {
    transform: translateX(100%);
}

.episode-slide.swiping {
    transition: none;
}

/* Background Image */
.episode-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.episode-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.4) 0%,
        rgba(0, 0, 0, 0.1) 30%,
        rgba(0, 0, 0, 0.1) 60%,
        rgba(0, 0, 0, 0.6) 100%
    );
}

/* Tap area for play/pause toggle */
.tap-area {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

/* Center play button */
.center-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    border: 3px solid rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    background: transparent;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: transform 0.2s, opacity 0.2s;
}

.center-play-btn:active {
    transform: translate(-50%, -50%) scale(0.95);
}

.center-play-btn svg {
    width: 44px;
    height: 44px;
    margin-left: 6px; /* Visual centering for play triangle */
}

/* Content */
.episode-content {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 24px;
    padding-top: max(24px, env(safe-area-inset-top));
    padding-left: max(24px, env(safe-area-inset-left));
    padding-right: max(24px, env(safe-area-inset-right));
    pointer-events: none;
    z-index: 3;
}

.show-title {
    font-size: 16px;
    font-weight: 400;
    opacity: 0.9;
    margin-bottom: 8px;
}

.episode-title {
    font-size: 36px;
    font-weight: 700;
    line-height: 1.1;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Player Controls */
.player-section {
    position: relative;
    padding: 24px;
    padding-bottom: max(32px, env(safe-area-inset-bottom));
    padding-left: max(24px, env(safe-area-inset-left));
    padding-right: max(24px, env(safe-area-inset-right));
    z-index: 5;
}

.player-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 48px;
    margin-bottom: 24px;
}

.control-btn {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 8px;
    opacity: 0.8;
    transition: opacity 0.2s, transform 0.1s;
}

.control-btn:active {
    transform: scale(0.95);
}

.control-btn svg {
    width: 32px;
    height: 32px;
}

/* Progress Bar */
.progress-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.progress-bar {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    cursor: pointer;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #fff;
    border-radius: 2px;
    width: 0%;
    transition: width 0.1s linear;
}

.time {
    font-size: 13px;
    font-variant-numeric: tabular-nums;
    opacity: 0.8;
    min-width: 45px;
}

.time-current {
    text-align: left;
}

.time-remaining {
    text-align: right;
}

/* Intro slide */
.intro-slide .episode-content {
    padding-top: 80px;
}

.intro-slide .episode-title {
    font-size: 50px;
    line-height: 1;
    text-shadow: none;
}

.intro-subtitle {
    font-size: 18px;
    font-weight: 400;
    opacity: 1;
    margin-top: 12px;
}

.intro-hint {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 32px;
    padding-bottom: max(48px, env(safe-area-inset-bottom));
    text-align: center;
    font-size: 16px;
    opacity: 0.8;
    z-index: 3;
}
