/* =============================================
   Hinggo — Main Stylesheet
   ============================================= */

:root {
  --pink:    #e91e8c;
  --pink2:   #ff6db6;
  --dark:    #1a1a2e;
  --darker:  #0f0f1a;
  --card:    #16213e;
  --text:    #e8e8f0;
  --muted:   #8888aa;
  --border:  #2a2a4a;
  --radius:  12px;
  --shadow:  0 4px 20px rgba(0,0,0,0.4);
}

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

body {
  font-family: 'Inter', sans-serif;
  background: var(--darker);
  color: var(--text);
  min-height: 100vh;
}

a { color: var(--pink); text-decoration: none; }
a:hover { color: var(--pink2); }

img { max-width: 100%; display: block; }

/* ---- Nav ---- */
.hg-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 60px;
  background: var(--dark);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.hg-logo {
  font-size: 1.4rem;
  font-weight: 700;
  background: linear-gradient(90deg, var(--pink), var(--pink2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hg-nav-links { display: flex; gap: 20px; align-items: center; }
.hg-nav-links a { color: var(--muted); font-size: 0.9rem; font-weight: 500; }
.hg-nav-links a:hover, .hg-nav-links a.active { color: var(--text); }

/* ---- Buttons ---- */
.hg-btn {
  display: inline-block;
  padding: 10px 22px;
  background: linear-gradient(135deg, var(--pink), var(--pink2));
  color: #fff;
  border: none;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}
.hg-btn:hover { opacity: 0.88; color: #fff; }
.hg-btn-outline {
  padding: 8px 20px;
  border: 2px solid var(--pink);
  border-radius: 50px;
  color: var(--pink) !important;
  font-weight: 600;
  font-size: 0.9rem;
}
.hg-btn-outline:hover { background: var(--pink); color: #fff !important; }
.hg-btn-sm { padding: 6px 14px; font-size: 0.8rem; }
.hg-btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 18px;
  border-radius: 50px;
  cursor: pointer;
  font-size: 0.85rem;
}

/* ---- Cards ---- */
.hg-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

/* ---- Container ---- */
.hg-container { max-width: 1100px; margin: 0 auto; padding: 24px 16px; }
.hg-container-sm { max-width: 480px; margin: 0 auto; padding: 40px 16px; }

/* ---- Forms ---- */
.hg-form-group { margin-bottom: 18px; }
.hg-form-group label { display: block; font-size: 0.85rem; color: var(--muted); margin-bottom: 6px; }
.hg-input {
  width: 100%;
  padding: 12px 16px;
  background: var(--dark);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.95rem;
}
.hg-input:focus { outline: none; border-color: var(--pink); }
.hg-input::placeholder { color: var(--muted); }
select.hg-input { appearance: none; }
textarea.hg-input { resize: vertical; min-height: 90px; }

/* ---- Alert ---- */
.hg-alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-size: 0.9rem; }
.hg-alert-error { background: rgba(220,50,50,0.15); border: 1px solid #dc3232; color: #ff8080; }
.hg-alert-success { background: rgba(50,200,100,0.15); border: 1px solid #32c864; color: #64dd64; }

/* ====================================================
   INDEX / HERO
   ==================================================== */
.hg-hero {
  text-align: center;
  padding: 80px 20px 60px;
}
.hg-hero h1 {
  font-size: 2.8rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 16px;
}
.hg-hero h1 span {
  background: linear-gradient(90deg, var(--pink), var(--pink2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hg-hero p { color: var(--muted); font-size: 1.1rem; max-width: 560px; margin: 0 auto 30px; }

.hg-stats-row { display: flex; justify-content: center; gap: 40px; margin: 40px 0; flex-wrap: wrap; }
.hg-stat { text-align: center; }
.hg-stat-num { font-size: 2rem; font-weight: 700; color: var(--pink); }
.hg-stat-label { font-size: 0.85rem; color: var(--muted); margin-top: 4px; }

/* ---- Dashboard cards ---- */
.hg-dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; }
.hg-dash-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  transition: border-color 0.2s, transform 0.2s;
  display: block;
  color: var(--text);
}
.hg-dash-card:hover { border-color: var(--pink); transform: translateY(-2px); color: var(--text); }
.hg-dash-icon { font-size: 2.2rem; margin-bottom: 10px; }
.hg-dash-label { font-size: 0.95rem; font-weight: 600; }
.hg-dash-num { font-size: 1.6rem; font-weight: 700; color: var(--pink); margin-top: 4px; }

/* ====================================================
   BROWSE
   ==================================================== */
.hg-browse-filters {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  align-items: center;
}
.hg-browse-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
@media (min-width: 640px)  { .hg-browse-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px)  { .hg-browse-grid { grid-template-columns: repeat(4, 1fr); } }

.hg-profile-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  transition: transform 0.2s;
}
.hg-profile-card:hover { transform: translateY(-3px); }
.hg-profile-card-img { position: relative; }
.hg-profile-card-img img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
}
.hg-locked-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15,15,26,0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
}
.hg-locked-overlay .lock-icon { font-size: 2rem; }
.hg-locked-overlay a { font-size: 0.78rem; color: var(--pink); }
.hg-online-dot {
  position: absolute;
  top: 8px; right: 8px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #2ecc71;
  border: 2px solid var(--card);
}
.hg-profile-card-info { padding: 10px 12px 14px; }
.hg-profile-card-name { font-weight: 600; font-size: 0.95rem; }
.hg-profile-card-meta { font-size: 0.78rem; color: var(--muted); margin: 2px 0 10px; }
.hg-card-actions { display: flex; gap: 8px; }
.hg-card-actions form { flex: 1; }
.hg-card-actions .hg-btn { width: 100%; text-align: center; padding: 7px 6px; font-size: 0.78rem; }

/* ====================================================
   PROFILE — Instagram style
   ==================================================== */
.hg-profile-header {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  padding: 32px 0 24px;
  flex-wrap: wrap;
}
.hg-avatar-wrap { position: relative; flex-shrink: 0; }
.hg-avatar-ring {
  width: 120px; height: 120px;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(135deg, var(--pink), var(--pink2), #ff9a00);
  display: block;
}
.hg-avatar-ring img {
  width: 100%; height: 100%;
  border-radius: 50%;
  border: 3px solid var(--darker);
  object-fit: cover;
}
.hg-profile-info { flex: 1; }
.hg-profile-username { font-size: 1.4rem; font-weight: 600; margin-bottom: 10px; }
.hg-profile-stats { display: flex; gap: 28px; margin-bottom: 16px; }
.hg-profile-stat { text-align: center; }
.hg-profile-stat-num { font-size: 1.1rem; font-weight: 700; }
.hg-profile-stat-label { font-size: 0.78rem; color: var(--muted); }
.hg-profile-bio { font-size: 0.9rem; color: var(--muted); max-width: 400px; line-height: 1.5; }
.hg-profile-location { font-size: 0.85rem; color: var(--muted); margin-top: 4px; }
.hg-profile-location::before { content: "📍 "; }

.hg-profile-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  margin-top: 20px;
}
.hg-profile-grid-item { position: relative; aspect-ratio: 1; overflow: hidden; }
.hg-profile-grid-item img { width: 100%; height: 100%; object-fit: cover; transition: opacity 0.2s; }
.hg-profile-grid-item:hover img { opacity: 0.8; }

/* ====================================================
   MESSAGES
   ==================================================== */
.hg-messages-layout { display: grid; grid-template-columns: 300px 1fr; gap: 0; height: calc(100vh - 60px); }
.hg-thread-list { border-right: 1px solid var(--border); overflow-y: auto; }
.hg-thread-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s;
}
.hg-thread-item:hover, .hg-thread-item.active { background: var(--dark); }
.hg-thread-avatar { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; }
.hg-thread-info { flex: 1; min-width: 0; }
.hg-thread-name { font-weight: 600; font-size: 0.9rem; }
.hg-thread-preview { font-size: 0.78rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hg-thread-time { font-size: 0.72rem; color: var(--muted); }

.hg-chat-area { display: flex; flex-direction: column; }
.hg-chat-header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}
.hg-messages-list { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.hg-msg { max-width: 60%; }
.hg-msg-me { align-self: flex-end; }
.hg-msg-other { align-self: flex-start; }
.hg-msg-bubble {
  padding: 10px 14px;
  border-radius: 18px;
  font-size: 0.9rem;
  line-height: 1.4;
}
.hg-msg-me .hg-msg-bubble { background: var(--pink); color: #fff; border-bottom-right-radius: 4px; }
.hg-msg-other .hg-msg-bubble { background: var(--card); border-bottom-left-radius: 4px; }
.hg-msg-time { font-size: 0.7rem; color: var(--muted); margin-top: 3px; text-align: right; }

.hg-chat-input-area {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
}
.hg-chat-input-area input { flex: 1; }
.hg-chat-call-btn {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  color: var(--text);
  transition: background 0.15s;
}
.hg-chat-call-btn:hover { background: var(--dark); }

/* ====================================================
   AUTH PAGES
   ==================================================== */
.hg-auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: radial-gradient(ellipse at center, rgba(233,30,140,0.08) 0%, var(--darker) 70%);
}
.hg-auth-box {
  width: 100%;
  max-width: 420px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 32px;
}
.hg-auth-logo { text-align: center; font-size: 1.8rem; font-weight: 700; margin-bottom: 24px; }
.hg-auth-logo span {
  background: linear-gradient(90deg, var(--pink), var(--pink2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ====================================================
   UPGRADE / PREMIUM
   ==================================================== */
.hg-premium-banner {
  background: linear-gradient(135deg, rgba(233,30,140,0.15), rgba(255,109,182,0.08));
  border: 1px solid rgba(233,30,140,0.3);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  margin-bottom: 24px;
}

/* ====================================================
   FOOTER
   ==================================================== */
.hg-footer {
  border-top: 1px solid var(--border);
  padding: 24px 16px;
  margin-top: 60px;
}
.hg-footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.82rem;
  color: var(--muted);
}
.hg-footer-links { display: flex; gap: 16px; }
.hg-footer-links a { color: var(--muted); }
.hg-footer-links a:hover { color: var(--text); }

/* ====================================================
   ADSTERRA AD ZONES
   ==================================================== */
.hg-ad-native { margin: 24px 0; }
.hg-ad-banner { margin: 16px 0; text-align: center; }

/* ====================================================
   RESPONSIVE
   ==================================================== */
@media (max-width: 768px) {
  .hg-hero h1 { font-size: 2rem; }
  .hg-messages-layout { grid-template-columns: 1fr; }
  .hg-thread-list { display: none; }
  .hg-profile-header { gap: 20px; }
  .hg-avatar-ring { width: 88px; height: 88px; }
}
