/* XTube — circa-2009 video site look, black & orange */
:root { --bg: #0b0b0b; --panel: #161616; --panel2: #1f1f1f; --line: #333; --text: #ddd; --muted: #999; --orange: #ff7a00; --orange2: #e05500; --link: #ff8c1a; }
html { background: var(--bg); }
body { margin: 0; background: var(--bg); font: 13px Arial, Helvetica, sans-serif; color: var(--text); }
a { color: var(--link); text-decoration: none; }
a:hover { color: #ffb366; text-decoration: underline; }
.small { font-size: 11px; color: var(--muted); }
#page { width: 970px; margin: 0 auto; }

/* masthead */
#masthead { position: relative; height: 112px; }
#logo { position: absolute; left: 0; top: 8px; font: 900 40px "Arial Black", Arial, sans-serif; letter-spacing: -1px; text-decoration: none; line-height: 1; }
#logo .lw { color: #fff; }
#logo .lo { display: inline-block; margin-left: 4px; padding: 2px 8px 3px; border-radius: 9px; color: #fff; vertical-align: top;
  background: linear-gradient(#ffa040, var(--orange2)); border: 1px solid #b84400; box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 0 12px rgba(255,122,0,.3); }
#logo:hover { text-decoration: none; }
#logo .admin-tag { display: inline-block; margin-left: 8px; padding: 2px 7px; font: bold 13px Arial; color: #000; background: var(--orange); border-radius: 3px; vertical-align: middle; letter-spacing: 0; }
#slogan { position: absolute; left: 3px; top: 58px; font-size: 11px; color: var(--muted); }
#utility { position: absolute; right: 0; top: 10px; font-size: 12px; color: #555; }
#search-form { position: absolute; left: 250px; top: 22px; }
#search-term { width: 320px; padding: 4px 5px; border: 1px solid #444; background: #000; color: #fff; font-size: 14px; }
#search-term:focus { outline: none; border-color: var(--orange); }
#search-source { font-size: 12px; padding: 3px; background: #111; color: var(--text); border: 1px solid #444; }
#nav { position: absolute; left: 0; right: 0; bottom: 0; height: 28px; border-bottom: 3px solid var(--orange); }
#nav a { float: left; margin-right: 3px; padding: 0 16px; line-height: 27px; font-weight: bold; color: #ccc; border: 1px solid #333; border-bottom: 0;
  border-radius: 4px 4px 0 0; background: linear-gradient(#2a2a2a, #141414); }
#nav a.sel { color: #000; background: linear-gradient(#ffa040, var(--orange2)); border-color: var(--orange2); }
#nav a:hover { text-decoration: none; color: #fff; background: linear-gradient(#383838, #1a1a1a); }
#nav a.sel:hover { color: #000; background: linear-gradient(#ffb060, var(--orange2)); }

/* buttons */
.yt-button { display: inline-block; padding: 3px 10px; font: bold 12px Arial, sans-serif; color: #000; border: 1px solid #b84400; border-radius: 3px; cursor: pointer;
  background: linear-gradient(#ffa040, var(--orange2)); text-decoration: none; vertical-align: middle; }
.yt-button:hover { color: #000; text-decoration: none; background: linear-gradient(#ffb560, #f06000); }
.yt-button.big { font-size: 15px; padding: 7px 16px; margin: 4px; }
.yt-button.alt { color: #ddd; border-color: #444; background: linear-gradient(#333, #1a1a1a); }
.yt-button.alt:hover { color: #fff; background: linear-gradient(#444, #222); }
.yt-button.on { color: #000; background: linear-gradient(#ffe08a, #f7c13c); border-color: #c99a1b; }
.linkish { border: 0; background: none; color: var(--link); cursor: pointer; font: 11px Arial; padding: 0; }

#content { padding-top: 10px; overflow: hidden; }
#main-col { float: left; width: 640px; }
#main-col.wide { float: none; width: auto; }
#side-col { float: right; width: 310px; }

/* boxes */
.box { border: 1px solid var(--line); margin-bottom: 10px; background: var(--panel); }
.box-head { padding: 6px 8px; font-weight: bold; font-size: 14px; color: var(--orange); background: linear-gradient(#262626, #121212); border-bottom: 1px solid var(--line); }
.head-link { float: right; font-size: 11px; font-weight: normal; }
.box-body { padding: 8px; overflow: hidden; }
.box.narrow { width: 380px; margin: 30px auto; }

/* video thumbs */
.vthumb { position: relative; display: block; float: left; width: 120px; height: 90px; padding: 2px; border: 1px solid #444; background: #000; }
.vthumb:hover { border-color: var(--orange); }
.vthumb img { display: block; width: 120px; height: 90px; object-fit: cover; background: #000; }
.vthumb.small { width: 96px; height: 72px; }
.vthumb.small img { width: 96px; height: 72px; }
.vtime { position: absolute; right: 3px; bottom: 3px; padding: 0 3px; font: bold 11px Arial; color: #fff; background: #000; opacity: .85; }
.grid .vgrid { float: left; width: 145px; height: 172px; margin: 0 5px 6px 5px; overflow: hidden; }
.grid .vthumb { float: none; }
.vgrid .vtitle { margin-top: 4px; font-weight: bold; font-size: 12px; max-height: 30px; overflow: hidden; }
.vtitle a { color: #fff; }
.vtitle a:hover { color: var(--orange); }
.vfacets { font-size: 11px; color: var(--muted); margin-top: 2px; }
.vsrc a { color: var(--muted); }
.vlist { overflow: hidden; padding: 8px 0; border-bottom: 1px solid #222; }
.vlist .vmain { margin-left: 140px; }
.vlist .vtitle { font-size: 14px; font-weight: bold; margin-bottom: 3px; }
.vdesc { font-size: 11px; margin-bottom: 4px; }
.vdesc a { color: #888; margin-right: 4px; }

.stars { position: relative; display: inline-block; font-size: 13px; line-height: 1; color: #444; white-space: nowrap; letter-spacing: 0; }
.stars-on { position: absolute; left: 0; top: 0; overflow: hidden; color: var(--orange); }

.results-head { overflow: hidden; padding: 6px 8px; margin-bottom: 4px; background: var(--panel2); border: 1px solid var(--line); }
.rh-left { float: left; }
.rh-left b { color: #fff; }
.rh-right { float: right; font-size: 12px; color: var(--muted); }
.rh-right b { color: var(--orange); }
.pager { clear: both; padding: 12px 0; text-align: center; }
.pager a, .pager .cur { display: inline-block; margin: 0 2px; padding: 2px 7px; border: 1px solid #333; background: #141414; }
.pager .cur { font-weight: bold; color: #000; background: var(--orange); border-color: var(--orange); }
.empty { padding: 20px; color: var(--muted); }

.notice { padding: 8px 10px; margin: 0 0 10px; border: 1px solid #444; background: #1a1a1a; }
.notice.warn { border-color: #7a4a00; background: #2a1a05; color: #ffcc88; }
.notice.ok { border-color: #b84400; background: #1e1305; color: #ffb366; }

.srclist { margin: 0; padding: 0 0 0 16px; }
.srclist li { padding: 2px 0; color: var(--orange); }
.srclist li.sel a { font-weight: bold; color: #fff; }
.srcrow { padding: 6px 0; border-bottom: 1px solid #222; }
.srcname { font-weight: bold; font-size: 14px; margin-right: 6px; }

/* watch page */
#watch-col { float: left; width: 650px; }
#watch-title { font-size: 18px; margin: 0 0 8px; color: #fff; }
#player { width: 640px; height: 385px; background: #000; border: 1px solid #222; }
#player iframe { display: block; width: 640px; height: 385px; border: 0; }
#watch-actions { overflow: hidden; width: 628px; padding: 6px; margin-top: 6px; border: 1px solid var(--line); background: linear-gradient(#222, #141414); }
.wa-left { float: left; font-size: 16px; }
.wa-right { float: right; font-size: 12px; color: var(--muted); }
.wa-right .views { font-size: 18px; font-weight: bold; color: #fff; }
.wa-buttons { clear: both; padding-top: 6px; }
#watch-side { float: right; width: 310px; }
#watch-side .box-body div { margin-bottom: 4px; }
.tags a { margin-right: 4px; }
#share-url { width: 250px; font-size: 11px; background: #000; color: #ccc; border: 1px solid #444; }
.rel { overflow: hidden; margin-bottom: 6px; }
.rel .rel-info { margin-left: 108px; font-size: 12px; font-weight: bold; max-height: 64px; overflow: hidden; }
.rel .rel-info a { color: #fff; }
.rel .rel-info a:hover { color: var(--orange); }
.rel .rel-info .small { font-weight: normal; }

#footer { clear: both; margin-top: 20px; padding: 10px 0 20px; border-top: 2px solid var(--orange); font-size: 11px; color: #777; text-align: center; line-height: 1.7; }
.prose p { line-height: 1.5; }

/* age gate */
body.gate { background: var(--bg); min-height: 100vh; }
#gate { width: 560px; margin: 80px auto; padding: 26px 30px; text-align: center; background: var(--panel); border: 1px solid var(--orange); border-radius: 6px; box-shadow: 0 0 30px rgba(255,122,0,.25); }
#gate #logo { position: static; display: inline-block; font-size: 52px; }
#gate h2 { font-size: 18px; margin: 18px 0 8px; color: #fff; }
#gate p { line-height: 1.5; }

/* admin */
#masthead.admin-head { height: 70px; border-bottom: 3px solid var(--orange); }
.admin-table { width: 100%; border-collapse: collapse; margin-bottom: 10px; }
.admin-table th { text-align: left; padding: 5px; color: var(--orange); background: #1c1c1c; border-bottom: 1px solid var(--line); }
.admin-table td { padding: 6px 5px; border-bottom: 1px solid #262626; vertical-align: top; }
.admin-table td.c { text-align: center; }
.admin-table .ord { width: 44px; }
.test-out { margin-top: 3px; max-width: 160px; }
.test-out.ok { color: #ffa040; }
.test-out.bad { color: #ffb347; }
.form-table td { padding: 4px 8px 4px 0; vertical-align: top; }
.admin label { line-height: 1.8; }
.admin textarea, .admin input[type=text], .admin input[type=password], .admin input[type=number] { font: 13px Arial; padding: 3px; background: #000; color: #eee; border: 1px solid #444; }
.admin input:focus, .admin textarea:focus { outline: none; border-color: var(--orange); }
.admin input.logo-w { font-weight: bold; color: #fff; }
.admin input.logo-o { font-weight: bold; color: #fff; background: var(--orange2); }
input[type=checkbox] { accent-color: var(--orange); }

/* admin v0.3 */
.box.accent { border-color: var(--orange); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 18px; }
@media (max-width: 700px) { .form-grid { grid-template-columns: 1fr; } }
.fld { display: flex; flex-direction: column; gap: 3px; line-height: 1.4 !important; }
.fld input { width: 100%; box-sizing: border-box; }
.form-actions { margin-top: 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
#test-result { margin-top: 8px; line-height: 1.6; }
.test-ok { color: #ffa040; } .test-bad { color: #ffcc88; font-weight: bold; }
.scroll-x { overflow-x: auto; }
.cat-table input { width: 100%; min-width: 80px; box-sizing: border-box; }
.cat-table .cname { font-weight: bold; color: #fff; }
.two-col { display: flex; flex-wrap: wrap; gap: 10px; }
.two-col > .box { flex: 1 1 380px; }
.linkish.danger { color: #ffb347; font-size: 11px; }
body.admin #page { width: auto; max-width: 1180px; padding: 0 12px; }
.noembed { position: relative; display: block; width: 640px; height: 385px; }
.noembed img { width: 640px; height: 385px; object-fit: cover; opacity: .6; }
.noembed span { position: absolute; left: 0; right: 0; top: 170px; text-align: center; font: bold 22px Arial; color: #fff; text-shadow: 0 2px 6px #000; }

/* ===== 1.1: member sign-in, Photos/Comics, in-page player, uploads ===== */
form.inline { display: inline; margin: 0; }
.nowrap { white-space: nowrap; }
#utility .linkish { font-size: 12px; }
[hidden] { display: none !important; }

/* sign in */
#gate.signin { width: auto; max-width: 640px; }
.signin-cols { display: flex; flex-wrap: wrap; gap: 24px; text-align: left; margin: 10px 0 14px; }
.signin-col { flex: 1 1 240px; display: flex; flex-direction: column; gap: 10px; }
.signin-col h3 { margin: 0; font-size: 15px; color: var(--orange); }
.signin-col .fld input { padding: 7px; border: 1px solid #444; background: #000; color: #fff; font-size: 14px; }
.signin-col .fld input:focus { outline: none; border-color: var(--orange); }
.signin-col .yt-button.big { margin: 0; }

/* tiles (folders, photos, comic covers) */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.tile { display: block; color: var(--text); }
.tile img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; background: #000; border: 1px solid #444; padding: 2px; box-sizing: border-box; }
.tiles.covers .tile img { aspect-ratio: 2 / 3; object-fit: cover; }
.tile:hover img { border-color: var(--orange); }
.tile:hover { text-decoration: none; }
.tile .tname { display: block; margin-top: 3px; font-weight: bold; font-size: 12px; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile.folder .tname { color: #ffca28; }
.tile .small { display: block; }
.shelf { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; color: var(--text); }
.shelf img { width: 48px; height: 66px; object-fit: cover; border: 1px solid #444; background: #000; flex: none; }
.shelf b { color: #fff; }

/* gallery pages */
#content > #gal-side { float: left; width: 230px; }
#content > #gal-main { margin-left: 240px; }
.folder-list a { display: flex; justify-content: space-between; gap: 6px; padding: 5px 4px; border-bottom: 1px solid #222; color: #ffca28; }
.folder-list a .small { color: #777; }
.folder-list a:hover { background: #222; text-decoration: none; }
.folder-list .fl-up { color: var(--link); }
.scope-form label { display: block; line-height: 1.9; }
.scope-form .yt-button { margin-top: 6px; }
.gal-head { display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; align-items: center; }
.gal-head .crumbs { font-weight: normal; font-size: 13px; color: var(--muted); }
.gal-head .crumbs b { color: #fff; }
.gal-tools { display: flex; gap: 6px; align-items: center; }
#gal-filter { width: 150px; padding: 3px 5px; border: 1px solid #444; background: #000; color: #fff; font-size: 12px; }
.gal-count { padding: 0 8px 10px; }
@media (max-width: 760px) { #content > #gal-side { float: none; width: auto; } #content > #gal-main { margin-left: 0; } #page { width: auto; padding: 0 8px; } #main-col, #side-col, #watch-col, #watch-side { float: none; width: auto; } }

/* photo viewer + slideshow */
.lightbox { position: fixed; inset: 0; z-index: 1000; display: flex; flex-direction: column; background: rgba(0,0,0,.95); }
.lb-top, .lb-bar, .ss-bar { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 12px; background: linear-gradient(#222, #111); border-bottom: 1px solid #333; color: #ddd; }
.lb-bar { border-top: 1px solid #333; border-bottom: 0; }
.lb-stage, .ss-stage { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 0; overflow: hidden; }
.lb-img { max-width: 100%; max-height: 100%; object-fit: contain; cursor: pointer; }
.ss-stage { height: 70vh; background: #000; }
#ss-img { max-width: 100%; max-height: 70vh; object-fit: contain; cursor: pointer; }

/* comic reader */
.rd-stage { display: flex; justify-content: center; gap: 8px; padding: 10px; background: #000; min-height: 300px; }
.rd-img { max-width: 100%; max-height: calc(100vh - 80px); width: auto; height: auto; object-fit: contain; cursor: pointer; }
.rd-img.half { max-width: calc(50% - 4px); }
.rd-stage.tall .rd-img { max-height: none; }
.rd-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; padding: 8px; border-top: 1px solid #333; background: linear-gradient(#222, #141414); }
.rd-bar select { background: #000; color: #fff; border: 1px solid #444; }
.rd-strip { display: flex; gap: 6px; padding: 8px; overflow-x: auto; }
.rd-thumb { width: 44px; height: 64px; object-fit: cover; flex: none; border: 1px solid #444; background: #111; cursor: pointer; }
.rd-thumb.cur { border: 2px solid var(--orange); }

/* ---------- the player (yt2009's classic layout, black + orange) ---------- */
.xtp { width: 640px; max-width: 100%; background: #000; border: 1px solid #222; user-select: none; outline: none; }
.xtp:fullscreen { width: 100%; height: 100%; display: flex; flex-direction: column; border: 0; }
.xtp:-webkit-full-screen { width: 100%; height: 100%; display: flex; flex-direction: column; border: 0; }
.xtp-screen { position: relative; aspect-ratio: 16 / 9; background: #000; }
.xtp:fullscreen .xtp-screen { flex: 1; aspect-ratio: auto; }
.xtp:-webkit-full-screen .xtp-screen { flex: 1; aspect-ratio: auto; }
.xtp-video { display: block; width: 100%; height: 100%; background: #000; object-fit: contain; }
.xtp-badge { position: absolute; right: 8px; top: 8px; padding: 1px 5px; font: bold 11px Arial; color: #000; background: var(--orange); border-radius: 2px; opacity: 0; transition: opacity .3s; pointer-events: none; }
.xtp-playing .xtp-badge { opacity: .85; }
.xtp-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 20px; text-align: center; background: rgba(0,0,0,.72); }
.xtp-spinner { width: 30px; height: 30px; border-radius: 50%; border: 4px solid #333; border-top-color: var(--orange); animation: xtp-spin .9s linear infinite; }
@keyframes xtp-spin { to { transform: rotate(360deg); } }
.xtp-msg { font: bold 14px Arial; color: #eee; }
.xtp-sub { font-size: 12px; color: #aaa; }
.xtp-bar { width: 260px; max-width: 80%; height: 8px; background: #000; border: 1px solid #444; }
.xtp-bar-fill { width: 3%; height: 100%; background: linear-gradient(#ffa040, var(--orange2)); transition: width .4s; }
.xtp-failed .xtp-msg { color: #ffcc88; }
.xtp-bigplay { position: absolute; left: 50%; top: 50%; width: 76px; height: 52px; margin: -26px 0 0 -38px; border: 1px solid #b84400; border-radius: 10px; cursor: pointer;
  background: linear-gradient(#ffa040, var(--orange2)); box-shadow: 0 0 18px rgba(255,122,0,.4); }
.xtp-bigplay::after { content: ""; position: absolute; left: 30px; top: 14px; border-style: solid; border-width: 12px 0 12px 20px; border-color: transparent transparent transparent #000; }
.xtp-controls { display: flex; align-items: center; gap: 7px; height: 28px; padding: 0 6px; background: linear-gradient(#2c2c2c, #0e0e0e); border-top: 1px solid #3a3a3a; }
.xtp-btn { flex: none; width: 28px; height: 21px; padding: 0; display: flex; align-items: center; justify-content: center; border: 1px solid #444; border-radius: 3px; cursor: pointer;
  background: linear-gradient(#3a3a3a, #1a1a1a); }
.xtp-btn:hover { border-color: var(--orange2); }
.xtp-btn svg { width: 14px; height: 14px; fill: none; stroke: #ccc; stroke-width: 2; }
.xtp-btn svg .fill { fill: #ccc; stroke: none; }
.xtp-muted .xtp-vol .wave { stroke: #555; }
.xtp-ico-play { width: 0; height: 0; border-style: solid; border-width: 6px 0 6px 10px; border-color: transparent transparent transparent var(--orange); }
.xtp-playing .xtp-ico-play { width: 10px; height: 12px; border: 0; background: linear-gradient(90deg, var(--orange) 0 35%, transparent 35% 65%, var(--orange) 65%); }
.xtp-seek { position: relative; flex: 1; height: 8px; background: #050505; border: 1px solid #444; border-radius: 4px; cursor: pointer; }
.xtp-seek:focus { outline: none; border-color: var(--orange2); }
.xtp-loaded, .xtp-played { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 4px; }
.xtp-loaded { background: #4a4a4a; }
.xtp-played { background: linear-gradient(#ffa040, var(--orange2)); }
.xtp-knob { position: absolute; top: -4px; left: 0; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: linear-gradient(#ffb060, var(--orange2)); border: 1px solid #b84400; }
.xtp-time { flex: none; font: 11px Arial; color: #bbb; white-space: nowrap; }
.xtp-volwrap { display: flex; align-items: center; gap: 4px; flex: none; }
.xtp-volume { width: 60px; accent-color: var(--orange); }
.xtp-hd { flex: none; padding: 2px 6px; font: bold 11px Arial; color: #000; background: linear-gradient(#ffa040, var(--orange2)); border: 1px solid #b84400; border-radius: 3px; }
#not-playing { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; width: 628px; max-width: calc(100% - 12px); margin-top: 6px; padding: 7px 6px; border: 1px solid #7a4a00; background: #1e1305; color: #ffcc88; font-size: 12px; }
@media (max-width: 760px) { #not-playing, #watch-actions { width: auto; } .xtp-volume { display: none; } }

/* admin: members + uploads */
.admin h4 { margin: 12px 0 4px; color: #fff; font-size: 13px; }
.admin .yt-button.no { color: #ffb347; border-color: #7a4a00; background: linear-gradient(#2a1a05, #140c02); }
.add-member { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.up-tabs { display: flex; gap: 3px; border-bottom: 2px solid var(--orange); margin-bottom: 10px; }
.up-tab { padding: 5px 14px; font: bold 12px Arial; color: #ccc; border: 1px solid #333; border-bottom: 0; border-radius: 4px 4px 0 0; background: linear-gradient(#2a2a2a, #141414); cursor: pointer; }
.up-tab.sel { color: #000; background: linear-gradient(#ffa040, var(--orange2)); border-color: var(--orange2); }
.up-form { display: flex; flex-direction: column; gap: 8px; }
.up-form select { max-width: 100%; padding: 3px; background: #000; color: #eee; border: 1px solid #444; }
.up-form .yt-button { align-self: flex-start; }
#up-queue { margin: 10px 0; }
.up-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; padding: 5px 0; border-bottom: 1px solid #262626; }
.up-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #fff; }
.up-prog { grid-column: 1 / -1; height: 5px; background: #000; border: 1px solid #333; }
.up-prog div { width: 0; height: 100%; background: var(--orange); }
.up-folders { margin-top: 10px; }
