@import url("https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;600;700&family=Syne:wght@400;600;700;800&display=swap");

:root {
  --bg-deep: #0a0c10;
  --bg-panel: #12161f;
  --bg-elevated: #181e2a;
  --bg-hover: #1f2736;
  --border: rgba(148, 163, 184, 0.12);
  --border-strong: rgba(148, 163, 184, 0.22);
  --text: #e8edf5;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --accent: #5eead4;
  --accent-strong: #2dd4bf;
  --accent-glow: rgba(94, 234, 212, 0.18);
  --accent-warm: #fbbf24;
  --danger: #f87171;
  --success: #4ade80;
  --server: #60a5fa;
  --both: #a78bfa;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --font-display: "Syne", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-display);
  color: var(--text);
  background:
    radial-gradient(circle at 15% 10%, rgba(94, 234, 212, 0.08), transparent 28%),
    radial-gradient(circle at 85% 0%, rgba(167, 139, 250, 0.07), transparent 24%),
    radial-gradient(circle at 50% 100%, rgba(96, 165, 250, 0.05), transparent 30%),
    linear-gradient(180deg, #0b0e14 0%, var(--bg-deep) 100%);
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at center, black, transparent 85%);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent-strong);
}

img {
  max-width: 100%;
}

.page-shell {
  position: relative;
  z-index: 1;
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 4rem;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  background: rgba(18, 22, 31, 0.72);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand-mark {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(94, 234, 212, 0.18), rgba(167, 139, 250, 0.12)),
    var(--bg-elevated);
  border: 1px solid var(--border-strong);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  font-size: 1.5rem;
}

.brand-copy h1 {
  margin: 0;
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.brand-copy p {
  margin: 0.2rem 0 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.nav-links {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  font-weight: 600;
  font-size: 0.92rem;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}

.nav-link:hover {
  transform: translateY(-1px);
  border-color: rgba(94, 234, 212, 0.35);
  background: rgba(94, 234, 212, 0.08);
  color: var(--text);
}

.nav-link.is-active {
  border-color: rgba(94, 234, 212, 0.45);
  background: rgba(94, 234, 212, 0.12);
  box-shadow: 0 0 0 1px rgba(94, 234, 212, 0.08);
}

.hero-panel,
.form-panel,
.list-panel {
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 6px);
  background: rgba(18, 22, 31, 0.78);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.hero-panel {
  padding: 2rem;
  margin-bottom: 1.5rem;
}

.hero-panel h2,
.form-panel h2,
.list-panel h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  letter-spacing: -0.03em;
}

.hero-panel p,
.panel-subtitle {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 70ch;
}

.status-banner {
  display: none;
  margin-top: 1.25rem;
  padding: 0.95rem 1.1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.03);
  font-family: var(--font-mono);
  font-size: 0.92rem;
}

.status-banner.is-visible {
  display: block;
}

.status-banner.success {
  border-color: rgba(74, 222, 128, 0.35);
  background: rgba(74, 222, 128, 0.08);
  color: var(--success);
}

.status-banner.error {
  border-color: rgba(248, 113, 113, 0.35);
  background: rgba(248, 113, 113, 0.08);
  color: var(--danger);
}

.status-banner.info {
  border-color: rgba(94, 234, 212, 0.35);
  background: rgba(94, 234, 212, 0.08);
  color: var(--accent);
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.stat-card {
  padding: 1rem 1.1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
}

.stat-label {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--text-dim);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stat-value {
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 700;
}

.layout-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.5rem;
}

.form-panel,
.list-panel {
  padding: 1.75rem;
}

.form-stack {
  display: grid;
  gap: 1.1rem;
  margin-top: 1.5rem;
}

.field {
  display: grid;
  gap: 0.45rem;
}

.field label {
  font-size: 0.92rem;
  font-weight: 600;
}

.field small {
  color: var(--text-dim);
  font-size: 0.82rem;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.9rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: rgba(10, 12, 16, 0.85);
  color: var(--text);
  font: inherit;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: rgba(94, 234, 212, 0.55);
  box-shadow: 0 0 0 4px var(--accent-glow);
  background: rgba(10, 12, 16, 0.95);
}

.field input::placeholder {
  color: var(--text-dim);
}

.radio-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.radio-card {
  position: relative;
}

.radio-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.radio-card label {
  display: grid;
  gap: 0.25rem;
  padding: 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    transform 0.2s ease,
    background 0.2s ease;
}

.radio-card label strong {
  font-size: 0.98rem;
}

.radio-card label span {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.radio-card input:checked + label {
  border-color: rgba(94, 234, 212, 0.45);
  background: rgba(94, 234, 212, 0.08);
  transform: translateY(-1px);
}

.button-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.btn {
  appearance: none;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.95rem 1.25rem;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    opacity 0.2s ease;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-primary {
  color: #04120f;
  background: linear-gradient(135deg, var(--accent), #34d399);
  box-shadow: 0 12px 30px rgba(94, 234, 212, 0.18);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 16px 36px rgba(94, 234, 212, 0.24);
}

.btn-secondary {
  color: var(--text);
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.03);
}

.btn-secondary:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(148, 163, 184, 0.35);
}

.list-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(74, 222, 128, 0.25);
  background: rgba(74, 222, 128, 0.08);
  color: var(--success);
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 12px currentColor;
  animation: pulse 1.8s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.45;
    transform: scale(0.85);
  }
}

.submissions-layout {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.submission-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 1.15rem 1.2rem;
  border-radius: calc(var(--radius) + 2px);
  border: 1px solid var(--border);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015)),
    rgba(15, 18, 26, 0.92);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.submission-card.is-new {
  border-color: rgba(94, 234, 212, 0.35);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 0 0 1px rgba(94, 234, 212, 0.08),
    0 18px 40px rgba(94, 234, 212, 0.08);
}

.avatar {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--accent);
  background: rgba(94, 234, 212, 0.08);
  border: 1px solid rgba(94, 234, 212, 0.18);
}

.card-main {
  min-width: 0;
}

.card-username {
  margin: 0 0 0.35rem;
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.85rem;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 0.84rem;
}

.type-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid transparent;
}

.type-badge.server {
  color: #bfdbfe;
  background: rgba(96, 165, 250, 0.12);
  border-color: rgba(96, 165, 250, 0.25);
}

.type-badge.both {
  color: #ddd6fe;
  background: rgba(167, 139, 250, 0.12);
  border-color: rgba(167, 139, 250, 0.25);
}

.empty-state {
  padding: 2.5rem 1.5rem;
  text-align: center;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  color: var(--text-muted);
}

.empty-state strong {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text);
  font-size: 1.1rem;
}

.recent-preview {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.recent-preview h3 {
  margin: 0 0 1rem;
  font-size: 1rem;
}

.recent-list {
  display: grid;
  gap: 0.75rem;
}

.recent-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}

.recent-item strong {
  font-size: 0.95rem;
}

.recent-item span {
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.site-footer {
  margin-top: 2rem;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.88rem;
}

@media (max-width: 900px) {
  .layout-grid {
    grid-template-columns: 1fr;
  }

  .stats-row {
    grid-template-columns: 1fr;
  }

  .submission-card {
    grid-template-columns: 1fr;
  }

  .site-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 1rem, 1120px);
    padding-top: 1rem;
  }

  .radio-group {
    grid-template-columns: 1fr;
  }
}
