/* ==========================================================================
   KissKH Clone - Main CSS — Exact replica of kiskh.fun / kisskh9.com.ro
   ========================================================================== */

* { box-sizing: border-box !important; }
body, html { height: 100%; margin: 0; font-family: Roboto, "Helvetica Neue", sans-serif; }
body {
    margin: 0; padding: 0;
    font-family: Roboto, "Helvetica Neue", sans-serif;
    background: #f5f5f5; color: var(--text-color);
    overflow-x: hidden; transition: background 0.3s ease; letter-spacing: normal;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; margin: 0; padding: 0; }
img { max-width: 100%; height: auto; display: block; }

.material-icons {
    font-family: 'Material Icons'; font-weight: normal; font-style: normal;
    font-size: 24px; line-height: 1; letter-spacing: normal; text-transform: none;
    display: inline-block; white-space: nowrap; word-wrap: normal;
    -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   SIDENAV
   ========================================================================== */
.sidenav-container { position: relative; flex: 1; display: flex; flex-direction: column; }
.large-screen-min-height { min-height: calc(100vh - 64px); }
@media (max-width: 768px) { .large-screen-min-height { min-height: auto; } }

.sidenav-backdrop {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: var(--menu-backdrop); z-index: 998;
    opacity: 0; visibility: hidden; transition: opacity 0.3s, visibility 0.3s;
}
.sidenav-backdrop.show { opacity: 1; visibility: visible; }

.sidenav {
    position: fixed; top: 0; left: 0; width: 170px; height: 100%;
    background: white; z-index: 999;
    transform: translateX(-100%);
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    overflow-y: auto; box-shadow: 2px 0 8px rgba(0,0,0,0.15);
}
.sidenav.open { transform: translateX(0); }
.sidenav-content { height: 100%; display: flex; flex-direction: column; }
.sidenav-header { padding: 10px; border-bottom: 1px solid #e0e0e0; background: white; }
.sidenav-header-content { display: flex; justify-content: space-between; align-items: center; }
.menu-close-btn {
    background: rgba(0,0,0,0.04); border: none; color: #333; cursor: pointer;
    padding: 8px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
}
.sidenav-divider { height: 1px; background: #e0e0e0; margin: 4px 0; }
.sidenav-menu { flex: 1; padding: 4px 0; }
.menu-item { padding: 0; margin: 0; }
.menu-button {
    font-size: 14px; font-weight: 500; width: 100%;
    background: transparent; border: none; cursor: pointer; outline: none;
    display: flex; align-items: center; padding: 12px 16px;
    text-decoration: none; transition: all 0.2s; color: #333;
}
.menu-button .material-icons { margin-right: 10px; font-size: 20px; }
.menu-item.active .menu-button { color: #ffc107; }
.menu-item:hover .menu-button { background: rgba(0,0,0,0.04); }

/* ==========================================================================
   TOP TOOLBAR / NAVBAR
   ========================================================================== */
.navbar-wrapper { position: sticky; top: 0; z-index: 100; }
.top-toolbar {
    display: flex; align-items: center; padding: 0 16px;
    height: 64px; background: var(--navbar-bg); color: var(--navbar-text);
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}
.toolbar-row { display: flex; align-items: center; width: 100%; }
.toolbar-spacer { flex: 1; }

.mobile-menu-btn {
    background: transparent; border: none; color: white; cursor: pointer;
    padding: 8px; border-radius: 50%; display: none; align-items: center; justify-content: center;
    margin-right: 8px;
}
@media (max-width: 768px) { .mobile-menu-btn { display: flex; } }

.toolbar-logo-btn { display: flex; align-items: center; text-decoration: none; }
.logo-icon { width: 80px; height: auto; }

/* Desktop Nav */
.desktop-nav { display: flex; align-items: center; }
@media (max-width: 768px) { .desktop-nav { display: none; } }

.nav-list { display: flex; align-items: center; gap: 2px; margin: 0; padding: 0; list-style: none; }
.nav-btn {
    display: flex; align-items: center; gap: 6px;
    padding: 8px 12px; border-radius: 4px;
    color: white; text-decoration: none; font-size: 14px; font-weight: 500;
    background: transparent; border: none; cursor: pointer;
    transition: background 0.2s; white-space: nowrap; font-family: Roboto, sans-serif;
}
.nav-btn:hover { background: rgba(255,255,255,0.12); color: white; }
.nav-btn .material-icons { font-size: 20px; }
.nav-btn.active { background: white !important; color: #333 !important; border-radius: 4px; }
.nav-btn.signin-btn { border: 1px solid rgba(255,255,255,0.4); border-radius: 4px; }

/* Search Overlay */
.search-overlay {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.88); z-index: 1000;
    align-items: flex-start; justify-content: center; padding-top: 100px;
}
.search-overlay.active { display: flex; }
.search-overlay-inner { width: 90%; max-width: 600px; }
.search-input-wrap {
    display: flex; align-items: center; background: white; border-radius: 4px; padding: 10px 16px;
}
.search-input-wrap input {
    flex: 1; border: none; outline: none; font-size: 18px;
    font-family: Roboto, sans-serif; color: #333;
}
.search-input-wrap .material-icons { color: #666; margin-right: 8px; }
.search-close-btn {
    background: transparent; border: none; color: white; cursor: pointer;
    font-size: 13px; margin-top: 12px; display: flex; align-items: center; gap: 4px;
    opacity: 0.8;
}

/* Theme Menu */
.theme-menu-overlay {
    display: none; position: fixed; top: 64px; right: 80px; z-index: 200;
    background: white; box-shadow: 0 4px 20px rgba(0,0,0,0.25); border-radius: 4px;
    min-width: 220px; padding: 8px 0;
}
.theme-menu-overlay.active { display: block; }
.theme-item {
    display: flex; align-items: center; gap: 12px; padding: 12px 16px;
    cursor: pointer; font-size: 14px; color: #333; transition: background 0.2s;
}
.theme-item:hover { background: #f5f5f5; }
.theme-swatch { width: 18px; height: 18px; border-radius: 50%; flex-shrink: 0; }

/* Sign In Menu */
.signin-menu-overlay {
    display: none; position: fixed; top: 64px; right: 16px; z-index: 200;
    background: white; box-shadow: 0 4px 20px rgba(0,0,0,0.25); border-radius: 4px;
    min-width: 180px; padding: 8px 0;
}
.signin-menu-overlay.active { display: block; }
.signin-item {
    display: flex; align-items: center; gap: 10px; padding: 12px 16px;
    cursor: pointer; font-size: 14px; color: #333; transition: background 0.2s;
    text-decoration: none;
}
.signin-item:hover { background: #f5f5f5; }
.signin-item .material-icons { color: #666; font-size: 20px; }

/* Request Drama Modal */
.modal-overlay {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6); z-index: 500;
    align-items: center; justify-content: center;
}
.modal-overlay.active { display: flex; }
.modal-box {
    background: white; border-radius: 8px; padding: 28px; width: 90%; max-width: 480px; color: #333;
}
.modal-box h3 { margin: 0 0 16px; font-size: 18px; }
.modal-box input, .modal-box textarea, .modal-box select {
    width: 100%; border: 1px solid #e0e0e0; border-radius: 4px; padding: 10px 12px;
    font-size: 14px; font-family: Roboto, sans-serif; margin-bottom: 12px; outline: none;
    color: #333;
}
.modal-box textarea { height: 90px; resize: vertical; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 4px; }
.modal-btn {
    padding: 10px 24px; border: none; border-radius: 4px; cursor: pointer;
    font-size: 14px; font-weight: 500; font-family: Roboto, sans-serif;
}
.modal-btn-cancel { background: #e0e0e0; color: #333; }
.modal-btn-submit { background: var(--primary-color); color: white; }

/* ==========================================================================
   HERO SLIDER — Exact like kisskh9.com.ro
   ========================================================================== */
.hero-slider {
    position: relative; width: 100%; overflow: hidden;
    background: linear-gradient(135deg, #3f3b8b 0%, #5c35a5 50%, #3f3b8b 100%);
    height: 340px;
}
@media (max-width: 768px) { .hero-slider { height: 220px; } }
@media (max-width: 480px) { .hero-slider { height: 180px; } }

.hero-slides { display: flex; height: 100%; transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1); }
.hero-slide { min-width: 100%; position: relative; overflow: hidden; height: 100%; }
.hero-slide img {
    width: 100%; height: 100%; object-fit: cover; display: block;
    opacity: 0.7;
}
.hero-slide-placeholder {
    width: 100%; height: 100%;
    background: linear-gradient(135deg, #3f3b8b 0%, #5c35a5 100%);
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 20px; font-weight: 600; text-align: center; padding: 20px;
}
.hero-slide-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to bottom,
        rgba(0,0,0,0) 0%,
        rgba(0,0,0,0.1) 50%,
        rgba(0,0,0,0.6) 100%);
}
.hero-slide-title-bar {
    position: absolute; bottom: 20px; left: 0; right: 0;
    display: flex; justify-content: center; align-items: center; padding: 0 60px;
}
.hero-slide-title {
    color: white; font-size: 16px; font-weight: 500; text-align: center;
    background: rgba(0,0,0,0.45); padding: 6px 16px; border-radius: 3px;
    text-decoration: none; max-width: 600px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Slider nav arrows — yellow chevrons like original */
.hero-nav-btn {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: rgba(0,0,0,0.45); border: none; color: #ffd740; cursor: pointer;
    padding: 0; display: flex; align-items: center; justify-content: center;
    z-index: 10; width: 44px; height: 44px; border-radius: 50%;
    transition: background 0.2s, transform 0.15s;
    -webkit-tap-highlight-color: rgba(255,215,64,0.35);
}
.hero-nav-btn:hover { background: rgba(0,0,0,0.7); }
.hero-nav-btn:active { transform: translateY(-50%) scale(0.92); }
.hero-nav-btn.prev { left: 12px; }
.hero-nav-btn.next { right: 12px; }
.hero-nav-btn .material-icons { font-size: 28px; }

/* Slider dots */
.hero-dots {
    position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%);
    display: flex; gap: 6px; align-items: center;
}
.hero-dot {
    width: 10px; height: 10px; border-radius: 50%;
    background: rgba(255,255,255,0.35); border: none; cursor: pointer; padding: 0;
    transition: background 0.3s, transform 0.2s;
}
.hero-dot.active { background: #ffd740; transform: scale(1.15); }

/* ==========================================================================
   HOME PAGE LAYOUT
   ========================================================================== */
.page-content { background: var(--content-bg); min-height: 100vh; }
.home-page { background: var(--content-bg); padding-bottom: 32px; }

/* Section */
.drama-section { background: var(--content-bg); padding: 0 16px 20px; }
.section-header { display: flex; align-items: center; padding: 16px 0 10px; }
.section-title-link {
    display: inline-flex; align-items: center; gap: 2px;
    font-size: 15px; font-weight: 600; color: #333;
    text-decoration: none; cursor: pointer;
}
.section-title-link .material-icons { font-size: 20px; color: #673ab7; }
body.pink-bluegrey-theme .section-title-link,
body.purple-green-theme .section-title-link { color: #ffffff; }
body.pink-bluegrey-theme .section-title-link .material-icons,
body.purple-green-theme .section-title-link .material-icons { color: #ffffff; }

/* Cards Row with scroll */
.cards-row { position: relative; display: flex; align-items: center; gap: 4px; }
.cards-scroll-container {
    display: flex; gap: 10px; overflow-x: auto; scroll-behavior: smooth;
    padding: 4px 0 8px; flex: 1;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
}
.cards-scroll-container > * { scroll-snap-align: start; }
.cards-scroll-container::-webkit-scrollbar { display: none; }
.cards-scroll-container { -ms-overflow-style: none; scrollbar-width: none; }

.nav-arrow {
    background: transparent; border: none; cursor: pointer;
    padding: 4px; display: flex; align-items: center; flex-shrink: 0;
    opacity: 0.7; transition: opacity 0.2s;
}
.nav-arrow:hover { opacity: 1; }
.nav-arrow .material-icons { font-size: 18px; color: var(--primary-color); }
body.pink-bluegrey-theme .nav-arrow .material-icons,
body.purple-green-theme .nav-arrow .material-icons { color: #ffffff; }

/* ==========================================================================
   DRAMA CARD — 284×160 landscape ratio
   ========================================================================== */
.drama-card-item {
    flex: 0 0 284px; min-width: 0; cursor: pointer;
}
.drama-card-wrapper {
    background: var(--content-bg);
    border-radius: 4px;
    overflow: hidden;
}
.drama-card-link { display: block; text-decoration: none; color: inherit; }
.drama-card-content { overflow: hidden; }

/* Aspect ratio box — 284×160 = 56.34% */
.aspect-ratio-box {
    position: relative;
    width: 100%;
    padding-top: 56.34%; /* 160/284 * 100 */
    overflow: hidden;
    background: #222;
}
.aspect-ratio-box img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
}

/* Episode overlay bar at bottom of image */
.episode-overlay {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding: 24px 7px 6px;
    background: linear-gradient(to top, rgba(0,0,0,0.65) 0%, transparent 100%);
}

/* SUB badge (left) */
.ribbon-left {
    font-size: 10px; font-weight: 700;
    padding: 2px 6px; border-radius: 2px;
    line-height: 1.4; letter-spacing: 0.3px;
    background: rgba(0,0,0,0.75); color: #fff;
}

/* EP number badge (right) */
.episode-right {
    font-size: 10px; font-weight: 700;
    padding: 2px 6px; border-radius: 2px;
    line-height: 1.4; letter-spacing: 0.3px;
    background: rgba(0,0,0,0.75); color: #fff;
}

/* NEW / SOON badge */
.card-badge-new {
    position: absolute; top: 6px; left: 6px;
    font-size: 10px; font-weight: 700;
    padding: 2px 6px; border-radius: 2px; line-height: 1.4;
    background: #f44336; color: #fff; text-transform: uppercase;
}

/* Title area below image */
.drama-card-title-area {
    padding: 7px 8px 10px;
}
.drama-card-title {
    font-size: 12px; font-weight: 500; color: #333;
    margin: 0; line-height: 1.45;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden;
}
body.pink-bluegrey-theme .drama-card-title,
body.purple-green-theme .drama-card-title { color: #fff; }

/* Responsive card sizes */
@media (max-width: 1200px) { .drama-card-item { flex: 0 0 250px; } }
@media (max-width: 900px)  { .drama-card-item { flex: 0 0 220px; } }
@media (max-width: 600px)  { .drama-card-item { flex: 0 0 180px; } }
@media (max-width: 400px)  { .drama-card-item { flex: 0 0 155px; } }

/* ==========================================================================
   EXPLORE PAGE
   ========================================================================== */
.explore-page { background: var(--content-bg); min-height: 100vh; padding: 16px; }
.filter-section { margin-bottom: 16px; }
.filter-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; align-items: center; }
.filter-label { font-size: 13px; color: #666; min-width: 60px; flex-shrink: 0; }
body.pink-bluegrey-theme .filter-label,
body.purple-green-theme .filter-label { color: #ccc; }

.filter-btn {
    background: #e0e0e0; color: rgba(0,0,0,0.87); border: none; cursor: pointer;
    padding: 5px 14px; border-radius: 14px; font-size: 13px; font-weight: 500;
    font-family: Roboto, sans-serif; transition: all 0.2s ease; line-height: 1.5;
}
.filter-btn:hover { background: #d0d0d0; }
.filter-btn.active { background: var(--primary-color) !important; color: #ffffff !important; }

/* Drama grid (explore, search, archive) */
.drama-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
}
@media (max-width: 600px) {
    .drama-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
}
@media (max-width: 380px) {
    .drama-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; }
}
.drama-grid .drama-card-item { flex: unset; }

/* Pagination */
.mat-paginator-container {
    display: flex; align-items: center; justify-content: flex-end;
    padding: 16px 0; gap: 8px; color: #666; font-size: 14px; flex-wrap: wrap;
}
.paginator-btn {
    background: transparent; border: none; cursor: pointer; padding: 8px;
    display: flex; align-items: center; border-radius: 50%;
    transition: background 0.2s;
}
.paginator-btn:hover:not(:disabled) { background: rgba(0,0,0,0.06); }
.paginator-btn:disabled { opacity: 0.3; cursor: default; }
.paginator-btn .material-icons { font-size: 22px; color: #555; }
.page-info { font-size: 14px; color: #666; }
body.pink-bluegrey-theme .page-info,
body.purple-green-theme .page-info { color: rgba(255,255,255,0.7); }

/* ==========================================================================
   SINGLE DRAMA DETAIL
   ========================================================================== */
.drama-detail-page { background: var(--content-bg); min-height: 100vh; }
.drama-backdrop { position: relative; width: 100%; height: 280px; overflow: hidden; background: #333; }
.drama-backdrop img { width: 100%; height: 100%; object-fit: cover; opacity: 0.7; }
.drama-backdrop-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.7) 100%);
}

.drama-detail-body { padding: 20px 16px; max-width: 1100px; margin: 0 auto; }
.drama-detail-header { display: flex; gap: 20px; margin-bottom: 24px; }
.drama-poster { width: 150px; flex-shrink: 0; }
.drama-poster img { width: 100%; border-radius: 4px; box-shadow: 0 4px 16px rgba(0,0,0,0.25); }
.drama-info h1 { font-size: 22px; font-weight: 700; color: #222; margin: 0 0 8px; line-height: 1.3; }
body.pink-bluegrey-theme .drama-info h1,
body.purple-green-theme .drama-info h1 { color: #fff; }

.drama-meta { font-size: 13px; color: #555; line-height: 2; }
body.pink-bluegrey-theme .drama-meta,
body.purple-green-theme .drama-meta { color: #ccc; }
.drama-meta strong { color: #333; margin-right: 4px; }
body.pink-bluegrey-theme .drama-meta strong,
body.purple-green-theme .drama-meta strong { color: #fff; }
.meta-row { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-bottom: 8px; }

.drama-genres { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.genre-chip {
    padding: 4px 12px; border-radius: 14px; font-size: 12px; font-weight: 500;
    background: #eeeeee; color: #333; text-decoration: none; transition: all 0.2s;
}
.genre-chip:hover { background: var(--primary-color); color: white; }

.drama-description { font-size: 14px; color: #555; line-height: 1.8; margin: 12px 0; }
body.pink-bluegrey-theme .drama-description,
body.purple-green-theme .drama-description { color: #ddd; }

.watch-btn {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--primary-color); color: white; padding: 10px 24px;
    border-radius: 4px; font-size: 14px; font-weight: 600; text-decoration: none;
    border: none; cursor: pointer; font-family: Roboto, sans-serif;
    transition: opacity 0.2s; margin-top: 8px;
}
.watch-btn:hover { opacity: 0.88; color: white; }
.watch-btn .material-icons { font-size: 20px; }

/* Episode list */
.episode-section { margin-top: 20px; }
.episode-section h3 { font-size: 15px; font-weight: 600; color: #333; margin: 0 0 10px; }
body.pink-bluegrey-theme .episode-section h3,
body.purple-green-theme .episode-section h3 { color: #fff; }

.episode-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.episode-btn {
    padding: 7px 14px; border: 1px solid #e0e0e0; background: white;
    border-radius: 4px; cursor: pointer; font-size: 13px; font-family: Roboto, sans-serif;
    transition: all 0.2s; text-decoration: none; color: #333;
    display: flex; align-items: center; gap: 4px;
}
.episode-btn:hover { border-color: var(--primary-color); color: var(--primary-color); }
.episode-btn.active { background: #ffd740; color: #333; border-color: #ffd740; }

/* Video Player */
.video-player-wrap {
    position: relative; width: 100%; padding-top: 56.25%;
    background: #000; border-radius: 4px; overflow: hidden; margin-bottom: 16px;
}
.video-player-wrap iframe,
.video-player-wrap video {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    border: none;
}

/* Post block info */
.post-block-info { background: #f9f9f9; border-radius: 4px; padding: 16px 20px; margin-bottom: 20px; }
.post-block-info h3 { margin: 0 0 10px; font-size: 16px; color: #333; }
.post-block-info p { margin: 6px 0; font-size: 14px; color: #555; line-height: 1.7; }
body.pink-bluegrey-theme .post-block-info,
body.purple-green-theme .post-block-info { background: #424242 !important; color: #fff !important; }
body.pink-bluegrey-theme .post-block-info h3,
body.purple-green-theme .post-block-info h3,
body.pink-bluegrey-theme .post-block-info p,
body.purple-green-theme .post-block-info p { color: #fff !important; }

/* Responsive single */
@media (max-width: 600px) {
    .drama-detail-header { flex-direction: column; gap: 12px; }
    .drama-poster { width: 100px; }
    .drama-backdrop { height: 180px; }
}

/* ==========================================================================
   SEARCH PAGE
   ========================================================================== */
.search-page { background: var(--content-bg); min-height: 100vh; padding: 16px; }
.search-header { margin-bottom: 16px; }
.search-header h1 { font-size: 20px; color: #333; margin: 0 0 12px; }
body.pink-bluegrey-theme .search-header h1,
body.purple-green-theme .search-header h1 { color: #fff; }
.search-main-input-wrap {
    display: flex; align-items: center; border: 1px solid #e0e0e0;
    border-radius: 4px; padding: 10px 16px; background: white;
}
.search-main-input-wrap input {
    flex: 1; border: none; outline: none; font-size: 16px; font-family: Roboto, sans-serif; color: #333;
}
.search-main-input-wrap .material-icons { color: #666; margin-right: 8px; }

.search-category-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.search-category-btn {
    padding: 5px 14px; border: 1px solid #e0e0e0; background: white;
    border-radius: 14px; cursor: pointer; font-size: 13px; font-weight: 500;
    font-family: Roboto, sans-serif; transition: all 0.2s; color: #333;
}
.search-category-btn:hover { border-color: var(--primary-color); color: var(--primary-color); }
.search-category-btn.active { background: var(--primary-color); color: white; border-color: var(--primary-color); }

.no-results { text-align: center; padding: 60px 20px; color: #bbb; }
.no-results .material-icons { font-size: 56px; margin-bottom: 12px; }
.no-results p { font-size: 15px; }

/* ==========================================================================
   FAQ PAGE
   ========================================================================== */
.faq-page { background: var(--content-bg); min-height: 100vh; padding: 24px 16px; max-width: 900px; margin: 0 auto; }
.faq-page h1 { font-size: 22px; margin-bottom: 20px; color: #333; }
body.pink-bluegrey-theme .faq-page h1,
body.purple-green-theme .faq-page h1 { color: #fff; }
.faq-question-item { border: 1px solid #e8e8e8; border-radius: 4px; margin-bottom: 8px; overflow: hidden; background: white; }
.faq-question-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 16px; cursor: pointer; background: white; transition: background 0.15s;
}
.faq-question-header:hover { background: #fafafa; }
.faq-question-text { font-size: 14px; font-weight: 500; color: #333; }
.faq-expand-arrow { transition: transform 0.3s; flex-shrink: 0; }
.faq-question-item.open .faq-expand-arrow { transform: rotate(180deg); }
.faq-answer-content {
    display: none; padding: 12px 16px; font-size: 14px; color: #555;
    line-height: 1.8; border-top: 1px solid #f0f0f0;
}
.faq-question-item.open .faq-answer-content { display: block; }
body.pink-bluegrey-theme .faq-question-item,
body.purple-green-theme .faq-question-item { background: #424242; border-color: rgba(255,255,255,0.1); }
body.pink-bluegrey-theme .faq-question-header,
body.purple-green-theme .faq-question-header { background: #424242; }
body.pink-bluegrey-theme .faq-question-text,
body.purple-green-theme .faq-question-text { color: #fff; }
body.pink-bluegrey-theme .faq-answer-content,
body.purple-green-theme .faq-answer-content { color: #ddd; border-top-color: rgba(255,255,255,0.1); }
body.pink-bluegrey-theme .faq-expand-arrow,
body.purple-green-theme .faq-expand-arrow { color: #fff; }

/* ==========================================================================
   STATIC PAGES
   ========================================================================== */
.page-content-body { background: var(--content-bg); min-height: 100vh; padding: 24px 16px; max-width: 900px; margin: 0 auto; }
.page-content-body h1 { font-size: 22px; color: #333; margin-bottom: 16px; }
.page-content-body p { color: #555; line-height: 1.9; margin-bottom: 14px; font-size: 14px; }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.app-footer { background: var(--navbar-bg); color: var(--navbar-text); padding: 24px 16px 12px; }
.footer-inner { max-width: 1100px; margin: 0 auto; }
.footer-logo { margin-bottom: 10px; }
.footer-logo img { width: 70px; }
.footer-desc { font-size: 13px; color: rgba(255,255,255,0.65); margin-bottom: 16px; line-height: 1.7; }
.footer-links {
    background: transparent !important;
    display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 14px 0;
    border-top: 1px solid rgba(255,255,255,0.12);
}
.footer-links a { font-size: 13px; color: rgba(255,255,255,0.75); text-decoration: none; transition: color 0.2s; }
.footer-links a:hover { color: #ffd740; }
.footer-copyright {
    font-size: 12px; color: rgba(255,255,255,0.45); text-align: center;
    padding-top: 12px; border-top: 1px solid rgba(255,255,255,0.1); margin-top: 12px;
}

/* ==========================================================================
   ERROR 404
   ========================================================================== */
.error-404-page {
    background: var(--content-bg); min-height: 80vh;
    display: flex; flex-direction: column; align-items: center;
    justify-content: center; text-align: center; padding: 40px;
}
.error-404-title { font-size: 80px; font-weight: 700; color: var(--primary-color); margin: 0; line-height: 1; }
.error-404-subtitle { font-size: 22px; color: #333; margin: 16px 0 8px; }
.error-404-text { font-size: 14px; color: #666; margin-bottom: 24px; }
.error-404-home-btn {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--primary-color); color: white;
    padding: 12px 24px; border-radius: 4px; font-size: 14px;
    text-decoration: none; font-weight: 500; transition: opacity 0.2s;
}
.error-404-home-btn:hover { opacity: 0.88; color: white; }
body.deeppurple-amber-theme .error-404-subtitle,
body.deeppurple-amber-theme .error-404-text,
body.indigo-pink-theme .error-404-subtitle,
body.indigo-pink-theme .error-404-text { color: #333 !important; }

/* ==========================================================================
   RESPONSIVE — Global
   ========================================================================== */
@media (max-width: 768px) {
    .top-toolbar { padding: 0 10px; height: 56px; }
    .drama-section { padding-left: 10px; padding-right: 10px; }
    .drama-detail-body { padding: 12px; }
    .explore-page { padding: 10px; }
}

/* ============================================================
   v1.1.0 — Episode tile grid, movie player, server tabs, mobile
   ============================================================ */

/* Episode tile grid (matches kisskh.co compact layout) */
.episode-grid{
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(78px,1fr));
    gap:8px;
    margin-top:12px;
}
.episode-tile{
    position:relative;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    aspect-ratio:1/1;
    background:linear-gradient(135deg,#2a2a35,#1a1a23);
    border:1px solid rgba(255,255,255,0.06);
    border-radius:8px;
    color:#fff;
    text-decoration:none;
    transition:all .2s ease;
    overflow:hidden;
}
.episode-tile:hover{
    transform:translateY(-2px);
    border-color:var(--theme-primary,#673ab7);
    box-shadow:0 6px 14px rgba(0,0,0,.35);
}
.episode-tile .ep-tile-num{
    font-size:18px;font-weight:700;line-height:1;letter-spacing:.5px;
}
.episode-tile .ep-tile-meta{
    margin-top:4px;font-size:10px;opacity:.85;
}
.episode-tile .ep-tile-sub{
    background:rgba(103,58,183,.85);color:#fff;padding:1px 6px;border-radius:3px;font-weight:600;
}
.episode-tile .ep-tile-soon{
    background:#ff9800;color:#000;padding:1px 6px;border-radius:3px;font-weight:600;
}
.episode-tile.is-upcoming{opacity:.55;pointer-events:none;cursor:not-allowed;}

/* Movie player server tabs */
.server-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:8px 0 10px;}
.server-tab{
    background:#1f1f29;color:#ddd;border:1px solid #333;border-radius:6px;
    padding:6px 14px;font-size:13px;cursor:pointer;transition:all .2s;
}
.server-tab:hover{background:#2a2a35;}
.server-tab.active{background:var(--theme-primary,#673ab7);color:#fff;border-color:transparent;}
.movie-source.hidden{display:none;}
.movie-source iframe{width:100%;aspect-ratio:16/9;border:0;border-radius:8px;background:#000;}

/* Watch Now button polish */
.watch-btn{
    display:inline-flex;align-items:center;gap:6px;
    background:var(--theme-primary,#673ab7);color:#fff !important;
    padding:10px 22px;border-radius:6px;font-weight:600;
    text-decoration:none;cursor:pointer;transition:all .2s;
    margin-top:10px;
}
.watch-btn:hover{filter:brightness(1.12);transform:translateY(-1px);box-shadow:0 6px 14px rgba(0,0,0,.4);}
.watch-btn .material-icons{font-size:20px;}

/* Drama card image fallback fix */
.drama-card-image img{background:#1a1a23;}

/* === Mobile responsive (<= 768px) === */
@media (max-width:768px){
    .drama-detail-header{flex-direction:column;align-items:center;text-align:center;}
    .drama-poster{width:60%;max-width:240px;margin:0 auto;}
    .drama-info{padding:12px 0;}
    .drama-info h1{font-size:22px;line-height:1.2;}
    .meta-row{justify-content:center;flex-wrap:wrap;gap:8px;font-size:12px;}
    .drama-genres{justify-content:center;}
    .episode-grid{grid-template-columns:repeat(auto-fill,minmax(64px,1fr));gap:6px;}
    .episode-tile .ep-tile-num{font-size:15px;}
    .episode-tile .ep-tile-meta{font-size:9px;}
    .video-player-wrap iframe,.movie-source iframe{aspect-ratio:16/9;}
    .hero-slider{height:auto;min-height:220px;}
    .hero-slide-title{font-size:14px;}
    .filter-row{flex-wrap:wrap;gap:6px;}
    .filter-btn{font-size:12px;padding:5px 10px;}
    .cards-row .nav-arrow{
        display:flex; width:32px; height:32px; min-width:32px;
        background:rgba(0,0,0,0.55); border-radius:50%;
        opacity:0.85; padding:0; align-items:center; justify-content:center;
    }
    .cards-row .nav-arrow .material-icons{font-size:16px; color:#ffd740;}
    .top-toolbar .desktop-nav{display:none;}
    .toolbar-row{padding:0 8px;}
}
@media (max-width:480px){
    .drama-poster{width:75%;}
    .drama-info h1{font-size:19px;}
    .episode-grid{grid-template-columns:repeat(auto-fill,minmax(56px,1fr));}
    .watch-btn{width:100%;justify-content:center;}
}

/* ============================================================
   v1.2.0 — kisskh.fun-style watch page (single-episode + single-drama)
   ============================================================ */
.kfun-watch-page{max-width:1280px;margin:0 auto;padding:14px 16px 32px;}
.kfun-crumb{font-size:13px;color:#9aa0a6;margin:0 0 12px;}
.kfun-crumb a{color:#bdbdbd;text-decoration:none;}
.kfun-crumb a:hover{color:var(--theme-primary,#673ab7);}
.kfun-crumb span{margin:0 6px;}

.kfun-watch-grid{
    display:grid;
    grid-template-columns:minmax(0,1fr) 380px;
    gap:18px;
    align-items:start;
}

/* Player column */
.kfun-player-col{min-width:0;}
.kfun-server-bar{
    display:flex;align-items:center;gap:6px;flex-wrap:wrap;
    background:#15151c;padding:8px 10px;border-radius:8px 8px 0 0;border:1px solid #1f1f29;border-bottom:none;
}
.kfun-server-label{font-size:12px;color:#9aa0a6;margin-right:4px;}
.kfun-server-btn{
    display:inline-flex;align-items:center;gap:4px;
    background:#22222d;color:#ddd;border:1px solid #2d2d3a;border-radius:5px;
    padding:5px 10px;font-size:12px;cursor:pointer;transition:all .15s;
}
.kfun-server-btn .material-icons{font-size:14px;}
.kfun-server-btn:hover{background:#2d2d3a;}
.kfun-server-btn.active{background:var(--theme-primary,#673ab7);border-color:transparent;color:#fff;}

.kfun-player{
    position:relative;width:100%;aspect-ratio:16/9;background:#000;
    border-radius:0 0 8px 8px;overflow:hidden;
}
.kfun-server-bar + .kfun-player{border-radius:0 0 8px 8px;}
.kfun-player iframe,.kfun-player video{position:absolute;inset:0;width:100%;height:100%;border:0;}
.kfun-player-empty{
    display:flex;flex-direction:column;align-items:center;justify-content:center;color:#888;
    border-radius:8px;
}
.kfun-player-empty .material-icons{font-size:56px;opacity:.6;margin-bottom:8px;}
.kfun-player-poster{
    background-size:cover;background-position:center;display:flex;align-items:center;justify-content:center;
    border-radius:8px;
}
.kfun-player-poster::before{content:"";position:absolute;inset:0;background:rgba(0,0,0,.55);}
.kfun-bigplay{
    position:relative;z-index:1;display:inline-flex;flex-direction:column;align-items:center;
    color:#fff;text-decoration:none;transition:transform .2s;
}
.kfun-bigplay .material-icons{font-size:88px;color:#fff;filter:drop-shadow(0 4px 12px rgba(0,0,0,.6));}
.kfun-bigplay span{margin-top:6px;font-weight:600;letter-spacing:.5px;}
.kfun-bigplay:hover{transform:scale(1.05);}

.kfun-trailer-note{
    margin:8px 0 0;font-size:12px;color:#aaa;display:flex;align-items:center;gap:6px;
}
.kfun-trailer-note .material-icons{font-size:16px;}

.kfun-prev-next{display:flex;justify-content:space-between;gap:8px;margin-top:10px;}
.kfun-pn-btn{
    display:inline-flex;align-items:center;gap:4px;
    background:#22222d;color:#fff;text-decoration:none;
    padding:8px 14px;border-radius:6px;font-size:13px;font-weight:500;
    transition:all .15s;
}
.kfun-pn-btn:hover{background:var(--theme-primary,#673ab7);}
.kfun-pn-btn .material-icons{font-size:18px;}

/* Info column */
.kfun-info-col{
    background:#15151c;border:1px solid #1f1f29;border-radius:8px;padding:16px;
    max-height:none;
}
.kfun-title{
    font-size:20px;line-height:1.3;font-weight:700;color:#fff;margin:0 0 4px;
}
.kfun-title .kfun-year{color:#aaa;font-weight:400;font-size:18px;}
.kfun-aka{font-size:12px;color:#888;margin-bottom:4px;}
.kfun-date{font-size:13px;color:#aaa;margin-bottom:10px;}

.kfun-pills{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 12px;}
.kfun-pill{
    display:inline-block;background:#22222d;color:#ddd;
    padding:4px 10px;border-radius:99px;font-size:12px;border:1px solid #2d2d3a;
}
.kfun-pill-ongoing{background:rgba(76,175,80,.15);color:#81c784;border-color:rgba(76,175,80,.3);}
.kfun-pill-completed{background:rgba(33,150,243,.15);color:#64b5f6;border-color:rgba(33,150,243,.3);}
.kfun-pill-upcoming{background:rgba(255,152,0,.15);color:#ffb74d;border-color:rgba(255,152,0,.3);}

.kfun-watch-cta{
    display:flex;align-items:center;justify-content:center;gap:6px;width:100%;
    background:var(--theme-primary,#673ab7);color:#fff !important;text-decoration:none;
    padding:11px 16px;border-radius:8px;font-weight:600;font-size:14px;
    margin:4px 0 12px;transition:all .2s;
}
.kfun-watch-cta:hover{filter:brightness(1.12);transform:translateY(-1px);}

.kfun-actions{
    display:grid;grid-template-columns:repeat(4,1fr);gap:6px;margin:0 0 14px;
}
.kfun-act{
    display:flex;flex-direction:column;align-items:center;gap:3px;
    background:transparent;color:#bdbdbd;text-decoration:none;
    border:none;padding:8px 4px;cursor:pointer;font-size:11px;
    border-radius:6px;transition:all .15s;
}
.kfun-act:hover{background:#22222d;color:#fff;}
.kfun-act .material-icons{font-size:22px;}

.kfun-genres{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 12px;}
.kfun-genre-chip{
    background:#22222d;color:#ddd;text-decoration:none;
    padding:3px 9px;border-radius:4px;font-size:11px;
    border:1px solid #2d2d3a;transition:all .15s;
}
.kfun-genre-chip:hover{background:var(--theme-primary,#673ab7);color:#fff;border-color:transparent;}

.kfun-credits{font-size:12px;color:#bdbdbd;margin:0 0 12px;line-height:1.6;}
.kfun-credits strong{color:#fff;}

.kfun-desc{
    background:#1a1a23;border:1px solid #2d2d3a;border-radius:6px;padding:10px 12px;margin:0 0 14px;
}
.kfun-desc summary{
    font-size:13px;font-weight:600;color:#fff;cursor:pointer;list-style:none;
    display:flex;justify-content:space-between;align-items:center;
}
.kfun-desc summary::after{content:"▼";font-size:9px;color:#888;transition:transform .2s;}
.kfun-desc[open] summary::after{transform:rotate(180deg);}
.kfun-desc p{font-size:12px;color:#bdbdbd;margin:8px 0 0;line-height:1.5;}

.kfun-eps-block h3{font-size:14px;color:#fff;margin:0 0 2px;}
.kfun-eps-total{font-size:11px;color:#888;margin:0 0 8px;}
.kfun-eps-grid{
    display:grid;grid-template-columns:repeat(7,1fr);gap:6px;
}
.kfun-ep-tile{
    position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;
    aspect-ratio:1/1;background:#1a1a23;border:1px solid #2d2d3a;border-radius:5px;
    color:#ddd;text-decoration:none;font-size:13px;font-weight:600;
    transition:all .15s;overflow:hidden;
}
.kfun-ep-tile:hover{border-color:var(--theme-primary,#673ab7);transform:translateY(-1px);background:#22222d;}
.kfun-ep-tile.is-current{background:#ffc107;color:#000;border-color:#ffc107;}
.kfun-ep-tile.is-current .kfun-ep-num{color:#000;}
.kfun-ep-tile.is-soon{opacity:.55;cursor:not-allowed;pointer-events:none;}
.kfun-ep-num{font-size:14px;line-height:1;}
.kfun-ep-tag{
    position:absolute;top:2px;right:2px;
    background:#000;color:#fff;font-size:8px;
    padding:1px 3px;border-radius:2px;font-weight:700;line-height:1;letter-spacing:.5px;
}
.kfun-ep-tile.is-current .kfun-ep-tag{background:#000;color:#ffc107;}

/* Mobile responsive */
@media (max-width: 980px){
    .kfun-watch-grid{grid-template-columns:1fr;}
    .kfun-info-col{max-height:none;}
    .kfun-eps-grid{grid-template-columns:repeat(7,1fr);}
}
@media (max-width: 600px){
    .kfun-watch-page{padding:8px 10px 24px;}
    .kfun-title{font-size:17px;}
    .kfun-title .kfun-year{font-size:15px;}
    .kfun-eps-grid{grid-template-columns:repeat(6,1fr);gap:5px;}
    .kfun-ep-num{font-size:12px;}
    .kfun-bigplay .material-icons{font-size:64px;}
    .kfun-actions{grid-template-columns:repeat(4,1fr);}
    .kfun-act .material-icons{font-size:19px;}
    .kfun-act{font-size:10px;}
    .kfun-server-btn{padding:4px 8px;font-size:11px;}
}
@media (max-width: 380px){
    .kfun-eps-grid{grid-template-columns:repeat(5,1fr);}
}

/* ============================================================
   Mobile slider — make it shorter & cleaner on phones
   ============================================================ */
@media (max-width: 768px){
    .hero-slider{height:auto !important;min-height:0 !important;}
    .hero-slides,.hero-slide{height:auto !important;}
    .hero-slide{aspect-ratio:16/9;max-height:42vh;}
    .hero-slide img{
        width:100%;height:100%;object-fit:cover;border-radius:8px;
    }
    .hero-slide-title-bar{padding:8px 12px;}
    .hero-slide-title{font-size:13px;line-height:1.3;}
    .hero-slide-overlay{background:linear-gradient(to top,rgba(0,0,0,.85) 0%,rgba(0,0,0,0) 50%);}
}
@media (max-width: 480px){
    .hero-slide{max-height:32vh;aspect-ratio:16/9;}
    .hero-slide-title{font-size:12px;}
}

/* v1.3 — Signup modal show/hide */
#signup-modal.modal-overlay{display:none;}
#signup-modal.modal-overlay.show{display:flex;align-items:center;justify-content:center;}
#signup-modal .modal-box input{font-size:14px;}
#signup-modal .modal-actions{display:flex;gap:8px;justify-content:flex-end;}
