/* Kuber Dham - Main Stylesheet */
@import url('https://fonts.googleapis.com/css2?family=Tiro+Devanagari+Hindi:ital@0;1&family=Cinzel+Decorative:wght@400;700;900&family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
  --primary: #8B1A1A;
  --primary-dark: #5C0A0A;
  --primary-light: #C0392B;
  --gold: #D4AF37;
  --gold-light: #F0D060;
  --gold-dark: #A0860A;
  --saffron: #FF6B2E;
  --cream: #FDF6E3;
  --cream-dark: #F5E6C8;
  --dark: #1A0A0A;
  --text: #2C1810;
  --text-light: #6B4226;
  --success: #27AE60;
  --danger: #E74C3C;
  --warning: #F39C12;
  --shadow: 0 4px 20px rgba(139,26,26,0.15);
  --shadow-gold: 0 4px 20px rgba(212,175,55,0.3);
  --radius: 16px;
  --radius-sm: 8px;
}

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

body {
  font-family: 'Poppins', sans-serif;
  background: var(--cream);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ===== SPLASH PAGE ===== */
.splash-page {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, #8B2500 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.splash-page::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(ellipse at center, rgba(212,175,55,0.1) 0%, transparent 60%);
  animation: pulse-bg 3s ease-in-out infinite;
}

@keyframes pulse-bg {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.1); opacity: 1; }
}

.om-symbol {
  font-size: 80px;
  color: var(--gold);
  text-shadow: 0 0 30px rgba(212,175,55,0.8);
  animation: glow 2s ease-in-out infinite alternate;
  margin-bottom: 20px;
}

@keyframes glow {
  from { text-shadow: 0 0 20px rgba(212,175,55,0.5); }
  to { text-shadow: 0 0 40px rgba(212,175,55,1), 0 0 60px rgba(240,208,96,0.5); }
}

.splash-title {
  font-family: 'Cinzel Decorative', serif;
  color: var(--gold);
  font-size: 2.5rem;
  text-align: center;
  text-shadow: 2px 2px 10px rgba(0,0,0,0.5);
  margin-bottom: 8px;
}

.splash-subtitle {
  color: rgba(253,246,227,0.8);
  font-size: 0.95rem;
  font-family: 'Tiro Devanagari Hindi', serif;
  letter-spacing: 2px;
  margin-bottom: 40px;
}

.splash-loader {
  display: flex;
  gap: 8px;
}

.splash-loader span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gold);
  animation: bounce 1.4s ease-in-out infinite;
}

.splash-loader span:nth-child(2) { animation-delay: 0.2s; }
.splash-loader span:nth-child(3) { animation-delay: 0.4s; }

@keyframes bounce {
  0%, 80%, 100% { transform: scale(0); opacity: 0.5; }
  40% { transform: scale(1); opacity: 1; }
}

/* ===== PAGE WRAPPER ===== */
.page-wrapper {
  min-height: 100vh;
  background: var(--cream);
}

/* ===== TOP HEADER ===== */
.app-header {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: white;
  padding: 15px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 15px rgba(0,0,0,0.3);
}

.header-title {
  font-family: 'Cinzel Decorative', serif;
  color: var(--gold);
  font-size: 1.3rem;
}

.header-icon {
  color: var(--gold);
  font-size: 1.4rem;
  cursor: pointer;
  background: none;
  border: none;
  padding: 5px;
}

/* ===== CARD ===== */
.card-custom {
  background: white;
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
  border: 1px solid rgba(212,175,55,0.15);
}

.card-gold {
  background: linear-gradient(135deg, #FFF8E1, #FFF3CD);
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
}

/* ===== LANGUAGE SELECT PAGE ===== */
.lang-page {
  min-height: 100vh;
  background: linear-gradient(180deg, var(--primary-dark) 0%, var(--primary) 40%, var(--cream) 100%);
  padding: 40px 20px 20px;
}

.lang-title {
  font-family: 'Cinzel Decorative', serif;
  color: var(--gold);
  font-size: 1.8rem;
  text-align: center;
  margin-bottom: 8px;
}

.lang-subtitle {
  color: rgba(255,255,255,0.8);
  text-align: center;
  font-family: 'Tiro Devanagari Hindi', serif;
  margin-bottom: 30px;
}

.lang-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  max-width: 400px;
  margin: 0 auto;
}

.lang-btn {
  background: white;
  border: 2px solid transparent;
  border-radius: var(--radius);
  padding: 20px 15px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--shadow);
  text-decoration: none;
  display: block;
}

.lang-btn:hover, .lang-btn.active {
  border-color: var(--gold);
  background: linear-gradient(135deg, #FFF8E1, white);
  transform: translateY(-3px);
  box-shadow: var(--shadow-gold);
}

.lang-btn .lang-emoji { font-size: 2rem; display: block; margin-bottom: 5px; }
.lang-btn .lang-native { font-size: 1.2rem; font-weight: 600; color: var(--primary); font-family: 'Tiro Devanagari Hindi', serif; }
.lang-btn .lang-english { font-size: 0.75rem; color: var(--text-light); margin-top: 2px; }

/* ===== FORM STYLES ===== */
.form-page { padding: 20px; max-width: 480px; margin: 0 auto; }

.form-section-title {
  color: var(--primary);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 5px;
  font-family: 'Tiro Devanagari Hindi', serif;
}

.form-section-sub {
  color: var(--text-light);
  font-size: 0.85rem;
  margin-bottom: 25px;
}

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

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-light);
  margin-bottom: 6px;
}

.form-control-custom {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid #E8D5B7;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: 'Poppins', sans-serif;
  background: white;
  color: var(--text);
  transition: all 0.3s ease;
  outline: none;
}

.form-control-custom:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212,175,55,0.15);
}

.input-group-phone {
  display: flex;
  gap: 10px;
}

.country-code-select {
  width: 110px;
  flex-shrink: 0;
  padding: 14px 10px;
  border: 2px solid #E8D5B7;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  background: white;
  color: var(--text);
  outline: none;
  cursor: pointer;
}

.country-code-select:focus { border-color: var(--gold); }

/* ===== BUTTONS ===== */
.btn-primary-custom {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: 'Poppins', sans-serif;
}

.btn-primary-custom:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(139,26,26,0.4);
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: var(--dark);
}

.btn-gold:hover {
  box-shadow: var(--shadow-gold);
}

.btn-sm {
  padding: 8px 20px;
  font-size: 0.85rem;
  width: auto;
  border-radius: 20px;
}

/* ===== OTP INPUT ===== */
.otp-inputs {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin: 20px 0;
}

.otp-box {
  width: 50px;
  height: 55px;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  border: 2px solid #E8D5B7;
  border-radius: var(--radius-sm);
  outline: none;
  transition: all 0.3s;
  color: var(--primary);
}

.otp-box:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212,175,55,0.2);
}

.otp-box.filled { border-color: var(--primary); background: #FFF8F8; }

/* ===== PANCHANG CARD ===== */
.panchang-card {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  border-radius: var(--radius);
  padding: 20px;
  color: white;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}

.panchang-card::before {
  content: '🕉️';
  position: absolute;
  right: -10px;
  top: -10px;
  font-size: 80px;
  opacity: 0.1;
}

.panchang-title {
  color: var(--gold);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 4px;
  font-family: 'Tiro Devanagari Hindi', serif;
}

.panchang-date {
  color: rgba(255,255,255,0.7);
  font-size: 0.8rem;
  margin-bottom: 15px;
}

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

.panchang-item {
  background: rgba(255,255,255,0.1);
  border-radius: var(--radius-sm);
  padding: 10px;
  border: 1px solid rgba(212,175,55,0.2);
}

.p-label { font-size: 0.7rem; color: var(--gold-light); margin-bottom: 2px; }
.p-value { font-size: 0.95rem; font-weight: 600; }

/* ===== EVENT CARD ===== */
.event-card {
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 15px;
  border: 1px solid rgba(212,175,55,0.2);
  transition: transform 0.3s ease;
}

.event-card:hover { transform: translateY(-3px); }

.event-header {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.event-date-badge {
  background: white;
  color: var(--primary);
  border-radius: 10px;
  padding: 5px 12px;
  font-weight: 700;
  font-size: 0.85rem;
  white-space: nowrap;
}

.event-title { color: var(--dark); font-weight: 600; font-size: 0.95rem; }

.event-body { padding: 14px 16px; }
.event-location { color: var(--text-light); font-size: 0.85rem; margin-bottom: 10px; }

.event-actions { display: flex; gap: 10px; }

.btn-seva {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border: none;
  border-radius: 20px;
  padding: 8px 20px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.3s;
}

.btn-seva:hover { transform: translateY(-2px); box-shadow: 0 4px 15px rgba(139,26,26,0.4); color: white; }

.btn-location {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
  border-radius: 20px;
  padding: 8px 20px;
  font-size: 0.85rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.3s;
}

.btn-location:hover { background: var(--primary); color: white; }

/* ===== BOTTOM NAV ===== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
  display: flex;
  justify-content: space-around;
  padding: 10px 0;
  z-index: 100;
  border-top: 2px solid var(--gold-light);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  text-decoration: none;
  color: var(--text-light);
  font-size: 0.7rem;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  transition: all 0.3s;
}

.nav-item.active, .nav-item:hover { color: var(--primary); }
.nav-item i { font-size: 1.3rem; margin-bottom: 2px; }
.nav-item.active i { color: var(--primary); }

/* ===== SEVA FORM ===== */
.seva-type-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
}

.seva-type-btn {
  border: 2px solid #E8D5B7;
  background: white;
  border-radius: var(--radius-sm);
  padding: 14px 10px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 0.85rem;
  font-weight: 500;
}

.seva-type-btn.selected {
  border-color: var(--primary);
  background: linear-gradient(135deg, #FFF0F0, white);
  color: var(--primary);
}

.seva-type-btn i { display: block; font-size: 1.5rem; margin-bottom: 5px; }

/* ===== STATUS BADGES ===== */
.badge-pending { background: #FFF3CD; color: #856404; padding: 4px 12px; border-radius: 20px; font-size: 0.75rem; font-weight: 600; }
.badge-approved { background: #D4EDDA; color: #155724; padding: 4px 12px; border-radius: 20px; font-size: 0.75rem; font-weight: 600; }
.badge-rejected { background: #F8D7DA; color: #721C24; padding: 4px 12px; border-radius: 20px; font-size: 0.75rem; font-weight: 600; }

/* ===== SUCCESS PAGE ===== */
.success-page {
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
}

.success-icon {
  width: 100px;
  height: 100px;
  background: linear-gradient(135deg, var(--success), #1e8449);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  margin: 0 auto 20px;
  animation: pop-in 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes pop-in {
  from { transform: scale(0); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* ===== ADMIN STYLES ===== */
.admin-body {
  background: #F5F6FA;
  font-family: 'Poppins', sans-serif;
}

.admin-sidebar {
  width: 260px;
  background: linear-gradient(180deg, var(--primary-dark), var(--primary));
  min-height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  padding: 0;
  z-index: 1000;
  transition: transform 0.3s ease;
}

.sidebar-logo {
  padding: 25px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  text-align: center;
}

.sidebar-logo h3 {
  font-family: 'Cinzel Decorative', serif;
  color: var(--gold);
  font-size: 1.1rem;
  margin-top: 8px;
}

.sidebar-menu { padding: 15px 0; }

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 20px;
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.3s;
  border-left: 3px solid transparent;
}

.sidebar-item:hover, .sidebar-item.active {
  background: rgba(212,175,55,0.15);
  color: var(--gold);
  border-left-color: var(--gold);
}

.sidebar-item i { font-size: 1.1rem; width: 20px; text-align: center; }

.admin-main {
  margin-left: 260px;
  padding: 20px;
  min-height: 100vh;
}

.admin-topbar {
  background: white;
  padding: 15px 25px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 25px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.stat-card {
  background: white;
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 2px 15px rgba(0,0,0,0.06);
  border-left: 4px solid var(--primary);
  transition: transform 0.3s;
}

.stat-card:hover { transform: translateY(-3px); }
.stat-card.gold { border-left-color: var(--gold); }
.stat-card.success { border-left-color: var(--success); }
.stat-card.danger { border-left-color: var(--danger); }

.stat-number { font-size: 2rem; font-weight: 700; color: var(--primary); }
.stat-label { color: #777; font-size: 0.85rem; margin-top: 2px; }

.admin-table { width: 100%; border-collapse: collapse; background: white; border-radius: var(--radius); overflow: hidden; box-shadow: 0 2px 15px rgba(0,0,0,0.06); }
.admin-table th { background: linear-gradient(135deg, var(--primary-dark), var(--primary)); color: white; padding: 12px 15px; text-align: left; font-size: 0.85rem; font-weight: 500; }
.admin-table td { padding: 12px 15px; border-bottom: 1px solid #F0F0F0; font-size: 0.875rem; vertical-align: middle; }
.admin-table tr:hover td { background: #FFF8F0; }
.admin-table tr:last-child td { border-bottom: none; }

/* ===== ALERT ===== */
.alert-custom {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 15px;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.alert-success { background: #D4EDDA; color: #155724; border: 1px solid #C3E6CB; }
.alert-danger { background: #F8D7DA; color: #721C24; border: 1px solid #F5C6CB; }
.alert-info { background: #CCE5FF; color: #004085; border: 1px solid #B8DAFF; }

/* ===== UTILITIES ===== */
.container-custom { max-width: 480px; margin: 0 auto; padding: 20px; padding-bottom: 80px; }
.text-gold { color: var(--gold); }
.text-primary-custom { color: var(--primary); }
.divider { height: 1px; background: linear-gradient(90deg, transparent, var(--gold), transparent); margin: 20px 0; }
.section-title { font-size: 1.1rem; font-weight: 700; color: var(--primary); margin-bottom: 15px; display: flex; align-items: center; gap: 8px; font-family: 'Tiro Devanagari Hindi', serif; }

/* Spinner */
.spinner { border: 3px solid rgba(255,255,255,0.3); border-top-color: white; border-radius: 50%; width: 20px; height: 20px; animation: spin 0.8s linear infinite; display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Country select */
.country-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; max-width: 480px; margin: 0 auto; }
.country-btn {
  background: white;
  border: 2px solid #E8D5B7;
  border-radius: var(--radius-sm);
  padding: 14px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 0.9rem;
  font-weight: 500;
}
.country-btn:hover, .country-btn.selected {
  border-color: var(--gold);
  background: #FFF8E1;
  color: var(--primary);
}
.country-btn .flag { font-size: 1.8rem; display: block; margin-bottom: 5px; }

@media (max-width: 768px) {
  .admin-sidebar { transform: translateX(-260px); }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-main { margin-left: 0; }
}
