/*
Theme Name: RongYok Style
Theme URI: https://example.com
Author: Custom
Description: ธีมเว็บดูหนังสั้น/ซีรีส์สั้น โทนมืด รองรับหลายตอนต่อเรื่อง (iframe) พร้อมระบบหลังบ้านเพิ่มเรื่องและตอน
Version: 1.0.0
Requires at least: 5.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: rongyok-style
*/
:root{--bg:#0a0a12;--bg2:#12121e;--bg3:#1a1a2a;--line:#26263a;--text:#f2f2f7;--muted:#9a9ab3;--accent:#ff4d8d;--wrap:900px}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;background:var(--bg);color:var(--text);font-family:'Prompt','Noto Sans Thai',system-ui,sans-serif;font-size:14px;line-height:1.6;padding-bottom:64px;-webkit-font-smoothing:antialiased}
a{color:inherit;text-decoration:none}
img{max-width:100%;display:block}
h1,h2,h3,h4{margin:0;line-height:1.35}
.rt-wrap{max-width:var(--wrap);margin:0 auto;padding:0 14px}
.rt-main{padding-top:18px;padding-bottom:30px}
.screen-reader-text{position:absolute;left:-9999px}
:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
/* header */
.rt-header{position:sticky;top:0;z-index:40;background:rgba(10,10,18,.92);backdrop-filter:blur(8px);border-bottom:1px solid var(--line)}
.rt-header .rt-wrap{display:flex;align-items:center;justify-content:space-between;gap:14px;height:52px}
.rt-logo{font-size:18px;font-weight:700;letter-spacing:-.2px}
.rt-logo img{max-height:34px;width:auto}
.rt-search{position:relative;flex:0 1 300px;width:100%}
.rt-search input{width:100%;height:34px;border-radius:10px;border:1px solid var(--line);background:#1d1b30;color:var(--text);padding:0 38px 0 12px;font:inherit;font-size:13px}
.rt-search input::placeholder{color:var(--muted)}
.rt-search button{position:absolute;right:4px;top:3px;width:30px;height:28px;border:0;background:none;color:var(--muted);cursor:pointer}
.rt-ic{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;flex:none}
/* headings */
.rt-h1{font-size:19px;font-weight:700;margin-bottom:4px}
.rt-intro{font-size:11.5px;color:#d86c8c;margin:0 0 18px}
/* sections */
.rt-sec{margin-bottom:22px}
.rt-sec-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:11px 14px;border-radius:12px;margin-bottom:12px;background:var(--bs);border:1px solid var(--bd)}
.rt-sec-head h2{display:flex;align-items:center;gap:10px;font-size:14px;font-weight:600;color:var(--c)}
.rt-sec-head h2 .rt-ic{width:30px;height:30px;padding:7px;border-radius:8px;background:var(--bs);border:1px solid var(--bd)}
.rt-more{display:inline-flex;align-items:center;gap:4px;font-size:11px;color:var(--c);padding:4px 10px;border-radius:8px;background:var(--bs);border:1px solid var(--bd)}
.rt-more .rt-ic{width:11px;height:11px}
.rt-sec--rec{--c:#ff5c8a;--bs:rgba(255,92,138,.1);--bd:rgba(255,92,138,.3)}
.rt-sec--pop{--c:#ff9a3d;--bs:rgba(255,154,61,.1);--bd:rgba(255,154,61,.3)}
.rt-sec--new{--c:#3ddc84;--bs:rgba(61,220,132,.09);--bd:rgba(61,220,132,.28)}
.rt-sec--dub{--c:#5b9bff;--bs:rgba(91,155,255,.1);--bd:rgba(91,155,255,.3)}
.rt-sec--sub{--c:#b58bff;--bs:rgba(181,139,255,.1);--bd:rgba(181,139,255,.3)}
.rt-sec--all{--c:#e6e6f0;--bs:rgba(255,255,255,.04);--bd:rgba(255,255,255,.14)}
/* cards */
.rt-grid{display:grid;grid-template-columns:repeat(6,1fr);gap:10px 10px}
.rt-poster{position:relative;aspect-ratio:2/3;border-radius:10px;overflow:hidden;background:var(--bg3);border:1px solid var(--line)}
.rt-poster img{width:100%;height:100%;object-fit:cover;transition:transform .3s}
.rt-card:hover .rt-poster img{transform:scale(1.04)}
.rt-ph{width:100%;height:100%;display:flex;align-items:center;justify-content:center;color:#44445e;background:linear-gradient(160deg,#1c1c30,#12121e)}
.rt-ph .rt-ic{width:34px;height:34px}
.rt-badge{position:absolute;top:6px;right:6px;font-size:9.5px;font-weight:600;padding:1px 7px;border-radius:5px;background:#555;color:#fff}
.rt-badge--dubbed{background:#2f6bff}
.rt-badge--subbed{background:#20b26b}
.rt-ep-tag{position:absolute;left:6px;bottom:6px;font-size:9.5px;padding:1px 7px;border-radius:5px;background:rgba(0,0,0,.65);color:#fff}
.rt-card-title{font-size:11px;font-weight:500;text-align:center;margin-top:6px;color:#dcdce8;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
/* seo block */
.rt-seo{max-width:760px;margin:34px auto 0;font-size:12px;color:#b4b4c8}
.rt-seo h2.rt-seo-title{text-align:center;font-size:19px;color:#ff5c8a;margin-bottom:14px}
.rt-seo h3{font-size:13px;color:#ffb347;margin:18px 0 6px}
.rt-seo p{margin:0 0 10px}
.rt-seo a{color:#ff6b9a;text-decoration:underline}
.rt-chips{display:flex;flex-wrap:wrap;gap:6px;margin:10px 0}
.rt-chips a{font-size:10.5px;padding:2px 10px;border-radius:7px;background:#25214a;border:1px solid #3a3470;color:#aaa6e6}
.rt-faq-title{text-align:center;font-size:17px;color:#ffb347;margin:34px 0 14px}
.rt-faq{display:grid;grid-template-columns:1fr 1fr;gap:12px;max-width:760px;margin:0 auto}
.rt-faq div{background:var(--bg2);border:1px solid var(--line);border-radius:10px;padding:14px}
.rt-faq h3{font-size:12px;color:#7aa8ff;margin-bottom:6px}
.rt-faq p{margin:0;font-size:11px;color:#a9a9bf}
.rt-tags{display:flex;flex-wrap:wrap;justify-content:center;gap:6px;margin:22px 0 0}
.rt-tags a{font-size:10px;padding:2px 10px;border-radius:7px;border:1px solid #2f5e49;background:#12261e;color:#6fe0a6}
.rt-tags a:nth-child(2n){border-color:#6e3d2a;background:#2a1a12;color:#ffa066}
.rt-tags a:nth-child(3n){border-color:#2f4a7a;background:#101c33;color:#82b2ff}
.rt-tags a:nth-child(5n){border-color:#7a2f55;background:#2c1220;color:#ff82b6}
/* footer */
.rt-footer{border-top:1px solid var(--line);margin-top:40px;padding:30px 0 18px;font-size:11px;color:var(--muted)}
.rt-footer .rt-top{display:flex;justify-content:space-between;align-items:center;gap:20px;flex-wrap:wrap}
.rt-footer .rt-logo{font-size:17px;color:var(--text)}
.rt-footer ul{list-style:none;display:flex;flex-wrap:wrap;gap:6px 20px;margin:0;padding:0}
.rt-footer ul a:hover{color:var(--text)}
.rt-copy{text-align:center;margin-top:24px;border-top:1px solid var(--line);padding-top:14px}
/* bottom nav */
.rt-bnav{position:fixed;left:0;right:0;bottom:0;z-index:50;display:grid;grid-template-columns:repeat(5,1fr);background:#0d0d18;border-top:1px solid var(--line);padding-bottom:env(safe-area-inset-bottom)}
.rt-bnav a,.rt-bnav button{display:flex;flex-direction:column;align-items:center;gap:2px;padding:8px 0 6px;font:inherit;font-size:10px;color:var(--muted);background:none;border:0;cursor:pointer}
.rt-bnav .rt-ic{width:20px;height:20px}
.rt-bnav .on{color:var(--accent)}
/* sheets */
.rt-sheet{position:fixed;inset:0;z-index:60;display:none;background:rgba(0,0,0,.6);align-items:flex-end;justify-content:center}
.rt-sheet.open{display:flex}
.rt-sheet-box{width:100%;max-width:560px;max-height:75vh;overflow:auto;background:var(--bg2);border:1px solid var(--line);border-radius:16px 16px 0 0;padding:16px}
.rt-sheet-box h2{font-size:15px;margin-bottom:12px}
.rt-sheet-list{display:flex;flex-wrap:wrap;gap:8px}
.rt-sheet-list a{padding:6px 14px;border-radius:9px;background:var(--bg3);border:1px solid var(--line);font-size:12px}
.rt-hist{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.rt-empty{color:var(--muted);font-size:12px}
/* archive */
.rt-tabs{display:flex;gap:8px;margin:0 0 14px}
.rt-tabs a{padding:4px 14px;border-radius:9px;border:1px solid var(--line);font-size:12px;color:var(--muted)}
.rt-tabs a.on{background:var(--accent);border-color:var(--accent);color:#fff}
.rt-pager{display:flex;justify-content:center;flex-wrap:wrap;gap:6px;margin-top:22px}
.rt-pager .page-numbers{padding:4px 12px;border-radius:8px;border:1px solid var(--line);font-size:12px}
.rt-pager .current{background:var(--accent);border-color:var(--accent)}
/* single */
.rt-single-head{display:flex;gap:14px;margin-bottom:14px}
.rt-single-head .rt-poster{width:110px;flex:none}
.rt-single-head h1{font-size:19px;margin-bottom:6px}
.rt-meta{display:flex;flex-wrap:wrap;gap:6px;font-size:11px;color:var(--muted);margin-bottom:8px}
.rt-meta a,.rt-meta span{padding:1px 9px;border-radius:7px;background:var(--bg3);border:1px solid var(--line)}
.rt-player{margin:0 auto 12px;background:#000;border-radius:12px;overflow:hidden;border:1px solid var(--line);position:relative;width:100%;aspect-ratio:16/9}
.rt-player--portrait{aspect-ratio:9/16;max-width:380px}
.rt-player iframe{position:absolute;inset:0;width:100%;height:100%;border:0}
.rt-player-empty{display:flex;align-items:center;justify-content:center;color:var(--muted);height:100%}
.rt-pn{display:flex;justify-content:center;gap:10px;margin-bottom:16px}
.rt-btn{padding:6px 18px;border-radius:9px;background:var(--bg3);border:1px solid var(--line);font-size:12px}
.rt-btn:hover{border-color:var(--accent)}
.rt-btn.dis{opacity:.35;pointer-events:none}
.rt-eps{display:grid;grid-template-columns:repeat(auto-fill,minmax(64px,1fr));gap:8px;max-height:260px;overflow:auto;margin-bottom:20px}
.rt-eps a{text-align:center;padding:6px 0;border-radius:8px;background:var(--bg3);border:1px solid var(--line);font-size:12px}
.rt-eps a.on{background:var(--accent);border-color:var(--accent);color:#fff}
.rt-desc{font-size:12.5px;color:#c3c3d6;background:var(--bg2);border:1px solid var(--line);border-radius:12px;padding:14px;margin-bottom:22px}
.rt-page{max-width:720px;margin:0 auto}
.rt-page h1{font-size:20px;margin-bottom:12px}
.rt-page .entry{font-size:13.5px;color:#cfcfe0}
.rt-page .entry a{color:#ff6b9a}
@media(max-width:900px){.rt-grid{grid-template-columns:repeat(4,1fr)}}
@media(max-width:640px){.rt-grid{grid-template-columns:repeat(3,1fr);gap:10px 8px}.rt-faq{grid-template-columns:1fr}.rt-single-head .rt-poster{width:92px}.rt-search{flex-basis:200px}}
@media(prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}
