/* ============================================================
   ilovem-unified.css — Yagona Ekotizim Dizayn Tizimi (ilovem.uz)
   Asos: app.php / template.php Neo-Brutalist Playful Education Tokens
   ============================================================ */

:root {
  /* Ranglar Palitrasi */
  --g-green: #00B341;
  --g-green-d: #007A2B;
  --g-green-l: #E8FFE8;
  --g-yellow: #FFD000;
  --g-yellow-d: #B89000;
  --g-yellow-l: #FFFBE6;
  --g-blue: #1877F2;
  --g-blue-d: #0D5EBF;
  --g-blue-l: #E7F0FF;
  --g-red: #FF3B30;
  --g-red-d: #C00000;
  --g-red-l: #FFE8E8;
  --g-orange: #FF7A00;
  --g-purple: #8B2BE2;
  --g-out: #1A1A1A;
  --g-bg: #FFF9EC;
  --g-card: #FFFFFF;
  --g-muted: #64748b;
  --g-border-light: rgba(26, 26, 26, 0.12);

  /* Shriftlar */
  --g-ff: 'Fredoka One', cursive, system-ui;
  --g-fb: 'Nunito', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* 3D Taktil Soyalar va Ramkalar */
  --g-border: 3px solid #1A1A1A;
  --g-border-sm: 2px solid #1A1A1A;
  --g-border-lg: 4px solid #1A1A1A;
  --g-sh: 4px 4px 0 #1A1A1A;
  --g-sh-sm: 2px 2px 0 #1A1A1A;
  --g-sh-lg: 6px 6px 0 #1A1A1A;
  --g-sh-yellow: 4px 4px 0 #B89000;
  --g-sh-green: 4px 4px 0 #007A2B;
  --g-sh-blue: 4px 4px 0 #0D5EBF;

  /* Radiuslar */
  --g-r-sm: 10px;
  --g-r: 16px;
  --g-r-lg: 24px;
  --g-r-pill: 9999px;

  /* Balandliklar */
  --g-topbar-h: 62px;
  --g-bnav-h: 64px;
}

/* ================= Global Reset & Asosiy Fon ================= */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body.ilovem-theme {
  min-height: 100vh;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  position: relative;
  font-family: var(--g-fb);
  background-color: var(--g-bg);
  background-image: 
    radial-gradient(circle at 12% 18%, rgba(255, 208, 0, 0.14) 0%, transparent 40%),
    radial-gradient(circle at 88% 82%, rgba(0, 179, 65, 0.12) 0%, transparent 42%),
    radial-gradient(circle at 50% 50%, rgba(24, 119, 242, 0.05) 0%, transparent 50%);
  color: var(--g-out);
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
}

/* ================= Yagona Global Topbar ================= */
.g-topbar {
  background: var(--g-green);
  border-bottom: 3.5px solid var(--g-out);
  height: var(--g-topbar-h);
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  gap: 12px;
  box-shadow: 0 4px 14px rgba(0, 122, 43, 0.25);
}

.g-logo {
  font-family: var(--g-ff);
  font-size: 21px;
  color: #fff;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-shadow: 2px 2px 0 var(--g-green-d);
  flex-shrink: 0;
  transition: transform .15s ease;
}
.g-logo:hover {
  transform: scale(1.02);
}
.g-logo-icon {
  font-size: 24px;
  line-height: 1;
}

/* Desktop Havolalar */
.g-nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.g-nav-item a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #fff;
  text-decoration: none;
  font-family: var(--g-ff);
  font-size: 13.5px;
  padding: 6px 12px;
  border-radius: var(--g-r-pill);
  transition: all .15s ease;
  border: 2px solid transparent;
}
.g-nav-item a:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.4);
}
.g-nav-item.active a {
  background: var(--g-yellow);
  color: var(--g-out);
  border: 2px solid var(--g-out);
  box-shadow: 2px 2px 0 var(--g-out);
  text-shadow: none;
}

/* O'ng tomon: Online, User, Kirish */
.g-topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.g-online-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.18);
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  padding: 4px 10px;
  border-radius: var(--g-r-pill);
  font-family: var(--g-fb);
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
}
.g-online-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #7fff9e;
  box-shadow: 0 0 8px #00ff6a;
  animation: g-pulse 2s infinite;
}
@keyframes g-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: .7; }
}

.g-user-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--g-yellow-l);
  border: 2px solid var(--g-out);
  padding: 5px 12px;
  border-radius: var(--g-r-pill);
  font-family: var(--g-ff);
  font-size: 13px;
  color: var(--g-out);
  box-shadow: var(--g-sh-sm);
  text-decoration: none;
  transition: transform .15s ease;
}
.g-user-badge:hover {
  transform: translateY(-2px);
  background: #fff;
}

.g-btn-login {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--g-yellow);
  color: var(--g-out);
  border: 2px solid var(--g-out);
  border-radius: var(--g-r-pill);
  padding: 6px 14px;
  font-family: var(--g-ff);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  box-shadow: var(--g-sh-sm);
  transition: all .15s ease;
  white-space: nowrap;
}
.g-btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 3px 3px 0 var(--g-out);
  background: #fff;
}
.g-btn-login:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--g-out);
}

/* ================= Yagona Mobil Pastki Menyu (Bottom Nav) ================= */
.g-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(var(--g-bnav-h) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: #ffffff;
  border-top: 3px solid var(--g-out);
  z-index: 1000;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
}

.g-bottom-nav-inner {
  display: flex;
  height: 100%;
  align-items: center;
  justify-content: space-around;
  padding: 0 4px;
}

.g-bnav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  text-decoration: none;
  color: #64748b;
  font-family: var(--g-ff);
  font-size: 11px;
  padding: 6px 0;
  transition: all .15s ease;
}
.g-bnav-item .bnav-icon {
  font-size: 20px;
  line-height: 1;
  transition: transform .15s ease;
}
.g-bnav-item:active .bnav-icon {
  transform: scale(0.88);
}
.g-bnav-item.active {
  color: var(--g-green-d);
}
.g-bnav-item.active .bnav-icon {
  transform: translateY(-2px);
}
.g-bnav-item.active span {
  font-weight: 800;
  color: var(--g-green-d);
}

/* ================= Yagona Kartochkalar & Tugmalar ================= */
.g-card {
  background: var(--g-card);
  border: var(--g-border);
  border-radius: var(--g-r);
  box-shadow: var(--g-sh);
  padding: 20px;
  transition: transform .2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow .2s ease;
}
.g-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--g-sh-lg);
}

.g-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-family: var(--g-ff);
  font-size: 14.5px;
  border-radius: var(--g-r);
  border: var(--g-border);
  cursor: pointer;
  text-decoration: none;
  box-shadow: var(--g-sh);
  transition: all .15s ease;
  user-select: none;
}
.g-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--g-sh-lg);
}
.g-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--g-out);
}

.g-btn-green {
  background: var(--g-green);
  color: #fff;
  border-color: var(--g-out);
}
.g-btn-green:hover { background: #02c74a; }

.g-btn-yellow {
  background: var(--g-yellow);
  color: var(--g-out);
  border-color: var(--g-out);
}
.g-btn-yellow:hover { background: #ffe033; }

.g-btn-blue {
  background: var(--g-blue);
  color: #fff;
  border-color: var(--g-out);
}
.g-btn-blue:hover { background: #2f88ff; }

.g-btn-white {
  background: #ffffff;
  color: var(--g-out);
  border-color: var(--g-out);
}
.g-btn-white:hover { background: #f8fafc; }

/* Filter Chips */
.g-chips-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: none;
}
.g-chips-row::-webkit-scrollbar { display: none; }

.g-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: #fff;
  border: 2px solid var(--g-out);
  border-radius: var(--g-r-pill);
  font-family: var(--g-ff);
  font-size: 13px;
  color: var(--g-out);
  cursor: pointer;
  box-shadow: 2px 2px 0 var(--g-out);
  transition: all .15s ease;
  white-space: nowrap;
}
.g-chip:hover {
  background: var(--g-yellow-l);
  transform: translateY(-1px);
}
.g-chip.active {
  background: var(--g-green);
  color: #fff;
  box-shadow: 3px 3px 0 var(--g-out);
}

/* ================= Yagona Futer ================= */
.g-footer {
  background: #ffffff;
  border-top: 3.5px solid var(--g-out);
  margin-top: auto;
  padding: 36px 20px 24px;
}
.g-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 28px;
  margin-bottom: 24px;
}
.g-footer-col h4 {
  font-family: var(--g-ff);
  font-size: 16px;
  color: var(--g-out);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.g-footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.g-footer-col ul a {
  color: #475569;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 600;
  transition: color .15s ease;
}
.g-footer-col ul a:hover {
  color: var(--g-green-d);
  text-decoration: underline;
}
.g-footer-bottom {
  border-top: 2px solid rgba(26, 26, 26, 0.1);
  padding-top: 16px;
  text-align: center;
  font-size: 12.5px;
  color: #64748b;
  font-weight: 600;
}

/* ================= Responsiv Moslashuv ================= */
@media (max-width: 900px) {
  .g-nav-links { display: none; }
}

@media (max-width: 768px) {
  .g-bottom-nav { display: block; }
  body.ilovem-theme { padding-bottom: calc(var(--g-bnav-h) + 12px); }
  .g-logo { font-size: 18px; }
  .g-online-badge { display: inline-flex; font-size: 11px; padding: 3px 8px; }
  .g-card { padding: 16px; }
}
