:root {
  color-scheme: dark;
  --bg: #000;
  --surface: #0f0f0f;
  --surface-2: #212121;
  --border: #303030;
  --text: #f1f1f1;
  --muted: #aaa;
  --accent: #ff0033;
  --shell: 440px;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: Arial, Helvetica, sans-serif; }
body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
button, input { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #3ea6ff; outline-offset: 3px; }
.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; }

.app-shell { width: 100%; max-width: 440px; min-height: 100vh; margin: 0 auto; background: var(--bg); }
.top-bar { min-height: 56px; padding: 0 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--border); background: var(--surface); }
.brand { min-width: 0; display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 700; letter-spacing: -.02em; }
.brand-mark { width: 34px; height: 24px; flex: 0 0 34px; border-radius: 7px; display: grid; place-items: center; background: var(--accent); }
.brand-mark svg { width: 16px; height: 16px; }
.icon-button { width: 40px; height: 40px; flex: 0 0 40px; border: 0; border-radius: 50%; padding: 8px; display: inline-grid; place-items: center; color: var(--text); background: transparent; }
.icon-button:hover { background: var(--surface-2); }
.icon-button svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.player-section { padding: 12px 12px 0; }
.player-section vturb-smartplayer { max-width: 400px; }
.video-details { padding: 16px 16px 20px; }
h1 { margin: 0 0 16px; font-size: 20px; line-height: 1.35; font-weight: 600; letter-spacing: -.015em; }
.channel-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.channel { min-width: 0; display: flex; align-items: center; gap: 10px; }
.channel > div:last-child { min-width: 0; }
.channel-photo { width: 52px; height: 52px; flex: 0 0 52px; border-radius: 50%; object-fit: cover; object-position: 50% 32%; background: #e9c8a6; }
.avatar { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 50%; display: grid; place-items: center; color: #25201b; background: #e9c8a6; font-size: 18px; font-weight: 700; }
.channel-name { font-size: 16px; font-weight: 500; }
.sub-count { margin-top: 2px; color: var(--muted); font-size: 14px; line-height: 1.3; }
.subscribe { min-height: 40px; flex: 0 0 auto; border: 0; border-radius: 999px; padding: 0 14px; color: #111; background: var(--text); font-size: 13px; font-weight: 700; }
.subscribe:hover { background: #d9d9d9; }
.action-row { display: flex; gap: 8px; overflow-x: auto; padding: 18px 0 2px; scrollbar-width: none; }
.action-row::-webkit-scrollbar { display: none; }
.action-button { min-height: 40px; border: 0; border-radius: 999px; background: var(--surface-2); color: var(--text); }
.action { min-height: 40px; flex: 0 0 auto; border: 1px solid var(--border); border-radius: 999px; padding: 0 14px; display: inline-flex; align-items: center; gap: 8px; color: var(--text); background: var(--surface-2); font-size: 13px; }
.action:hover, .action[aria-pressed="true"] { background: #393939; }
.action svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.live-chat, .description { margin: 0 16px 16px; padding: 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 16px; font-size: 16px; line-height: 1.3; font-weight: 700; }
.section-heading [aria-label="Chat messages"] { color: var(--accent); font-size: 12px; }
.live-chat .section-heading { margin-bottom: 8px; }
.chat-disclosure { margin: 0 0 16px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.chat-messages { height: 180px; max-height: 230px; overflow: auto; display: grid; gap: 16px; overscroll-behavior: contain; }
.message { min-width: 0; display: flex; align-items: flex-start; gap: 10px; color: #d5d5d5; font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; }
.message-entering { animation: comment-enter .28s ease-out both; }
.message > div:last-child { min-width: 0; }
.message .avatar { width: 30px; height: 30px; flex-basis: 30px; font-size: 13px; }
.message:nth-child(2) .avatar { background: #a9c9d8; }
.message:nth-child(3) .avatar { background: #d7b7ce; }
.message strong { display: block; margin-bottom: 3px; color: var(--text); font-size: 12px; }
.chat-compose { min-width: 0; display: flex; align-items: center; gap: 8px; margin-top: 16px; }
#chat-input { min-width: 0; flex: 1; border: 1px solid var(--border); border-radius: 999px; padding: 10px 12px; color: var(--text); background: var(--surface-2); font-size: 13px; }
#chat-input::placeholder { color: var(--muted); opacity: 1; }
#chat-send { min-height: 40px; flex: 0 0 auto; border: 0; border-radius: 999px; padding: 0 14px; color: var(--text); background: var(--surface-2); font-size: 13px; }
#chat-send:hover { background: #393939; }
.description p { margin: 8px 0 0; color: #c6c6c6; font-size: 14px; line-height: 1.6; }
.checkout-button { margin: 0 16px 18px; border-radius: 8px; padding: 15px 18px; color: #15110d; background: #e6bd76; text-align: center; text-decoration: none; font-weight: 700; }
.checkout-button:not([hidden]) { display: block; }
.checkout-button:hover { background: #f2cc8a; }
.legal { padding: 4px 16px 22px; color: #888; text-align: center; font-size: 11px; line-height: 1.6; }
.legal a { color: var(--muted); }

.bottom-nav { position: fixed; z-index: 2; inset: auto 0 0; min-height: calc(64px + env(safe-area-inset-bottom)); display: flex; justify-content: center; border-top: 1px solid var(--border); background: var(--surface); }
.bottom-nav a { width: 100%; max-width: 440px; min-height: 64px; padding-bottom: env(safe-area-inset-bottom); display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--text); text-decoration: none; font-size: 13px; }
.bottom-nav svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }

@keyframes comment-enter {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (min-width: 700px) { .app-shell { box-shadow: 0 0 0 1px #191919, 0 24px 90px rgba(255,255,255,.04); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; } }
