/* ===== SOLUTION ASTROLOGY PLATFORM - MOBILE FIRST ===== */

:root {
  --navy-deep: #0a1432;
  --navy: #0f1b44;
  --navy-light: #1a2a5e;
  --gold: #e8b84a;
  --gold-bright: #ffd872;
  --gold-dark: #b8881e;
  --cream: #f7f1e3;
  --white: #ffffff;
  --text-dark: #1a1a2e;
  --text-muted: #6b7280;
  --bg-light: #fbf8f1;
  --border: rgba(232, 184, 74, 0.25);
  --success: #10b981;
  --danger: #ef4444;
  --info: #3b82f6;

  --font-display: 'Cinzel', serif;
  --font-ui: 'Outfit', sans-serif;
  --font-body: 'Cormorant Garamond', serif;

  --shadow-sm: 0 2px 8px rgba(10, 20, 50, 0.08);
  --shadow-md: 0 4px 20px rgba(10, 20, 50, 0.12);
  --shadow-lg: 0 10px 40px rgba(232, 184, 74, 0.25);

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 20px;
  --radius-full: 50px;

  --header-height: 60px;
  --bottom-nav-height: 70px;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-ui);
  color: var(--text-dark);
  background: var(--bg-light);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  font-size: 14px;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; outline: none; }

/* ===== HEADINGS ===== */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--navy-deep);
}
h1 { font-size: 24px; }
h2 { font-size: 20px; }
h3 { font-size: 17px; }
h4 { font-size: 15px; }

.gold { color: var(--gold-dark); }

/* ===== APP CONTAINER (Mobile-first) ===== */
.app-container {
  max-width: 480px;
  margin: 0 auto;
  background: var(--white);
  min-height: 100vh;
  position: relative;
  box-shadow: 0 0 30px rgba(0,0,0,0.05);
}

/* ===== TOP HEADER ===== */
.app-header {
  background: linear-gradient(135deg, var(--navy-deep), var(--navy));
  color: white;
  padding: 14px 16px;
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.app-header .header-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--gold-bright);
  flex: 1;
  text-align: center;
}

.app-header .icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  font-size: 20px;
  background: rgba(232, 184, 74, 0.1);
  transition: all 0.2s;
}

.app-header .icon-btn:active { transform: scale(0.92); background: rgba(232, 184, 74, 0.2); }

.app-header .back-btn {
  background: rgba(255,255,255,0.1);
  color: white;
}

/* ===== MAIN CONTENT ===== */
.app-main {
  padding: 16px;
  padding-bottom: calc(var(--bottom-nav-height) + 24px);
  min-height: calc(100vh - var(--header-height));
}

.app-main.no-bottom-nav {
  padding-bottom: 16px;
}

/* ===== BOTTOM NAVIGATION ===== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  background: var(--white);
  display: flex;
  justify-content: space-around;
  padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
  box-shadow: 0 -2px 20px rgba(10, 20, 50, 0.1);
  z-index: 99;
  height: var(--bottom-nav-height);
  border-top: 1px solid var(--border);
}

.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--text-muted);
  padding: 6px;
  transition: all 0.2s;
  font-size: 11px;
  font-weight: 500;
}

.bottom-nav-item i {
  font-size: 22px;
}

.bottom-nav-item.active {
  color: var(--gold-dark);
}

.bottom-nav-item.active i {
  transform: translateY(-3px);
  filter: drop-shadow(0 4px 8px rgba(232, 184, 74, 0.4));
}

.bottom-nav-item:active { transform: scale(0.95); }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: var(--radius-full);
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.3px;
  transition: all 0.2s;
  white-space: nowrap;
  text-align: center;
  border: none;
  cursor: pointer;
}

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

.btn-gold {
  background: linear-gradient(135deg, var(--gold-bright), var(--gold), var(--gold-dark));
  color: var(--navy-deep);
  box-shadow: var(--shadow-lg);
}

.btn-navy {
  background: linear-gradient(135deg, var(--navy-deep), var(--navy));
  color: var(--gold);
  border: 2px solid var(--gold);
}

.btn-outline {
  background: transparent;
  color: var(--gold-dark);
  border: 2px solid var(--gold);
}

.btn-success { background: var(--success); color: white; }
.btn-danger { background: var(--danger); color: white; }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-lg { padding: 16px 32px; font-size: 16px; }

/* ===== FORMS ===== */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy-deep);
  margin-bottom: 6px;
  letter-spacing: 0.3px;
}

.form-control {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid rgba(10, 20, 50, 0.12);
  border-radius: var(--radius);
  font-size: 15px;
  background: var(--white);
  color: var(--navy-deep);
  transition: all 0.2s;
}

.form-control:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(232, 184, 74, 0.15);
}

.form-control::placeholder {
  color: var(--text-muted);
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236b7280' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

.input-icon {
  position: relative;
}
.input-icon i {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gold-dark);
  font-size: 16px;
}
.input-icon .form-control {
  padding-left: 44px;
}

/* ===== CARDS ===== */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
}

.card:active {
  transform: scale(0.98);
}

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

/* ===== AVATAR ===== */
.avatar {
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-bright), var(--gold-dark));
  color: var(--navy-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-family: var(--font-display);
  flex-shrink: 0;
  overflow: hidden;
}
.avatar-sm { width: 36px; height: 36px; font-size: 14px; }
.avatar-md { width: 50px; height: 50px; font-size: 18px; }
.avatar-lg { width: 70px; height: 70px; font-size: 26px; }
.avatar-xl { width: 100px; height: 100px; font-size: 36px; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ===== BADGES ===== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.badge-gold { background: rgba(232, 184, 74, 0.15); color: var(--gold-dark); }
.badge-success { background: rgba(16, 185, 129, 0.15); color: var(--success); }
.badge-danger { background: rgba(239, 68, 68, 0.15); color: var(--danger); }
.badge-online::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--success);
  border-radius: 50%;
  display: inline-block;
}

/* ===== UTILITIES ===== */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-gold { color: var(--gold-dark); }
.text-navy { color: var(--navy-deep); }

.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-5 { margin-top: 24px; }
.mt-6 { margin-top: 32px; }

.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-5 { margin-bottom: 24px; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }

/* ===== LOADING ===== */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(232, 184, 74, 0.3);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.fullscreen-loader {
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

/* ===== TOAST NOTIFICATIONS ===== */
.toast {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  background: var(--navy-deep);
  color: white;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  font-size: 14px;
  z-index: 9999;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transition: all 0.3s;
  border: 1px solid var(--gold);
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast.success { border-color: var(--success); }
.toast.error { border-color: var(--danger); }

/* ===== EMPTY STATES ===== */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}
.empty-state i {
  font-size: 48px;
  color: var(--gold);
  opacity: 0.5;
  margin-bottom: 16px;
}
.empty-state h3 { color: var(--navy-deep); margin-bottom: 8px; font-size: 18px; }
.empty-state p { font-size: 14px; }

/* ===== LANG TOGGLE ===== */
.lang-toggle {
  display: inline-flex;
  background: rgba(232, 184, 74, 0.15);
  border-radius: var(--radius-full);
  padding: 4px;
  border: 1px solid var(--border);
}
.lang-toggle button {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  transition: all 0.2s;
}
.lang-toggle button.active {
  background: var(--gold);
  color: var(--navy-deep);
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

/* ===== RESPONSIVE ===== */
@media (min-width: 768px) {
  body { background: var(--navy-deep); }
  body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
      radial-gradient(2px 2px at 20px 30px, rgba(232,184,74,0.4), transparent),
      radial-gradient(1px 1px at 40px 70px, rgba(255,255,255,0.4), transparent),
      radial-gradient(1px 1px at 90px 40px, rgba(232,184,74,0.5), transparent);
    background-size: 200px 100px;
    background-repeat: repeat;
    pointer-events: none;
    opacity: 0.5;
  }
  .app-container {
    margin: 20px auto;
    border-radius: 24px;
    overflow: hidden;
    min-height: calc(100vh - 40px);
  }
}
