/* ===== Design System — 四时造物 Onv13 ATELIER ===== */
:root {
  --bg: #121214;
  --panel: #1a1a1d;
  --panel2: #1e1e21;
  --panel3: #252529;
  --accent: #d4a373;
  --accent2: #b8845a;
  --accent-bg: rgba(212, 163, 115, 0.12);
  --accent-glow: rgba(212, 163, 115, 0.18);
  --text: #e4e4e7;
  --text2: #a1a1aa;
  --text3: #71717a;
  --border: #242428;
  --border2: #2a2a2e;
  --danger: #ef4444;
  --danger-bg: rgba(239, 68, 68, 0.12);
  --success: #22c55e;
  --success-bg: rgba(34, 197, 94, 0.12);
  --radius: 16px;
  --radius-sm: 12px;
  --radius-lg: 24px;
  --radius-pill: 9999px;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.24);
  --shadow: 0 8px 24px rgba(0,0,0,0.32);
  --shadow-md: 0 16px 40px rgba(0,0,0,0.40);
  --shadow-lg: 0 24px 70px rgba(0,0,0,0.48);
  --max-w: 520px;
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
button { font-family: inherit; }
input, textarea { font-family: inherit; }

/* ===== Ambient Background ===== */
#ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.18;
}

.ambient-orb.a {
  width: 520px; height: 520px;
  background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
  top: -160px; right: -140px;
  animation: orbFloat 24s ease-in-out infinite alternate;
}

.ambient-orb.b {
  width: 480px; height: 480px;
  background: radial-gradient(circle, #6b5b95 0%, transparent 70%);
  bottom: -180px; left: -120px;
  animation: orbFloat 28s ease-in-out infinite alternate-reverse;
}

.ambient-orb.c {
  width: 360px; height: 360px;
  background: radial-gradient(circle, rgba(212,163,115,0.6) 0%, transparent 70%);
  top: 45%; left: 55%;
  animation: orbFloat 20s ease-in-out infinite alternate;
}

@keyframes orbFloat {
  0% { transform: translate3d(0,0,0) scale(1); }
  100% { transform: translate3d(40px,-30px,0) scale(1.12); }
}

.ambient-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 72px 72px;
  opacity: 0.06;
  mask-image: radial-gradient(circle at 50% 35%, black 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(circle at 50% 35%, black 0%, transparent 70%);
  animation: gridPulse 14s ease-in-out infinite;
}

@keyframes gridPulse {
  0%, 100% { opacity: 0.04; }
  50% { opacity: 0.09; }
}

/* ===== Layout ===== */
.container {
  position: relative;
  z-index: 1;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== Nav ===== */
.nav {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(18, 18, 20, 0.78);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(36, 36, 40, 0.6);
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: opacity var(--transition), transform var(--transition);
}

.nav-logo:hover { opacity: 0.85; transform: scale(1.02); }

.nav-logo img {
  height: 30px;
  width: auto;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.3));
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  padding: 9px 18px;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  text-decoration: none;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--accent);
  color: #000;
  box-shadow: 0 4px 14px rgba(212, 163, 115, 0.25);
}
.btn-primary:hover { background: var(--accent2); box-shadow: 0 6px 18px rgba(212, 163, 115, 0.32); }

.btn-ghost {
  background: transparent;
  color: var(--text2);
  border: 1px solid var(--border2);
}
.btn-ghost:hover { background: var(--panel2); border-color: var(--border); color: var(--text); }

.btn-soft {
  background: var(--panel2);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-soft:hover { background: var(--panel3); border-color: var(--border2); }

.btn-danger {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.2);
}
.btn-danger:hover { background: rgba(239, 68, 68, 0.18); }

.btn-block { width: 100%; padding: 12px; }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 10px;
  font-size: 15px;
  background: rgba(30, 30, 33, 0.9);
  color: var(--text);
  border: 1px solid var(--border2);
  backdrop-filter: blur(8px);
}
.btn-icon:hover { background: var(--panel3); border-color: var(--accent); color: var(--accent); }

/* ===== Hero ===== */
.hero {
  position: relative;
  z-index: 1;
  padding: 56px 0 40px;
  text-align: center;
}

.hero-logo {
  width: 180px;
  max-width: 62vw;
  margin: 0 auto 22px;
  filter: drop-shadow(0 8px 30px rgba(0,0,0,0.22));
  animation: heroLogoBreathe 5s ease-in-out infinite;
}

@keyframes heroLogoBreathe {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 8px 30px rgba(0,0,0,0.22)); }
  50% { transform: scale(1.02); filter: drop-shadow(0 12px 42px rgba(0,0,0,0.28)); }
}

.hero-name {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.6px;
  margin-bottom: 6px;
}

.hero-name span { color: var(--accent); }

.hero-title {
  font-size: 15px;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 12px;
  letter-spacing: 0.3px;
}

.hero-intro {
  font-size: 14px;
  color: var(--text2);
  max-width: 340px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ===== Filter ===== */
.filter-bar {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding: 4px;
  background: var(--panel2);
  border: 1px solid var(--border);
  border-radius: 14px;
  margin-bottom: 22px;
}
.filter-bar::-webkit-scrollbar { display: none; }

.filter-tab {
  flex: 1;
  padding: 9px 18px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  background: transparent;
  color: var(--text2);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
}

.filter-tab:hover { color: var(--text); }

.filter-tab.active {
  background: var(--accent);
  color: #000;
  box-shadow: 0 4px 12px rgba(212, 163, 115, 0.22);
}

/* ===== Projects ===== */
.projects-section { position: relative; z-index: 1; padding: 8px 0 48px; }

.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: start;
}

.project-card {
  background: var(--panel);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition);
  border: 1px solid var(--border);
  position: relative;
}

.project-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.project-card:active { transform: scale(0.98); }

.project-cover {
  width: 100%;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, var(--panel2), var(--panel3));
  overflow: hidden;
  position: relative;
}

.project-cover.vertical {
  aspect-ratio: 9/16;
}

.project-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.project-card:hover .project-cover img { transform: scale(1.04); }

.project-cover-empty {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
  opacity: 0.2;
}

.project-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.18);
  transition: background var(--transition);
}

.project-card:hover .project-play { background: rgba(0,0,0,0.08); }

.project-play svg {
  width: 56px;
  height: 56px;
  color: #fff;
  filter: drop-shadow(0 4px 16px rgba(0,0,0,0.4));
  opacity: 0.92;
  transition: transform var(--transition), opacity var(--transition);
}

.project-card:hover .project-play svg {
  transform: scale(1.08);
  opacity: 1;
}

.project-body { padding: 16px; }

.project-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-bg);
  padding: 4px 10px;
  border-radius: 6px;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  border: 1px solid rgba(212, 163, 115, 0.15);
}

.project-title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: -0.2px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.project-desc {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.project-date {
  font-size: 12px;
  color: var(--text3);
  margin-top: 10px;
}

/* Admin buttons on card */
.project-admin {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  gap: 8px;
  z-index: 5;
}

.project-admin .btn-icon {
  background: rgba(18, 18, 20, 0.85);
  color: #fff;
  border-color: rgba(255,255,255,0.1);
  box-shadow: var(--shadow-sm);
}

.project-admin .btn-icon:hover { background: var(--accent); color: #000; border-color: var(--accent); }

/* ===== Add Card (Admin) ===== */
.add-card {
  border: 2px dashed var(--border2);
  background: transparent;
  border-radius: var(--radius);
  padding: 36px 20px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  color: var(--text3);
}

.add-card:hover {
  border-color: var(--accent);
  background: var(--accent-bg);
  color: var(--accent);
}

.add-card-icon { font-size: 32px; margin-bottom: 10px; opacity: 0.7; }
.add-card-text { font-size: 14px; font-weight: 600; }

/* ===== Empty State ===== */
.empty {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 70px 20px;
  color: var(--text3);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.empty-icon { font-size: 48px; margin-bottom: 14px; opacity: 0.25; }
.empty-text { font-size: 14px; }

/* ===== Loading ===== */
.loading {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 60px 20px;
  color: var(--text3);
  font-size: 14px;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 2.5px solid var(--border2);
  border-top-color: var(--accent);
  border-radius: 50%;
  margin: 0 auto 14px;
  animation: spin 0.8s linear infinite;
}

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

/* ===== Contact ===== */
.contact {
  position: relative;
  z-index: 1;
  padding: 36px 0 28px;
  text-align: center;
  border-top: 1px solid var(--border);
  margin-top: 24px;
}

.contact h3 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 18px;
  color: var(--text);
}

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text2);
}

.contact-item a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

/* ===== Footer ===== */
.footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 24px 20px 32px;
  font-size: 12px;
  color: var(--text3);
}

.footer a { color: var(--text2); text-decoration: none; }
.footer a:hover { color: var(--accent); }

/* ===== Admin Toolbar ===== */
.admin-bar {
  position: relative;
  z-index: 1;
  background: var(--panel);
  color: var(--text);
  padding: 12px 16px;
  display: none;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-w);
  margin: 0 auto 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.admin-bar.show { display: flex; }

.admin-bar-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
}

.admin-bar-badge {
  background: var(--success);
  width: 7px;
  height: 7px;
  border-radius: 50%;
  box-shadow: 0 0 8px var(--success);
}

.admin-bar-actions {
  display: flex;
  gap: 8px;
}

.admin-bar-actions .btn {
  background: var(--panel2);
  color: var(--text);
  padding: 6px 14px;
  font-size: 13px;
  border: 1px solid var(--border2);
}

.admin-bar-actions .btn:hover { background: var(--panel3); border-color: var(--accent); color: var(--accent); }

/* ===== Modal ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.72);
  z-index: 100;
  display: none;
  justify-content: center;
  align-items: flex-end;
  animation: fadeIn 0.2s ease;
  backdrop-filter: blur(4px);
}

.modal-overlay.active { display: flex; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: var(--panel);
  width: 100%;
  max-width: var(--max-w);
  max-height: 92vh;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  animation: slideUp 0.35s cubic-bezier(0.32, 0.72, 0, 1);
  border-top: 1px solid var(--border2);
}

@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

.modal-header {
  position: sticky;
  top: 0;
  background: var(--panel);
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 10;
}

.modal-title {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.modal-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: var(--panel2);
  font-size: 16px;
  cursor: pointer;
  color: var(--text2);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.modal-close:hover { background: var(--panel3); color: var(--text); }

.modal-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-body { padding: 20px; }

/* ===== Share Modal ===== */
.share-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  background: var(--panel2);
  padding: 4px;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.share-tab {
  flex: 1;
  padding: 9px 12px;
  border: none;
  background: transparent;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text2);
  cursor: pointer;
  transition: all var(--transition);
}

.share-tab.active {
  background: var(--accent);
  color: #000;
  box-shadow: 0 2px 8px rgba(212, 163, 115, 0.2);
}

.share-qr {
  text-align: center;
  padding: 16px;
  background: #fff;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  margin-bottom: 16px;
}

.share-qr img {
  display: inline-block;
  width: 180px;
  height: 180px;
}

.share-link-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.share-link-row .form-input {
  flex: 1;
  font-size: 13px;
}

.share-link-row .btn { white-space: nowrap; }

/* ===== Project Detail ===== */
.detail-title { font-size: 24px; font-weight: 800; margin-bottom: 8px; letter-spacing: -0.4px; }

.detail-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.detail-tag {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-bg);
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(212, 163, 115, 0.15);
}

.detail-date { font-size: 13px; color: var(--text3); }

.detail-desc {
  font-size: 15px;
  color: var(--text);
  line-height: 1.8;
  white-space: pre-wrap;
  margin-bottom: 24px;
}

/* Gallery */
.gallery {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.gallery-item {
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--panel2);
  border: 1px solid var(--border);
}

.gallery-item img { width: 100%; cursor: pointer; transition: opacity var(--transition); }
.gallery-item img:hover { opacity: 0.9; }

.gallery-item video { width: 100%; max-height: 80vh; background: #000; }

.gallery-item.vertical video {
  max-height: 70vh;
}

.gallery-item.vertical iframe {
  aspect-ratio: 9/16;
}

.gallery-item iframe {
  width: 100%;
  aspect-ratio: 16/9;
  border: none;
}

/* ===== Forms ===== */
.form-group { margin-bottom: 18px; }

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 7px;
  color: var(--text);
}

.form-label .req { color: var(--danger); }

.form-input,
.form-textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  outline: none;
  transition: all var(--transition);
  background: var(--panel2);
  color: var(--text);
  resize: vertical;
}

.form-input::placeholder,
.form-textarea::placeholder { color: var(--text3); }

.form-input:focus,
.form-textarea:focus { border-color: var(--accent); background: var(--panel); }

.form-textarea { line-height: 1.6; }

.form-hint {
  font-size: 12px;
  color: var(--text3);
  margin-top: 6px;
}

/* Upload row */
.upload-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.upload-row .form-input { flex: 1; }

.upload-sep {
  font-size: 12px;
  color: var(--text3);
  white-space: nowrap;
}

/* Video Dropzone */
.video-dropzone {
  display: block;
  width: 100%;
  box-sizing: border-box;
  border: 2px dashed var(--border2);
  border-radius: var(--radius-sm);
  padding: 32px 18px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  background: var(--panel2);
}

.video-dropzone:hover {
  border-color: var(--accent);
  background: var(--accent-bg);
}

.video-dropzone.drag-over {
  border-color: var(--accent);
  background: var(--accent-bg);
}

.video-dropzone-icon {
  font-size: 36px;
  margin-bottom: 10px;
  opacity: 0.7;
}

.video-dropzone-text {
  font-size: 14px;
  color: var(--text);
  font-weight: 500;
}

.video-dropzone-hint {
  font-size: 12px;
  color: var(--text3);
  margin-top: 7px;
}

/* Upload Progress */
.upload-progress {
  margin: 14px 0;
  padding: 14px;
  background: var(--panel2);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.upload-progress-track {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 10px;
}

.upload-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 3px;
  transition: width 0.3s ease;
}

.upload-progress-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.upload-progress-info {
  font-size: 12px;
  color: var(--text3);
  margin-top: 3px;
}

/* Video Preview */
.video-preview { margin-top: 12px; }

.video-preview-item {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #000;
  border: 1px solid var(--border);
}

.video-preview-item video,
.video-preview-item iframe {
  width: 100%;
  aspect-ratio: 16/9;
  border: none;
  display: block;
}

.video-preview-item.vertical {
  display: flex;
  justify-content: center;
}

.video-preview-item.vertical video,
.video-preview-item.vertical iframe {
  aspect-ratio: 9/16;
  max-height: 34vh;
  max-width: 100%;
  width: auto;
}

.video-remove-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(0,0,0,0.6);
  color: #fff;
  border: none;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  transition: background var(--transition);
}

.video-remove-btn:hover { background: rgba(0,0,0,0.85); }

.video-actions {
  margin-top: 10px;
  display: flex;
  gap: 8px;
}

/* Orientation Selector */
.orientation-group {
  margin-top: 14px;
}

.orientation-selector {
  display: flex;
  gap: 10px;
}

.category-selector {
  display: flex;
  gap: 10px;
}

.category-btn,
.orientation-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 12px;
  border: 2px solid var(--border2);
  border-radius: var(--radius-sm);
  background: var(--panel2);
  color: var(--text2);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.category-btn:hover,
.orientation-btn:hover {
  border-color: var(--border);
  color: var(--text);
}

.orientation-btn.active {
  border-color: var(--accent);
  background: var(--accent-bg);
  color: var(--accent);
}

.category-btn.active {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(212, 163, 115, 0.22);
}

.orient-icon-h {
  display: block;
  width: 32px;
  height: 20px;
  border: 2px solid currentColor;
  border-radius: 3px;
}

.orient-icon-v {
  display: block;
  width: 20px;
  height: 32px;
  border: 2px solid currentColor;
  border-radius: 3px;
}

/* Image preview */
.img-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.img-thumb {
  position: relative;
  width: 76px;
  height: 76px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--panel2);
  border: 1px solid var(--border);
}

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

.img-thumb-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(0,0,0,0.65);
  color: #fff;
  border: none;
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Login form */
.login-form { padding: 8px 0; }

.login-form .form-group { margin-bottom: 14px; }

.login-error {
  font-size: 13px;
  color: var(--danger);
  margin-bottom: 12px;
  display: none;
}

.login-error.show { display: block; }

/* Editor actions */
.editor-actions {
  display: flex;
  gap: 10px;
  margin-top: 26px;
  padding-bottom: 20px;
}

.editor-actions .btn { flex: 1; padding: 12px; }

/* Settings sections */
.settings-section { margin-bottom: 28px; }
.settings-section:last-child { margin-bottom: 0; }

.settings-section h3 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

/* Data tab */
.data-section { margin-bottom: 24px; }

.data-section p {
  font-size: 13px;
  color: var(--text2);
  margin-bottom: 12px;
  line-height: 1.6;
}

/* ===== Image Preview Overlay ===== */
.preview-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  animation: fadeIn 0.2s ease;
}

.preview-overlay img {
  max-width: 95%;
  max-height: 90vh;
  border-radius: 8px;
}

/* ===== Toast ===== */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--panel2);
  color: var(--text);
  padding: 11px 26px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  z-index: 300;
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
  white-space: nowrap;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}

.toast.show { transform: translateX(-50%) translateY(0); }

/* ===== Responsive ===== */
@media (min-width: 600px) {
  :root { --max-w: 720px; }
  .projects-grid { grid-template-columns: 1fr 1fr; }
  .hero { padding: 72px 0 52px; }
  .hero-logo { width: 200px; }
  .hero-name { font-size: 32px; }
}

@media (min-width: 900px) {
  :root { --max-w: 960px; }
  .projects-grid { grid-template-columns: repeat(3, 1fr); }
}
