:root {
  --bg: #111418;
  --surface: #1b1f26;
  --surface-2: #242a33;
  --text: #e6e9ef;
  --muted: #9aa4b2;
  --accent: #5b8cff;
  --danger: #ff5b5b;
  --radius: 10px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 16px 80px;
}

header.site-header {
  padding: 24px 16px 0;
  text-align: center;
}

header.site-header h1 {
  margin: 0;
  font-size: 1.8rem;
}

header.site-header p {
  color: var(--muted);
  margin: 8px 0 0;
}

.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px;
  margin-top: 24px;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  margin-top: 16px;
}

input[type="text"],
input[type="password"],
textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius);
  border: 1px solid #333a45;
  background: var(--surface-2);
  color: var(--text);
  font-size: 1rem;
}

textarea {
  resize: vertical;
  min-height: 70px;
}

button {
  cursor: pointer;
  border: none;
  border-radius: var(--radius);
  padding: 10px 18px;
  font-size: 1rem;
  font-weight: 600;
  background: var(--accent);
  color: #0b0e14;
}

button.secondary {
  background: var(--surface-2);
  color: var(--text);
}

button.danger {
  background: var(--danger);
  color: #1a0606;
}

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

.actions {
  margin-top: 20px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.captcha-box {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
}

.captcha-box svg {
  display: block;
  border-radius: var(--radius);
  background: #fff;
}

.captcha-box button {
  padding: 10px 14px;
  font-size: 1.2rem;
  line-height: 1;
}

.result-box {
  margin-top: 24px;
}

.result-box .field {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.result-box input {
  flex: 1;
  font-family: monospace;
}

.warning {
  background: #3a2e0f;
  border: 1px solid #6b5316;
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-top: 16px;
  font-size: 0.9rem;
}

.error {
  color: var(--danger);
  margin-top: 12px;
}

.success {
  color: #6fe3a1;
}

.album-header h1 {
  margin: 0 0 4px;
}

.album-header p {
  color: var(--muted);
  margin: 0 0 16px;
}

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

.photo {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface-2);
  aspect-ratio: 1 / 1;
}

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

.photo .delete-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(20, 20, 20, 0.7);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  font-size: 1rem;
  line-height: 1;
  padding: 0;
}

.empty {
  color: var(--muted);
  margin-top: 20px;
}

.dropzone {
  border: 2px dashed #3a4250;
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  color: var(--muted);
  margin-top: 20px;
  transition: border-color 0.15s ease;
}

.dropzone.dragover {
  border-color: var(--accent);
  color: var(--text);
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.lightbox img {
  max-width: 95vw;
  max-height: 95vh;
  border-radius: 6px;
}

.lightbox .close {
  position: absolute;
  top: 16px;
  right: 24px;
  background: transparent;
  color: #fff;
  font-size: 2rem;
}

.lightbox .nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(20, 20, 20, 0.5);
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  width: 52px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
}

.lightbox .nav.prev {
  left: 16px;
}

.lightbox .nav.next {
  right: 16px;
}

.lightbox .nav:hover {
  background: rgba(20, 20, 20, 0.85);
}

.lightbox-counter {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  background: rgba(20, 20, 20, 0.5);
  padding: 4px 12px;
  border-radius: var(--radius);
  font-size: 0.9rem;
}

.hidden {
  display: none !important;
}

footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 40px;
}
