:root {
  --bg: #0a0e16;
  --bg-elev: #101820;
  --bg-card: rgba(14, 20, 30, 0.72);
  --line: #2a3548;
  --text: #e8eef7;
  --muted: #8b9bb0;
  --accent: #ff4655;
  --accent-soft: rgba(255, 70, 85, 0.16);
  --ok: #3dd68c;
  --danger: #ff8f7a;
  --radius: 4px;
  --font: "IBM Plex Sans JP", system-ui, sans-serif;
  --brand: "Orbitron", "IBM Plex Sans JP", sans-serif;
  --hud: #ff4655;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
  max-width: 100%;
  color: var(--text);
  font-family: var(--font);
  line-height: 1.5;
}

body.theme-a {
  background-color: var(--bg);
  background-image:
    radial-gradient(900px 480px at 8% -8%, rgba(255, 70, 85, 0.14), transparent 55%),
    radial-gradient(700px 400px at 100% 0%, rgba(255, 70, 85, 0.05), transparent 50%),
    /* fine dots */
    radial-gradient(rgba(255, 255, 255, 0.07) 0.7px, transparent 0.8px),
    /* soft grid */
    linear-gradient(rgba(255, 70, 85, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 70, 85, 0.03) 1px, transparent 1px);
  background-size:
    auto,
    auto,
    18px 18px,
    48px 48px,
    48px 48px;
  background-attachment: fixed;
  position: relative;
}

.messages,
.main,
.site-footer {
  position: relative;
  z-index: 1;
}

.site-chrome {
  position: sticky;
  top: 0;
  z-index: 20;
}

a {
  color: #9ec1ff;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 1.25rem;
  border-bottom: 1px solid rgba(255, 70, 85, 0.22);
  background: rgba(10, 14, 22, 0.92);
  backdrop-filter: blur(10px);
  min-height: 52px;
  box-sizing: border-box;
}

.brand {
  display: inline-flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: baseline;
  gap: 0;
  font-family: var(--brand);
  font-weight: 700;
  text-decoration: none;
  background: transparent;
  padding: 0;
  line-height: 1.2;
  white-space: nowrap;
}

.brand-valorant {
  color: #ff4655;
  font-size: 0.88rem;
  letter-spacing: 0.02em;
}

.brand-ranking {
  color: #e8eef7;
  font-weight: 600;
  font-size: 0.88rem;
  letter-spacing: 0.04em;
}

.brand:hover {
  text-decoration: none;
}

.brand:hover .brand-valorant {
  color: #ff5c69;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: nowrap;
  flex-shrink: 0;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  appearance: none;
  -webkit-appearance: none;
  font-family: var(--font);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  border-radius: 2px;
  padding: 0.48rem 0.7rem;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.nav-btn:hover {
  text-decoration: none;
}

.nav-btn-primary {
  background: #ff4655;
  color: #0a0e16;
  border-color: #ff4655;
}

.nav-btn-primary:hover {
  background: #ff5c69;
  border-color: #ff5c69;
  color: #0a0e16;
}

.nav-btn-outline {
  background: transparent;
  color: #ff4655;
  border-color: #ff4655;
}

.nav-btn-outline:hover {
  background: rgba(255, 70, 85, 0.12);
  color: #ff5c69;
  border-color: #ff5c69;
}

.nav-btn-ghost {
  background: transparent;
  color: var(--muted);
  border-color: rgba(139, 155, 176, 0.35);
}

.nav-btn-ghost:hover {
  color: var(--text);
  border-color: rgba(232, 238, 247, 0.35);
  background: rgba(255, 255, 255, 0.04);
}

.inline-form {
  display: inline-flex;
  margin: 0;
}

/* legacy aliases if any */
.nav-link {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 500;
}

.btn-link {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.tabs {
  display: flex;
  width: 100%;
  margin: 0;
  padding: 0;
  border-bottom: 1px solid rgba(255, 70, 85, 0.2);
  background: rgba(10, 14, 22, 0.94);
  backdrop-filter: blur(10px);
}

.tab {
  flex: 1 1 0;
  min-width: 0;
  text-align: center;
  padding: 0.8rem 0.35rem;
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  color: var(--muted);
  background: transparent;
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
}

.tab:hover {
  color: var(--text);
  text-decoration: none;
  background: rgba(255, 70, 85, 0.04);
}

.tab.is-active {
  color: var(--text);
  font-weight: 600;
  border-bottom-color: #ff4655;
  background: transparent;
}

@media (max-width: 520px) {
  .site-header {
    min-height: 48px;
    padding: 0.55rem 0.75rem;
  }

  .brand-valorant,
  .brand-ranking {
    font-size: 0.8rem;
  }

  .nav-btn {
    font-size: 0.68rem;
    padding: 0.4rem 0.5rem;
  }

  .nav-actions {
    gap: 0.3rem;
  }

  .main {
    padding: 0.85rem 0.5rem 1.25rem;
    max-width: 100%;
  }

  .tab {
    font-size: 0.75rem;
    padding: 0.65rem 0.1rem;
  }

  .clip-card {
    width: 100%;
    max-width: 100%;
    padding: 0.45rem;
  }

  .hud-frame {
    padding: 6px;
  }

  .clip-stats {
    font-size: 0.7rem;
  }

  .site-footer {
    padding: 1rem 0.5rem;
    max-width: 100%;
  }
}

.messages {
  padding: 0.75rem 1.25rem 0;
}

.message {
  margin: 0 0 0.5rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  font-size: 0.9rem;
}

.message-success {
  border-color: rgba(61, 214, 140, 0.4);
  color: var(--ok);
}

.message-error {
  border-color: rgba(255, 143, 122, 0.45);
  color: var(--danger);
}

.main {
  max-width: 540px;
  width: 100%;
  margin: 0 auto;
  padding: 1.1rem 0.75rem 1.5rem;
  overflow-x: clip;
}

.feed {
  width: 100%;
  max-width: 100%;
}

.clip-list {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 1.5rem;
  width: 100%;
  max-width: 100%;
}

.clip-card {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid rgba(255, 70, 85, 0.12);
  border-radius: 2px;
  padding: 0.65rem;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

.clip-card-top {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.55rem;
  min-height: 1.75rem;
  width: 100%;
}

.clip-card-heading {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  min-width: 0;
  flex: 1 1 auto;
}

.rank {
  font-family: var(--brand);
  color: var(--accent);
  font-size: 1.15rem;
  font-weight: 700;
  flex: 0 0 auto;
  line-height: 1;
}

.clip-stats {
  color: var(--muted);
  font-size: 0.75rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stats-label {
  margin-right: 0.25rem;
  color: rgba(232, 238, 247, 0.75);
}

.accent-num {
  color: #ff4655;
  font-weight: 600;
  font-family: var(--brand);
  font-size: 0.78rem;
}

.report-menu {
  position: relative;
  flex: 0 0 auto;
  margin-left: auto;
}

.report-toggle {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid #ff4655 !important;
  border-radius: 2px;
  background: transparent !important;
  color: #ff4655 !important;
  font-family: var(--font);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  padding: 0.4rem 0.55rem;
  letter-spacing: 0.02em;
}

.report-toggle:hover,
.report-toggle[aria-expanded="true"] {
  background: rgba(255, 70, 85, 0.15) !important;
  color: #ff4655 !important;
  filter: none;
}

.report-panel {
  position: absolute;
  top: calc(100% + 0.35rem);
  right: 0;
  z-index: 40;
  width: min(240px, 78vw);
  padding: 0.7rem;
  border-radius: 4px;
  border: 1px solid rgba(255, 70, 85, 0.35);
  background: #0f1520;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5);
}

.report-panel[hidden] {
  display: none !important;
}

.report-form {
  display: grid;
  gap: 0.5rem;
}

.report-form label {
  display: grid;
  gap: 0.25rem;
  font-size: 0.75rem;
  color: var(--muted);
}

.menu-source {
  margin-top: 0.55rem;
}

.source-link {
  display: inline-block;
  margin-top: 0.55rem;
  font-size: 0.75rem;
  color: var(--muted);
}

.empty, .hint {
  color: var(--muted);
  font-size: 0.92rem;
}

/* --- HUD red technical frame around X embed --- */
.hud-frame {
  position: relative;
  padding: 10px;
  background: rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.hud-seg {
  position: absolute;
  background: var(--hud);
  pointer-events: none;
  z-index: 2;
}

.hud-seg-t-l {
  top: 0;
  left: 0;
  height: 2px;
  width: 38%;
}

.hud-seg-t-r {
  top: 0;
  right: 0;
  height: 2px;
  width: 38%;
}

.hud-seg-b-l {
  bottom: 0;
  left: 0;
  height: 2px;
  width: 38%;
}

.hud-seg-b-r {
  bottom: 0;
  right: 0;
  height: 2px;
  width: 38%;
}

.hud-seg-l-t {
  top: 0;
  left: 0;
  width: 2px;
  height: 34%;
}

.hud-seg-l-b {
  bottom: 0;
  left: 0;
  width: 2px;
  height: 34%;
}

.hud-seg-r-t {
  top: 0;
  right: 0;
  width: 2px;
  height: 34%;
}

.hud-seg-r-b {
  bottom: 0;
  right: 0;
  width: 2px;
  height: 34%;
}

.hud-corner {
  position: absolute;
  width: 12px;
  height: 12px;
  pointer-events: none;
  z-index: 3;
  border-color: var(--hud);
  border-style: solid;
}

.hud-corner-tl {
  top: -1px;
  left: -1px;
  border-width: 2px 0 0 2px;
}

.hud-corner-tr {
  top: -1px;
  right: -1px;
  border-width: 2px 2px 0 0;
}

.hud-corner-bl {
  bottom: -1px;
  left: -1px;
  border-width: 0 0 2px 2px;
}

.hud-corner-br {
  bottom: -1px;
  right: -1px;
  border-width: 0 2px 2px 0;
}

.embed-wrap {
  position: relative;
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border-radius: 0;
  line-height: 0;
  background: #000;
}

.embed-click-catcher {
  position: absolute;
  inset: 0;
  z-index: 5;
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  cursor: pointer;
}

.embed-wrap .twitter-tweet,
.embed-wrap twitter-widget,
.embed-wrap iframe {
  margin: 0 auto !important;
  max-width: 100% !important;
  width: 100% !important;
}

.btn-small {
  padding: 0.45rem 0.7rem;
  font-size: 0.8rem;
}

.auth-card, .legal {
  background: var(--bg-card);
  border: 1px solid rgba(255, 70, 85, 0.2);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.auth-card h1, .legal h1 {
  margin: 0 0 0.75rem;
  font-size: 1.25rem;
}

.legal h2 {
  margin: 1.1rem 0 0.4rem;
  font-size: 1rem;
}

.feed-intro {
  margin: 0 0 1rem;
  padding: 0.75rem 0.85rem;
  color: var(--muted);
  font-size: 0.86rem;
  border: 1px solid rgba(255, 70, 85, 0.18);
  background: rgba(14, 20, 30, 0.55);
  border-radius: var(--radius);
}

.stack-form {
  display: grid;
  gap: 0.85rem;
}

.stack-form label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.check-row {
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 0.55rem;
}

.input, select.input, textarea.input {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
  border-radius: 4px;
  padding: 0.7rem 0.8rem;
  font: inherit;
}

.input:focus {
  outline: 2px solid rgba(255, 70, 85, 0.35);
  border-color: var(--accent);
}

.btn {
  border: 0;
  border-radius: 4px;
  padding: 0.75rem 1rem;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.btn:hover {
  filter: brightness(1.05);
}

.btn-secondary {
  background: transparent;
  border: 1px solid rgba(255, 70, 85, 0.45);
  color: var(--text);
}

.field-error, .form-errors {
  color: var(--danger);
  font-size: 0.85rem;
}

.help {
  color: var(--muted);
  font-size: 0.8rem;
}

.site-footer {
  max-width: 540px;
  margin: 2rem auto 0;
  padding: 1.25rem 0.75rem;
  border-top: 1px solid rgba(255, 70, 85, 0.18);
  color: var(--muted);
  font-size: 0.78rem;
}

.site-footer a {
  color: var(--muted);
}

.disclaimer-en {
  font-size: 0.7rem;
  line-height: 1.45;
}
