@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

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

:root {
  --gold: #f5c542;
  --gold-dark: #d4a017;
  --green: #4CAF50;
  --green-dark: #388E3C;
  --grass: #5B8731;
  --grass-dark: #4a7128;
  --dirt: #8B6914;
  --dirt-dark: #6b4f0e;
  --stone: #333333;
  --deep: #111111;
  --bg-card: rgba(0, 0, 0, 0.6);
  --text: #fff;
  --text-muted: rgba(255, 255, 255, 0.6);
}

body {
  background: var(--deep);
  color: var(--text);
  font-family: 'Segoe UI', system-ui, sans-serif;
  min-height: 100vh;
}

/* Minecraft cross-section background: grass → dirt → stone → deep */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 100vh;
  z-index: -1;
  /* Stepped gradient — hard pixel-like stops instead of smooth blending */
  background:
    /* Grass layer — top ~15% */
    linear-gradient(180deg,
      var(--grass) 0%,
      var(--grass) 8%,
      var(--grass-dark) 8%,
      var(--grass-dark) 10%,
      /* Pixel fade: grass → dirt */
      #6e7a2e 10%, #6e7a2e 11%,
      #7a7422 11%, #7a7422 12%,
      #866e18 12%, #866e18 13%,
      var(--dirt) 13%, var(--dirt) 14%,
      /* Dirt body */
      var(--dirt) 14%,
      var(--dirt) 20%,
      /* Pixel fade: dirt → stone */
      var(--dirt-dark) 20%, var(--dirt-dark) 21%,
      #5a4210 21%, #5a4210 22%,
      #4a360e 22%, #4a360e 23%,
      #3d2d0a 23%, #3d2d0a 24%,
      var(--stone) 24%, var(--stone) 25%,
      /* Stone → deep fade */
      #2a2a2a 25%, #2a2a2a 28%,
      #222222 28%, #222222 32%,
      #1a1a1a 32%, #1a1a1a 38%,
      #151515 38%, #151515 45%,
      var(--deep) 45%,
      var(--deep) 100%
    );
}

h1, h2, h3 {
  font-family: 'Press Start 2P', monospace;
}

.page {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 16px;
}

header {
  text-align: center;
  padding: 12px 0 8px; /* was 24/16 — reclaimed ~20px above the fold */
}

header h1 {
  color: var(--gold);
  font-size: clamp(14px, 3.2vw, 22px); /* was 16-28px */
  text-shadow: 2px 2px 0 #000, 4px 4px 0 rgba(0,0,0,0.3);
  line-height: 1.3;
}

.site-title-link {
  color: inherit;
  text-decoration: none;
}

.site-title-link:hover {
  opacity: 0.85;
}

/* The "Take turns playing Minecraft — 2 minutes each!" subtitle is at
   tension with the no-goal-collaboration repositioning we agreed on
   earlier. Hide it from the home page so the title alone speaks. */
header p { display: none; }

/* --- Stream section --- */
.stream-section {
  position: relative;
  width: 100%;
  height: 480px;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.1);
}

.stream-section iframe,
#twitch-embed,
#twitch-embed > iframe {
  width: 100% !important;
  height: 100% !important;
  border: none;
}

#twitch-embed {
  position: absolute;
  inset: 0;
}

.stream-offline {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  color: var(--text-muted);
  font-size: 14px;
  text-align: center;
}

@media (max-width: 639px) {
  .stream-section {
    height: auto;
    aspect-ratio: 16 / 9;
  }
}

/* --- Join section --- */
.join-section {
  margin-top: 20px;
  background: var(--bg-card);
  border-radius: 8px;
  padding: 24px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.join-form {
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.join-form input {
  padding: 12px 16px;
  font-size: 16px;
  border: 2px solid #555;
  border-radius: 6px;
  width: 220px;
  background: #222;
  color: #fff;
  outline: none;
  transition: border-color 0.2s;
}

.join-form input:focus {
  border-color: var(--gold);
}

.join-form button {
  padding: 12px 28px;
  font-size: 16px;
  font-weight: bold;
  font-family: 'Press Start 2P', monospace;
  border: none;
  border-radius: 6px;
  background: var(--green);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  white-space: nowrap;
}

.join-form button:hover { background: var(--green-dark); }
.join-form button:active { transform: scale(0.97); }
.join-form button:disabled {
  background: #555;
  cursor: not-allowed;
}

.twitch-login {
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-muted);
}

/* --- Auth section --- */
.auth-section {
  margin-bottom: 12px;
}

.auth-status {
  font-size: 14px;
  color: var(--green);
  margin-bottom: 8px;
}

.auth-status a {
  color: var(--text-muted);
  font-size: 12px;
  margin-left: 8px;
  cursor: pointer;
  text-decoration: underline;
}

.auth-status a:hover {
  color: var(--gold);
}

.ms-login-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: bold;
  border: none;
  border-radius: 6px;
  background: #2f2f2f;
  color: #fff;
  cursor: pointer;
  transition: background 0.2s;
  text-decoration: none;
}

.ms-login-btn:hover {
  background: #3f3f3f;
}

.ms-login-btn svg {
  width: 20px;
  height: 20px;
}

.ms-login-btn-secondary {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #ccc;
  font-size: 13px;
  padding: 8px 16px;
}
.ms-login-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.google-login-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 20px;
  background: #fff;
  color: #333;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  width: 100%;
  box-sizing: border-box;
}
.google-login-btn:hover {
  background: #f5f5f5;
}

.auth-divider {
  display: flex;
  align-items: center;
  margin: 12px 0;
  color: rgba(255, 255, 255, 0.4);
  font-size: 12px;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}
.auth-divider span {
  padding: 0 10px;
}

.auth-recheck-btn {
  margin-top: 8px;
}

.twitch-login-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
  padding: 10px 20px;
  margin-top: 8px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  background: #9146ff;
  color: #fff;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s;
}
.twitch-login-btn:hover { background: #7c3aed; }

.connected-accounts-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.connected-accounts-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 6px;
}

.connected-accounts-label {
  font-size: 14px;
  color: #eee;
}

.connected-accounts-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.connected-accounts-primary-tag {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gold, #f59e0b);
  background: rgba(245, 158, 11, 0.15);
  padding: 2px 8px;
  border-radius: 4px;
}

.connected-accounts-link-btn {
  font-size: 13px;
  padding: 6px 14px;
  border-radius: 6px;
  background: var(--gold, #f59e0b);
  color: #000;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.connected-accounts-link-btn:hover { background: #d97706; }

.connected-accounts-unlink-btn {
  font-size: 13px;
  padding: 6px 14px;
  border-radius: 6px;
  background: transparent;
  color: #ccc;
  border: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
}
.connected-accounts-unlink-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}
.connected-accounts-unlink-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.ownership-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 8px 16px;
  background: rgba(245, 158, 11, 0.9);
  color: #000;
  font-size: 13px;
  font-weight: 500;
}
.ownership-banner a {
  color: #000;
  text-decoration: underline;
  font-weight: 700;
}
.ownership-banner-close {
  background: none;
  border: none;
  color: #000;
  font-size: 16px;
  cursor: pointer;
  padding: 0 4px;
  opacity: 0.7;
}
.ownership-banner-close:hover {
  opacity: 1;
}

.profile-mc-status {
  margin-top: 16px;
}
.mc-verified {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--green);
}
.mc-username {
  font-weight: 700;
}
.mc-not-owned {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mc-not-linked {
  margin-top: 8px;
}

.auth-error {
  color: #ff4444;
  font-size: 13px;
  margin-bottom: 8px;
}

.auth-guest {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-style: italic;
}

/* --- In-queue state --- */
.queue-status {
  display: none;
  margin-top: 12px;
  font-size: 14px;
}

.queue-status .position {
  font-family: 'Press Start 2P', monospace;
  font-size: 18px;
  color: var(--gold);
  margin-bottom: 4px;
}

/* --- Twitch link section --- */
.twitch-link-section {
  margin-top: 12px;
  padding: 10px;
  border-radius: 6px;
  background: rgba(145, 70, 255, 0.1);
  border: 1px solid rgba(145, 70, 255, 0.3);
}

.twitch-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: bold;
  border: none;
  border-radius: 6px;
  background: #9146ff;
  color: #fff;
  cursor: pointer;
  transition: background 0.2s;
}

.twitch-link-btn:hover { background: #7c3aed; }
.twitch-link-btn:disabled { background: #555; cursor: not-allowed; }

.twitch-link-btn svg {
  width: 16px;
  height: 16px;
}

.twitch-status {
  font-size: 13px;
  margin-top: 6px;
}

.twitch-status.follower { color: #4CAF50; }
.twitch-status.subscriber { color: #9146ff; }
.twitch-status.not-following { color: var(--text-muted); }

.twitch-follow-link {
  color: #9146ff;
  text-decoration: underline;
}

.twitch-follow-link:hover { color: #b388ff; }

.twitch-linked-info {
  display: flex; align-items: center; gap: 8px; font-size: 14px;
}
.twitch-linked-username { color: #9146ff; font-weight: bold; }
.twitch-unlink-btn {
  padding: 4px 10px; font-size: 11px;
  background: none; border: 1px solid rgba(255,255,255,0.2);
  border-radius: 4px; color: var(--text-muted); cursor: pointer;
  transition: all 0.15s;
}
.twitch-unlink-btn:hover { border-color: #ff4444; color: #ff4444; }
.twitch-unlink-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* --- Queue badges (kill badges, twitch badge) --- */
.queue-badge {
  display: inline-block;
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 3px;
  font-weight: bold;
  margin-left: 4px;
}

/* --- Two-column layout wrapping the queue + diary feed --- */
.landing-columns {
  margin-top: 20px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: start;
}
@media (min-width: 768px) {
  .landing-columns {
    grid-template-columns: 1fr 1fr;
  }
}
.landing-columns > .queue-section {
  margin-top: 0;
}

/* --- Diary feed (home page column) --- */
.diary-feed {
  background: var(--bg-card);
  border-radius: 8px;
  padding: 20px 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.diary-feed-title {
  font-size: 12px;
  color: var(--gold);
  letter-spacing: 1px;
  margin-bottom: 12px;
}
.diary-feed-empty {
  font-size: 13px;
  color: var(--text-muted);
  padding: 14px 0;
  font-style: italic;
}
.diary-feed-list {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 520px;
  overflow-y: auto;
}
.diary-card {
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.diary-card:last-child { border-bottom: 0; }
.diary-card-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 6px;
}
.diary-card-name {
  font-weight: 700;
  color: #e8c97a;
  font-size: 13px;
}
.diary-card-ago {
  font-size: 11px;
  color: var(--text-muted);
  flex-shrink: 0;
}
.diary-card-text {
  font-size: 13px;
  color: #ddd;
  line-height: 1.45;
  white-space: pre-wrap;
  word-wrap: break-word;
  margin: 0;
}
.diary-card-expand {
  margin-top: 4px;
  background: none;
  border: 0;
  color: var(--gold);
  font-size: 11px;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}
.diary-card-expand:hover { opacity: 0.85; }
.diary-card-clip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 12px;
  color: var(--green);
  text-decoration: none;
  font-weight: 600;
}
.diary-card-clip:hover { text-decoration: underline; }

/* --- Diary form (on the Thanks page) --- */
.diary-form {
  margin: 16px auto 24px;
  padding: 20px;
  max-width: 640px;
  background: var(--bg-card);
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.08);
  text-align: left;
}
.diary-form-title {
  font-size: 16px;
  color: var(--gold);
  margin-bottom: 4px;
}
.diary-form-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.diary-textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 14px;
  background: rgba(0,0,0,0.4);
  color: #eee;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 4px;
  resize: vertical;
  min-height: 120px;
}
.diary-textarea:focus { outline: 1px solid var(--gold); }
.diary-form-meta {
  display: flex;
  justify-content: flex-end;
  margin-top: 4px;
}
.diary-charcount {
  font-size: 11px;
  color: var(--text-muted);
  font-family: 'Menlo', 'Consolas', monospace;
}
.diary-charcount-over { color: #ff5555; }
.diary-form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}
.diary-error {
  margin-top: 8px;
  padding: 8px 10px;
  background: rgba(255, 85, 85, 0.08);
  border: 1px solid rgba(255, 85, 85, 0.35);
  color: #ffb3b3;
  border-radius: 4px;
  font-size: 13px;
}
.diary-ok {
  margin-top: 8px;
  padding: 8px 10px;
  background: rgba(76, 175, 80, 0.1);
  border: 1px solid rgba(76, 175, 80, 0.4);
  color: #a8e6aa;
  border-radius: 4px;
  font-size: 13px;
}
.diary-login-cta {
  max-width: 640px;
  margin: 16px auto;
  padding: 14px 18px;
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  border: 1px dashed rgba(255,255,255,0.1);
  border-radius: 6px;
}

/* --- Queue list --- */
.queue-section {
  margin-top: 20px;
  background: var(--bg-card);
  border-radius: 8px;
  padding: 20px 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.queue-section h2 {
  font-size: 12px;
  color: var(--gold);
  margin-bottom: 12px;
  letter-spacing: 1px;
}

.queue-list {
  list-style: none;
  font-size: 14px;
}

.queue-list li {
  padding: 6px 8px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.queue-list li.active {
  background: rgba(76, 175, 80, 0.15);
  color: var(--green);
  font-weight: bold;
}

.queue-list li.you {
  background: rgba(245, 197, 66, 0.15);
  color: var(--gold);
  font-weight: bold;
}

.queue-list .pos {
  min-width: 24px;
  text-align: right;
  color: var(--text-muted);
  font-size: 12px;
}

.queue-empty {
  color: var(--text-muted);
  font-size: 13px;
  font-style: italic;
}

.now-playing {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  margin-bottom: 8px;
  background: rgba(76, 175, 80, 0.1);
  border-radius: 4px;
  font-size: 14px;
}

.now-playing .label {
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  color: var(--green);
}

.now-playing .timer {
  margin-left: auto;
  font-family: 'Press Start 2P', monospace;
  font-size: 12px;
}

/* --- Modals --- */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 100;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.modal-overlay.visible {
  display: flex;
}

/* --- Auth modal --- */
.auth-modal-content {
  background: var(--bg-card);
  border: 2px solid var(--gold-dark);
  border-radius: 12px;
  padding: 32px;
  max-width: 420px;
  width: 90%;
  text-align: center;
  position: relative;
}

.auth-modal-content h2 {
  color: var(--gold);
  font-size: 18px;
  margin-bottom: 12px;
}

.auth-modal-content p {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 20px;
  line-height: 1.5;
}

.auth-modal-content .auth-error {
  margin-bottom: 12px;
}

.auth-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
}

.auth-modal-close:hover { color: var(--gold); }

/* --- No Minecraft modal --- */
.no-minecraft-modal-content {
  background: var(--bg-card);
  border: 2px solid #3b82f6;
  border-radius: 12px;
  padding: 32px;
  max-width: 420px;
  width: 90%;
  text-align: center;
  position: relative;
}

.no-minecraft-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  background: rgba(59, 130, 246, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #3b82f6;
}

.no-minecraft-icon svg {
  width: 28px;
  height: 28px;
}

.no-minecraft-modal-content h2 {
  color: #3b82f6;
  font-size: 18px;
  margin-bottom: 12px;
}

.no-minecraft-modal-content p {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 20px;
  line-height: 1.5;
}

.no-minecraft-buy-btn {
  display: inline-block;
  padding: 12px 28px;
  font-size: 14px;
  font-weight: bold;
  border: none;
  border-radius: 6px;
  background: var(--green);
  color: #fff;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, transform 0.1s;
}

.no-minecraft-buy-btn:hover {
  background: var(--green-dark);
}

.no-minecraft-buy-btn:active {
  transform: scale(0.97);
}

.no-minecraft-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
}

.no-minecraft-modal-close:hover { color: #3b82f6; }

/* --- Redirect modal --- */
.redirect-modal h2 {
  color: var(--gold);
  font-size: 24px;
  margin-bottom: 16px;
}

.redirect-modal .countdown {
  font-family: 'Press Start 2P', monospace;
  font-size: 64px;
  color: var(--green);
}

/* Dev mode badge */
.dev-mode-badge {
  position: fixed;
  bottom: 12px;
  left: 12px;
  background: #f59e0b;
  color: #000;
  font-size: 11px;
  font-weight: bold;
  padding: 3px 8px;
  border-radius: 4px;
  z-index: 9999;
  pointer-events: none;
  letter-spacing: 0.05em;
}

.dev-badge {
  display: inline-block;
  background: #f59e0b;
  color: #000;
  font-size: 10px;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 4px;
  margin-bottom: 12px;
  letter-spacing: 0.05em;
}

.dev-login-btn {
  background: #292929;
  border: 1px solid #f59e0b;
}

.dev-login-btn:hover {
  background: #3a3a3a;
}

/* WS reconnection bar */
#ws-status {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0;
  background: #ff4444;
  color: #fff;
  text-align: center;
  padding: 8px;
  font-size: 13px;
  z-index: 200;
}

#ws-status.visible { display: block; }

/* Footer */
footer {
  text-align: center;
  padding: 24px 0 72px;
  font-size: 12px;
  color: var(--text-muted);
}

.footer-social {
  margin-bottom: 12px;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
}

.footer-links a:hover { color: var(--gold); }

/* --- Social links --- */
.social-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
  padding: 6px 14px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.social-link:hover {
  color: #ff4500;
  border-color: rgba(255, 69, 0, 0.4);
  background: rgba(255, 69, 0, 0.08);
}

.social-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* --- Legal pages (privacy, terms, faq) --- */
.legal-page { max-width: 720px; margin: 0 auto; padding: 24px 16px; }
.legal-content { background: var(--bg-card); border-radius: 8px; padding: 24px 32px; border: 1px solid rgba(255, 255, 255, 0.08); line-height: 1.7; font-size: 14px; }
.legal-content h2 { font-family: 'Segoe UI', system-ui, sans-serif; font-size: 18px; font-weight: bold; color: var(--gold); margin: 24px 0 12px; }
.legal-content ul { margin: 8px 0 16px 20px; }
.legal-content li { margin-bottom: 6px; }
.legal-content p { margin-bottom: 12px; }
.legal-notice { font-style: italic; color: var(--text-muted); font-size: 13px; margin-bottom: 16px; }
.gold-link { color: var(--gold); text-decoration: underline; }
.gold-link:hover { color: var(--gold-dark); }
.back-link { display: inline-block; margin-top: 20px; color: var(--text-muted); text-decoration: none; font-size: 13px; }
.back-link:hover { color: var(--gold); }

/* --- Paused banner --- */
.paused-banner {
  display: none;
  background: rgba(255, 170, 0, 0.12);
  border: 2px solid rgba(255, 170, 0, 0.4);
  border-radius: 8px;
  padding: 14px 20px;
  margin-top: 16px;
  text-align: center;
  color: #ffaa00;
  font-size: 14px;
  font-weight: bold;
}
.paused-banner.visible { display: block; }
.paused-banner .detail {
  font-weight: normal;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* --- Burger menu --- */
.burger-menu { position: fixed; top: 12px; right: 12px; z-index: 50; }
.burger-toggle {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  background: rgba(0,0,0,0.6); border: 1px solid rgba(255,255,255,0.2);
  border-radius: 6px; cursor: pointer; transition: border-color 0.2s;
}
.burger-toggle:hover { border-color: var(--gold); }
.burger-icon {
  display: flex; flex-direction: column; gap: 4px; width: 18px;
}
.burger-icon span {
  display: block; width: 100%; height: 2px; background: var(--text);
  border-radius: 1px; transition: transform 0.2s, opacity 0.2s;
}
.burger-icon.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.burger-icon.open span:nth-child(2) { opacity: 0; }
.burger-icon.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.burger-dropdown {
  position: absolute; top: 100%; right: 0; margin-top: 8px;
  background: rgba(0,0,0,0.95); border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px; min-width: 200px; padding: 12px 0;
}
.burger-section { padding: 0 16px; }
.burger-section-label {
  font-size: 10px; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px;
}
.burger-lang-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px;
}
.burger-lang {
  padding: 6px; font-size: 12px; font-weight: bold;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 4px; color: var(--text-muted); cursor: pointer;
  text-align: center; transition: all 0.15s;
}
.burger-lang:hover { background: rgba(245,197,66,0.15); color: var(--text); }
.burger-lang.active { color: var(--gold); border-color: var(--gold); background: rgba(245,197,66,0.1); }

.burger-divider { height: 1px; background: rgba(255,255,255,0.1); margin: 8px 0; }
.burger-item {
  display: block; width: 100%; padding: 10px 16px;
  background: none; border: none; color: var(--text);
  font-size: 13px; text-align: left; cursor: pointer;
  text-decoration: none; transition: background 0.15s;
}
.burger-item:hover { background: rgba(245,197,66,0.1); color: var(--gold); }

/* --- Mute toggle --- */
.mute-toggle {
  position: fixed;
  bottom: 16px;
  right: 16px;
  z-index: 50;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.2);
  background: rgba(0,0,0,0.6);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s;
}
.mute-toggle:hover {
  background: rgba(0,0,0,0.8);
  border-color: var(--gold);
}
.mute-toggle.muted {
  color: var(--text-muted);
  border-color: rgba(255,255,255,0.1);
}

/* --- Update banner --- */
.update-banner {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 90;
  background: rgba(30,20,0,0.95);
  border-bottom: 2px solid var(--gold);
  padding: 10px 16px;
  text-align: center;
  font-size: 13px;
  color: var(--text);
  transform: translateY(-100%);
  transition: transform 0.3s ease;
}

#update-banner-text {
  cursor: pointer;
}

.update-banner-refresh {
  margin-left: 12px;
  background: var(--gold);
  color: #000;
  border: none;
  padding: 4px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
}

.update-banner-close {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 16px;
}

/* --- Cookie consent banner --- */
#cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0,0,0,0.95);
  color: #fff;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  z-index: 9999;
  font-size: 13px;
  flex-wrap: wrap;
  border-top: 1px solid rgba(255,255,255,0.15);
}

#cookie-banner a {
  color: var(--gold);
  text-decoration: underline;
}

#cookie-banner .cookie-accept {
  padding: 8px 20px;
  border: none;
  border-radius: 4px;
  background: var(--green);
  color: #fff;
  cursor: pointer;
  font-size: 13px;
  font-weight: bold;
}

#cookie-banner .cookie-decline {
  padding: 8px 20px;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 4px;
  background: transparent;
  color: #fff;
  cursor: pointer;
  font-size: 13px;
}

/* --- Queue player links --- */
.queue-player-link {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s;
}
.queue-player-link:hover {
  color: var(--gold);
  text-decoration: underline;
}

/* --- Profile page --- */
.profile-page {
  max-width: 720px;
  margin: 0 auto;
}

.profile-loading,
.profile-error {
  text-align: center;
  padding: 48px 16px;
  font-size: 16px;
  color: var(--text-muted);
}

.profile-error {
  color: #ff4444;
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--bg-card);
  border-radius: 8px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 16px;
}

.profile-header-info {
  min-width: 0;
}

.profile-username {
  font-size: clamp(14px, 3vw, 22px);
  color: var(--gold);
  text-shadow: 2px 2px 0 #000;
  word-break: break-word;
}

.profile-join-date {
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 6px;
}

.profile-section {
  background: var(--bg-card);
  border-radius: 8px;
  padding: 20px 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 16px;
}

.profile-section-title {
  font-size: 12px;
  color: var(--gold);
  margin-bottom: 16px;
  letter-spacing: 1px;
}

.profile-empty-text {
  color: var(--text-muted);
  font-size: 13px;
  font-style: italic;
}

/* --- Badge grid --- */
.badge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}

.badge-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  text-align: center;
  transition: opacity 0.2s, filter 0.2s;
}

.badge-card.badge-earned {
  border-color: rgba(245, 197, 66, 0.3);
  background: rgba(245, 197, 66, 0.05);
}

.badge-card.badge-locked {
  opacity: 0.3;
  filter: grayscale(1);
}

.badge-icon {
  font-size: 24px;
  font-family: 'Press Start 2P', monospace;
  line-height: 1;
}

.badge-name {
  font-size: 11px;
  font-weight: bold;
  color: var(--text);
}

.badge-desc {
  font-size: 10px;
  color: var(--text-muted);
  line-height: 1.3;
}

/* --- Profile top stat badges (games played / total playtime) --- */
.profile-stat-row {
  display: flex;
  gap: 12px;
  margin: 8px 0 16px;
  flex-wrap: wrap;
}

.profile-stat-badge {
  flex: 1 1 140px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
}

.profile-stat-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.profile-stat-value {
  font-family: 'Press Start 2P', monospace;
  font-size: 15px;
  color: var(--gold);
  font-weight: bold;
}

/* --- Stats grid --- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.stat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 16px 8px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
}

.stat-value {
  font-family: 'Press Start 2P', monospace;
  font-size: 18px;
  color: var(--gold);
}

.stat-label {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
}

/* --- Kills breakdown --- */
.kills-breakdown {
  margin-top: 12px;
}

.kills-breakdown-title {
  font-family: 'Segoe UI', system-ui, sans-serif;
  font-size: 13px;
  font-weight: bold;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.kills-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 6px;
}

.kill-entry {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 10px;
  border-radius: 4px;
  background: rgba(231, 76, 60, 0.08);
  font-size: 13px;
}

.kill-mob {
  color: var(--text);
}

.kill-count {
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  color: #E74C3C;
}

/* --- Clips placeholder --- */
.clips-list {
  display: grid;
  gap: 12px;
}

.clip-card {
  padding: 16px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
}

@media (max-width: 480px) {
  .profile-header {
    flex-direction: column;
    text-align: center;
  }
  .stats-grid {
    grid-template-columns: 1fr;
  }
  .badge-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Thanks / Feedback page */
.thanks-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 80vh;
  padding: 40px 20px;
  text-align: center;
}

.thanks-page h1 {
  font-family: 'Press Start 2P', monospace;
  font-size: 24px;
  color: var(--gold);
  text-shadow: 2px 2px 4px #000;
  margin-bottom: 16px;
}

.thanks-subtitle {
  margin: 0 auto 16px;
  max-width: 520px;
  font-size: 16px;
  color: rgba(255, 255, 255, 0.82);
}

.feedback-form {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
  width: 100%;
}
.feedback-form .star-rating {
  justify-content: center;
}
.feedback-form .feedback-prompt {
  text-align: center;
}

.feedback-prompt {
  font-size: 15px;
  color: var(--text-muted);
  margin: 0;
}

.star-rating {
  display: flex;
  gap: 6px;
}

.star-rating .star {
  background: none;
  border: none;
  font-size: 36px;
  cursor: pointer;
  color: rgba(255,255,255,0.2);
  padding: 0 2px;
  transition: color 0.15s;
  line-height: 1;
}

.star-rating .star.filled {
  color: var(--gold);
}

.feedback-comment {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(0,0,0,0.4);
  color: #fff;
  font-size: 14px;
  font-family: inherit;
  resize: none;
}

.feedback-comment::placeholder {
  color: rgba(255,255,255,0.3);
}

.feedback-actions {
  display: flex;
  gap: 12px;
  margin-top: 4px;
}

.feedback-submit,
.feedback-skip {
  padding: 10px 24px;
  border-radius: 8px;
  border: none;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s;
}

.feedback-submit {
  background: var(--green);
  color: #fff;
}

.feedback-submit:hover { background: var(--green-dark); }
.feedback-submit:disabled { opacity: 0.5; cursor: not-allowed; }

.feedback-skip {
  background: rgba(255,255,255,0.1);
  color: var(--text-muted);
}

.feedback-skip:hover { background: rgba(255,255,255,0.18); }

.feedback-thanks {
  font-size: 16px;
  color: var(--gold);
}

.feedback-redirect {
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-muted);
}

/* ============ FEAT-028: Updates bubble & panel ============ */

/* Collapsed bubble trigger */
.updates-bubble-trigger {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  z-index: 50;
  transition: transform 0.15s ease, background 0.15s;
}
.updates-bubble-trigger:hover {
  transform: scale(1.05);
  background: rgba(255, 255, 255, 0.18);
}
.updates-bubble-icon {
  font-size: 26px;
  line-height: 1;
}

/* Expanded card */
.updates-bubble-card {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: min(360px, calc(100vw - 40px));
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  background: var(--surface, #1a1a2e);
  color: #eee;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.5);
  padding: 20px;
  z-index: 50;
}
.updates-bubble-close {
  position: absolute;
  top: 8px;
  right: 12px;
  background: transparent;
  border: none;
  font-size: 24px;
  line-height: 1;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  padding: 4px 8px;
}
.updates-bubble-close:hover { color: #fff; }
.updates-bubble-heading {
  margin: 0 0 12px 0;
  font-size: 18px;
  color: #fff;
}

/* Shared panel */
.updates-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.updates-panel-sep {
  border: none;
  border-top: 2px solid rgba(255, 255, 255, 0.25);
  margin: 4px 0;
}

/* Email signup form */
.email-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.email-form-heading {
  margin: 0;
  font-size: 15px;
  font-family: system-ui, -apple-system, sans-serif;
  font-weight: 600;
  color: inherit;
}
.email-form-desc {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted, rgba(255, 255, 255, 0.6));
}
.email-form-input {
  padding: 10px 12px;
  font-size: 14px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  width: 100%;
  box-sizing: border-box;
  background: rgba(0, 0, 0, 0.3);
  color: #fff;
}
.email-form-input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}
.email-form-consent {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted, rgba(255, 255, 255, 0.6));
  cursor: pointer;
}
.email-form-consent input {
  margin-top: 2px;
  flex-shrink: 0;
}
.email-form-error {
  color: #ff6b6b;
  font-size: 13px;
  margin: 0;
}
.email-form-submit {
  align-self: flex-start;
  padding: 10px 24px;
  border-radius: 8px;
  border: none;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  background: var(--green);
  color: #fff;
  transition: background 0.2s, opacity 0.2s;
}
.email-form-submit:hover { background: var(--green-dark); }
.email-form-submit:disabled { opacity: 0.5; cursor: not-allowed; }
.email-form-success {
  padding: 12px;
  background: rgba(46, 125, 50, 0.2);
  border-radius: 6px;
  color: #81c784;
}

/* Unsubscribe standalone page */
.unsubscribe-page {
  max-width: 520px;
  margin: 80px auto;
  padding: 0 20px;
  text-align: center;
  font-family: system-ui, -apple-system, sans-serif;
}
.unsubscribe-page h1 {
  margin-bottom: 16px;
}
.unsubscribe-page a {
  color: #3f51b5;
}

/* Thanks page: adjust spacing now that UpdatesPanel is in */
.thanks-page .updates-panel {
  max-width: 520px;
  margin: 16px auto;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 20px;
  border-radius: 10px;
}
.thanks-actions {
  margin-top: 16px;
  display: flex;
  justify-content: center;
}
.thanks-actions .btn-secondary {
  padding: 10px 28px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted, rgba(255, 255, 255, 0.6));
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s;
}
.thanks-actions .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.thanks-community {
  margin: 32px auto 0;
  padding: 20px;
  max-width: 520px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  text-align: center;
}

.thanks-community-title {
  font-family: 'Press Start 2P', monospace;
  font-size: 14px;
  color: var(--gold);
  text-shadow: 1px 1px 2px #000;
  margin: 0 0 8px;
}

.thanks-community-subtitle {
  margin: 0 0 14px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
}

.thanks-reddit-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 22px;
  border-radius: 8px;
  background: #ff4500;
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  border: 1px solid #ff4500;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}

.thanks-reddit-btn:hover {
  background: #ff5a1f;
  border-color: #ff5a1f;
  color: #fff;
  transform: translateY(-1px);
}

.thanks-reddit-btn .social-icon {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* Mobile tweaks */
@media (max-width: 480px) {
  .updates-bubble-trigger {
    right: 14px;
    bottom: 14px;
    width: 52px;
    height: 52px;
  }
  .updates-bubble-card {
    right: 10px;
    bottom: 10px;
    width: calc(100vw - 20px);
    padding: 16px;
  }
}

/* ───── Timeline page ───── */

.timeline-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

.timeline-title {
  font-family: 'Press Start 2P', monospace;
  font-size: 20px;
  color: var(--gold);
  margin: 0 0 8px;
}

.timeline-intro {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  margin: 0 0 24px;
}

.timeline-login-hint {
  background: rgba(245, 197, 66, 0.1);
  border: 1px solid rgba(245, 197, 66, 0.3);
  color: var(--gold);
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 13px;
  margin: 0 0 24px;
}

.timeline-empty {
  color: rgba(255, 255, 255, 0.5);
  font-style: italic;
  text-align: center;
  padding: 48px 16px;
}

.timeline-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 20px;
}

.clip-card {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  overflow: hidden;
  scroll-margin-top: 20px;
}

/* When the URL hash targets a specific clip (e.g. arrived here from a
   diary entry's "Watch their turn" link), highlight it briefly so the
   user sees which card they're now looking at. */
.clip-card:target {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(245, 197, 66, 0.35);
}

/* Diary block inside a clip card — reads as the player's own note
   attached to the video. Kept visually adjacent to the video so the
   two read as one unit. */
.clip-diary {
  padding: 10px 14px;
  background: rgba(245, 197, 66, 0.06);
  border-top: 1px solid rgba(245, 197, 66, 0.18);
  border-bottom: 1px solid rgba(245, 197, 66, 0.18);
}
.clip-diary-text {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: #eee;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.clip-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  display: block;
}

.clip-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  flex-wrap: wrap;
}

.clip-meta-left,
.clip-meta-right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.clip-player {
  color: var(--gold);
  font-weight: bold;
  font-size: 14px;
  text-decoration: none;
}

a.clip-player:hover {
  text-decoration: underline;
}

.clip-time,
.clip-duration {
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
}

.clip-votes {
  display: flex;
  gap: 6px;
}

.clip-vote-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.7);
  font-family: 'Press Start 2P', monospace;
  font-size: 11px;
  padding: 6px 10px;
  border-radius: 4px;
  cursor: pointer;
  min-width: 60px;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.clip-vote-btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.clip-vote-btn:not(:disabled):hover {
  background: rgba(255, 255, 255, 0.12);
}

.clip-vote-up.active {
  background: rgba(90, 200, 90, 0.2);
  border-color: rgba(90, 200, 90, 0.6);
  color: rgb(140, 230, 140);
}

.clip-vote-down.active {
  background: rgba(220, 80, 80, 0.2);
  border-color: rgba(220, 80, 80, 0.6);
  color: rgb(240, 130, 130);
}

.clip-download {
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  font-size: 18px;
  padding: 4px 8px;
  border-radius: 4px;
}

.clip-download:hover {
  color: var(--gold);
  background: rgba(245, 197, 66, 0.1);
}

.clip-frozen {
  color: rgba(255, 255, 255, 0.4);
  font-size: 11px;
  font-style: italic;
}

.clip-unfreeze {
  color: rgba(255, 255, 255, 0.3);
  font-size: 11px;
}

.timeline-loadmore {
  text-align: center;
  margin-top: 24px;
}

.timeline-loadmore-btn {
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-family: 'Press Start 2P', monospace;
  font-size: 12px;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
}

.timeline-loadmore-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.timeline-loadmore-btn:not(:disabled):hover {
  background: rgba(245, 197, 66, 0.15);
}

@media (max-width: 600px) {
  .clip-meta {
    flex-direction: column;
    align-items: flex-start;
  }
  .clip-meta-right {
    width: 100%;
    justify-content: space-between;
  }
}

/* ───── Landing → Timeline strip link ───── */

.timeline-strip-link {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px auto;
  padding: 10px 14px;
  max-width: 720px;
  background: rgba(245, 197, 66, 0.08);
  border: 1px solid rgba(245, 197, 66, 0.25);
  border-radius: 6px;
  color: var(--gold);
  text-decoration: none;
  font-size: 13px;
  transition: background 0.15s, border-color 0.15s;
}

.timeline-strip-link:hover {
  background: rgba(245, 197, 66, 0.14);
  border-color: rgba(245, 197, 66, 0.45);
}

.timeline-strip-icon {
  font-size: 14px;
  opacity: 0.85;
}

.timeline-strip-label {
  flex: 1;
}

.timeline-strip-arrow {
  opacity: 0.6;
  font-size: 14px;
}

/* --- Profile danger zone (account deletion) --- */
.profile-danger-zone {
  border-color: rgba(255, 68, 68, 0.35);
}

.profile-danger-zone .profile-section-title {
  color: #ff4444;
}

.profile-danger-note {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 12px;
}

.delete-account-btn {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  background: #ff4444;
  color: #fff;
  border: 1px solid #ff4444;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.delete-account-btn:hover {
  background: #cc0000;
  border-color: #cc0000;
}

.delete-account-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* --- Change display name (inline row under profile header) --- */
.change-name-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: -8px 0 16px 0;
  flex-wrap: wrap;
}

.change-name-btn {
  padding: 6px 12px;
  font-size: 11px;
  font-family: inherit;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.change-name-btn:hover {
  color: var(--gold);
  border-color: rgba(245, 197, 66, 0.5);
}

.change-name-success {
  font-size: 12px;
  color: var(--green, #6ab04c);
}

.change-name-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: -8px 0 16px 0;
}

.change-name-input {
  padding: 6px 10px;
  font-size: 14px;
  font-family: inherit;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  color: var(--text);
  min-width: 180px;
}

.change-name-input:focus {
  outline: none;
  border-color: var(--gold);
}

.change-name-save,
.change-name-cancel {
  padding: 6px 14px;
  font-size: 12px;
  font-family: inherit;
  border-radius: 4px;
  cursor: pointer;
  border: 1px solid transparent;
}

.change-name-save {
  background: var(--gold);
  color: #000;
  border-color: var(--gold);
  font-weight: 600;
}

.change-name-save:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.change-name-cancel {
  background: transparent;
  color: var(--text-muted);
  border-color: rgba(255, 255, 255, 0.2);
}

.change-name-cancel:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.4);
}

.change-name-error {
  flex-basis: 100%;
  color: #ff6666;
  font-size: 12px;
  margin-top: 4px;
}

/* ─── /tech deep-dive article ─────────────────────────────────────── */
.tech-page {
  padding-bottom: 48px;
}
.tech-main {
  max-width: 780px;
  margin: 0 auto;
  padding: 24px 20px;
  color: var(--text);
  font-family: 'Segoe UI', system-ui, sans-serif;
  line-height: 1.6;
}
.tech-main h1 {
  color: var(--gold);
  font-size: 2rem;
  line-height: 1.2;
  margin: 12px 0 8px;
}
.tech-main h2 {
  color: var(--gold);
  font-size: 1.35rem;
  margin: 48px 0 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.tech-subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin: 0 0 32px;
  font-style: italic;
}
.tech-main p { margin: 0 0 16px; font-size: 1rem; }
.tech-main ul { margin: 0 0 16px 0; padding-left: 20px; }
.tech-main li { margin-bottom: 8px; }
.tech-main a { color: #8bc9ff; text-decoration: underline; }
.tech-main a:hover { color: var(--gold); }
.tech-main code {
  background: rgba(255,255,255,0.07);
  color: #e8c97a;
  padding: 1px 6px;
  border-radius: 3px;
  font-family: 'Menlo', 'Consolas', monospace;
  font-size: 0.9em;
}
.tech-main pre {
  background: rgba(0,0,0,0.45);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 4px;
  padding: 14px 16px;
  overflow-x: auto;
  margin: 0 0 20px;
}
.tech-main pre code {
  background: transparent;
  color: #d8d8d8;
  padding: 0;
  font-size: 0.85em;
  line-height: 1.5;
}
.tech-main section { margin-bottom: 12px; }
.tech-diagram {
  display: flex;
  justify-content: center;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 4px;
  padding: 16px;
  margin: 12px 0 24px;
  overflow-x: auto;
}
.tech-diagram svg {
  max-width: 100%;
  height: auto;
}
.tech-stack-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  margin: 12px 0 20px;
}
.tech-stack-table th,
.tech-stack-table td {
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}
.tech-stack-table th {
  color: var(--gold);
  font-weight: 600;
  border-bottom: 2px solid rgba(255,255,255,0.15);
}
@media (max-width: 640px) {
  .tech-main { padding: 16px 14px; font-size: 0.95rem; }
  .tech-main h1 { font-size: 1.5rem; }
  .tech-main h2 { font-size: 1.15rem; margin-top: 36px; }
}

/* Unsubscribe URL shown after successful email signup */
.email-form-unsub {
  margin-top: 12px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.04);
  border: 1px dashed rgba(245,197,66,0.25);
  border-radius: 4px;
}
.email-form-unsub-label {
  font-size: 11px;
  color: var(--text-muted);
  margin: 0 0 6px;
}
.email-form-unsub-url {
  width: 100%;
  padding: 6px 8px;
  font-family: 'Menlo', 'Consolas', monospace;
  font-size: 11px;
  background: rgba(0,0,0,0.3);
  color: #e8c97a;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 3px;
  user-select: all;
}
.email-form-unsub-url:focus { outline: 1px solid var(--gold); }
.email-form-unsub-msg { margin-top: 8px; font-size: 12px; }

/* Server-rendered unsubscribe form page (/unsubscribe with no token) */
.unsubscribe-page {
  max-width: 520px;
  margin: 48px auto;
  padding: 24px;
  font-family: 'Segoe UI', system-ui, sans-serif;
  color: var(--text);
}
.unsubscribe-page h1 {
  color: var(--gold);
  font-size: 1.4rem;
  margin-bottom: 16px;
}

/* --- KarmaBadge: inline pill next to player names --- */
.karma-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: 6px;
  padding: 1px 6px;
  font-size: 11px;
  font-weight: 700;
  font-family: 'Menlo', 'Consolas', monospace;
  border-radius: 10px;
  vertical-align: baseline;
  line-height: 1.2;
}
.karma-badge.karma-pos {
  background: rgba(245, 197, 66, 0.18);
  color: #f5c542;
  border: 1px solid rgba(245, 197, 66, 0.35);
}
.karma-badge.karma-neg {
  background: rgba(255, 85, 85, 0.15);
  color: #ff7a7a;
  border: 1px solid rgba(255, 85, 85, 0.35);
}
.karma-icon { font-size: 10px; }
.karma-num { font-size: 11px; }

@media (max-width: 480px) {
  .karma-badge { font-size: 10px; padding: 0 5px; margin-left: 4px; }
  .karma-icon { font-size: 9px; }
}

/* --- Home strip: 4 condensed columns under the stream --- */
.home-strip {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 16px;
  align-items: start; /* let each column size to its content; the diary col can be taller */
}
@media (min-width: 768px) {
  .home-strip { grid-template-columns: 1fr 1fr 1fr 1fr; }
}
.home-strip-col {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 6px;
  padding: 10px 12px;
  min-width: 0;
}
.home-strip-title {
  font-size: 11px;
  letter-spacing: 0.5px;
  color: var(--gold);
  margin: 0 0 8px;
}
.home-strip-title a { color: inherit; text-decoration: none; }
.home-strip-title a:hover { text-decoration: underline; }
.home-strip-list { list-style: none; padding: 0; margin: 0; }
.home-strip-row { padding: 4px 0; border-bottom: 1px solid rgba(255,255,255,0.04); }
.home-strip-row:last-child { border-bottom: 0; }
.home-strip-rowlink {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-decoration: none;
  color: inherit;
}
.home-strip-rowlink:hover .home-strip-name { color: var(--gold); }
.home-strip-name {
  font-size: 13px;
  color: #eee;
  font-weight: 600;
}
.home-strip-meta {
  font-size: 11px;
  color: var(--text-muted);
  font-family: 'Menlo', 'Consolas', monospace;
}
.home-strip-empty,
.home-strip-loading {
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
  padding: 6px 0;
}
.home-strip-col-diary { display: flex; flex-direction: column; min-height: 0; }
.home-strip-diary-scroll {
  max-height: 200px; /* fits ~2-3 entries, matches the height of the user-list columns */
  overflow-y: auto;
  margin: 0 -4px; /* breathing room for scrollbar */
  padding: 0 4px;
}
.home-strip-diary-entry {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.home-strip-diary-entry:last-child { border-bottom: 0; }
.home-strip-diary-text {
  font-size: 13px;
  line-height: 1.45;
  color: #ddd;
  white-space: pre-wrap;
  word-wrap: break-word;
  margin: 0 0 4px;
}
.home-strip-diary-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
}
.home-strip-diary-sentinel { height: 1px; }

/* --- CondensedQueue: single-row replacement for QueueSection on home --- */
.condensed-queue {
  margin-top: 16px;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 6px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 13px;
  overflow-x: auto;
}
.condensed-queue-label {
  color: var(--gold);
  letter-spacing: 1px;
  font-weight: 700;
  font-size: 11px;
  flex-shrink: 0;
}
.condensed-queue-active {
  color: var(--text-muted);
  font-size: 11px;
  font-family: 'Menlo', 'Consolas', monospace;
  flex-shrink: 0;
}
.condensed-queue-empty {
  color: var(--text-muted);
  font-style: italic;
}
.condensed-queue-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  flex: 1;
  min-width: 0;
}
.condensed-queue-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.condensed-queue-item.is-you .condensed-queue-name {
  color: var(--gold);
  font-weight: 700;
}
.condensed-queue-pos {
  font-family: 'Menlo', 'Consolas', monospace;
  font-size: 11px;
  color: var(--text-muted);
}
.condensed-queue-name { color: #eee; }
.condensed-queue-you {
  font-size: 10px;
  color: var(--gold);
  margin-left: 2px;
}

/* --- Banned modal: full-screen blocker shown when /auth/me reports banned --- */
.banned-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.banned-modal-card {
  background: var(--bg-card, #1a1a1a);
  border: 1px solid rgba(255,85,85,0.45);
  border-radius: 8px;
  padding: 24px 28px;
  max-width: 440px;
  text-align: center;
  box-shadow: 0 8px 40px rgba(0,0,0,0.6);
}
.banned-modal-title {
  margin: 0 0 12px;
  color: #ff7a7a;
  font-size: 18px;
  font-weight: 700;
}
.banned-modal-body {
  margin: 0 0 16px;
  color: #ddd;
  font-size: 14px;
  line-height: 1.5;
}
.banned-modal-close {
  background: rgba(255,255,255,0.08);
  color: #eee;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 4px;
  padding: 6px 18px;
  font-size: 13px;
  cursor: pointer;
}
.banned-modal-close:hover { background: rgba(255,255,255,0.14); }

/* --- Removed-clip placeholder on the timeline --- */
.clip-removed {
  aspect-ratio: 16 / 9;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(0,0,0,0.4);
  color: #aaa;
  border: 1px dashed rgba(255,85,85,0.3);
  border-radius: 4px;
  text-align: center;
  padding: 16px;
}
.clip-removed-icon { font-size: 24px; color: #ff7a7a; }
.clip-removed-text { font-size: 13px; font-style: italic; }
