/* =============================================
   1SEC NANO BANANA – Main Stylesheet
   ============================================= */

/* ---- CSS Variables ---- */
:root {
  --bg: #0d0d1a;
  --bg-card: #13132a;
  --bg-sidebar: #0b0b1e;
  --bg-header: rgba(13, 13, 26, 0.95);
  --bg-popup: #15152e;
  --accent: #f5b800;
  --accent-2: #ff6b35;
  --accent-glow: rgba(245, 184, 0, 0.25);
  --text: #e8e8f0;
  --text-muted: #7a7a9a;
  --text-dim: #4a4a6a;
  --border: rgba(255, 255, 255, 0.07);
  --border-hover: rgba(245, 184, 0, 0.4);
  --radius: 14px;
  --radius-sm: 8px;
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-popup: 0 24px 80px rgba(0, 0, 0, 0.8);
  --sidebar-w: 240px;
  --header-h: 64px;
  --transition: 0.2s ease;
  --font: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ---- Reset ---- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: var(--font);
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--text-dim);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* =============================================
   AD BANNER TOP
   ============================================= */
.ad-banner-top {
  background: var(--bg-sidebar);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 6px;
  min-height: 50px;
}

.ad-slot {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ad-slot--leaderboard {
  width: 728px;
  max-width: 100%;
  min-height: 90px;
}

.ad-slot--sidebar {
  width: 160px;
  min-height: 300px;
}

.ad-slot--rectangle {
  width: 300px;
  min-height: 250px;
}

.ad-slot--footer {
  min-height: 60px;
  width: 100%;
  max-width: 728px;
  margin: 0 auto;
}

.ad-placeholder-label {
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--text-dim);
  border: 1px dashed var(--text-dim);
  padding: 2px 8px;
  border-radius: 4px;
  opacity: 0.5;
  position: absolute;
  bottom: 4px;
  right: 4px;
}

/* =============================================
   HEADER
   ============================================= */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: var(--bg-header);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.header__inner {
  max-width: 1600px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 20px;
}

.header__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex-shrink: 0;
}

.header__logo {
  font-size: 28px;
  filter: drop-shadow(0 0 12px rgba(245, 184, 0, 0.6));
  animation: banana-pulse 3s ease-in-out infinite;
}

@keyframes banana-pulse {

  0%,
  100% {
    transform: scale(1) rotate(-5deg);
  }

  50% {
    transform: scale(1.1) rotate(5deg);
  }
}

.header__title-wrap {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.header__title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1;
  color: var(--text);
}

.header__title-accent {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header__subtitle {
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.header__search-wrap {
  flex: 1;
  max-width: 500px;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-box__icon {
  position: absolute;
  left: 14px;
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  pointer-events: none;
}

.search-box__input {
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 10px 40px 10px 40px;
  color: var(--text);
  font-size: 14px;
  font-family: var(--font);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.search-box__input::placeholder {
  color: var(--text-dim);
}

.search-box__input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.search-box__clear {
  position: absolute;
  right: 12px;
  color: var(--text-muted);
  font-size: 12px;
  display: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  line-height: 20px;
  text-align: center;
}

.search-box__clear.visible {
  display: block;
}

.header__menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
  margin-left: auto;
  flex-shrink: 0;
}

.header__menu-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}

/* =============================================
   LAYOUT
   ============================================= */
.layout {
  display: flex;
  max-width: 1600px;
  margin: 0 auto;
  min-height: calc(100vh - var(--header-h));
}

/* =============================================
   SIDEBAR
   ============================================= */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  position: sticky;
  top: var(--header-h);
  height: calc(100vh - var(--header-h));
  overflow-y: auto;
}

.sidebar__inner {
  padding: 20px 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.sidebar__heading {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0 16px 12px;
  border-bottom: 1px solid var(--border);
}

.sidebar__heading svg {
  width: 14px;
  height: 14px;
}

.sidebar__list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px;
}

.sidebar__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  font-size: 14px;
  color: var(--text-muted);
  position: relative;
}

.sidebar__item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.sidebar__item--active {
  background: linear-gradient(135deg, rgba(245, 184, 0, 0.15), rgba(255, 107, 53, 0.1));
  color: var(--accent);
  font-weight: 600;
  border: 1px solid rgba(245, 184, 0, 0.2);
}

.sidebar__icon {
  font-size: 16px;
  width: 18px;
  text-align: center;
  flex-shrink: 0;
}

.sidebar__name {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar__count {
  font-size: 11px;
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 7px;
  border-radius: 20px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.sidebar__item--active .sidebar__count {
  background: rgba(245, 184, 0, 0.2);
  color: var(--accent);
}

.sidebar__ad {
  padding: 16px;
  display: flex;
  justify-content: center;
}

/* =============================================
   MAIN
   ============================================= */
.main {
  flex: 1;
  min-width: 0;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* =============================================
   FILTER BAR (mobile chips)
   ============================================= */
.filter-bar {
  display: none;
  overflow-x: auto;
}

.filter-bar::-webkit-scrollbar {
  height: 0;
}

.filter-bar__chips {
  display: flex;
  gap: 8px;
  padding: 4px 0;
  white-space: nowrap;
}

.chip {
  padding: 7px 14px;
  border-radius: 50px;
  font-size: 13px;
  font-family: var(--font);
  font-weight: 500;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-muted);
  border: 1px solid var(--border);
  transition: all var(--transition);
  white-space: nowrap;
}

.chip:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text);
}

.chip--active {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #000;
  border-color: transparent;
  font-weight: 700;
}

/* =============================================
   STATS ROW
   ============================================= */
.stats-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.stats-row__info {
  font-size: 13px;
  color: var(--text-muted);
}

.tabs {
  display: flex;
  gap: 4px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 4px;
}

.tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  transition: all var(--transition);
  font-family: var(--font);
}

.tab svg {
  width: 14px;
  height: 14px;
}

.tab:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.tab--active {
  background: var(--bg-card);
  color: var(--text);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* =============================================
   INLINE AD
   ============================================= */
.ad-inline {
  display: flex;
  justify-content: center;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 70px;
}

/* =============================================
   GRID
   ============================================= */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

/* =============================================
   PAGINATION
   ============================================= */
.pagination-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding: 24px 0 8px;
  flex-wrap: wrap;
}

.page-btn {
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-btn:hover:not(:disabled) {
  background: rgba(245, 184, 0, 0.12);
  border-color: rgba(245, 184, 0, 0.4);
  color: var(--accent);
}

.page-btn--active {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: transparent;
  color: #000;
  cursor: default;
  box-shadow: 0 4px 14px rgba(245, 184, 0, 0.35);
}

.page-btn--disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.page-ellipsis {
  color: var(--text-dim);
  font-size: 14px;
  padding: 0 4px;
  user-select: none;
}

/* ---- Card ---- */
.card {
  position: relative;
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  group: true;
}

.card:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--border-hover);
  border-color: rgba(245, 184, 0, 0.3);
}

.card__img-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3/4;
  background: #1a1a30;
}

.card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.card:hover .card__img {
  transform: scale(1.06);
}

/* Card overlay on hover */
.card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.4) 50%, transparent 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px;
}

.card:hover .card__overlay {
  opacity: 1;
}

.card__prompt-preview {
  font-size: 11px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.85);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 10px;
}

.card__copy-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  background: rgba(245, 184, 0, 0.15);
  border: 1px solid rgba(245, 184, 0, 0.3);
  border-radius: 6px;
  padding: 6px 10px;
  width: fit-content;
}

.card__copy-hint svg {
  width: 12px;
  height: 12px;
}

.card__category {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  color: var(--accent);
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid rgba(245, 184, 0, 0.25);
}

.card__num {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 10px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
  background: rgba(0, 0, 0, 0.6);
  padding: 2px 6px;
  border-radius: 5px;
}

/* 🔥 Trending badge on card */
.card__trending-badge {
  position: absolute;
  bottom: 10px;
  right: 10px;
  font-size: 11px;
  font-weight: 700;
  background: linear-gradient(135deg, rgba(255, 100, 0, 0.85), rgba(245, 184, 0, 0.85));
  color: #fff;
  padding: 3px 9px;
  border-radius: 20px;
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 150, 0, 0.4);
  box-shadow: 0 2px 10px rgba(255, 100, 0, 0.4);
  letter-spacing: 0.3px;
}

/* 🔥 Trending sidebar item special style */
.sidebar__item--trending {
  background: linear-gradient(135deg, rgba(255, 100, 0, 0.12), rgba(245, 184, 0, 0.08));
  border: 1px solid rgba(255, 120, 0, 0.25) !important;
  color: #ff9040 !important;
}

.sidebar__item--trending:hover {
  background: linear-gradient(135deg, rgba(255, 100, 0, 0.2), rgba(245, 184, 0, 0.12));
  color: #ffb060 !important;
}

.sidebar__item--trending.sidebar__item--active {
  background: linear-gradient(135deg, rgba(255, 100, 0, 0.25), rgba(245, 184, 0, 0.15));
  color: #ffb060 !important;
  box-shadow: 0 0 12px rgba(255, 100, 0, 0.2);
}

.sidebar__item--trending .sidebar__count {
  background: rgba(255, 100, 0, 0.2);
  color: #ff9040;
}

/* =============================================
   LOADING / ERROR / EMPTY
   ============================================= */
.loading-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 80px 20px;
  color: var(--text-muted);
  font-size: 14px;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(245, 184, 0, 0.2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.error-wrap,
.empty-wrap {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 80px 20px;
  text-align: center;
}

.error-icon,
.empty-icon {
  font-size: 40px;
}

.error-wrap h3,
.empty-wrap h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}

.error-wrap p,
.empty-wrap p {
  font-size: 14px;
  color: var(--text-muted);
}

.btn-retry {
  margin-top: 8px;
  padding: 10px 24px;
  background: var(--accent);
  color: #000;
  font-weight: 700;
  border-radius: 8px;
  font-size: 14px;
  font-family: var(--font);
  transition: transform var(--transition);
}

.btn-retry:hover {
  transform: scale(1.03);
}

/* =============================================
   LOAD MORE
   ============================================= */
.load-more-wrap {
  display: flex;
  justify-content: center;
  padding: 16px 0;
}

.btn-load-more {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 32px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 50px;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font);
  transition: all var(--transition);
}

.btn-load-more:hover {
  background: rgba(245, 184, 0, 0.1);
  border-color: rgba(245, 184, 0, 0.4);
  color: var(--accent);
}

.btn-load-more svg {
  width: 16px;
  height: 16px;
  transition: transform 0.3s ease;
}

.btn-load-more:hover svg {
  transform: translateY(3px);
}

.btn-load-more.loading svg {
  animation: spin 0.8s linear infinite;
}

/* =============================================
   POPUP OVERLAY
   ============================================= */
.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.popup-overlay.open {
  opacity: 1;
  visibility: visible;
}

.popup {
  background: var(--bg-popup);
  border-radius: 20px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-popup);
  max-width: 640px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  display: flex;
  flex-direction: column;
  animation: popup-in 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes popup-in {
  from {
    transform: translateY(20px) scale(0.96);
    opacity: 0;
  }

  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.popup__close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  color: var(--text);
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), transform var(--transition);
  backdrop-filter: blur(8px);
}

.popup__close:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: scale(1.1);
}

.popup__image-wrap {
  position: relative;
  background: #1a1a30;
  border-radius: 18px 18px 0 0;
  overflow: hidden;
  max-height: 380px;
}

.popup__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  max-height: 380px;
}

.popup__category-badge {
  position: absolute;
  bottom: 12px;
  left: 12px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  color: var(--accent);
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border: 1px solid rgba(245, 184, 0, 0.25);
}

.popup__body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Prompt Tabs inside popup */
.prompt-tabs {
  display: flex;
  gap: 8px;
}

.prompt-tab {
  padding: 7px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  font-family: var(--font);
  transition: all var(--transition);
}

.prompt-tab:hover {
  color: var(--text);
}

.prompt-tab--active {
  background: linear-gradient(135deg, rgba(245, 184, 0, 0.2), rgba(255, 107, 53, 0.1));
  color: var(--accent);
  border-color: rgba(245, 184, 0, 0.35);
}

.prompt-block {
  position: relative;
}

.prompt-text {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
  font-family: 'Courier New', monospace;
  max-height: 220px;
  overflow-y: auto;
  margin-bottom: 10px;
}

.btn-copy {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  justify-content: center;
  padding: 13px 20px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #000;
  font-size: 15px;
  font-weight: 700;
  border-radius: 10px;
  font-family: var(--font);
  transition: all 0.25s ease;
  box-shadow: 0 4px 16px rgba(245, 184, 0, 0.3);
}

.btn-copy svg {
  width: 16px;
  height: 16px;
}

.btn-copy:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(245, 184, 0, 0.45);
}

.btn-copy:active {
  transform: translateY(0);
}

.btn-copy.copied {
  background: linear-gradient(135deg, #4caf50, #2e7d32);
  color: #fff;
}

.popup__meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.popup__num {
  font-size: 12px;
  color: var(--text-dim);
}

/* =============================================
   TOAST
   ============================================= */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: #1e1e3a;
  border: 1px solid rgba(76, 175, 80, 0.4);
  color: #81c784;
  border-radius: 50px;
  padding: 12px 22px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  z-index: 1001;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s ease;
  opacity: 0;
  pointer-events: none;
}

.toast svg {
  width: 16px;
  height: 16px;
  stroke: #81c784;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* =============================================
   SIDEBAR OVERLAY (mobile)
   ============================================= */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 200;
}

.sidebar-overlay.open {
  display: block;
}

/* =============================================
   FOOTER
   ============================================= */
.footer {
  background: var(--bg-sidebar);
  border-top: 1px solid var(--border);
  margin-top: 40px;
}

.footer__inner {
  max-width: 1600px;
  margin: 0 auto;
  padding: 32px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}

.footer__brand {
  font-size: 18px;
  font-weight: 700;
}

.footer__text {
  font-size: 13px;
  color: var(--text-muted);
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1024px) {
  :root {
    --sidebar-w: 200px;
  }

  .grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }
}

@media (max-width: 768px) {
  :root {
    --header-h: 56px;
  }

  .header__menu-btn {
    display: flex;
  }

  .header__search-wrap {
    display: none;
  }

  .header__title {
    font-size: 15px;
  }

  .header__logo {
    font-size: 22px;
  }

  /* Sidebar becomes a drawer */
  .sidebar {
    position: fixed;
    left: -260px;
    top: 0;
    height: 100vh;
    width: 250px;
    z-index: 300;
    transition: left 0.3s ease;
    padding-top: var(--header-h);
  }

  .sidebar.open {
    left: 0;
  }

  .filter-bar {
    display: block;
  }

  .ad-slot--sidebar {
    display: none;
  }

  .grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
  }

  .main {
    padding: 12px;
    gap: 12px;
  }

  .tabs .tab span {
    display: none;
  }

  .tab {
    padding: 7px 10px;
  }

  .ad-slot--leaderboard {
    width: 100%;
  }

  .ad-slot--rectangle {
    width: 250px;
    min-height: 200px;
  }

  /* Popup full screen on mobile */
  .popup {
    max-height: 95vh;
    border-radius: 16px;
  }

  .popup__image-wrap {
    max-height: 280px;
  }

  .popup__image {
    max-height: 280px;
  }
}

@media (max-width: 480px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .header__title {
    font-size: 13px;
  }

  .stats-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .popup-overlay {
    padding: 10px;
    align-items: flex-end;
  }

  .popup {
    border-radius: 20px 20px 0 0;
    max-width: 100%;
  }

  .popup__image-wrap {
    max-height: 240px;
  }
}

/* =============================================
   UTILITY
   ============================================= */
.hidden {
  display: none !important;
}

.skeleton {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.04) 25%, rgba(255, 255, 255, 0.08) 50%, rgba(255, 255, 255, 0.04) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius);
  aspect-ratio: 3/4;
}

@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}

/* =============================================
   SEO CONTENT SECTION
   ============================================= */
.seo-intro {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 32px;
  margin-bottom: 8px;
  line-height: 1.7;
}

.seo-intro h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 12px;
}

.seo-intro h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin: 20px 0 10px;
}

.seo-intro p {
  font-size: 14px;
  color: var(--text-muted);
}

.seo-intro strong {
  color: var(--text);
}

.seo-categories {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 6px;
}

.seo-categories li {
  font-size: 13px;
  color: var(--text-muted);
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  transition: background var(--transition);
}

.seo-categories li:hover {
  background: rgba(255, 255, 255, 0.06);
}

.seo-intro ol {
  list-style: decimal;
  padding-left: 20px;
  font-size: 14px;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

@media (max-width: 600px) {
  .seo-intro {
    padding: 20px 16px;
  }

  .seo-intro h2 {
    font-size: 16px;
  }

  .seo-categories {
    grid-template-columns: 1fr;
  }
}