@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@600;700&family=Montserrat:wght@400;500;600&display=swap');

:root {
  --primary: #1A1A1A;
  --body-text: #6B6B6B;
  --accent: #B8975A;
  --white: #FFFFFF;
  --light-bg: #FAFAFA;
  --error: #DC3545;
  --success: #28A745;
  --font-heading: 'Cormorant Garamond', serif;
  --font-body: 'Montserrat', sans-serif;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
}

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

body {
  font-family: var(--font-body);
  color: var(--body-text);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Typography */
h1 { font-family: var(--font-heading); font-weight: 700; font-size: 48px; color: var(--primary); }
h2 { font-family: var(--font-heading); font-weight: 600; font-size: 36px; color: var(--primary); }
h3 { font-family: var(--font-body); font-weight: 600; font-size: 20px; color: var(--primary); }
p { margin: 8px 0; }

/* Logo */
.logo {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 32px;
  color: var(--primary);
  text-decoration: none;
  letter-spacing: 1px;
}
.logo-accent { color: var(--accent); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 4px;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  text-decoration: none;
  font-size: 14px;
}
.btn:hover { background: #9c7f4a; }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-outline {
  background: transparent;
  border: 2px solid var(--accent);
  color: var(--accent);
}
.btn-outline:hover { background: var(--accent); color: white; }

.btn-danger { background: var(--error); }
.btn-danger:hover { background: #c82333; }
.btn-success { background: var(--success); }
.btn-success:hover { background: #218838; }

/* Inputs */
.input {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 14px;
  transition: border-color 0.2s;
}
.input:focus { outline: none; border-color: var(--accent); }

/* Layout */
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.header {
  padding: 20px 0;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.header a {
  color: var(--body-text);
  text-decoration: none;
  margin-left: 15px;
  font-size: 14px;
  transition: color 0.2s;
}
.header a:hover { color: var(--accent); }

/* Login Page */
.login-wrapper {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.login-box {
  max-width: 400px;
  padding: 30px;
  background: var(--light-bg);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

/* Gallery Grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 15px;
  padding: 30px 0;
}
.gallery-item {
  aspect-ratio: 1;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  background: #f5f5f5;
  position: relative;
  box-shadow: var(--shadow);
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.gallery-item:hover img { transform: scale(1.03); }

/* Status Banner */
.status-banner {
  padding: 15px 20px;
  border-radius: 4px;
  margin: 20px 0;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.status-banner.red {
  background: #FFF5F5;
  border-left: 4px solid var(--error);
}
.status-banner.green {
  background: #F0FFF4;
  border-left: 4px solid var(--success);
}

/* Upload Area */
.upload-area {
  border: 2px dashed #ccc;
  border-radius: 8px;
  padding: 30px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.upload-area:hover,
.upload-area.dragover {
  border-color: var(--accent);
  background: rgba(184, 151, 90, 0.05);
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.95);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}
.lightbox img {
  max-width: 90vw;
  max-height: 70vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: white;
  font-size: 36px;
  cursor: pointer;
  line-height: 1;
  transition: opacity 0.2s;
}
.lightbox-close:hover { opacity: 0.8; }
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: white;
  font-size: 40px;
  cursor: pointer;
  padding: 10px 20px;
  user-select: none;
  transition: opacity 0.2s;
}
.lightbox-nav:hover { opacity: 0.8; }
.lightbox-nav:disabled { opacity: 0.3; cursor: not-allowed; }

/* Comments in Lightbox */
.comments-box {
  background: rgba(255,255,255,0.1);
  padding: 15px;
  border-radius: 6px;
  margin-top: 15px;
  width: 100%;
  max-width: 700px;
  max-height: 200px;
  overflow-y: auto;
}
.comment {
  border-bottom: 1px solid #555;
  padding: 8px 0;
  color: #ddd;
  font-size: 14px;
}
.comment:last-child { border-bottom: none; }
.comment strong { color: var(--accent); }
.comment small { color: #999; font-size: 12px; margin-left: 8px; }

.comment-form {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  background: rgba(255,255,255,0.1);
  padding: 10px;
  border-radius: 6px;
}
.comment-form input {
  flex: 1;
  background: white;
  border: 1px solid #ddd;
  padding: 8px 12px;
  border-radius: 4px;
}

/* Admin Dashboard */
.event-card {
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 20px;
  margin: 15px 0;
  background: white;
  box-shadow: var(--shadow);
}
.settings-box {
  background: var(--light-bg);
  padding: 12px;
  border-radius: 6px;
  margin-top: 10px;
}
.qr-container {
  background: white;
  padding: 8px;
  border-radius: 4px;
  display: inline-block;
}

/* Admin Gate */
#admin-gate {
  position: fixed;
  inset: 0;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
#admin-gate .box {
  background: white;
  padding: 30px;
  border-radius: 8px;
  text-align: center;
  max-width: 350px;
  width: 90%;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

/* Utilities */
.hidden { display: none !important; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.gap-10 { gap: 10px; }
.gap-20 { gap: 20px; }
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.w-full { width: 100%; }

/* Responsive */
@media (max-width: 768px) {
  h1 { font-size: 36px; }
  h2 { font-size: 28px; }
  .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .lightbox-nav { font-size: 30px; padding: 5px 15px; }
}

/* Footer */
footer {
  text-align: center;
  padding: 20px;
  font-size: 12px;
  color: #999;
  border-top: 1px solid #eee;
  margin-top: 40px;
}
footer a { color: #999; text-decoration: none; }
footer a:hover { color: var(--accent); }