@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=Poppins:wght@300;400;500;600&display=swap');

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

:root {
  --rose-gold: #b76e79;
  --rose-gold-light: #d4a5a5;
  --rose-gold-dark: #8b4d57;
  --rose-gold-pale: #f5e6e8;
  --gold-shimmer: #d4af37;
  --cream: #fdf8f5;
  --cream-dark: #f9f0eb;
  --text-dark: #4a3f3f;
  --text-muted: #8b7d7d;
  --white: #ffffff;
  --error-color: #c44569;
  --success-color: #78c49a;
}

body {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
  background: linear-gradient(135deg, var(--cream) 0%, var(--rose-gold-pale) 50%, var(--cream) 100%);
  background-attachment: fixed;
  color: var(--text-dark);
  min-height: 100vh;
  line-height: 1.6;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    radial-gradient(circle at 20% 80%, rgba(212, 175, 55, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(183, 110, 121, 0.1) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
}

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

/* Header */
header {
  text-align: center;
  margin-bottom: 30px;
  padding: 20px 0;
}

header h1 {
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--rose-gold) 0%, var(--gold-shimmer) 50%, var(--rose-gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 5px;
  letter-spacing: 2px;
}

header .tagline {
  color: var(--rose-gold);
  font-size: 1.1rem;
  font-weight: 300;
  letter-spacing: 1px;
}

header .age-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--rose-gold) 0%, var(--gold-shimmer) 100%);
  color: var(--white);
  padding: 8px 20px;
  border-radius: 25px;
  font-size: 0.9rem;
  font-weight: 600;
  margin-top: 10px;
  box-shadow: 0 4px 15px rgba(183, 110, 121, 0.3);
  letter-spacing: 1px;
}

header nav {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 20px;
  flex-wrap: wrap;
}

header nav a {
  color: var(--text-muted);
  text-decoration: none;
  padding: 10px 20px;
  border-radius: 25px;
  transition: all 0.3s ease;
  font-weight: 500;
  border: 2px solid transparent;
}

header nav a:hover {
  color: var(--rose-gold);
  background: rgba(183, 110, 121, 0.1);
  border-color: var(--rose-gold-light);
}

header nav a.active {
  color: var(--white);
  background: linear-gradient(135deg, var(--rose-gold) 0%, var(--rose-gold-dark) 100%);
  border-color: var(--rose-gold);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 14px 28px;
  border: none;
  border-radius: 25px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  font-family: 'Poppins', sans-serif;
}

.btn-primary {
  background: linear-gradient(135deg, var(--rose-gold) 0%, var(--rose-gold-dark) 100%);
  color: var(--white);
  box-shadow: 0 4px 15px rgba(183, 110, 121, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(183, 110, 121, 0.5);
}

.btn-primary:disabled {
  background: var(--text-muted);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-secondary {
  background: var(--white);
  color: var(--rose-gold);
  border: 2px solid var(--rose-gold-light);
}

.btn-secondary:hover {
  background: var(--rose-gold-pale);
  border-color: var(--rose-gold);
}

.btn-link {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.95rem;
  padding: 10px 20px;
  font-family: 'Poppins', sans-serif;
}

.btn-link:hover {
  color: var(--rose-gold-dark);
}

/* Cards */
.login-card,
.upload-section,
.gallery-section,
.qrcode-card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 24px;
  padding: 40px;
  box-shadow: 0 10px 40px rgba(183, 110, 121, 0.15);
  border: 1px solid rgba(212, 165, 165, 0.3);
  backdrop-filter: blur(10px);
}

.login-card {
  max-width: 420px;
  margin: 40px auto;
  text-align: center;
}

.login-card h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  color: var(--rose-gold);
  margin-bottom: 10px;
}

.login-card p {
  color: var(--text-muted);
  margin-bottom: 30px;
}

.welcome-decoration {
  font-size: 2.5rem;
  margin-bottom: 15px;
}

/* Forms */
.form-group {
  margin-bottom: 25px;
  text-align: left;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--text-dark);
}

.form-group input {
  width: 100%;
  padding: 14px 18px;
  border: 2px solid var(--rose-gold-pale);
  border-radius: 12px;
  font-size: 1rem;
  font-family: 'Poppins', sans-serif;
  transition: all 0.3s ease;
  background: var(--white);
}

.form-group input:focus {
  outline: none;
  border-color: var(--rose-gold);
  box-shadow: 0 0 0 4px rgba(183, 110, 121, 0.1);
}

.form-group input::placeholder {
  color: var(--rose-gold-light);
}

.error-message {
  background: rgba(196, 69, 105, 0.1);
  color: var(--error-color);
  padding: 14px;
  border-radius: 12px;
  margin-top: 15px;
  border: 1px solid rgba(196, 69, 105, 0.2);
}

/* Upload Area */
.upload-area {
  border: 3px dashed var(--rose-gold-light);
  border-radius: 20px;
  padding: 50px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  margin: 25px 0;
  background: rgba(245, 230, 232, 0.3);
}

.upload-area:hover,
.upload-area.dragover {
  border-color: var(--rose-gold);
  background: rgba(245, 230, 232, 0.6);
  transform: scale(1.01);
}

.upload-icon {
  font-size: 3.5rem;
  color: var(--rose-gold);
  margin-bottom: 15px;
}

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

/* Progress */
.upload-progress {
  margin: 25px 0;
}

.progress-bar {
  height: 10px;
  background: var(--rose-gold-pale);
  border-radius: 5px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--rose-gold) 0%, var(--gold-shimmer) 100%);
  width: 0%;
  transition: width 0.3s;
  border-radius: 5px;
}

.upload-progress p {
  text-align: center;
  margin-top: 12px;
  color: var(--text-muted);
}

/* Upload Results */
.upload-results {
  margin-top: 20px;
}

.upload-results .success {
  color: var(--success-color);
  padding: 10px;
}

.upload-results .error {
  color: var(--error-color);
  padding: 10px;
}

/* Photo Grid */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 20px;
  margin-top: 25px;
}

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

.photo-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(183, 110, 121, 0.2);
  transition: all 0.3s ease;
}

.photo-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(183, 110, 121, 0.3);
}

.photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.photo-item:hover img {
  transform: scale(1.05);
}

.photo-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(75, 50, 50, 0.85));
  padding: 30px 12px 12px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.photo-item:hover .photo-overlay {
  opacity: 1;
}

.photo-uploader {
  color: var(--white);
  font-size: 0.8rem;
  display: block;
  margin-bottom: 5px;
}

/* Like Button */
.like-section {
  display: flex;
  align-items: center;
  gap: 8px;
}

.like-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.3rem;
  transition: transform 0.2s ease;
  padding: 0;
  line-height: 1;
}

.like-btn:hover {
  transform: scale(1.2);
}

.like-btn.liked {
  animation: heartBeat 0.3s ease;
}

@keyframes heartBeat {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

.like-count {
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 500;
}

/* Like Badge (always visible on photos) */
.like-badge {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  padding: 6px 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: all 0.2s ease;
  z-index: 10;
}

.like-badge:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(183, 110, 121, 0.3);
}

.like-badge.liked {
  background: linear-gradient(135deg, var(--rose-gold-pale) 0%, var(--white) 100%);
}

.like-badge .like-icon {
  font-size: 1.1rem;
  line-height: 1;
}

.like-badge .like-count {
  color: var(--rose-gold-dark);
  font-size: 0.9rem;
  font-weight: 600;
}

.no-photos {
  text-align: center;
  color: var(--text-muted);
  padding: 50px;
  grid-column: 1 / -1;
  font-style: italic;
}

/* My Photos Section */
.my-photos-section {
  margin-top: 50px;
}

.my-photos-section h3 {
  font-family: 'Playfair Display', serif;
  margin-bottom: 20px;
  color: var(--rose-gold);
  font-size: 1.4rem;
}

/* Gallery */
.gallery-section h2 {
  font-family: 'Playfair Display', serif;
  color: var(--rose-gold);
  font-size: 1.8rem;
}

.photo-count {
  color: var(--text-muted);
  margin-bottom: 25px;
  font-size: 0.95rem;
}

/* Lightbox */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(75, 50, 50, 0.95);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 25px;
  background: none;
  border: none;
  color: var(--rose-gold-light);
  font-size: 2.5rem;
  cursor: pointer;
  padding: 10px;
  transition: color 0.2s;
}

.lightbox-close:hover {
  color: var(--white);
}

.lightbox img {
  max-width: 90%;
  max-height: 75vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.lightbox-info {
  margin-top: 25px;
  text-align: center;
  color: var(--rose-gold-light);
}

.lightbox-info p {
  margin: 8px 0;
}

.lightbox-like {
  margin-top: 15px;
}

.lightbox-like .like-btn {
  font-size: 2rem;
}

.lightbox-like .like-count {
  font-size: 1.1rem;
  color: var(--rose-gold-light);
}

/* QR Code */
.qrcode-card {
  max-width: 420px;
  margin: 30px auto;
  text-align: center;
}

.qrcode-card h2 {
  font-family: 'Playfair Display', serif;
  color: var(--rose-gold);
  font-size: 1.6rem;
  margin-bottom: 10px;
}

.qrcode-container {
  margin: 30px 0;
  padding: 25px;
  background: var(--white);
  border-radius: 20px;
  display: inline-block;
  box-shadow: 0 4px 20px rgba(183, 110, 121, 0.15);
}

.qrcode-container img {
  width: 250px;
  height: 250px;
}

.app-url {
  color: var(--text-muted);
  font-family: monospace;
  margin-bottom: 25px;
  font-size: 0.9rem;
}

.qrcode-card .btn {
  margin: 8px;
}

/* User Info */
.user-info {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 25px;
}

/* Upload Section */
.upload-section h2 {
  font-family: 'Playfair Display', serif;
  color: var(--rose-gold);
  font-size: 1.8rem;
  margin-bottom: 10px;
}

/* Decorative Elements */
.sparkle {
  position: relative;
}

.sparkle::before,
.sparkle::after {
  content: '';
  position: absolute;
  width: 8px;
  height: 8px;
  background: var(--gold-shimmer);
  border-radius: 50%;
  animation: sparkle 2s infinite;
}

@keyframes sparkle {
  0%, 100% { opacity: 0; transform: scale(0); }
  50% { opacity: 1; transform: scale(1); }
}

/* Responsive */
@media (max-width: 600px) {
  .container {
    padding: 15px;
  }

  header h1 {
    font-size: 1.8rem;
  }

  .login-card,
  .upload-section,
  .gallery-section,
  .qrcode-card {
    padding: 25px;
  }

  .photo-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
  }

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

  .upload-area {
    padding: 35px 20px;
  }

  header nav {
    gap: 10px;
  }

  header nav a {
    padding: 8px 15px;
    font-size: 0.9rem;
  }
}

/* ======================= */
/* LEADERBOARD STYLES */
/* ======================= */

.leaderboard-section,
.quests-section {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 24px;
  padding: 40px;
  box-shadow: 0 10px 40px rgba(183, 110, 121, 0.15);
  border: 1px solid rgba(212, 165, 165, 0.3);
  backdrop-filter: blur(10px);
}

.leaderboard-section h2,
.quests-section h2 {
  font-family: 'Playfair Display', serif;
  color: var(--rose-gold);
  font-size: 1.8rem;
  margin-bottom: 10px;
}

.points-info {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 25px;
}

.points-info span {
  display: inline-block;
  margin-right: 10px;
}

/* My Stats Section */
.my-stats {
  background: linear-gradient(135deg, var(--rose-gold-pale) 0%, rgba(255, 255, 255, 0.8) 100%);
  border-radius: 16px;
  padding: 25px;
  margin-bottom: 30px;
  border: 1px solid var(--rose-gold-light);
}

.my-stats h3 {
  font-family: 'Playfair Display', serif;
  color: var(--rose-gold);
  font-size: 1.2rem;
  margin-bottom: 20px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  margin-bottom: 20px;
}

.stat-item {
  text-align: center;
  padding: 15px;
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(183, 110, 121, 0.1);
}

.stat-value {
  display: block;
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--rose-gold);
  font-family: 'Playfair Display', serif;
}

.stat-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.points-breakdown {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.points-breakdown p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Leaderboard List */
.leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.leaderboard-item {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(183, 110, 121, 0.1);
  transition: all 0.2s ease;
}

.leaderboard-item:hover {
  transform: translateX(5px);
  box-shadow: 0 4px 15px rgba(183, 110, 121, 0.15);
}

.leaderboard-item.is-me {
  background: linear-gradient(135deg, var(--rose-gold-pale) 0%, var(--white) 100%);
  border: 2px solid var(--rose-gold-light);
}

.leaderboard-item .rank {
  font-size: 1.4rem;
  font-weight: 600;
  width: 50px;
  text-align: center;
  color: var(--rose-gold);
}

.leaderboard-item .user-info {
  flex: 1;
  margin-left: 15px;
}

.leaderboard-item .username {
  display: block;
  font-weight: 600;
  color: var(--text-dark);
  font-size: 1rem;
}

.leaderboard-item .stats {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.leaderboard-item .points {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--rose-gold);
  background: var(--rose-gold-pale);
  padding: 8px 16px;
  border-radius: 20px;
}

/* ======================= */
/* QUESTS STYLES */
/* ======================= */

.quests-intro {
  color: var(--text-muted);
  margin-bottom: 25px;
}

.quests-list {
  display: grid;
  gap: 16px;
}

.quest-card {
  background: var(--white);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 10px rgba(183, 110, 121, 0.1);
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.quest-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(183, 110, 121, 0.2);
  border-color: var(--rose-gold-light);
}

.quest-card.completed {
  background: linear-gradient(135deg, rgba(120, 196, 154, 0.1) 0%, var(--white) 100%);
  border-color: var(--success-color);
}

.quest-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.quest-type {
  font-size: 1.5rem;
}

.quest-points {
  background: linear-gradient(135deg, var(--rose-gold) 0%, var(--gold-shimmer) 100%);
  color: var(--white);
  padding: 4px 12px;
  border-radius: 15px;
  font-size: 0.85rem;
  font-weight: 600;
}

.quest-title {
  font-family: 'Playfair Display', serif;
  color: var(--text-dark);
  font-size: 1.2rem;
  margin-bottom: 8px;
}

.quest-description {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 12px;
}

.quest-badge {
  display: inline-block;
  font-size: 0.8rem;
  color: var(--rose-gold);
  font-weight: 500;
}

.quest-badge.completed-badge {
  color: var(--success-color);
}

.quest-badge.correct-badge {
  color: #4CAF50;
}

.quest-badge.incorrect-badge {
  color: #F44336;
}

.quest-card.correct {
  border-left: 4px solid #4CAF50;
}

.quest-card.incorrect {
  border-left: 4px solid #F44336;
}

.quest-card.completed {
  border-left: 4px solid var(--success-color);
}

/* Quest Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(75, 50, 50, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-content {
  background: var(--white);
  border-radius: 24px;
  padding: 35px;
  max-width: 500px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 20px;
  background: none;
  border: none;
  font-size: 2rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s;
}

.modal-close:hover {
  color: var(--rose-gold);
}

.quest-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.quest-type-badge {
  background: var(--rose-gold-pale);
  color: var(--rose-gold);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
}

.quest-points-badge {
  background: linear-gradient(135deg, var(--rose-gold) 0%, var(--gold-shimmer) 100%);
  color: var(--white);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

.modal-content h2 {
  font-family: 'Playfair Display', serif;
  color: var(--rose-gold);
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.quest-modal-description {
  color: var(--text-muted);
  margin-bottom: 25px;
}

.already-completed {
  background: rgba(120, 196, 154, 0.15);
  color: var(--success-color);
  padding: 12px;
  border-radius: 10px;
  font-size: 0.9rem;
  margin-bottom: 20px;
  text-align: center;
}

/* Quest Form */
.quest-form {
  margin-top: 20px;
}

.quest-input {
  width: 100%;
  padding: 14px 18px;
  border: 2px solid var(--rose-gold-pale);
  border-radius: 12px;
  font-size: 1rem;
  font-family: 'Poppins', sans-serif;
  transition: all 0.3s ease;
  background: var(--white);
  margin-bottom: 15px;
}

.quest-input:focus {
  outline: none;
  border-color: var(--rose-gold);
  box-shadow: 0 0 0 4px rgba(183, 110, 121, 0.1);
}

/* Choice Options */
.choice-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.choice-option {
  display: flex;
  align-items: center;
  padding: 14px 18px;
  background: var(--cream);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 2px solid transparent;
}

.choice-option:hover {
  background: var(--rose-gold-pale);
}

.choice-option input[type="radio"] {
  margin-right: 12px;
  accent-color: var(--rose-gold);
  width: 18px;
  height: 18px;
}

.choice-option input[type="radio"]:checked + span {
  font-weight: 600;
  color: var(--rose-gold);
}

/* Quest Preview */
#quest-preview {
  margin: 15px 0;
  border-radius: 12px;
  overflow: hidden;
}

#quest-preview img,
#preview-img {
  max-width: 100%;
  max-height: 300px;
  object-fit: contain;
  border-radius: 12px;
}

/* Quest Result */
.quest-result {
  margin-top: 15px;
  text-align: center;
}

.quest-result .success {
  color: var(--success-color);
  font-weight: 500;
}

.quest-result .error {
  color: var(--error-color);
  font-weight: 500;
}

/* ======================= */
/* ADMIN PANEL STYLES */
/* ======================= */

.admin-login {
  max-width: 420px;
  margin: 40px auto;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}

.admin-header h2 {
  font-family: 'Playfair Display', serif;
  color: var(--rose-gold);
  font-size: 1.8rem;
}

/* Admin Tabs */
.admin-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 25px;
  flex-wrap: wrap;
}

.tab-btn {
  padding: 12px 24px;
  background: var(--white);
  border: 2px solid var(--rose-gold-pale);
  border-radius: 25px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.95rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.3s ease;
}

.tab-btn:hover {
  border-color: var(--rose-gold-light);
  color: var(--rose-gold);
}

.tab-btn.active {
  background: linear-gradient(135deg, var(--rose-gold) 0%, var(--rose-gold-dark) 100%);
  color: var(--white);
  border-color: var(--rose-gold);
}

/* Settings Card */
.settings-card,
.quest-form-card {
  background: var(--white);
  border-radius: 16px;
  padding: 25px;
  box-shadow: 0 2px 10px rgba(183, 110, 121, 0.1);
}

.settings-card h3,
.quest-form-card h3 {
  font-family: 'Playfair Display', serif;
  color: var(--rose-gold);
  font-size: 1.3rem;
  margin-bottom: 20px;
}

#settings-result .success {
  color: var(--success-color);
  margin-top: 15px;
}

#settings-result .error {
  color: var(--error-color);
  margin-top: 15px;
}

/* Quest Admin List */
.quests-admin {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

#quests-admin-list {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.quest-admin-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(183, 110, 121, 0.1);
  transition: all 0.2s ease;
}

.quest-admin-item:hover {
  box-shadow: 0 4px 15px rgba(183, 110, 121, 0.15);
}

.quest-admin-item.inactive {
  opacity: 0.6;
  background: var(--cream);
}

.quest-admin-info {
  display: flex;
  align-items: center;
  gap: 15px;
}

.quest-type-icon {
  font-size: 1.5rem;
}

.quest-admin-info strong {
  display: block;
  color: var(--text-dark);
}

.quest-meta {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

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

.btn-small {
  padding: 8px 16px;
  background: var(--rose-gold-pale);
  border: none;
  border-radius: 20px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.85rem;
  color: var(--rose-gold);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-small:hover {
  background: var(--rose-gold);
  color: var(--white);
}

.btn-small.btn-danger {
  background: rgba(196, 69, 105, 0.15);
  color: var(--error-color);
}

.btn-small.btn-danger:hover {
  background: var(--error-color);
  color: var(--white);
}

.btn-danger {
  background: var(--error-color);
  color: var(--white);
}

.btn-danger:hover {
  background: #a03050;
  transform: translateY(-2px);
}

/* Quest Form */
.quest-form-card {
  margin-top: 20px;
}

.form-group textarea {
  width: 100%;
  padding: 14px 18px;
  border: 2px solid var(--rose-gold-pale);
  border-radius: 12px;
  font-size: 1rem;
  font-family: 'Poppins', sans-serif;
  transition: all 0.3s ease;
  background: var(--white);
  resize: vertical;
}

.form-group textarea:focus {
  outline: none;
  border-color: var(--rose-gold);
  box-shadow: 0 0 0 4px rgba(183, 110, 121, 0.1);
}

.form-group select {
  width: 100%;
  padding: 14px 18px;
  border: 2px solid var(--rose-gold-pale);
  border-radius: 12px;
  font-size: 1rem;
  font-family: 'Poppins', sans-serif;
  transition: all 0.3s ease;
  background: var(--white);
  cursor: pointer;
}

.form-group select:focus {
  outline: none;
  border-color: var(--rose-gold);
  box-shadow: 0 0 0 4px rgba(183, 110, 121, 0.1);
}

.form-group input[type="checkbox"] {
  width: auto;
  margin-right: 8px;
  accent-color: var(--rose-gold);
}

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

/* Submissions List */
#submissions-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.submission-item {
  background: var(--white);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(183, 110, 121, 0.1);
}

.submission-info {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.submission-info strong {
  color: var(--rose-gold);
}

.submission-quest {
  background: var(--rose-gold-pale);
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 0.85rem;
  color: var(--rose-gold-dark);
}

.submission-time {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.submission-answer {
  padding: 12px;
  background: var(--cream);
  border-radius: 8px;
}

.submission-answer p {
  color: var(--text-dark);
}

.submission-photo {
  max-width: 200px;
  max-height: 200px;
  object-fit: cover;
  border-radius: 8px;
}

.no-data {
  text-align: center;
  color: var(--text-muted);
  padding: 40px;
  font-style: italic;
}

/* ======================= */
/* RESPONSIVE UPDATES */
/* ======================= */

@media (max-width: 600px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .leaderboard-item {
    padding: 12px 15px;
  }

  .leaderboard-item .rank {
    width: 40px;
    font-size: 1.2rem;
  }

  .leaderboard-item .points {
    font-size: 0.95rem;
    padding: 6px 12px;
  }

  .quest-admin-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .quest-admin-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .admin-tabs {
    gap: 8px;
  }

  .tab-btn {
    padding: 10px 18px;
    font-size: 0.85rem;
  }

  .modal-content {
    padding: 25px;
    margin: 10px;
  }

  .form-actions {
    flex-direction: column;
  }

  .points-breakdown {
    flex-direction: column;
    gap: 5px;
  }
}

/* Print Styles for QR Code */
@media print {
  .btn { display: none !important; }
  header .tagline { display: none; }
  header nav { display: none; }
  .qrcode-card {
    box-shadow: none;
    border: none;
    background: white;
  }
  body {
    background: white;
  }
  body::before {
    display: none;
  }
}

/* Infinite Scroll */
.loading-indicator,
.end-message {
  text-align: center;
  padding: 20px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.loading-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.loading-indicator::before {
  content: '';
  width: 20px;
  height: 20px;
  border: 2px solid var(--rose-gold-light);
  border-top-color: var(--rose-gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.end-message {
  color: var(--rose-gold);
  font-style: italic;
}

.load-more-section {
  text-align: center;
  padding: 20px;
  min-height: 60px;
}

#scroll-sentinel {
  height: 1px;
  width: 100%;
}

#load-more-btn {
  margin-top: 10px;
}

/* Form hints */
.form-hint {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* User submissions list */
.user-submission-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  background: var(--white);
  border-radius: 10px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.user-submission-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(183, 110, 121, 0.15);
}

.user-submission-item .user-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.user-submission-item .user-email {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.user-submission-item .user-stats {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  font-size: 0.85rem;
}

.user-submission-item .submission-count {
  color: var(--rose-gold);
  font-weight: 500;
}

.user-submission-item .last-submission {
  color: var(--text-muted);
}

#user-submissions {
  margin-top: 15px;
}

#user-submissions h3 {
  margin: 15px 0;
  color: var(--rose-gold);
}

/* Previous answer display */
.previous-answer {
  padding: 15px;
  border-radius: 10px;
  margin: 15px 0;
}

.previous-answer.correct {
  background: rgba(76, 175, 80, 0.1);
  border: 1px solid rgba(76, 175, 80, 0.3);
}

.previous-answer.incorrect {
  background: rgba(244, 67, 54, 0.1);
  border: 1px solid rgba(244, 67, 54, 0.3);
}

.previous-answer p {
  margin: 5px 0;
}

.previous-answer .answer-result {
  font-weight: 600;
}

.previous-answer.correct .answer-result {
  color: #4CAF50;
}

.previous-answer.incorrect .answer-result {
  color: #F44336;
}

/* Language Toggle */
.lang-toggle {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--rose-gold);
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 25px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(183, 110, 121, 0.3);
  transition: all 0.3s ease;
  z-index: 1000;
}

.lang-toggle:hover {
  background: var(--rose-gold-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(183, 110, 121, 0.4);
}

.lang-toggle:active {
  transform: translateY(0);
}

@media print {
  .lang-toggle {
    display: none !important;
  }
}
