/* RackTube — classic tube layout. Light by default, dark when the device asks for it. */
:root {
  color-scheme: light;
  --bg: #FFFFFF; --surface: #F5F5F5; --surface2: #F2F2F2; --border: #E2E2E2; --border2: #D5D5D5; --line: #EDEDED;
  --text: #1A1A1A; --text2: #333333; --muted: #555555; --meta: #666666; --faint: #6E6E6E;
  --input: #FFFFFF; --accent: #D42A85; --accent-text: #C4237A; --accent-deep: #9E1F63;
  --thumb: #E9E9E9; --ok-bg: #E8F5EC; --ok-text: #1E5E33; --err-bg: #FDECEE; --err-text: #8A1F2D;
  --scrim: rgba(255, 255, 255, .6); --shadow: 0 8px 30px rgba(0, 0, 0, .12);
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #0F0F10; --surface: #1A1A1C; --surface2: #151517; --border: #2A2A2D; --border2: #38383C; --line: #242427;
    --text: #EDEDED; --text2: #CFCFCF; --muted: #ADADAD; --meta: #A0A0A0; --faint: #8E8E8E;
    --input: #1A1A1C; --accent-text: #FF6EB0; --thumb: #202022;
    --ok-bg: #12301D; --ok-text: #9BE0B0; --err-bg: #3A1418; --err-text: #FFB3BD;
    --scrim: rgba(10, 10, 10, .75); --shadow: 0 8px 30px rgba(0, 0, 0, .5);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.4 Arial, Helvetica, sans-serif; }
a { color: var(--text); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0; color: var(--text); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 2000; background: var(--accent); color: #FFF; padding: 8px 12px; border-radius: 3px; }
.skip:focus { left: 8px; }
.wrap { max-width: 1600px; margin: 0 auto; padding-left: 20px; padding-right: 20px; }
@media (max-width: 600px) { .wrap { padding-left: 12px; padding-right: 12px; } }
.inline { display: inline; margin: 0; }
.small { font-size: 12px; color: var(--muted); }
.muted { color: var(--muted); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; padding: 0 16px; border: 1px solid var(--border2); border-radius: 3px; background: var(--bg); color: var(--text); font-size: 14px; font-weight: 700; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { text-decoration: none; filter: brightness(.97); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #FFFFFF; }
.btn-outline { border: 2px solid var(--accent); color: var(--accent-text); background: transparent; }
.btn-icon { width: 42px; padding: 0; }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: 13px; }
.btn-lg { min-height: 48px; font-size: 15px; }
.btn-danger { background: #B3261E; border-color: #B3261E; color: #FFF; }
.btn[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #FFF; }

/* Header */
.hdr { background: var(--bg); border-bottom: 1px solid var(--border); }
.hdr-in { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; padding-top: 14px; padding-bottom: 14px; }
.logo img { height: 46px; width: auto; }
.search { flex: 1 1 320px; max-width: 680px; display: flex; height: 42px; min-width: 0; margin: 0; }
.search input { flex: 1 1 auto; min-width: 0; height: 100%; padding: 0 14px; border: 2px solid var(--accent); border-right: 0; border-radius: 3px 0 0 3px; background: var(--input); color: var(--text); font-size: 15px; }
.search input::placeholder { color: var(--faint); }
.search button { display: flex; align-items: center; justify-content: center; padding: 0 18px; border: 0; border-radius: 0 3px 3px 0; background: var(--accent); color: #FFFFFF; cursor: pointer; }
.hdr-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
@media (max-width: 700px) { .logo img { height: 36px; } .hdr-in { gap: 12px; } .hdr-actions { margin-left: 0; } }

.nav { background: var(--accent); }
.nav-in { display: flex; flex-wrap: wrap; }
.nav a { display: flex; align-items: center; min-height: 44px; padding: 0 16px; color: #FFFFFF; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; white-space: nowrap; }
.nav a:hover { text-decoration: none; background: rgba(0, 0, 0, .12); }
.nav a[aria-current="page"] { background: var(--accent-deep); }
@media (max-width: 700px) { .nav-in { overflow-x: auto; flex-wrap: nowrap; padding-left: 0; padding-right: 0; } .nav a { padding: 0 12px; font-size: 13px; } }

.main { padding-top: 20px; padding-bottom: 36px; display: flex; flex-direction: column; gap: 32px; }

/* Flash messages */
.flashes { display: flex; flex-direction: column; gap: 8px; }
.flash { padding: 10px 14px; border-radius: 3px; font-weight: 700; }
.flash-ok { background: var(--ok-bg); color: var(--ok-text); }
.flash-error { background: var(--err-bg); color: var(--err-text); }

/* Sections */
.sec { display: flex; flex-direction: column; gap: 14px; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-bottom: 8px; border-bottom: 2px solid var(--accent); }
.sec-head h1, .sec-head h2 { font-size: 22px; font-weight: 700; }
.more { padding: 6px 0; color: var(--accent-text); font-size: 13px; font-weight: 700; }
.tabs { display: flex; gap: 2px; flex-wrap: wrap; }
.tabs a { display: inline-flex; align-items: center; min-height: 32px; padding: 0 10px; border-radius: 3px; color: var(--muted); font-size: 13px; }
.tabs a:hover { text-decoration: none; background: var(--surface); }
.tabs a[aria-current="true"] { background: var(--accent); color: #FFFFFF; font-weight: 700; }
.intro { margin: 0; max-width: 1080px; color: var(--text2); line-height: 1.6; }
.center { display: flex; justify-content: center; }

/* Video grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px 12px; }
@media (max-width: 520px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 8px; } }
.card { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.thumb { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: 3px; overflow: hidden; background: var(--thumb); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb .badge-hd { position: absolute; top: 5px; right: 5px; padding: 1px 4px; border-radius: 2px; background: var(--accent); color: #FFF; font-size: 10px; font-weight: 700; }
.thumb .dur { position: absolute; right: 5px; bottom: 5px; padding: 1px 5px; border-radius: 2px; background: rgba(0, 0, 0, .8); color: #FFF; font-size: 12px; font-weight: 700; }
.thumb .state { position: absolute; left: 5px; top: 5px; padding: 1px 6px; border-radius: 2px; background: rgba(0, 0, 0, .8); color: #FFF; font-size: 11px; font-weight: 700; }
.card-title { min-height: 36px; font-size: 14px; font-weight: 700; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--meta); }
.card-meta span { display: inline-flex; align-items: center; gap: 4px; }
.card-meta .rating { color: var(--accent-text); font-weight: 700; }
.empty { padding: 40px 16px; text-align: center; color: var(--muted); background: var(--surface); border: 1px solid var(--border); border-radius: 3px; }

/* Pagination */
.pager { display: flex; justify-content: center; align-items: center; gap: 4px; flex-wrap: wrap; padding-top: 10px; }
.pager a, .pager span { display: inline-flex; align-items: center; justify-content: center; min-width: 38px; height: 38px; padding: 0 12px; border: 1px solid var(--border2); border-radius: 3px; background: var(--bg); color: var(--text); font-size: 13px; font-weight: 700; }
.pager a:hover { text-decoration: none; border-color: var(--accent); }
.pager .current { background: var(--accent); border-color: var(--accent); color: #FFF; }
.pager .gap { border: 0; min-width: 0; padding: 0 4px; color: var(--faint); }

/* Boxes (SEO text, tags, models) */
.box { display: flex; flex-direction: column; gap: 12px; padding: 18px; background: var(--surface); border: 1px solid var(--border); border-radius: 3px; }
.box h2 { font-size: 18px; }
.box h3 { font-size: 15px; margin-top: 4px; }
.box p { margin: 0; max-width: 1080px; color: var(--text2); line-height: 1.6; }
.taglist { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 14px; }
.taglist a { padding: 4px 0; color: var(--accent-text); }
.taglist a.all { color: var(--text); font-weight: 700; }
.modellist { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 4px 16px; font-size: 14px; margin: 0; padding: 0; list-style: none; }
.modellist a { display: block; padding: 4px 0; }
.modellist .rank { display: inline-block; min-width: 26px; color: var(--faint); }

/* Tag index */
.letters { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.letter h2 { font-size: 18px; padding-bottom: 6px; border-bottom: 2px solid var(--accent); margin-bottom: 6px; }
.letter ul { list-style: none; margin: 0; padding: 0; }
.letter a { display: flex; justify-content: space-between; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--line); }
.letter .count, .count { color: var(--faint); font-size: 12px; }
.catgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px 12px; }
.cat .thumb { margin-bottom: 6px; }
.cat-name { font-weight: 700; font-size: 15px; display: flex; justify-content: space-between; gap: 8px; }

/* Video page */
.vp { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.vp-main { flex: 999 1 640px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.vp-side { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.vp h1 { font-size: 20px; line-height: 1.3; }
.player { position: relative; aspect-ratio: 16 / 9; background: #000; }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.notice { padding: 10px 14px; border-radius: 3px; background: var(--surface); border: 1px solid var(--border); color: var(--text2); }
.vbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 12px; background: var(--surface2); border: 1px solid var(--border); }
.vstats { display: flex; flex-direction: column; gap: 6px; min-width: 200px; }
.vstats strong { font-size: 16px; }
.ratebar { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.ratebar .track { position: relative; width: 160px; height: 4px; background: var(--border2); }
.ratebar .fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--accent); }
.vactions { display: flex; gap: 4px; flex-wrap: wrap; }
.vinfo { display: flex; flex-direction: column; gap: 8px; padding: 12px; background: var(--surface); border: 1px solid var(--border); font-size: 13px; }
.vrow { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.vrow .lbl { min-width: 84px; color: var(--muted); font-weight: 700; }
.vrow a { padding: 3px 0; }
.vrow a.model { color: var(--accent-text); font-weight: 700; }
.vdesc { margin: 4px 0 0; color: var(--text2); font-size: 14px; white-space: pre-line; }
.side-head { margin: 0; padding: 10px 12px; background: var(--surface2); border-bottom: 2px solid var(--accent); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.mini { display: flex; gap: 10px; }
.mini:hover { text-decoration: none; }
.mini .thumb { flex: 0 0 150px; }
.mini-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.mini-title { font-size: 13px; font-weight: 700; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.comments { display: flex; flex-direction: column; gap: 10px; padding-top: 8px; }
.comments h2 { font-size: 16px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.comment { padding: 10px 0; border-bottom: 1px solid var(--line); }
.comment-head { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.comment-head strong { color: var(--text); }
.comment p { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }

/* Forms */
.form-page { max-width: 560px; width: 100%; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.form-page.wide { max-width: 760px; }
.form-page h1 { font-size: 24px; }
.form { display: flex; flex-direction: column; gap: 14px; padding: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: 3px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .field .lbl { font-weight: 700; }
.field .hint { font-size: 12px; color: var(--muted); }
.field input[type=text], .field input[type=email], .field input[type=password], .field input[type=file], .field textarea, .field select, textarea.full {
  width: 100%; min-height: 42px; padding: 9px 12px; border: 1px solid var(--border2); border-radius: 3px; background: var(--input); color: var(--text);
}
.field textarea, textarea.full { min-height: 96px; resize: vertical; }
.check { display: flex; gap: 10px; align-items: flex-start; line-height: 1.45; }
.field label.check { font-weight: 400; }
.check input { margin-top: 3px; width: 18px; height: 18px; flex: 0 0 auto; accent-color: var(--accent); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.errors { margin: 0; padding: 10px 14px 10px 30px; background: var(--err-bg); color: var(--err-text); border-radius: 3px; }
.progress { height: 10px; background: var(--border2); border-radius: 5px; overflow: hidden; }
.progress div { height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.upload-status { font-weight: 700; }

/* Account */
.table-wrap { overflow-x: auto; }
table.list { width: 100%; border-collapse: collapse; font-size: 13px; }
table.list th, table.list td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.list th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.pill { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 700; background: var(--surface2); border: 1px solid var(--border2); }
.pill-published { background: var(--ok-bg); color: var(--ok-text); border-color: transparent; }
.pill-rejected, .pill-hidden { background: var(--err-bg); color: var(--err-text); border-color: transparent; }

/* Static pages */
.prose { max-width: 820px; line-height: 1.65; color: var(--text2); }
.prose h1 { font-size: 24px; margin-bottom: 12px; }
.prose h2 { font-size: 18px; margin: 20px 0 8px; }
.prose a { color: var(--accent-text); text-decoration: underline; }

/* Footer */
.ftr { background: var(--surface2); border-top: 3px solid var(--accent); }
.ftr-cols { display: flex; flex-wrap: wrap; gap: 28px 48px; padding-top: 28px; padding-bottom: 18px; }
.ftr-brand { flex: 2 1 240px; display: flex; flex-direction: column; gap: 10px; }
.ftr-brand img { height: 32px; width: auto; }
.ftr-brand p { margin: 0; max-width: 300px; color: var(--muted); font-size: 13px; }
.ftr nav { flex: 1 1 150px; display: flex; flex-direction: column; gap: 2px; }
.ftr h3 { margin: 0 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; }
.ftr nav a { padding: 5px 0; color: var(--text2); font-size: 13px; }
.ftr-bottom { display: flex; flex-wrap: wrap; gap: 8px 32px; justify-content: space-between; padding-top: 14px; padding-bottom: 24px; border-top: 1px solid var(--border); color: var(--muted); font-size: 12px; }

/* Age gate: the page is fully rendered underneath; this only covers it. */
.is-gated { overflow: hidden; }
.agegate { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 16px; background: var(--scrim); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.agegate-card { width: 100%; max-width: 520px; max-height: 100%; overflow-y: auto; display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 32px 28px 26px; text-align: center; background: var(--bg); border: 1px solid var(--border); border-top: 4px solid var(--accent); border-radius: 3px; box-shadow: var(--shadow); }
.agegate-card img { height: 52px; width: auto; }
.agegate-card h2 { font-size: 22px; }
.agegate-card p { margin: 0; color: var(--text2); line-height: 1.5; }
.agegate-btns { display: flex; gap: 10px; width: 100%; flex-wrap: wrap; }
.agegate-btns .btn { flex: 1 1 180px; }
