/* Astro Nier Moon: the look both tools share (colours, font, header, tabs, panels, buttons).
   The calendar bundles this file (src/app/globals.css @imports it); the static /names page
   links /site.css. Change it here once and both pages follow. */

:root {
  --background: #0f172a;
  --foreground: #f8fafc;
  --card-bg: #1e293b;
  --border: #334155;
  --accent: #f59e0b;
  --accent-hover: #d97706;
  --text-muted: #94a3b8;
  --success: #34d399;
  --warning: #fbbf24;
  --error: #f87171;
  /* Latin in Segoe UI, Japanese in Yu Gothic UI on Windows; the platform's own fonts elsewhere */
  --font-ui: 'Segoe UI', 'Yu Gothic UI', 'Hiragino Sans', 'Noto Sans JP', system-ui, -apple-system, sans-serif;
}

html {
  color-scheme: dark;
}

body {
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

[hidden] {
  display: none !important;
}

/* Header: site name, one line about the page, actions, then the two tools as equal tabs */
.header {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  padding: 1.5rem 1.5rem 0;
  display: flex;
  flex-wrap: wrap;
  row-gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.header-brand {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.header-home {
  /* Site name; links to the moon calendar (/) like a usual logo */
  color: var(--foreground);
  text-decoration: none;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
}

.header-home:hover {
  color: var(--accent);
  text-decoration: none;
}

.header-tagline {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 400;
  line-height: 1.4;
}

.header-actions {
  display: flex;
  gap: 0.5rem;
}

.header-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--foreground);
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-family: inherit;
  font-size: 0.85rem;
  line-height: 1.2;
  text-decoration: none;
  transition: all 0.2s;
}

.header-btn:hover {
  background: var(--border);
  text-decoration: none;
}

.site-tabs {
  flex-basis: 100%;
  display: flex;
  gap: 0.25rem;
}

.site-tab {
  /* Sized to the label, so the space between labels is even (equal boxes left uneven gaps) */
  flex: 0 1 auto;
  text-align: center;
  padding: 0.6rem 1.25rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}

.site-tab:hover {
  color: var(--foreground);
  text-decoration: none;
}

.site-tab[aria-current="page"] {
  color: var(--foreground);
  border-bottom-color: var(--accent);
}

@media (max-width: 480px) {
  .header {
    padding: 0.75rem 0.5rem 0;
  }
}

/* Panels and buttons */
.panel {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
}

.btn {
  background: var(--accent);
  color: #1a1205;
  border: 0;
  border-radius: 8px;
  padding: 0.5rem 1rem;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: all 0.2s;
}

.btn:hover {
  background: var(--accent-hover);
  text-decoration: none;
}

.btn.ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}

.btn.ghost:hover {
  background: rgba(245, 158, 11, 0.1);
}

.btn[disabled] {
  opacity: 0.45;
  cursor: default;
}

/* A long tab name gets a short form on narrow screens */
.site-tab .tab-short {
  display: none;
}

@media (max-width: 480px) {
  .site-tab .tab-long {
    display: none;
  }

  .site-tab .tab-short {
    display: inline;
  }

  .site-tab {
    padding-left: 0.6rem;
    padding-right: 0.6rem;
  }
}
