.gr-shell { display: flex; min-height: 100vh; }
.gr-sidebar {
  width: 256px;
  background: var(--gr-sidebar-bg);
  border-right: 1px solid var(--gr-border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 30;
}
.gr-brand {
  height: 64px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--gr-border);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.015em;
}
.gr-brand-badge {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--gr-primary);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.gr-nav {
  flex: 1;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
}
.gr-nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--gr-muted);
  transition: background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}
.gr-nav-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.gr-nav a:hover { background: rgba(148, 163, 184, 0.12); color: var(--gr-text); }
html[data-theme="dark"] .gr-nav a:hover { background: rgba(30, 41, 59, 0.6); color: #fff; }
.gr-nav a.is-active { background: rgba(124, 58, 237, 0.14); color: #a78bfa; font-weight: 600; }
html:not([data-theme="dark"]) .gr-nav a.is-active { color: #7c3aed; }
.gr-sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--gr-border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.gr-main {
  flex: 1;
  margin-left: 256px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.gr-topbar {
  position: sticky;
  top: 0;
  z-index: 25;
  height: 64px;
  border-bottom: 1px solid var(--gr-border);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
html[data-theme="dark"] .gr-topbar {
  background: rgba(14, 19, 32, 0.94);
}
.gr-topbar-title { font-size: 14px; font-weight: 500; color: var(--gr-muted); }
.gr-topbar-brand-mobile { display: none; font-size: 16px; font-weight: 800; }
.gr-topbar-right { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.gr-coin-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 12px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: var(--gr-gold);
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.gr-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: 1px solid var(--gr-border);
  background: transparent;
  color: var(--gr-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
}
.gr-icon-btn:hover { background: rgba(148, 163, 184, 0.12); }
.gr-notif-dot {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 17px;
  height: 17px;
  border-radius: 9999px;
  background: #e11d48;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}
.gr-content { max-width: 1280px; width: 100%; margin: 0 auto; padding: 24px; }

/* Home Hero & Sections */
.gr-hero {
  display: grid;
  grid-template-columns: 7fr 5fr;
  align-items: stretch;
  background: var(--gr-surface);
  border: 1px solid var(--gr-border);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 32px;
}
.gr-hero-body {
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
}
.gr-hero-kicker { font-size: 12px; font-weight: 600; color: #a78bfa; margin: 0 0 12px; }
html:not([data-theme="dark"]) .gr-hero-kicker { color: #7c3aed; }
.gr-hero-title { font-size: 34px; line-height: 1.18; font-weight: 800; margin: 0 0 14px; letter-spacing: -0.025em; }
.gr-hero-desc { font-size: 15px; color: var(--gr-muted); line-height: 1.65; margin: 0; max-width: 560px; }
.gr-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.gr-hero-media { position: relative; min-height: 280px; background: #0f172a; overflow: hidden; }
.gr-hero-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }

.gr-section { margin-top: 36px; }
.gr-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.gr-section-head h2 { margin: 0; font-size: 20px; font-weight: 800; }
.gr-section-head p { margin: 4px 0 0; font-size: 12px; color: var(--gr-muted); }
.gr-link-more { font-size: 13px; font-weight: 600; color: #a78bfa; white-space: nowrap; }
html:not([data-theme="dark"]) .gr-link-more { color: #7c3aed; }
.gr-link-more:hover { text-decoration: underline; }

.gr-kpi-label { font-size: 12px; color: var(--gr-muted); margin: 0; }
.gr-kpi-val { font-size: 24px; font-weight: 800; margin: 6px 0 0; font-variant-numeric: tabular-nums; font-family: 'JetBrains Mono', ui-monospace, monospace; }
.gr-text-emerald { color: var(--gr-emerald); }
.gr-text-gold { color: var(--gr-gold); }
.gr-text-violet { color: #a78bfa; }

.gr-game-card {
  background: var(--gr-surface);
  border: 1px solid var(--gr-border);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.gr-game-card:hover { transform: translateY(-2px); border-color: rgba(124, 58, 237, 0.55); }
.gr-game-thumb { aspect-ratio: 4 / 3; background: #0f172a; overflow: hidden; }
.gr-game-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gr-game-body { padding: 16px; }
.gr-game-meta { font-size: 12px; color: var(--gr-muted); margin: 0 0 6px; }
.gr-game-title { font-size: 16px; font-weight: 700; margin: 0 0 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gr-game-price { font-size: 14px; font-weight: 700; color: var(--gr-gold); margin: 0; }

.gr-task-card {
  background: var(--gr-surface);
  border: 1px solid var(--gr-border);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.gr-task-left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.gr-task-thumb { width: 52px; height: 52px; border-radius: 12px; object-fit: cover; flex-shrink: 0; background: #0f172a; }

.gr-auth-wrap { max-width: 440px; margin: 28px auto; }
.gr-auth-card {
  background: var(--gr-surface);
  border: 1px solid var(--gr-border);
  border-radius: 18px;
  padding: 28px;
}
.gr-auth-card h1 { margin: 0 0 6px; font-size: 22px; font-weight: 800; }
.gr-auth-sub { margin: 0 0 18px; font-size: 13px; color: var(--gr-muted); }
.gr-field { margin-bottom: 14px; }
.gr-field label { display: block; font-size: 12px; font-weight: 600; color: var(--gr-muted); margin-bottom: 6px; }
.gr-auth-links { margin-top: 16px; display: flex; justify-content: space-between; font-size: 12px; color: #a78bfa; }

.gr-mobile-nav { display: none; }
@media (max-width: 1023px) {
  .gr-sidebar { display: none; }
  .gr-main { margin-left: 0; }
  .gr-topbar { padding: 0 16px; }
  .gr-topbar-title { display: none; }
  .gr-topbar-brand-mobile { display: inline-block; }
  .gr-hero { grid-template-columns: 1fr; }
  .gr-hero-body { padding: 24px; }
  .gr-hero-title { font-size: 26px; }
  .gr-hero-media { min-height: 220px; }
  .gr-content { padding: 16px 16px 84px; }
  .gr-mobile-nav {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: 58px;
    background: var(--gr-sidebar-bg);
    border-top: 1px solid var(--gr-border);
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    align-items: center;
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    color: var(--gr-muted);
    z-index: 40;
  }
  .gr-mobile-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    height: 100%;
  }
  .gr-mobile-nav a.is-active {
    color: #a78bfa;
  }
}

/* Banner Carousel Controls */
.gr-hero-wrap { position: relative; margin-bottom: 32px; }
.gr-hero-wrap .gr-hero { margin-bottom: 0; }
.gr-hero-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(15, 23, 42, 0.68);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 6;
  transition: background 0.15s ease;
}
.gr-hero-nav:hover { background: rgba(124, 58, 237, 0.9); }
.gr-hero-prev { left: 12px; }
.gr-hero-next { right: 12px; }
.gr-hero-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 6;
}
.gr-hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  border: 0;
  padding: 0;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}
.gr-hero-dot.is-active { width: 22px; background: #fff; }

/* Task cover frame (larger on mobile) */
.gr-task-cover {
  height: 176px;
  background: #0f172a;
  overflow: hidden;
}
.gr-task-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
@media (max-width: 639px) {
  .gr-task-card {
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
  }
  .gr-task-left {
    flex-direction: column;
    align-items: stretch;
  }
  .gr-task-thumb {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
    border-radius: 14px;
  }
  .gr-task-cover {
    height: auto;
    aspect-ratio: 16 / 10;
    min-height: 200px;
  }
}

/* Popup Announcement Modal */
.gr-popup-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.gr-popup-backdrop.is-open { display: flex; }
.gr-popup-card {
  width: 100%;
  max-width: 480px;
  background: var(--gr-surface);
  border: 1px solid rgba(124, 58, 237, 0.45);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}
.gr-popup-head {
  padding: 14px 18px;
  border-bottom: 1px solid var(--gr-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.gr-popup-title-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.gr-popup-badge {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: rgba(124, 58, 237, 0.16);
  color: #a78bfa;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.gr-popup-head h3 { margin: 0; font-size: 16px; font-weight: 800; line-height: 1.3; }
.gr-popup-close {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid var(--gr-border);
  background: transparent;
  color: var(--gr-muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}
.gr-popup-close:hover { background: rgba(148, 163, 184, 0.15); color: var(--gr-text); }
.gr-popup-img { width: 100%; max-height: 220px; object-fit: cover; display: block; background: #0f172a; }
.gr-popup-body { padding: 18px; font-size: 14px; line-height: 1.65; color: var(--gr-text); max-height: 55vh; overflow-y: auto; }
.gr-popup-link { color: #a78bfa; text-decoration: underline; word-break: break-all; font-weight: 600; }
html:not([data-theme="dark"]) .gr-popup-link { color: #7c3aed; }
.gr-popup-foot {
  padding: 12px 18px;
  border-top: 1px solid var(--gr-border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.gr-popup-hint { font-size: 11px; color: var(--gr-muted); margin: 0; }

/* Facebook Tasks Module */
.gr-fb-step-card {
  background: var(--gr-surface);
  border: 1px solid var(--gr-border);
  border-radius: 16px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.gr-fb-step-card.is-done {
  border-color: rgba(16, 185, 129, 0.45);
  background: rgba(16, 185, 129, 0.04);
}
.gr-fb-step-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.gr-fb-step-title-wrap {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
  flex: 1;
}
.gr-fb-step-num {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: rgba(124, 58, 237, 0.14);
  border: 1px solid rgba(124, 58, 237, 0.35);
  color: #a78bfa;
  font-weight: 800;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
html:not([data-theme="dark"]) .gr-fb-step-num { color: #7c3aed; }
.gr-fb-step-card.is-done .gr-fb-step-num {
  background: rgba(16, 185, 129, 0.16);
  border-color: rgba(16, 185, 129, 0.45);
  color: var(--gr-emerald);
}
.gr-fb-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid var(--gr-border);
  background: var(--gr-surface-2);
  color: var(--gr-muted);
  white-space: nowrap;
}
.gr-fb-badge.is-req {
  border-color: rgba(245, 158, 11, 0.38);
  background: rgba(245, 158, 11, 0.12);
  color: var(--gr-gold);
}
.gr-fb-badge.is-done {
  border-color: rgba(16, 185, 129, 0.45);
  background: rgba(16, 185, 129, 0.14);
  color: var(--gr-emerald);
}
.gr-fb-step-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.gr-fb-fallback-box {
  border-radius: 12px;
  padding: 12px 14px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.38);
  font-size: 12.5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.gr-fb-next-card {
  background: var(--gr-surface);
  border: 1px solid var(--gr-border);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

