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

:root {
  --bg: #0f0f12;
  --surface: #1a1a21;
  --surface-2: #24242e;
  --text: #f4f4f6;
  --text-muted: #9b9bab;
  --accent: #25d366;
  --accent-2: #229ed9;
  --border: rgba(255, 255, 255, 0.08);
  --radius: 16px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.hero {
  text-align: center;
  padding: 48px 20px 32px;
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%);
}

.hero h1 {
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.hero p {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 480px;
  margin: 0 auto;
}

/* Gallery */
.gallery {
  padding: 24px 0 120px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.gallery-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.gallery-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

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

.gallery-empty {
  text-align: center;
  padding: 64px 20px;
  color: var(--text-muted);
  grid-column: 1 / -1;
}

.gallery-empty svg {
  width: 64px;
  height: 64px;
  opacity: 0.3;
  margin-bottom: 16px;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.lightbox.active {
  display: flex;
}

.lightbox img {
  max-width: 100%;
  max-height: 90dvh;
  border-radius: 8px;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 1;
  background: var(--surface-2);
  border: none;
  color: var(--text);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Contact bar — always on top of page content (gallery, lightbox, etc.) */
.contact-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10000;
  padding: 16px 20px calc(16px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, transparent 0%, rgba(15, 15, 18, 0.95) 30%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.contact-bar-inner {
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  gap: 12px;
}

.btn-contact {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 20px;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s, opacity 0.15s;
}

.btn-contact:hover {
  transform: scale(1.02);
}

.btn-contact:active {
  transform: scale(0.98);
}

.btn-whatsapp {
  background: var(--accent);
}

.btn-telegram {
  background: var(--accent-2);
}

.btn-contact svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

/* Admin link */
.admin-link {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 50;
  color: var(--text-muted);
  font-size: 0.8rem;
  text-decoration: none;
  opacity: 0.4;
  transition: opacity 0.2s;
}

.admin-link:hover {
  opacity: 1;
}

/* ========== Admin styles ========== */
.admin-page {
  min-height: 100dvh;
  padding: 32px 20px 64px;
}

.admin-header {
  max-width: 720px;
  margin: 0 auto 32px;
}

.admin-header h1 {
  font-size: 1.75rem;
  margin-bottom: 8px;
}

.admin-header p {
  color: var(--text-muted);
}

.admin-card {
  max-width: 720px;
  margin: 0 auto 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.admin-card h2 {
  font-size: 1.1rem;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-2);
}

.form-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 520px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

/* Upload zone */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: 12px;
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.upload-zone:hover,
.upload-zone.dragover {
  border-color: var(--accent-2);
  background: rgba(34, 158, 217, 0.05);
}

.upload-zone svg {
  width: 48px;
  height: 48px;
  opacity: 0.4;
  margin-bottom: 12px;
}

.upload-zone p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.upload-zone input {
  display: none;
}

/* Image list in admin */
.image-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.image-thumb {
  position: relative;
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
}

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

.image-thumb .remove-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.image-thumb .order-btns {
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 4px;
}

.image-thumb .order-btns button {
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 0.75rem;
  cursor: pointer;
}

/* Admin actions */
.admin-actions {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  padding: 12px 24px;
  border: none;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, opacity 0.15s;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--accent-2);
  color: #fff;
}

.btn-secondary {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-success {
  background: var(--accent);
  color: #fff;
}

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--surface-2);
  color: var(--text);
  padding: 12px 24px;
  border-radius: 10px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  z-index: 300;
  opacity: 0;
  transition: transform 0.3s, opacity 0.3s;
}

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

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.back-link:hover {
  color: var(--text);
}
