:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #eef2ff;
  background: #070b14;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(circle at top right, rgba(44, 86, 140, 0.22), transparent 32rem),
    #070b14;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a,
input,
select,
textarea {
  border-radius: 7px;
}

[v-cloak] {
  display: none;
}

.app-shell {
  width: min(1500px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 48px;
}

.page-header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}

.eyebrow {
  margin: 0 0 4px;
  color: #8fb7ee;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 8px;
  font-size: clamp(2rem, 5vw, 3.4rem);
  letter-spacing: -0.045em;
}

.subtitle {
  max-width: 800px;
  margin-bottom: 0;
  color: #abb6ca;
  line-height: 1.55;
}

code {
  color: #dbeafe;
}

.category-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.category-button,
.download-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 9px 14px;
  border: 1px solid #334155;
  background: #111827;
  color: #e5e7eb;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
}

.category-button:hover,
.download-button:hover {
  border-color: #6b8cb6;
  background: #172033;
}

.category-button.is-active {
  border-color: #93c5fd;
  background: #20304a;
  box-shadow: 0 0 0 1px rgba(147, 197, 253, 0.3);
}

.toolbar {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

.field {
  display: grid;
  gap: 6px;
  color: #aeb9cc;
  font-size: 0.82rem;
  font-weight: 700;
}

.field-search {
  flex: 1 1 320px;
}

input[type="search"],
select,
textarea {
  border: 1px solid #334155;
  background: #0c1220;
  color: #eef2ff;
}

input[type="search"],
select {
  min-height: 42px;
  padding: 9px 11px;
}

textarea {
  width: 100%;
  min-width: 240px;
  resize: vertical;
  padding: 8px 10px;
  line-height: 1.35;
}

input[type="search"]:focus,
select:focus,
textarea:focus,
button:focus-visible,
a:focus-visible {
  outline: 2px solid #93c5fd;
  outline-offset: 2px;
}

.summary-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 14px;
  padding: 16px 18px;
  border: 1px solid #263247;
  border-radius: 10px;
  background: rgba(12, 18, 32, 0.8);
}

.summary-panel h2 {
  margin-bottom: 4px;
}

.summary-panel p {
  margin-bottom: 0;
  color: #9eabc1;
}

.counter {
  flex: 0 0 auto;
  color: #c7d2fe;
  white-space: nowrap;
}

.counter strong {
  font-size: 1.35rem;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid #263247;
  border-radius: 10px;
  background: rgba(8, 13, 24, 0.9);
}

table {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
}

th,
td {
  padding: 12px;
  border-bottom: 1px solid #1f2937;
  vertical-align: middle;
  text-align: left;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #111827;
  color: #cbd5e1;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

tbody tr:hover {
  background: rgba(30, 41, 59, 0.52);
}

tbody tr:last-child td {
  border-bottom: 0;
}

.watch-column,
.watch-cell {
  width: 66px;
  text-align: center;
}

.watch-cell input {
  width: 20px;
  height: 20px;
  accent-color: #60a5fa;
  cursor: pointer;
}

.rank-column,
.rank-cell {
  width: 54px;
  color: #8692a8;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.type-column {
  width: 150px;
}

.notes-column {
  width: 36%;
}

.movie-title {
  font-weight: 690;
}

.movie-title.watched {
  color: #7f8ba0;
  text-decoration: line-through;
}

.state-message {
  padding: 24px;
  color: #aeb9cc;
  text-align: center;
}

.error-message {
  border: 1px solid #7f1d1d;
  border-radius: 10px;
  background: #2a1115;
  color: #fecaca;
}

footer {
  padding-top: 18px;
  color: #758198;
  font-size: 0.82rem;
}

footer p {
  margin-bottom: 0;
}

@media (max-width: 700px) {
  .app-shell {
    width: min(100% - 20px, 1500px);
    padding-top: 20px;
  }

  .category-controls {
    display: grid;
    grid-template-columns: 1fr;
  }

  .category-button {
    justify-content: flex-start;
  }

  .summary-panel {
    align-items: flex-start;
    flex-direction: column;
  }

  .counter {
    white-space: normal;
  }

  .download-button {
    width: 100%;
  }
}
