* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #ffffff;
    color: #000;
}

.container {
    max-width: 100%;
    margin: 0 auto;
}

/* Header */
header {
    text-align: center;
    padding: 25px 20px;
    background: #ffffff;
    border-bottom: 1px solid #eee;
}

h1 {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: #000;
}

/* Series List */
.series-list {
    padding: 15px;
}

.series-item {
    background: #f8f9fa;
    border-radius: 16px;
    margin-bottom: 12px;
    overflow: hidden;
}

.series-title {
    padding: 18px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    background: #ffffff;
    border: 1px solid #eee;
    border-radius: 16px;
}

.series-title.active {
    background: #f0f0f0;
    border-radius: 16px 16px 0 0;
}

/* Episodes Grid - Simple 1,2,3 */
.episode-dropdown {
    padding: 20px;
    display: none;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    background: #f8f9fa;
}

.episode-dropdown.show {
    display: grid;
}

.episode-btn {
    background: white;
    border: 1px solid #ddd;
    padding: 20px 5px;
    border-radius: 12px;
    font-size: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.episode-btn:active {
    transform: scale(0.95);
    background: #f0f0f0;
}

/* Fullscreen Reader */
.reader-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: black;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.reader-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    padding: 15px;
    background: rgba(0,0,0,0.9);
    color: white;
    z-index: 1002;
    backdrop-filter: blur(10px);
}

.back-btn {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    padding: 0 15px 0 5px;
}

.episode-indicator {
    font-size: 18px;
    font-weight: 500;
}

/* Password Screen */
.password-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: black;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
}

.password-box {
    background: white;
    padding: 40px 30px;
    border-radius: 24px;
    width: 90%;
    max-width: 350px;
    text-align: center;
}

.password-box p {
    margin-bottom: 25px;
    font-size: 20px;
    font-weight: 600;
}

#passwordInput {
    width: 100%;
    padding: 18px;
    border: 2px solid #ddd;
    border-radius: 30px;
    font-size: 16px;
    margin-bottom: 15px;
    text-align: center;
}

#passwordInput:focus {
    outline: none;
    border-color: #000;
}

#submitPassword {
    background: black;
    color: white;
    border: none;
    padding: 18px 30px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
}

.error-message {
    color: #ff3b30;
    margin-top: 15px;
    font-size: 14px;
}

/* Webtoon Fullscreen */
.webtoon-fullscreen {
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    margin-top: 60px;
}

.images-container {
    display: flex;
    flex-direction: column;
    min-height: min-content;
}

.images-container img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    background: #000;
    pointer-events: none;
    -webkit-user-drag: none;
}

/* Ad Space - Optimized for AdSense */
.ad-space {
    width: 100%;
    min-height: 120px;
    background: #1a1a1a;
    border-top: 2px solid #333;
    border-bottom: 2px solid #333;
    margin: 20px 0;
    padding: 15px 10px;
    display: none;
    justify-content: center;
    align-items: center;
}

.ad-content {
    width: 100%;
    max-width: 728px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 90px;
}

/* AdSense specific */
.adsbygoogle {
    display: block;
    width: 100%;
    text-align: center;
}

/* Navigation */
.navigation {
    position: sticky;
    bottom: 20px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    pointer-events: none;
    z-index: 1003;
    margin: 20px 0;
}

.nav-btn {
    pointer-events: auto;
    width: 60px;
    height: 60px;
    border-radius: 30px;
    background: rgba(0,0,0,0.9);
    border: 2px solid rgba(255,255,255,0.3);
    color: white;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    transition: all 0.2s;
}

.nav-btn:active {
    transform: scale(0.9);
    background: rgba(255,255,255,0.2);
}

.nav-btn:disabled {
    opacity: 0.3;
    pointer-events: none;
}

/* Mobile */
@media (max-width: 500px) {
    h1 {
        font-size: 28px;
    }
    
    .episode-btn {
        padding: 15px 5px;
        font-size: 18px;
    }
}

input {
    user-select: text;
}