:root {
  --bg: #09090b;
  --bg-elevated: rgba(24, 24, 27, 0.72);
  --bg-elevated-hover: rgba(30, 30, 35, 0.86);
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.18);
  --text: #fafafa;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --accent: #6366f1;
  --accent-soft: rgba(99, 102, 241, 0.16);
  --emerald: #10b981;
  --amber: #f59e0b;
  --rose: #f43f5e;
  --radius: 16px;
  --radius-sm: 10px;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'PingFang SC', 'Helvetica Neue', sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

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

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  position: relative;
  overflow-x: hidden;
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(99, 102, 241, 0.14), transparent 70%),
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 100% 100%, 36px 36px, 36px 36px;
  background-attachment: fixed;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  color: inherit;
  cursor: pointer;
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 28px 20px 64px;
}

/* Top Navigation Bar */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-icon {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: block;
  flex-shrink: 0;
}

.brand-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.8);
}

.brand-title {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.brand-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-left: 8px;
}

.nav-pills {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-pill {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--text-secondary);
  border: 1px solid transparent;
  transition: all 0.18s ease;
}

.nav-pill:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.nav-pill.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-hover);
}

.clock-box {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-secondary);
}

.clock-time {
  color: var(--text);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

/* Cards */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--bg-elevated);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
}

.card-interactive:hover {
  border-color: var(--border-hover);
  background: var(--bg-elevated-hover);
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 12px 32px -12px rgba(0, 0, 0, 0.65);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.card-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 16px;
}

.tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  padding: 3px 8px;
  border-radius: 6px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  transition: all 0.18s ease;
}

.btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-hover);
}

.btn-primary {
  background: rgba(99, 102, 241, 0.2);
  border-color: rgba(99, 102, 241, 0.45);
  color: #e0e7ff;
}

.btn-primary:hover {
  background: rgba(99, 102, 241, 0.32);
  border-color: rgba(99, 102, 241, 0.7);
}

.btn-sm {
  padding: 5px 10px;
  font-size: 12px;
  border-radius: 8px;
}

/* Bento Grid on Home */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
}

.col-span-4 { grid-column: span 4; }
.col-span-5 { grid-column: span 5; }
.col-span-6 { grid-column: span 6; }
.col-span-7 { grid-column: span 7; }
.col-span-8 { grid-column: span 8; }
.col-span-12 { grid-column: span 12; }

.tool-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.09);
  margin-bottom: 14px;
}

.tool-title {
  margin: 0 0 6px;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.tool-desc {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.arrow-hint {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  transition: transform 0.2s ease, color 0.2s ease;
}

.card-interactive:hover .arrow-hint {
  color: var(--text);
  transform: translate(2px, -2px);
}

/* Home Daily Vinyl Preview */
.vinyl-preview {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-top: 4px;
}

.vinyl-thumb-wrap {
  position: relative;
  width: 96px;
  height: 96px;
  flex-shrink: 0;
}

.vinyl-thumb {
  width: 96px;
  height: 96px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.5);
  position: relative;
  z-index: 2;
  background: #18181b;
}

.vinyl-disc-mini {
  position: absolute;
  top: 6px;
  right: -18px;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #18181b 0 14%, #6366f1 14% 26%, #111 27% 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  z-index: 1;
  transition: transform 0.35s ease;
}

.card-interactive:hover .vinyl-disc-mini {
  transform: translateX(6px) rotate(45deg);
}

.vinyl-meta {
  min-width: 0;
  padding-left: 12px;
}

.vinyl-meta h3 {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vinyl-meta .artist {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.vinyl-meta .snippet {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Home NBA Strip */
.nba-mini-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 6px;
}

.nba-mini-game {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-family: var(--font-mono);
  font-size: 12px;
}

.nba-mini-status {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 6px;
  display: flex;
  justify-content: space-between;
}

.nba-mini-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  line-height: 1.6;
}

.live-badge {
  color: var(--rose);
  font-weight: 600;
}

/* Scratchpad */
.scratchpad {
  width: 100%;
  min-height: 92px;
  resize: vertical;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.6;
  outline: none;
  transition: border-color 0.18s ease;
}

.scratchpad:focus {
  border-color: rgba(99, 102, 241, 0.55);
}

.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quick-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 10px;
  font-size: 13px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: var(--text-secondary);
  transition: all 0.18s ease;
}

.quick-link:hover {
  color: var(--text);
  border-color: var(--border-hover);
  background: rgba(255, 255, 255, 0.07);
}

.footer {
  margin-top: 36px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* Responsive */
@media (max-width: 900px) {
  .col-span-4,
  .col-span-5,
  .col-span-6,
  .col-span-7,
  .col-span-8 {
    grid-column: span 12;
  }

  .nba-mini-list {
    grid-template-columns: 1fr;
  }

  .topbar {
    flex-wrap: wrap;
  }

  .brand-sub {
    display: none;
  }
}
