* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: system-ui, sans-serif;
  background: #111417;
  color: #e6e8eb;
  min-height: 100vh;
}

/* --- login --- */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 280px;
  background: #1a1e23;
  padding: 2rem;
  border-radius: 12px;
}

/* --- brand --- */
.brand {
  display: flex;
  align-items: baseline;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: 1.35rem;
}

.brand .media { color: #fff; }
.brand .force { color: #5fa8f5; }
.brand sup { font-size: 0.6rem; margin-left: 2px; opacity: 0.75; font-weight: 600; }

.brand-lg { font-size: 1.75rem; justify-content: center; }

.brand-subtitle {
  text-align: center;
  color: #9aa4af;
  font-size: 0.85rem;
  margin-top: -0.25rem;
  margin-bottom: 0.5rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.login-card h1 { font-size: 1.25rem; margin-bottom: 0.5rem; }

.login-card input {
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  border: 1px solid #333;
  background: #0f1216;
  color: #fff;
  font-size: 1rem;
}

.login-card button, #newScreenForm button, .upload-form button, .secondary, .thumb button {
  padding: 0.6rem 1rem;
  border-radius: 8px;
  border: none;
  background: #2563eb;
  color: #fff;
  font-size: 0.95rem;
  cursor: pointer;
}

.secondary { background: #2a2f36; }

.error { color: #f87171; font-size: 0.85rem; }

/* --- admin shell --- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  background: #0d2b52;
}

.topbar-brand { display: flex; flex-direction: column; gap: 0.15rem; }
.topbar .brand-subtitle { text-align: left; margin: 0; }

#app {
  max-width: 900px;
  margin: 0 auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.new-screen-card, .screen-card {
  background: #1a1e23;
  border-radius: 12px;
  padding: 1.25rem;
}

.new-screen-card h2, .screen-header h2 { font-size: 1rem; font-weight: 600; margin-bottom: 0.75rem; }

#newScreenForm { display: flex; gap: 0.5rem; }

#newScreenForm input {
  flex: 1;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  border: 1px solid #333;
  background: #0f1216;
  color: #fff;
}

.screen-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.screen-header-left { display: flex; align-items: center; gap: 0.75rem; }

.screen-link { color: #60a5fa; text-decoration: none; font-size: 0.85rem; }

.toggle-btn {
  background: none;
  border: 1px solid #333;
  color: #c3c9d1;
  border-radius: 6px;
  padding: 0.2rem 0.6rem;
  font-size: 0.8rem;
  cursor: pointer;
}

.screen-card.collapsed .upload-form,
.screen-card.collapsed .interval-form,
.screen-card.collapsed .thumb-grid {
  display: none;
}

.upload-form { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1rem; flex-wrap: wrap; }

.upload-status { font-size: 0.85rem; color: #9aa4af; }

.interval-form { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 1rem; flex-wrap: wrap; font-size: 0.9rem; color: #c3c9d1; }

.interval-input {
  width: 70px;
  padding: 0.4rem 0.5rem;
  border-radius: 8px;
  border: 1px solid #333;
  background: #0f1216;
  color: #fff;
}

.interval-status { font-size: 0.85rem; color: #9aa4af; }

.thumb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.75rem;
}

.thumb {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 16/10;
  background: #0f1216;
}

.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.thumb button {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(220, 38, 38, 0.9);
  padding: 0.2rem 0.5rem;
  font-size: 0.75rem;
  border-radius: 6px;
}

.empty-note { color: #9aa4af; font-size: 0.85rem; }
