:root {
    color-scheme: dark;
    --yd-bg: #0b0e12;
    --yd-panel: #151a21;
    --yd-line: #ffffff14;
    --yd-muted: #a2acba;
    --yd-accent: #d3f76c;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; }
body.yd-site {
    margin: 0;
    background: var(--yd-bg);
    color: #f4f5f7;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    font-size: 16px;
    line-height: 1.65;
}
.yd-site a { color: inherit; text-decoration: none; }
.yd-site h1, .yd-site h2, .yd-site h3 { color: #f4f5f7; line-height: 1.25; }
.yd-site h1 { font-size: clamp(32px, 4vw, 62px); letter-spacing: -2px; }
.yd-site h2 { font-size: 26px; letter-spacing: -.6px; }
.yd-site h3 { font-size: 18px; }
.yd-site button, .yd-site input, .yd-site select { font: inherit; }
.yd-site button { cursor: pointer; }
.yd-site button:disabled { opacity: .4; cursor: default; }
.yd-site a:focus-visible, .yd-site button:focus-visible, .yd-site input:focus-visible { outline: 2px solid var(--yd-accent); outline-offset: 4px; }
.yd-site [hidden] { display: none !important; }
.yd-site .skip-link { position: fixed; left: 20px; top: -100px; z-index: 100; }
.yd-site .skip-link:focus { top: 10px; background: var(--yd-panel); padding: 10px; }
.yd-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 6%; height: 84px; border-bottom: 1px solid var(--yd-line); background: #0b0e12ef; }
.yd-logo { font-size: 31px; font-weight: 900; letter-spacing: -1.5px; white-space: nowrap; }
.yd-logo span { color: var(--yd-accent); }
.yd-header nav { display: flex; gap: 32px; }
.yd-header nav a { color: #c1c8d3; font-size: 15px; }
.yd-header nav a:hover { color: var(--yd-accent); }
.account-link { font-size: 14px; border: 1px solid #ffffff25; border-radius: 7px; padding: 8px 16px; }
.yd-container { width: min(1280px, 88%); margin: auto; }
.yd-hero { position: relative; min-height: 590px; overflow: hidden; background: #10151c; }
.hero-image { position: absolute; right: 8%; top: 0; width: 44%; height: 100%; object-fit: cover; object-position: center 25%; }
.hero-gradient { position: absolute; inset: 0; background: linear-gradient(90deg,#0b0e12 10%,#0b0e12db 38%,#0b0e1200 72%,#0b0e12b0),linear-gradient(0deg,#0b0e12,transparent 35%); }
.hero-text { position: relative; padding: 105px 7%; max-width: 780px; }
.hero-text h1 { font-size: clamp(44px, 5vw, 72px); max-width: 470px; margin: 24px 0; }
.eyebrow { color: var(--yd-accent); font-size: 12px; letter-spacing: 2px; font-weight: 700; margin: 0 0 14px; }
.hero-meta, .hero-description, .muted { color: var(--yd-muted); }
.hero-description { max-width: 430px; }
.yd-site .yd-button { display: inline-flex; align-items: center; justify-content: center; gap: 28px; background: var(--yd-accent); border: 0; border-radius: 7px; color: #17200b; font-size: 15px; font-weight: 700; padding: 13px 24px; min-height: 46px; }
.hero-text .yd-button { margin-top: 18px; }
.yd-site .secondary { background: #ffffff08; color: #e6ebf2; border: 1px solid #ffffff25; }
.yd-site .secondary[aria-pressed=true] { color: var(--yd-accent); border-color: var(--yd-accent); }
.catalog-section { padding: 45px 0; }
.section-title { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 22px; }
.section-title h2 { margin: 0; }
.section-title a { color: var(--yd-muted); font-size: 14px; }
.yd-search { display: flex; background: #141a22; border: 1px solid #ffffff18; border-radius: 8px; overflow: hidden; }
.yd-site .yd-search input { background: transparent; border: 0; color: #fff; height: 44px; max-width: 230px; }
.yd-search button { border: 0; padding: 0 15px; background: transparent; color: var(--yd-muted); }
.genre-list { display: flex; gap: 12px; margin-bottom: 26px; flex-wrap: wrap; }
.genre-list a { padding: 6px 17px; border-radius: 6px; background: #ffffff06; color: var(--yd-muted); font-size: 14px; }
.genre-list .selected { color: var(--yd-accent); background: #d3f76c13; }
.card-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 24px; }
.card-art { position: relative; aspect-ratio: 2 / 3; overflow: hidden; border-radius: 10px; background: var(--yd-panel); }
.card-art img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
.drama-card:hover img { transform: scale(1.035); }
.card-play { position: absolute; right: 13px; bottom: 13px; background: #0b0e12d0; border-radius: 50%; width: 36px; height: 36px; display: grid; place-items: center; font-size: 13px; }
.drama-card h3 { margin: 15px 0 7px; }
.drama-card p { font-size: 14px; color: var(--yd-muted); margin: 0; }
.empty-state { background: #ffffff03; padding: 55px 25px; text-align: center; border: 1px solid var(--yd-line); border-radius: 12px; }
.empty-state p { color: var(--yd-muted); }
.empty-state a { color: var(--yd-accent); }
.pagination { display: flex; gap: 15px; padding: 30px 0; }
.drama-detail { padding: 30px 0 80px; }
.back-link { display: inline-block; color: var(--yd-muted) !important; font-size: 14px; margin: 5px 0 24px; }
.detail-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 32px; }
.detail-heading h1 { margin: 5px 0 0; font-size: 34px; letter-spacing: -1px; }
.watch-layout { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 30px; }
.player-column { border-radius: 12px; overflow: hidden; background: #030405; }
.video-stage { position: relative; height: min(72dvh, 740px); min-height: 360px; }
#yd-video { display: block; width: 100%; height: 100%; object-fit: contain; }
.player-overlay { position: absolute; inset: 0; background: #0e131bef; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 30px; text-align: center; }
.player-overlay p { color: var(--yd-muted); }
.player-overlay h2 { margin: 0; }
.player-overlay > a:last-child { font-size: 14px; }
.player-controls { display: flex; justify-content: space-between; align-items: center; padding: 15px; background: #171d25; }
.yd-site .plain-button { background: transparent; border: 1px solid #ffffff1f; border-radius: 6px; padding: 7px 13px; color: #e0e5eb; font-size: 14px; }
.episode-panel { background: #121820; padding: 25px; border: 1px solid var(--yd-line); border-radius: 12px; }
.episode-panel h2 { font-size: 21px; }
.autoplay { color: var(--yd-muted); font-size: 14px; display: flex; gap: 7px; align-items: center; white-space: nowrap; }
.episode-grid { display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); gap: 9px; max-height: 620px; overflow-y: auto; padding: 4px; }
.episode-grid button { background: #202832; color: #c7d0dd; border: 1px solid transparent; border-radius: 5px; min-height: 43px; padding: 8px 1px; font-size: 14px; }
.episode-grid button:hover { border-color: #ffffff50; }
.episode-grid [aria-pressed=true] { color: #18200b; background: var(--yd-accent); font-weight: 700; }
.series-description { max-width: 800px; padding-top: 40px; color: var(--yd-muted); }
.account-page { min-height: 65vh; padding: 60px 0 90px; }
.account-page > h1 { font-size: 36px; letter-spacing: -1px; margin-bottom: 30px; }
.account-form { max-width: 560px; background: #121820; padding: 30px; border: 1px solid var(--yd-line); border-radius: 12px; }
.yd-site .account-form input:not([type=checkbox]):not([type=submit]), .yd-site .account-form select { background: #0b1017; border: 1px solid #ffffff28; color: #fff; border-radius: 6px; min-height: 44px; width: 100%; }
.yd-site .account-form input[type=submit], .yd-site .account-form button[type=submit] { background: var(--yd-accent); color: #17200b; border: 0; border-radius: 6px; min-height: 44px; padding: 10px 22px; }
.yd-site .account-form a { color: var(--yd-accent); }
.yd-site .account-form table { border: 0; }
.yd-site .account-form td { border: 0; padding: 8px 0; }
.yd-site .account-form label { color: #cbd4df; }
.yd-site .swpm-yellow-box { background: #29251b; color: #f4d988; border-color: #6a5727; }
.membership-card { max-width: 620px; background: linear-gradient(135deg,#202b29,#141d24 65%); border: 1px solid #d3f76c33; border-radius: 14px; padding: 40px; }
.membership-card h2 { font-size: 32px; }
.membership-card ul { padding-left: 20px; line-height: 2.3; color: #c2ccd7; }
.membership-status { padding: 15px; background: #0003; border-radius: 7px; }
.yd-footer { border-top: 1px solid var(--yd-line); padding: 40px 6%; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 25px; color: var(--yd-muted); }
.yd-footer nav { display: flex; gap: 25px; font-size: 14px; }
.yd-footer p { margin: 0; }
.yd-footer small { font-size: 13px; }
.yd-toast { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%); padding: 12px 20px; background: #303c4a; border-radius: 8px; box-shadow: 0 8px 35px #0008; color: #fff; z-index: 1000; max-width: 90%; }
@media (max-width: 900px) {
    .card-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
    .watch-layout { grid-template-columns: minmax(0,1.1fr) minmax(0,1fr); gap: 18px; }
    .episode-panel { padding: 18px; }
    .episode-grid { grid-template-columns: repeat(5, minmax(0,1fr)); max-height: 620px; }
    .yd-header nav { gap: 20px; }
}
@media (max-width: 640px) {
    html { scroll-padding-top: 20px; }
    .yd-header { height: 72px; padding: 0 5%; gap: 12px; flex-wrap: wrap; }
    .yd-logo { font-size: 26px; }
    .yd-header nav { gap: 14px; }
    .yd-header nav a { font-size: 14px; }
    .yd-header nav a:first-child { display: none; }
    .account-link { font-size: 13px; padding: 6px 10px; }
    .yd-container { width: 90%; }
    .yd-hero { min-height: 510px; }
    .hero-image { width: 85%; right: 0; }
    .hero-gradient { background: linear-gradient(90deg,#0b0e12c9,#0b0e1220),linear-gradient(0deg,#0b0e12,transparent 80%); }
    .hero-text { padding: 170px 6% 45px; }
    .hero-text h1 { font-size: 42px; max-width: 330px; margin: 18px 0; }
    .hero-meta { font-size: 15px; }
    .section-title { flex-wrap: wrap; }
    .yd-search { width: 100%; }
    .yd-site .yd-search input { flex: 1; max-width: none; min-width: 0; }
    .catalog-section { padding: 32px 0; }
    .card-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
    .drama-card h3 { font-size: 16px; }
    .drama-detail { padding-top: 20px; }
    .detail-heading h1 { font-size: 26px; }
    .detail-heading { gap: 12px; }
    .detail-heading .yd-button { font-size: 13px; padding: 10px 12px; white-space: nowrap; }
    .watch-layout { display: block; }
    .video-stage { height: min(71dvh,680px); }
    .episode-panel { margin-top: 20px; padding: 20px 16px; }
    .episode-panel .section-title { flex-wrap: nowrap; }
    .episode-grid { grid-template-columns: repeat(7,minmax(0,1fr)); max-height: 300px; gap: 7px; }
    .account-page { padding-top: 35px; }
    .account-form { padding: 22px 16px; }
    .membership-card { padding: 28px 22px; }
    .membership-card h2 { font-size: 28px; }
    .yd-footer { padding: 30px 6%; }
    .yd-footer p { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .card-art img { transition: none; }
}
/* English catalog layout */
body.yd-site { padding-left: 218px; background: #0d1016; }
.yd-sidebar { position: fixed; inset: 0 auto 0 0; width: 218px; padding: 34px 22px 24px; background: #11161e; border-right: 1px solid #ffffff09; display: flex; flex-direction: column; z-index: 40; }
.yd-sidebar .yd-logo { padding-left: 8px; margin-bottom: 54px; }
.yd-sidebar nav { display: grid; gap: 10px; }
.yd-sidebar nav a { display: flex; gap: 15px; align-items: center; padding: 12px; color: #939cab; font-size: 14px; border-radius: 8px; }
.yd-sidebar nav a span { font-size: 22px; width: 22px; text-align: center; line-height: 1; }
.yd-sidebar nav .active, .yd-sidebar nav a:hover { color: #d3f76c; background: #d3f76c0c; }
.sidebar-membership { padding: 22px 16px; border: 1px solid #d3f76c24; border-radius: 12px; background: linear-gradient(155deg,#25312a,#151d22); margin-top: auto; }
.sidebar-membership .eyebrow { font-size: 10px; letter-spacing: 1px; }
.sidebar-membership h2 { font-size: 20px; letter-spacing: -.5px; margin: 8px 0 12px; }
.sidebar-membership p:not(.eyebrow) { font-size: 12px; color: #aeb8b8; line-height: 1.6; }
.sidebar-membership a { color: var(--yd-accent); font-size: 12px; font-weight: 700; }
.sidebar-account { margin-top: 25px; padding: 10px; font-size: 14px; color: #adb6c2 !important; }
.yd-header { height: 87px; padding: 0 40px; border-bottom: 0; background: #0d1016; gap: 24px; }
.mobile-logo { display: none; }
.header-line { color: #788392; font-size: 14px; margin: 0 auto 0 0; }
.yd-search { border: 1px solid #ffffff0b; border-radius: 24px; background: #171d27; }
.yd-site .yd-search input { width: 235px; max-width: 235px; font-size: 13px; padding-left: 20px; }
.yd-search button { font-size: 24px; color: #929dac; }
.account-link { border-color: #d3f76c33; color: #d3f76c !important; font-size: 13px; border-radius: 20px; white-space: nowrap; }
.catalog-home { padding: 0 38px; }
.feature-carousel { position: relative; border-radius: 18px; overflow: hidden; background: #20282a; }
.feature-slide { position: relative; min-height: 452px; overflow: hidden; }
.feature-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 30%; filter: blur(25px) saturate(.7); opacity: .45; }
.feature-shade { position: absolute; inset: 0; background: linear-gradient(90deg,#111920fa 0%,#172027c9 46%,#171e2260); }
.feature-copy { position: relative; z-index: 2; width: 63%; padding: 60px 0 68px 44px; }
.feature-copy .eyebrow { font-size: 10px; letter-spacing: 2px; margin-bottom: 20px; }
.feature-copy h1 { font-size: clamp(25px,3.2vw,47px); letter-spacing: -1.3px; line-height: 1.12; max-width: 560px; margin: 0 0 20px; }
.feature-description { max-width: 340px; font-size: 14px; color: #bbc2ca; margin-bottom: 28px; }
.feature-copy .yd-button { border-radius: 24px; font-size: 13px; padding: 10px 22px; min-height: 42px; gap: 32px; }
.feature-poster { position: absolute; right: 6%; height: 88%; top: 6%; width: 28%; object-fit: cover; object-position: center; border-radius: 10px; box-shadow: 0 15px 40px #0008; transform: rotate(3deg); }
.carousel-tabs { position: absolute; bottom: 20px; left: 44px; display: flex; gap: 7px; z-index: 3; }
.carousel-tabs button { width: 17px; height: 4px; border: 0; padding: 0; background: #ffffff35; border-radius: 8px; }
.carousel-tabs [aria-pressed=true] { width: 32px; background: var(--yd-accent); }
.home-content .catalog-section { padding: 35px 0 5px; }
.home-content .section-title { margin-bottom: 21px; }
.home-content h2 { font-size: 23px; letter-spacing: -.5px; }
.section-note { font-size: 12px; color: #738091; margin: 0; }
.spotlight-grid { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 20px; }
.home-content .card-grid { grid-template-columns: repeat(6,minmax(0,1fr)); gap: 27px 18px; }
.card-art { border-radius: 9px; aspect-ratio: 2/3; }
.drama-card h3 { font-size: 14px; font-weight: 600; line-height: 1.4; margin: 11px 0 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.drama-card p { font-size: 11px; color: #748191; }
.card-play { width: 30px; height: 30px; font-size: 10px; background: #0b1016aa; backdrop-filter: blur(8px); }
.home-content { padding-bottom: 60px; }
.yd-footer { margin-top: 42px; font-size: 12px; padding: 35px 38px; }
.yd-footer .yd-logo { font-size: 23px; }
.yd-footer nav { font-size: 12px; gap: 20px; }
.yd-footer small { font-size: 11px; }
#coming-soon-dialog { width: min(460px,90vw); max-width: 90vw; padding: 44px 35px 35px; background: #18212b; border: 1px solid #ffffff20; color: #e8edf3; border-radius: 18px; box-shadow: 0 30px 120px #000c; }
#coming-soon-dialog::backdrop { background: #03070bd9; backdrop-filter: blur(8px); }
#coming-soon-dialog h2 { font-size: 34px; margin: 10px 0 16px; }
#coming-soon-dialog p:not(.eyebrow) { font-size: 15px; color: #9eabba; }
#coming-soon-dialog .modal-title { color: #e2e9f2 !important; font-weight: 600; }
#coming-soon-dialog .modal-dismiss { width: 100%; margin-top: 18px; }
.modal-close { position: absolute; top: 11px; right: 15px; background: none; color: #a0abb9; font-size: 29px; border: 0; padding: 0 6px; }
@media(min-width:1500px) { .catalog-home { max-width: 1600px; margin: auto; } .feature-slide { min-height: 490px; } }
@media(max-width:1150px) {
 body.yd-site { padding-left: 190px; }
 .yd-sidebar { width: 190px; padding: 30px 16px; }
 .catalog-home { padding: 0 25px; }
 .yd-header { padding: 0 25px; }
 .header-line { display: none; }
 .yd-header .yd-search { margin-right: auto; }
 .home-content .card-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
 .spotlight-grid { gap: 13px; }
 .feature-copy { padding-left: 28px; width: 65%; }
 .feature-copy h1 { font-size: 35px; }
 .feature-slide { min-height: 410px; }
 .feature-poster { right: 4%; width: 29%; height: 80%; top: 10%; }
 .carousel-tabs { left: 28px; }
}
@media(max-width:760px) {
 body.yd-site { padding-left: 0; }
 .yd-sidebar { display: none; }
 .mobile-logo { display: block; font-size: 26px; }
 .yd-header { height: 76px; padding: 0 20px; flex-wrap: nowrap; gap: 15px; }
 .yd-site .yd-search input { width: 150px; max-width: 150px; font-size: 12px; }
 .yd-header .yd-search { margin-left: auto; margin-right: 0; }
 .yd-header .account-link { display: none; }
 .catalog-home { padding: 0 18px; }
 .feature-slide { min-height: 395px; }
 .feature-copy { width: 70%; padding: 48px 0 55px 22px; }
 .feature-copy h1 { font-size: 31px; }
 .feature-copy .eyebrow { font-size: 9px; letter-spacing: 1px; }
 .feature-description { font-size: 12px; max-width: 220px; }
 .feature-poster { height: 60%; width: 35%; right: -5%; top: 18%; opacity: .65; }
 .feature-copy .yd-button { font-size: 12px; padding: 10px 18px; }
 .carousel-tabs { left: 22px; }
 .spotlight-grid { display: flex; overflow-x: auto; padding-bottom: 12px; gap: 13px; scroll-snap-type: x mandatory; }
 .spotlight-grid .drama-card { width: 140px; flex-shrink: 0; scroll-snap-align: start; }
 .home-content .card-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 22px 12px; }
 .home-content h2 { font-size: 21px; }
 .home-content .section-note { font-size: 11px; }
 .home-content .section-title { flex-wrap: nowrap; gap: 10px; }
 .home-content .catalog-section { padding-top: 30px; }
 .drama-card h3 { font-size: 13px; }
 .yd-footer { padding: 28px 20px; }
 .yd-footer nav { font-size: 12px; }
}
@media(max-width:380px) {
 .yd-site .yd-search input { width: 125px; max-width: 125px; }
 .feature-copy h1 { font-size: 27px; }
 .feature-slide { min-height: 380px; }
 .section-note { display: none; }
}
.catalog-filters { display: flex; gap: 12px; align-items: center; margin: 0 0 26px; flex-wrap: wrap; }
.catalog-filters label { color: #9eabba; font-size: 14px; }
.yd-site .catalog-filters select { max-width: 260px; min-height: 42px; color: #e8edf4; background: #171f29; border: 1px solid #ffffff20; border-radius: 7px; padding: 0 34px 0 13px; }
.catalog-filters button { background: #d3f76c; border: 0; border-radius: 7px; padding: 10px 20px; color: #18200b; font-size: 14px; font-weight: 600; }
.catalog-filters a { font-size: 13px; color: #aeb9c7; }
