*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0d0d0d;
  --surface: #1a1a1a;
  --border: #2a2a2a;
  --accent: #ff3366;
  --accent2: #ff6699;
  --text: #f0f0f0;
  --muted: #888;
  --radius: 8px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
  min-height: 100vh;
}

a { color: var(--accent2); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Header ── */
.xup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.xup-logo { font-size: 22px; font-weight: 800; color: var(--accent); letter-spacing: -0.5px; }
.xup-logo span { color: var(--text); }
.xup-nav a {
  color: var(--muted);
  margin-left: 20px;
  font-size: 13px;
  transition: color .2s;
}
.xup-nav a:hover { color: var(--text); text-decoration: none; }

/* ── Container ── */
.xup-wrap { max-width: 860px; margin: 0 auto; padding: 32px 20px; }

/* ── Banner ── */
.laxdx-banner-link { display: block; text-align: center; margin-bottom: 20px; }
.laxdx-banner-img {
  width: 280px;
  border-radius: 16px;
  display: inline-block;
}
@media (max-width: 600px) {
  .laxdx-banner-img {
    width: 80%;
    border-radius: 12px;
  }
}

/* ── Hero ── */
.xup-hero { text-align: center; margin-bottom: 28px; }
.xup-tags { display: flex; gap: 8px; justify-content: center; margin-top: 14px; flex-wrap: wrap; }
.xup-tag {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 12px;
  color: var(--muted);
}
.xup-tag.hot { border-color: var(--accent); color: var(--accent); }

/* ── Index 2-col layout ── */
.index-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
  align-items: start;
}
.index-upload { min-width: 0; }
.index-hot { min-width: 0; }

.hot-title { font-size: 16px; font-weight: 700; margin-bottom: 12px; }

.hot-list { display: flex; flex-direction: column; gap: 10px; }
.hot-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  text-decoration: none;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px;
  transition: border-color .2s;
}
.hot-item:hover { border-color: var(--accent); text-decoration: none; }
.hot-thumb {
  position: relative;
  width: 100px;
  min-width: 100px;
  aspect-ratio: 16/9;
  background: #111;
  border-radius: 4px;
  overflow: hidden;
}
.hot-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hot-info { flex: 1; min-width: 0; }
.hot-item-title {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hot-item-meta { font-size: 11px; color: var(--muted); margin-top: 4px; }
.more-hot-link {
  display: block;
  text-align: center;
  margin-top: 14px;
  font-size: 13px;
  color: var(--accent2);
  text-decoration: none;
}
.more-hot-link:hover { text-decoration: underline; }

@media (max-width: 700px) {
  .index-layout {
    grid-template-columns: 1fr;
  }
}

/* ── Upload Form ── */
.xup-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 24px;
}

.drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s;
  position: relative;
}
.drop-zone:hover, .drop-zone.over { border-color: var(--accent); background: rgba(255,51,102,.06); }
.drop-zone input[type=file] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%;
}
.drop-icon { font-size: 42px; margin-bottom: 12px; }
.drop-zone h2 { font-size: 18px; margin-bottom: 6px; }
.drop-zone p { color: var(--muted); font-size: 13px; }
.drop-zone .file-name { margin-top: 12px; color: var(--accent2); font-size: 13px; display: none; }

.form-group { margin-top: 18px; }
.form-group label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.form-group input[type=text],
.form-group input[type=file] {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  padding: 10px 14px;
  font-size: 14px;
  outline: none;
  transition: border-color .2s;
}
.form-group input:focus { border-color: var(--accent); }
.form-group input[type=file] { padding: 8px 12px; cursor: pointer; }

.thumb-preview {
  margin-top: 10px;
  display: none;
}
.thumb-preview img {
  width: 120px;
  height: 68px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--border);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: opacity .2s, transform .1s;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--accent); color: #fff; width: 100%; justify-content: center; margin-top: 24px; }
.btn-primary:hover { opacity: .9; }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; }
.btn-x { background: #000; color: #fff; border: 1px solid #333; }
.btn-x-big {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px;
  background: #000;
  color: #fff;
  border: 1px solid #333;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  margin-top: 20px;
  transition: background .2s;
}
.btn-x-big:hover { background: #111; text-decoration: none; }
.btn-copy { background: var(--surface); color: var(--text); border: 1px solid var(--border); }

/* ── Progress ── */
.upload-progress { display: none; margin-top: 20px; }
.progress-bar-wrap {
  background: var(--border);
  border-radius: 999px;
  height: 6px;
  overflow: hidden;
  margin-top: 8px;
}
.progress-bar { height: 100%; background: var(--accent); width: 0%; transition: width .3s; border-radius: 999px; }
.progress-label { font-size: 13px; color: var(--muted); text-align: center; }

/* ── Video Player ── */
.player-wrap {
  position: relative;
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16/9;
  max-width: 100%;
}
.player-wrap video { width: 100%; height: 100%; display: block; }

/* Ad overlay */
.ad-overlay {
  position: absolute;
  inset: 0;
  background: transparent;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 20;
  cursor: default;
  padding: 12px;
}
.ad-overlay .ad-label {
  position: absolute;
  top: 8px;
  right: 10px;
  font-size: 10px;
  color: rgba(255,255,255,.45);
  background: rgba(0,0,0,.4);
  padding: 2px 7px;
  border-radius: 4px;
}
.ad-overlay .ad-timer {
  position: absolute;
  bottom: 10px;
  right: 12px;
  font-size: 13px;
  font-weight: 700;
  color: rgba(255,255,255,.75);
}

/* End overlay */
.end-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.88);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 20;
  gap: 16px;
  padding: 24px;
  text-align: center;
}
.end-overlay h3 { font-size: 18px; }
.end-overlay p { color: var(--muted); font-size: 14px; }
.btn-cta {
  background: var(--accent);
  color: #fff;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 15px;
  display: inline-block;
  text-decoration: none;
}
.btn-cta:hover { opacity: .9; text-decoration: none; }
.replay-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 8px 20px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 13px;
}
.replay-btn:hover { color: var(--text); }

/* ── Watch page layout ── */
.watch-main { display: grid; grid-template-columns: 1fr; gap: 24px; }
@media (min-width: 720px) {
  .watch-main { grid-template-columns: 1fr 300px; }
  .watch-player-col { grid-column: 1; }
  .watch-side { grid-column: 2; grid-row: 1 / 3; }
}

.watch-title { font-size: 20px; font-weight: 700; margin: 16px 0 6px; }
.watch-meta { font-size: 13px; color: var(--muted); display: flex; gap: 16px; align-items: center; }

.tweet-preview {
  margin-top: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 13px;
  color: var(--text);
  line-height: 1.6;
}
.tweet-preview span { color: var(--muted); font-size: 12px; }

.share-box { margin-top: 20px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.share-url {
  flex: 1;
  min-width: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--muted);
  padding: 9px 12px;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.delete-link { font-size: 12px; color: #c44; margin-top: 12px; display: inline-block; }
.delete-link:hover { color: #f66; }

/* ── Side card ── */
.side-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}
.side-card h3 { font-size: 15px; margin-bottom: 8px; }
.side-card p { font-size: 13px; color: var(--muted); margin-bottom: 16px; }

/* ── Hot (trending) ── */
.grid-videos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 24px;
}
.video-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  transition: border-color .2s;
  display: block;
}
.video-card:hover { border-color: var(--accent); text-decoration: none; }
.video-thumb {
  background: #111;
  position: relative;
  overflow: hidden;
}
.video-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.video-thumb .duration-badge {
  position: absolute;
  bottom: 6px;
  right: 6px;
  background: rgba(0,0,0,.75);
  color: #fff;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 3px;
}
.video-card-info { padding: 10px 12px; }
.video-card-title { font-size: 13px; font-weight: 600; line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.video-card-meta { font-size: 11px; color: var(--muted); margin-top: 4px; }

/* ── Alerts ── */
.alert { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 20px; font-size: 14px; }
.alert-error { background: rgba(200,50,50,.15); border: 1px solid rgba(200,50,50,.4); color: #f88; }
.alert-success { background: rgba(50,200,100,.15); border: 1px solid rgba(50,200,100,.4); color: #6f8; }
.alert-info { background: rgba(80,120,255,.12); border: 1px solid rgba(80,120,255,.3); color: #8af; }

/* ── Footer ── */
.xup-footer {
  text-align: center;
  padding: 28px 20px;
  color: var(--muted);
  font-size: 12px;
  border-top: 1px solid var(--border);
  margin-top: 48px;
}
.xup-footer a { color: var(--accent2); }

/* ── Responsive ── */
@media (max-width: 560px) {
  .xup-hero h1 { font-size: 24px; }
  .xup-card { padding: 18px; }
  .drop-zone { padding: 32px 16px; }
}
