:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #08090d;
  color: #f5f7fb;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top, #24345f 0, #08090d 42rem);
}

header, main {
  width: min(960px, calc(100% - 32px));
  margin: 0 auto;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0;
}

.logo {
  color: #fff;
  font-weight: 800;
  letter-spacing: -0.04em;
  text-decoration: none;
}

nav {
  display: flex;
  gap: 16px;
}

nav a {
  color: #c9d4ff;
  text-decoration: none;
}

nav a:hover { color: #fff; }

.hero, .card {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 28px;
  background: rgba(8, 9, 13, 0.72);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

.hero {
  margin-top: 48px;
  padding: clamp(32px, 8vw, 80px);
}

.card {
  margin-top: 32px;
  padding: 28px;
}

h1 {
  max-width: 760px;
  margin: 0 0 20px;
  font-size: clamp(44px, 8vw, 84px);
  line-height: 0.92;
  letter-spacing: -0.07em;
}

h2 { margin-top: 0; }

p {
  max-width: 680px;
  color: #d9def6;
  font-size: 18px;
  line-height: 1.65;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.button, button {
  border: 0;
  border-radius: 999px;
  background: #7c9cff;
  color: #081029;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 800;
  padding: 13px 20px;
  text-decoration: none;
}

.button.secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

input[type="file"] {
  width: 100%;
  border: 1px dashed rgba(255, 255, 255, 0.28);
  border-radius: 18px;
  padding: 28px;
}

.upload-progress {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.upload-progress-row {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  padding: 12px;
}

.upload-progress-row strong,
.upload-progress-row span {
  overflow-wrap: anywhere;
}

.upload-progress-row progress {
  width: 100%;
}

.upload-progress-row.success span { color: #9ff0be; }
.upload-progress-row.error span { color: #ff9a9a; }

.status {
  margin-top: 18px;
  color: #d9def6;
}

.status.error { color: #ff9a9a; }
.status.success { color: #9ff0be; }

.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.duplicate-badge {
  display: inline-block;
  background: rgba(255, 138, 138, 0.18);
  color: #ff8f8f;
  border: 1px solid rgba(255, 138, 138, 0.3);
  border-radius: 999px;
  font-size: 11px;
  padding: 2px 8px;
  margin-left: 6px;
  vertical-align: middle;
}

.notice {
  border-left: 4px solid #ffd166;
  padding-left: 16px;
}

gallery, .gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.media-card {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
  padding: 12px;
}

.media-card img,
.media-card video {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 12px;
  background: #000;
}

.media-card p {
  margin: 10px 0 0;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.admin-form {
  display: grid;
  gap: 10px;
  max-width: 420px;
}

input[type="password"] {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font: inherit;
  padding: 12px 14px;
}

button.danger {
  background: #ff8f8f;
  color: #260808;
  margin-top: 12px;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.presenter-settings {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-top: 24px;
}

.presenter-settings label {
  display: grid;
  gap: 8px;
  color: #d9def6;
  font-weight: 700;
}

.presenter-settings select {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font: inherit;
  padding: 12px 14px;
}

.settings-help {
  margin: 16px 0 0;
  color: #c9d4ff;
  font-size: 15px;
}

.checkbox-label {
  align-content: end;
  grid-template-columns: auto 1fr;
}

.checkbox-label input {
  margin: 4px 0 0;
}

.presenter {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: #02030a;
  color: #fff;
}

.presenter-stage {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 48px;
}

.presenter-single-wrap {
  display: grid;
  justify-items: center;
}

.presenter-image {
  max-width: 100%;
  max-height: calc(100vh - 120px);
  object-fit: contain;
  border-radius: 18px;
  box-shadow: 0 24px 120px rgba(124, 156, 255, 0.22);
}

.presenter-collage-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
}

.presenter-collage {
  position: relative;
  width: min(1700px, calc(100vw - 96px));
  height: calc(100vh - 96px);
}

.presenter-collage img,
.presenter-collage video {
  object-fit: contain;
  border-radius: 14px;
  background: #000;
  box-shadow: 0 12px 60px rgba(124, 156, 255, 0.18);
}

.presenter-caption {
  position: fixed;
  right: 32px;
  bottom: 24px;
  max-width: min(720px, calc(100vw - 64px));
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 16px;
  text-align: right;
}

.presenter-close {
  position: fixed;
  right: 24px;
  top: 24px;
  z-index: 1001;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.presenter-qr {
  display: grid;
  justify-items: center;
  gap: 24px;
  text-align: center;
}

.presenter-qr h2 {
  margin: 0;
  font-size: clamp(42px, 7vw, 92px);
  letter-spacing: -0.06em;
}

.presenter-qr img {
  width: min(420px, 70vw);
  height: min(420px, 70vw);
  border: 18px solid #fff;
  border-radius: 24px;
  background: #fff;
}

.presenter-qr p {
  margin: 0;
  max-width: none;
  color: #d9def6;
  font-size: clamp(20px, 3vw, 34px);
}

.presenter-settings-badge {
  position: fixed;
  left: 24px;
  bottom: 24px;
  max-width: calc(100vw - 48px);
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.48);
  color: rgba(255, 255, 255, 0.82);
  font-size: 15px;
  padding: 8px 12px;
}

body.presenter-active {
  overflow: hidden;
}

/* Upload processing/completed sections */
.upload-section { margin-top: 18px; }

.upload-section-label {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}

/* Admin tabs */
.admin-tabs {
  display: flex;
  gap: 8px;
  margin-top: 24px;
}

.tab-btn {
  background: rgba(255, 255, 255, 0.08);
  color: #c9d4ff;
  border-radius: 999px;
  padding: 8px 18px;
  font-weight: 600;
  font-size: 14px;
}

.tab-btn.tab-active {
  background: #7c9cff;
  color: #081029;
}

/* Bulk action bar */
.bulk-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
}

.bulk-select-all {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.selection-count {
  font-size: 13px;
  color: #c9d4ff;
  min-width: 80px;
}

.bulk-btn {
  padding: 8px 16px;
  font-size: 13px;
  border-radius: 999px;
}

/* Admin list view */
.media-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

.media-row {
  display: grid;
  grid-template-columns: 24px 72px 1fr auto;
  align-items: center;
  gap: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  padding: 10px 14px;
}

.row-checkbox {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: #7c9cff;
}

.row-thumb {
  width: 72px;
  height: 52px;
  object-fit: cover;
  border-radius: 8px;
  background: #000;
}

.row-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.row-name {
  font-size: 14px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.row-meta {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  overflow-wrap: anywhere;
}

.row-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.row-actions button {
  padding: 7px 14px;
  font-size: 13px;
}

.list-empty {
  color: rgba(255, 255, 255, 0.45);
  font-size: 15px;
  text-align: center;
  padding: 32px 0;
}
