/* =====================================================
   Homepage (Site-styled layout, Nina golden palette)
   ===================================================== */

:root {
  /* Site structural vars, repainted with Nina golden */
  --hp-bg:           #0a0a0a;
  --hp-bg-soft:      #121212;
  --hp-panel:        #1a1a1a;
  --hp-panel-2:      #222222;
  --hp-card:         rgba(26, 26, 26, 0.85);
  --hp-card-border:  rgba(192, 192, 192, 0.18);
  --hp-card-border-h:rgba(192, 192, 192, 0.55);
  --hp-text:         #e8e8e8;
  --hp-text-dim:     rgba(232, 232, 232, 0.62);
  --hp-text-muted:   rgba(232, 232, 232, 0.42);
  --hp-primary:      #c0c0c0;
  --hp-primary-2:    #a0a0a0;
  --hp-primary-3:    #808080;
  --hp-primary-4:    #606060;
  --hp-accent:       #e8e8e8;
  --hp-danger:       #ff4444;
  --hp-success:      #22c55e;

  --hp-gradient-gold: linear-gradient(135deg, #c0c0c0 0%, #e8e8e8 25%, #a0a0a0 50%, #808080 75%, #606060 100%);
  --hp-gradient-dark: linear-gradient(135deg, rgba(0,8,20,0.96) 0%, rgba(26,26,26,0.92) 100%);

  --hp-radius:       12px;
  --hp-radius-sm:    8px;
  --hp-shadow:       0 8px 24px rgba(0, 0, 0, 0.5);
  --hp-shadow-gold:  0 4px 20px rgba(192, 192, 192, 0.25);
}

/* ---------- Base ---------- */

.hp-root {
  background: var(--hp-bg);
  color: var(--hp-text);
  font-family: var(--font-primary, 'Roboto Condensed', 'Poppins', sans-serif);
  min-height: 100vh;
}

.hp-root *,
.hp-root *::before,
.hp-root *::after {
  box-sizing: border-box;
}

.hp-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 16px;
}

.hp-section {
  margin-top: 32px;
}

.hp-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--hp-card-border);
  padding-bottom: 8px;
}

.hp-section-title {
  font-size: 20px;
  font-weight: 700;
  background: var(--hp-gradient-gold);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  letter-spacing: 0.5px;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hp-section-title i {
  color: var(--hp-primary);
  -webkit-text-fill-color: var(--hp-primary);
  background: none;
}

.hp-section-action {
  color: var(--hp-text-dim);
  font-size: 13px;
  text-decoration: none;
  transition: color 0.2s;
}
.hp-section-action:hover { color: var(--hp-primary); }

/* ---------- Hero banner ---------- */

.hp-hero {
  position: relative;
  border-radius: var(--hp-radius);
  overflow: hidden;
  min-height: 320px;
  display: flex;
  align-items: center;
  background: var(--hp-gradient-dark);
  border: 1px solid var(--hp-card-border);
  box-shadow: var(--hp-shadow);
}

.hp-hero__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.55;
  z-index: 0;
}

.hp-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    rgba(0, 8, 20, 0.92) 0%,
    rgba(0, 8, 20, 0.55) 50%,
    rgba(0, 8, 20, 0.25) 100%);
  z-index: 1;
}

.hp-hero__content {
  position: relative;
  z-index: 2;
  padding: 48px;
  max-width: 560px;
}

.hp-hero__subtitle {
  font-size: 14px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--hp-primary);
  margin-bottom: 10px;
}

.hp-hero__title {
  font-size: 40px;
  font-weight: 800;
  line-height: 1.15;
  margin: 0 0 20px;
  background: var(--hp-gradient-gold);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hp-hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: var(--hp-gradient-gold);
  color: var(--tg-bg, #0a0a0a);
  font-weight: 700;
  text-decoration: none;
  border-radius: var(--hp-radius-sm);
  transition: transform 0.2s, box-shadow 0.2s;
}
.hp-hero__cta:hover {
  transform: translateY(-2px);
  box-shadow: var(--hp-shadow-gold);
}

/* Slider */
.hp-banner-slider {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}

.hp-banner-card {
  position: relative;
  border-radius: var(--hp-radius);
  overflow: hidden;
  aspect-ratio: 16 / 7;
  background: var(--hp-panel);
  border: 1px solid var(--hp-card-border);
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
  text-decoration: none;
  color: var(--hp-text);
  display: block;
}
.hp-banner-card:hover {
  transform: translateY(-4px);
  border-color: var(--hp-card-border-h);
  box-shadow: var(--hp-shadow-gold);
}
.hp-banner-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hp-banner-card__caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 10px 14px;
  background: linear-gradient(0deg, rgba(0,8,20,0.92), transparent);
  font-weight: 600;
}

/* ---------- Grid cards ---------- */

.hp-grid {
  display: grid;
  gap: 14px;
}
.hp-grid-2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.hp-grid-3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.hp-grid-4 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.hp-grid-6 { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }

.hp-card {
  background: var(--hp-card);
  border: 1px solid var(--hp-card-border);
  border-radius: var(--hp-radius);
  padding: 16px;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  text-decoration: none;
  color: var(--hp-text);
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
}
.hp-card:hover {
  transform: translateY(-3px);
  border-color: var(--hp-card-border-h);
  box-shadow: var(--hp-shadow-gold);
}

/* ---------- Sponsor cards ---------- */

.hp-sponsor {
  min-height: 120px;
  padding: 8px;
  gap: 6px;
  align-items: stretch;
  justify-content: center;
  text-align: center;
  background: var(--hp-panel);
  overflow: hidden;
}
.hp-sponsor__logo-wrap {
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.hp-sponsor img {
  max-height: 100%;
  max-width: 80%;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(var(--rgb-primary, 192, 192, 192), 0.15));
}
.hp-sponsor__bonus {
  font-size: 11px;
  color: var(--hp-primary);
  font-weight: 700;
  line-height: 1.25;
  padding: 4px 6px;
  background: rgba(var(--rgb-primary, 192, 192, 192), 0.08);
  border-radius: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (max-width: 640px) {
  .hp-sponsor { padding: 4px; min-height: 100px; gap: 4px; }
  .hp-sponsor__logo-wrap { height: 50px; }
  .hp-sponsor img { max-width: 100%; max-height: 100%; }
  .hp-sponsor__bonus { font-size: 10px; padding: 3px 4px; }
}
.hp-sponsor__badge {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 3px 8px;
  background: var(--hp-gradient-gold);
  color: var(--tg-bg, #0a0a0a);
  font-size: 10px;
  font-weight: 700;
  border-radius: 4px;
  letter-spacing: 0.5px;
}
.hp-sponsor__name {
  font-size: 13px;
  color: var(--hp-text-dim);
  margin-top: 6px;
}

/* ---------- Event cards ---------- */

.hp-event {
  background: linear-gradient(135deg, var(--hp-panel) 0%, var(--hp-panel-2) 100%);
  border: 1px solid var(--hp-card-border);
  overflow: hidden;
}
.hp-event--pulse {
  border-color: var(--hp-primary);
  box-shadow: 0 0 0 0 rgba(var(--rgb-primary, 192, 192, 192), 0.4);
  animation: hp-pulse 2s infinite;
}
@keyframes hp-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(var(--rgb-primary, 192, 192, 192), 0.4); }
  70%  { box-shadow: 0 0 0 14px rgba(var(--rgb-primary, 192, 192, 192), 0); }
  100% { box-shadow: 0 0 0 0 rgba(var(--rgb-primary, 192, 192, 192), 0); }
}

.hp-event__image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--hp-radius-sm);
}
.hp-event__title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
}
.hp-event__prize {
  font-size: 20px;
  font-weight: 800;
  color: var(--hp-primary);
}
.hp-event__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--hp-text-dim);
  margin-top: auto;
}
.hp-event__cta {
  color: var(--hp-primary);
  font-weight: 600;
}

/* Countdown pill */
.hp-countdown {
  display: inline-flex;
  gap: 4px;
  font-variant-numeric: tabular-nums;
  color: var(--hp-accent);
  font-weight: 600;
}

/* ---------- Winners ---------- */

.hp-winners {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.hp-winner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--hp-card);
  border: 1px solid var(--hp-card-border);
  border-radius: var(--hp-radius-sm);
  padding: 8px 12px;
  font-size: 13px;
  transition: border-color 0.2s;
}
.hp-winner:hover { border-color: var(--hp-card-border-h); }

.hp-winner__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--hp-card-border);
}
.hp-winner__meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}
.hp-winner__name {
  font-weight: 600;
  color: var(--hp-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hp-winner__game {
  font-size: 11px;
  color: var(--hp-text-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hp-winner__amount {
  font-weight: 700;
  color: var(--hp-primary);
}
.hp-winner__mult {
  font-size: 11px;
  color: var(--hp-success);
}

/* ---------- YouTube ---------- */

.hp-yt {
  background: var(--hp-card);
  border: 1px solid var(--hp-card-border);
  border-radius: var(--hp-radius);
  overflow: hidden;
  text-decoration: none;
  color: var(--hp-text);
  display: block;
  transition: transform 0.2s, border-color 0.2s;
}
.hp-yt:hover { transform: translateY(-2px); border-color: var(--hp-card-border-h); }

.hp-yt__thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--tg-bg, #000);
  overflow: hidden;
}
.hp-yt__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hp-yt__play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.25);
  opacity: 0;
  transition: opacity 0.2s;
}
.hp-yt:hover .hp-yt__play { opacity: 1; }
.hp-yt__play i {
  font-size: 42px;
  color: var(--hp-primary);
  filter: drop-shadow(0 0 12px rgba(var(--rgb-primary, 192, 192, 192), 0.7));
}
.hp-yt__label {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.7);
  color: var(--hp-accent);
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 3px;
}
.hp-yt__title {
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- Instagram reels ---------- */

.hp-ig {
  background: var(--hp-card);
  border: 1px solid var(--hp-card-border);
  border-radius: var(--hp-radius);
  overflow: hidden;
  text-decoration: none;
  color: var(--hp-text);
  display: block;
  transition: transform 0.2s, border-color 0.2s;
  position: relative;
}
.hp-ig:hover { transform: translateY(-2px); border-color: var(--hp-card-border-h); }
.hp-ig img {
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  display: block;
}
.hp-ig__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 10px;
  background: linear-gradient(0deg, rgba(0,8,20,0.9) 0%, transparent 60%);
  font-size: 12px;
  color: var(--hp-text);
}
.hp-ig__label { color: var(--hp-text-dim); font-size: 10px; }

/* ---------- Onboarding steps ---------- */

.hp-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.hp-step {
  position: relative;
  background: var(--hp-card);
  border: 1px solid var(--hp-card-border);
  border-radius: var(--hp-radius);
  padding: 20px;
  text-decoration: none;
  color: var(--hp-text);
  transition: border-color 0.2s, transform 0.2s;
  text-align: center;
}
.hp-step:hover {
  transform: translateY(-3px);
  border-color: var(--hp-card-border-h);
}
.hp-step__num {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--hp-gradient-gold);
  color: var(--tg-bg, #0a0a0a);
  font-weight: 800;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hp-step__icon {
  font-size: 32px;
  color: var(--hp-primary);
  margin: 12px 0;
}
.hp-step__title {
  font-size: 16px;
  font-weight: 700;
  margin: 4px 0;
}
.hp-step__desc {
  font-size: 12px;
  color: var(--hp-text-dim);
}

/* ---------- Social cards ---------- */

.hp-social {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}
.hp-social__card {
  background: var(--hp-card);
  border: 1px solid var(--hp-card-border);
  border-radius: var(--hp-radius);
  padding: 16px;
  text-align: center;
  text-decoration: none;
  color: var(--hp-text);
  transition: transform 0.2s, border-color 0.2s;
}
.hp-social__card:hover {
  transform: translateY(-2px);
  border-color: var(--hp-card-border-h);
}
.hp-social__icon {
  font-size: 28px;
  color: var(--hp-primary);
  margin-bottom: 8px;
}
.hp-social__title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
}
.hp-social__btn {
  display: inline-block;
  margin-top: 8px;
  padding: 6px 14px;
  background: var(--hp-gradient-gold);
  color: var(--tg-bg, #0a0a0a);
  font-weight: 700;
  font-size: 12px;
  border-radius: 4px;
}

/* platform accents */
.hp-social__card[data-platform="telegram"]  .hp-social__icon { color: #26A5E4; }
.hp-social__card[data-platform="instagram"] .hp-social__icon { color: #E1306C; }
.hp-social__card[data-platform="youtube"]   .hp-social__icon { color: #FF0000; }
.hp-social__card[data-platform="twitter"]   .hp-social__icon { color: var(--tg-gradient-mid, #ffffff); }
.hp-social__card[data-platform="kick"]      .hp-social__icon { color: #53FC18; }

/* ---------- Quick actions (redirect tiles) ---------- */

.hp-quick {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}
@media (max-width: 640px) {
  .hp-quick {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }
  /* Last orphan spans full row when odd count */
  .hp-quick .hp-quick__card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
  .hp-quick__card {
    padding: 6px 8px;
    gap: 2px;
    border-radius: 8px;
    border-left-width: 2px;
    flex-direction: row;
    align-items: center;
  }
  .hp-quick__icon { font-size: 14px; margin-right: 4px; }
  .hp-quick__title { font-size: 11px; letter-spacing: 0; line-height: 1.15; }
  .hp-quick__desc { display: none; }
  .hp-quick__badge { padding: 1px 4px; font-size: 7px; top: 3px; right: 3px; border-radius: 3px; }
}
.hp-quick__card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 18px;
  background: linear-gradient(135deg, var(--hp-panel) 0%, var(--hp-panel-2) 100%);
  border: 1px solid var(--hp-card-border);
  border-left: 3px solid var(--qa-accent, var(--hp-primary));
  border-radius: var(--hp-radius);
  text-decoration: none;
  color: var(--hp-text);
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.hp-quick__card:hover {
  transform: translateY(-3px);
  border-color: var(--hp-card-border-h);
  border-left-color: var(--qa-accent, var(--hp-primary));
  box-shadow: var(--hp-shadow-gold);
}
.hp-quick__icon {
  font-size: 28px;
  color: var(--qa-accent, var(--hp-primary));
  line-height: 1;
}
.hp-quick__title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.3px;
}
.hp-quick__desc {
  font-size: 12px;
  color: var(--hp-text-dim);
  line-height: 1.35;
}
.hp-quick__badge {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 3px 8px;
  background: var(--hp-gradient-gold);
  color: var(--tg-bg, #0a0a0a);
  font-size: 10px;
  font-weight: 700;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

/* ---------- Coupons (auto-fed from recommended_coupons) ---------- */

.hp-coupon { overflow: hidden; }
.hp-coupon__image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--hp-radius-sm);
}
.hp-coupon__title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
}
.hp-coupon__desc {
  font-size: 12px;
  color: var(--hp-text-dim);
  line-height: 1.4;
}
.hp-coupon__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  font-size: 12px;
}
.hp-coupon__status {
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}
.hp-coupon__status--success { background: rgba(34,197,94,0.15); color: var(--hp-success); }
.hp-coupon__status--failed  { background: rgba(255,68,68,0.15); color: var(--hp-danger); }
.hp-coupon__status--pending { background: rgba(255,176,0,0.15); color: var(--hp-primary); }
.hp-coupon__cta { color: var(--hp-primary); font-weight: 600; }

/* ---------- Bonus Hunts ---------- */

.hp-bonushunt {
  background: linear-gradient(135deg, rgba(255,176,0,0.04) 0%, var(--hp-panel-2) 100%);
}
.hp-bonushunt__title {
  font-size: 16px;
  font-weight: 700;
}
.hp-bonushunt__desc {
  font-size: 12px;
  color: var(--hp-text-dim);
  line-height: 1.4;
}
.hp-bonushunt__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--hp-card-border);
}
.hp-bonushunt__reward {
  font-weight: 700;
  color: var(--hp-primary);
  font-size: 13px;
}
.hp-bonushunt__reward i { margin-right: 4px; }
.hp-bonushunt__cta {
  font-size: 12px;
  color: var(--hp-primary);
  font-weight: 600;
}

/* ---------- Site-styled chrome: subheader ---------- */

.hp-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 0;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--hp-card-border);
}
.hp-subnav__item {
  padding: 6px 14px;
  background: rgba(var(--rgb-highlight, 255, 255, 255), 0.04);
  border: 1px solid transparent;
  border-radius: 20px;
  text-decoration: none;
  color: var(--hp-text-dim);
  font-size: 13px;
  transition: all 0.2s;
}
.hp-subnav__item:hover {
  border-color: var(--hp-card-border-h);
  color: var(--hp-primary);
}
.hp-subnav__item.active {
  background: var(--hp-gradient-gold);
  color: var(--tg-bg, #0a0a0a);
  font-weight: 700;
}

/* ---------- Responsive ---------- */

@media (max-width: 768px) {
  .hp-hero { min-height: 220px; }
  .hp-hero__content { padding: 24px; }
  .hp-hero__title { font-size: 26px; }
  .hp-section-title { font-size: 16px; }
}

/* ---------- Admin Builder styles (minimal) ---------- */

.hb-wrap {
  padding: 20px;
  color: var(--hp-text);
}
.hb-tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  border-bottom: 2px solid var(--hp-card-border);
  margin-bottom: 20px;
}
.hb-tab {
  padding: 10px 16px;
  background: transparent;
  border: none;
  color: var(--hp-text-dim);
  cursor: pointer;
  font-weight: 600;
  border-bottom: 3px solid transparent;
  transition: all 0.2s;
}
.hb-tab:hover { color: var(--hp-primary); }
.hb-tab.active {
  color: var(--hp-primary);
  border-bottom-color: var(--hp-primary);
}

.hb-panel { display: none; }
.hb-panel.active { display: block; }

.hb-sections-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}
.hb-section-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--hp-card);
  border: 1px solid var(--hp-card-border);
  border-radius: var(--hp-radius-sm);
  cursor: grab;
}
.hb-section-row[draggable="true"]:active { cursor: grabbing; }
.hb-section-row__drag { color: var(--hp-text-muted); }
.hb-section-row__title { flex: 1; font-weight: 600; }

.hb-toggle {
  position: relative;
  width: 44px;
  height: 22px;
  background: #444;
  border-radius: 22px;
  cursor: pointer;
  transition: background 0.2s;
}
.hb-toggle::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  background: white;
  border-radius: 50%;
  transition: transform 0.2s;
}
.hb-toggle.on { background: var(--hp-primary); }
.hb-toggle.on::after { transform: translateX(22px); }

.hb-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.hb-table th,
.hb-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--hp-card-border);
  text-align: left;
}
.hb-table th {
  color: var(--hp-text-dim);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
}
.hb-table tr:hover td { background: rgba(var(--rgb-primary, 192, 192, 192), 0.04); }

.hb-btn {
  padding: 8px 14px;
  border: 1px solid var(--hp-card-border);
  background: var(--hp-panel);
  color: var(--hp-text);
  border-radius: var(--hp-radius-sm);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.hb-btn:hover {
  border-color: var(--hp-primary);
  color: var(--hp-primary);
}
.hb-btn--primary {
  background: var(--hp-gradient-gold);
  color: var(--tg-bg, #0a0a0a);
  border-color: transparent;
}
.hb-btn--primary:hover { color: var(--tg-bg, #0a0a0a); opacity: 0.9; }
.hb-btn--danger {
  color: var(--hp-danger);
  border-color: rgba(var(--rgb-danger, 255, 68, 68), 0.3);
}
.hb-btn--danger:hover {
  background: rgba(var(--rgb-danger, 255, 68, 68), 0.1);
  color: var(--hp-danger);
}

.hb-input,
.hb-textarea,
.hb-select {
  width: 100%;
  padding: 8px 10px;
  background: var(--hp-bg-soft);
  border: 1px solid var(--hp-card-border);
  border-radius: var(--hp-radius-sm);
  color: var(--hp-text);
  font-size: 13px;
  font-family: inherit;
}
.hb-textarea { min-height: 80px; resize: vertical; }
.hb-input:focus,
.hb-textarea:focus,
.hb-select:focus {
  outline: none;
  border-color: var(--hp-primary);
}

.hb-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.hb-form-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.hb-form-field label {
  font-size: 12px;
  color: var(--hp-text-dim);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.hb-toolbar {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  align-items: center;
  justify-content: space-between;
}

.hb-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.hb-modal.open { display: flex; }
.hb-modal__box {
  background: var(--hp-panel);
  border: 1px solid var(--hp-card-border);
  border-radius: var(--hp-radius);
  padding: 24px;
  max-width: 640px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}
.hb-modal__title {
  font-size: 18px;
  font-weight: 700;
  color: var(--hp-primary);
  margin-bottom: 16px;
}
.hb-modal__actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 16px;
}

/* Section preview thumbnails */
.hb-thumb {
  width: 60px;
  height: 36px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--hp-card-border);
}

/* Source-mode Manual/Otomatik buttons (sections list) */
.hb-source-mode {
  display: inline-flex;
  border: 1px solid var(--hp-card-border);
  border-radius: var(--hp-radius-sm);
  overflow: hidden;
  margin-right: 8px;
}
.hb-mode-btn {
  padding: 4px 10px;
  background: transparent;
  border: none;
  color: var(--hp-text-dim);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  letter-spacing: 0.3px;
}
.hb-mode-btn:hover { color: var(--hp-primary); }
.hb-mode-btn.active {
  background: var(--hp-gradient-gold);
  color: var(--tg-bg, #0a0a0a);
}
.hb-mode-btn + .hb-mode-btn { border-left: 1px solid var(--hp-card-border); }

/* ===== Sponsor Rows (Page Builder style) ===== */
.sr-row {
  background: var(--hp-panel);
  border: 1px solid var(--hp-card-border);
  border-radius: var(--hp-radius);
  padding: 16px;
  margin-bottom: 16px;
}
.sr-row__header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px dashed rgba(var(--rgb-primary, 192, 192, 192), 0.2);
  margin-bottom: 14px;
}
.sr-row__title {
  flex: 1;
  font-size: 16px;
  font-weight: 700;
  color: var(--hp-primary);
}
.sr-row__meta {
  color: var(--hp-text-dim);
  font-size: 12px;
}
.sr-row__actions {
  display: flex;
  gap: 6px;
}
.sr-row__actions button {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: rgba(var(--rgb-primary, 192, 192, 192), 0.08);
  border: 1px solid rgba(var(--rgb-primary, 192, 192, 192), 0.25);
  color: var(--hp-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.sr-row__actions button:hover {
  background: rgba(var(--rgb-primary, 192, 192, 192), 0.2);
}
.sr-row__actions button.sr-btn-danger {
  color: #ff6666;
  border-color: rgba(255, 80, 80, 0.3);
  background: rgba(255, 80, 80, 0.08);
}
.sr-row__actions button.sr-btn-danger:hover { background: rgba(255, 80, 80, 0.2); }

.sr-slots {
  display: grid;
  gap: 10px;
}
.sr-slot {
  position: relative;
  aspect-ratio: 4 / 1;
  border: 2px dashed rgba(var(--rgb-primary, 192, 192, 192), 0.25);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: rgba(0, 8, 20, 0.4);
  overflow: hidden;
  transition: all 0.15s;
}
.sr-slot:hover { border-color: var(--hp-primary); background: rgba(var(--rgb-primary, 192, 192, 192), 0.05); }
.sr-slot--empty { color: rgba(var(--rgb-text, 232, 232, 232), 0.3); font-size: 24px; }
.sr-slot--filled {
  border-style: solid;
  border-color: rgba(var(--rgb-primary, 192, 192, 192), 0.35);
  background: #0a0f1e;
}
.sr-slot__logo {
  max-width: 80%;
  max-height: 60%;
  object-fit: contain;
}
.sr-slot__name {
  position: absolute;
  bottom: 6px;
  left: 6px;
  right: 6px;
  text-align: center;
  font-size: 11px;
  color: var(--hp-text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sr-slot__del {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(255, 80, 80, 0.5);
  color: #ff6666;
  font-size: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.15s;
}
.sr-slot:hover .sr-slot__del { opacity: 1; }

/* Sponsor site picker grid (modal) */
.sr-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  margin-top: 12px;
  max-height: 60vh;
  overflow-y: auto;
  padding: 4px;
}
.sr-pick {
  aspect-ratio: 4 / 3;
  position: relative;
  border: 1px solid rgba(var(--rgb-primary, 192, 192, 192), 0.2);
  border-radius: 8px;
  background: #0a0f1e;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: all 0.15s;
}
.sr-pick:hover {
  border-color: var(--hp-primary);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(var(--rgb-primary, 192, 192, 192), 0.25);
}
.sr-pick img { max-width: 80%; max-height: 60%; object-fit: contain; }
.sr-pick i { color: rgba(var(--rgb-text, 232, 232, 232), 0.3); font-size: 26px; }
.sr-pick__name {
  position: absolute;
  inset: auto 0 0 0;
  padding: 4px 6px;
  background: linear-gradient(0deg, rgba(0,0,0,0.85), transparent);
  color: var(--tg-text, #e8e8e8);
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sr-pick--current {
  border-color: var(--hp-primary);
  box-shadow: 0 0 0 2px rgba(var(--rgb-primary, 192, 192, 192), 0.4);
}

/* ===== Popups (dynamic_page parity) ===== */
.hb-popups-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 900px) {
  .hb-popups-wrap { grid-template-columns: 1fr; }
}
.hb-popups-col {
  background: var(--hp-panel);
  border: 1px solid var(--hp-card-border);
  border-radius: var(--hp-radius);
  padding: 14px;
  min-height: 320px;
}
.hb-popups-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.hb-pp-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  background: rgba(0, 8, 20, 0.5);
  border: 1px solid rgba(var(--rgb-primary, 192, 192, 192), 0.2);
  border-radius: 10px;
  cursor: grab;
}
.hb-pp-item:active { cursor: grabbing; }
.hb-pp-item__thumb {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid rgba(var(--rgb-primary, 192, 192, 192), 0.25);
  flex-shrink: 0;
  background: #0a0f1e;
}
.hb-pp-item__body { flex: 1; min-width: 0; }
.hb-pp-item__name {
  font-weight: 700;
  color: var(--hp-text);
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hb-pp-item__meta {
  font-size: 11px;
  color: var(--hp-text-dim);
  margin-top: 2px;
}
.hb-pp-item__actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}
.hb-pp-item__actions button {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  background: rgba(var(--rgb-primary, 192, 192, 192), 0.08);
  border: 1px solid rgba(var(--rgb-primary, 192, 192, 192), 0.2);
  color: var(--hp-primary);
  cursor: pointer;
  font-size: 11px;
}
.hb-pp-item__actions button.danger {
  color: #ff6666;
  border-color: rgba(255, 80, 80, 0.25);
  background: rgba(255, 80, 80, 0.08);
}
.hb-pp-item.dragging { opacity: 0.4; }

.hb-popups-available {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 8px;
  margin-top: 10px;
  max-height: 560px;
  overflow-y: auto;
}
.hb-pp-avail {
  aspect-ratio: 1 / 1;
  position: relative;
  border-radius: 8px;
  border: 1px solid rgba(var(--rgb-primary, 192, 192, 192), 0.2);
  overflow: hidden;
  cursor: pointer;
  background: #0a0f1e;
  transition: all 0.15s;
}
.hb-pp-avail:hover {
  border-color: var(--hp-primary);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(var(--rgb-primary, 192, 192, 192), 0.25);
}
.hb-pp-avail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hb-pp-avail__label {
  position: absolute;
  inset: auto 0 0 0;
  padding: 4px 6px;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.85), transparent);
  color: var(--tg-text, #e8e8e8);
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hb-pp-avail--added {
  opacity: 0.35;
  pointer-events: none;
}
.hb-pp-avail--added::after {
  content: "✓";
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--hp-primary);
  color: var(--tg-bg, #0a0a0a);
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
}
