:root {
  --bg: #06111c;
  --panel: #0e2336cc;
  --line: #6ce0f43f;
  --text: #e9f7ff;
  --subtext: #9cc7d7;
  --accent: #54f0b8;
  --warn: #f3bf5f;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: "Sora", "Segoe UI", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 20% 5%, #164669 0%, transparent 35%),
    radial-gradient(circle at 85% 10%, #2a1e4f 0%, transparent 40%),
    linear-gradient(140deg, #06111c 0%, #03101a 45%, #081c2a 100%);
  min-height: 100vh;
}

.bg-blur {
  position: fixed;
  width: 28vw;
  height: 28vw;
  border-radius: 50%;
  filter: blur(55px);
  opacity: 0.2;
  z-index: 0;
  pointer-events: none;
}

.bg-blur-a {
  background: #5df3ca;
  top: -6vw;
  left: -4vw;
}

.bg-blur-b {
  background: #8e7bff;
  bottom: -10vw;
  right: -5vw;
}

.page {
  position: relative;
  z-index: 1;
  width: min(1320px, 94vw);
  margin: 0 auto;
  padding: 2.4rem 0 2rem;
}

.hero {
  position: relative;
  margin-bottom: 1.2rem;
}

.login-top-btn {
  position: absolute;
  top: 0.1rem;
  right: 0;
  text-decoration: none;
  border: 1px solid #76d8ea45;
  color: #bce7f4;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  font-size: 0.9rem;
}

.login-top-btn:hover {
  border-color: #7aeaff8c;
  color: #e9f8ff;
}

.eyebrow {
  margin: 0;
  color: var(--subtext);
  font-family: "IBM Plex Mono", "Cascadia Mono", monospace;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
}

h1 {
  margin: 0.35rem 0 0.5rem;
  font-size: clamp(1.45rem, 2.6vw, 2.65rem);
  line-height: 1.12;
}

.accent {
  color: var(--accent);
}

.hero-sub {
  margin: 0 0 0.9rem;
  color: var(--subtext);
}

.actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.page-tabs {
  display: flex;
  gap: 0.6rem;
  margin: 0.3rem 0 0.9rem;
}

.catalog-summary {
  margin: 0 0 0.95rem;
  color: var(--subtext);
  font-size: 0.95rem;
}

.catalog-progress {
  margin: -0.35rem 0 0.95rem;
  color: #b5d9e6;
  font-size: 0.9rem;
}

.tab-btn {
  text-decoration: none;
  border: 1px solid #76d8ea45;
  color: #bce7f4;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  font-size: 0.92rem;
}

.tab-btn.active {
  color: #072139;
  background: linear-gradient(135deg, #5ef5ca, #4ac6ff);
  border-color: transparent;
  font-weight: 700;
}

button {
  border: 1px solid transparent;
  background: linear-gradient(135deg, #5ef5ca, #4ac6ff);
  color: #072139;
  border-radius: 999px;
  padding: 0.58rem 1rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  cursor: pointer;
}

button:hover {
  transform: translateY(-1px);
}

.status-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.48rem 0.86rem;
  color: var(--subtext);
  font-size: 0.9rem;
}

.meta {
  margin-top: 0.78rem;
  color: var(--subtext);
  font-size: 0.9rem;
  line-height: 1.5;
}

.rank-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(560px, 1fr);
  gap: 0.9rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
}

.rank-strip.two-col {
  grid-auto-flow: row;
  grid-auto-columns: unset;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow-x: visible;
}

.rank-card {
  min-height: 380px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  backdrop-filter: blur(12px);
  padding: 0.95rem;
}

.panel h2 {
  margin: 0.05rem 0 0.55rem;
  font-size: 1.08rem;
}

.panel h3 {
  margin: 0.8rem 0 0.45rem;
  font-size: 0.94rem;
  color: #b5d9e6;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

th,
td {
  border-bottom: 1px solid #8acbe129;
  padding: 0.4rem 0.35rem;
  text-align: left;
  vertical-align: top;
}

th {
  color: #95c6d7;
  font-weight: 700;
  white-space: nowrap;
}

td.money,
td.percent,
td.rank {
  font-family: "IBM Plex Mono", "Cascadia Mono", monospace;
  white-space: nowrap;
}

td.name {
  min-width: 220px;
}

td.time {
  min-width: 150px;
  white-space: nowrap;
  font-family: "IBM Plex Mono", "Cascadia Mono", monospace;
}

.muted {
  color: #8fb7c7;
  font-size: 0.76rem;
}

.empty {
  color: var(--warn);
  font-size: 0.88rem;
  padding: 0.3rem 0;
}

.article-page .hero {
  margin-bottom: 1rem;
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.article-card h2 {
  margin: 0 0 0.45rem;
  font-size: 1.05rem;
}

.article-card h2 a {
  color: #dcf6ff;
  text-decoration: none;
}

.article-card h2 a:hover {
  color: #7aeaff;
}

.article-summary {
  margin: 0 0 0.55rem;
  color: #c7e7f5;
  line-height: 1.5;
}

.article-meta {
  margin: 0.25rem 0 0.55rem;
  color: #96bfd0;
  font-size: 0.85rem;
}

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.article-tag {
  display: inline-flex;
  align-items: center;
  border: 1px solid #79dbeb40;
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  font-size: 0.78rem;
  color: #a5d8e8;
}

.article-detail {
  padding: 1.1rem;
}

.article-detail h2 {
  margin: 0.05rem 0 0.45rem;
}

.article-content {
  margin-top: 0.9rem;
  line-height: 1.75;
  color: #def4ff;
  white-space: pre-wrap;
  word-break: break-word;
}

.article-footer {
  margin-top: 1rem;
}

.article-form-panel {
  padding: 1.05rem;
}

.article-form {
  display: grid;
  gap: 0.75rem;
}

.article-form label {
  display: grid;
  gap: 0.35rem;
  color: #b8dcea;
  font-size: 0.9rem;
}

.article-form input,
.article-form textarea {
  width: 100%;
  border: 1px solid #7ce7f14a;
  border-radius: 10px;
  background: #092132d4;
  color: #e7f8ff;
  padding: 0.58rem 0.68rem;
  font-family: "Sora", "Segoe UI", sans-serif;
  font-size: 0.92rem;
}

.article-form textarea {
  resize: vertical;
  min-height: 280px;
  line-height: 1.6;
}

.article-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.article-submit-msg {
  color: #a9d7e8;
  font-size: 0.9rem;
}

@media (max-width: 980px) {
  .login-top-btn {
    top: -0.1rem;
    font-size: 0.84rem;
    padding: 0.4rem 0.8rem;
  }
  .panel {
    padding: 0.8rem;
  }
  .rank-strip {
    grid-auto-columns: minmax(500px, 1fr);
  }
  .rank-strip.two-col {
    grid-template-columns: minmax(0, 1fr);
  }
  .article-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
