/* Search, notices, cards, and loaders */
/* ================= SEARCH ================= */
.search-container {
  width: 100%;
  max-width: 760px;
  margin: 0 auto 16px;
  padding: 0;
}

.search-wrapper {
  width: 100%;
  height: 54px;
  display: flex;
  align-items: center;
  border-radius: 36px;
  background: var(--search-bg, #030812);
  border: 1.5px solid var(--border);
  backdrop-filter: blur(20px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
  transition: var(--transition);
}

.search-wrapper:focus-within {
  border-color: var(--cyan);
  box-shadow: 0 0 14px var(--cyan-glow);
  background: var(--bg2, #030814);
}

.search-wrapper input {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0 18px;
  border: 0;
  outline: 0;
  color: var(--text);
  font-size: 0.95rem;
  background: transparent;
}

.search-wrapper input::placeholder {
  color: var(--muted, #8da2ba);
}

.search-btn {
  flex: 0 0 auto;
  height: 42px;
  margin-right: 6px;
  padding: 0 22px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 26px;
  cursor: pointer;
  background: linear-gradient(135deg, var(--cyanDark), var(--cyan));
  color: #030712;
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 15px var(--cyan-glow);
  transition: var(--transition);
}

.search-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px var(--cyan-glow);
  color: #000;
}

.search-btn:active {
  transform: translateY(0);
}

/* ================= NOTICE ================= */
.notice-container {
  display: none;
  width: 100%;
  max-width: 760px;
  margin: 0 auto 16px;
  padding: 0;
}

.notice-bar {
  height: 48px;
  display: flex;
  align-items: center;
  overflow: hidden;
  border-radius: 30px;
  background: #030812;
  border: 1.5px solid rgba(244, 63, 94, 0.35);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
}

.notice-label {
  height: 100%;
  padding: 0 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  border-radius: 30px;
  background: linear-gradient(135deg, #f43f5e, #be123c);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  box-shadow: 2px 0 10px rgba(244, 63, 94, 0.4);
}

.marquee-wrapper {
  flex: 1;
  overflow: hidden;
}

.marquee-content {
  display: inline-block;
  white-space: nowrap;
  padding-left: 100%;
  color: var(--cyan);
  font-size: 0.9rem;
  font-weight: 600;
  animation: marquee 16s linear infinite;
}

/* Notice Bar Dynamic Styles */
.notice-bar.theme-rose {
  border-color: rgba(244, 63, 94, 0.45);
}
.notice-bar.theme-rose .notice-label {
  background: linear-gradient(135deg, #f43f5e, #be123c);
  box-shadow: 2px 0 10px rgba(244, 63, 94, 0.4);
  color: #fff;
}
.notice-bar.theme-rose .marquee-content {
  color: #ff8597;
}

.notice-bar.theme-cyan {
  border-color: rgba(0, 240, 255, 0.45);
}
.notice-bar.theme-cyan .notice-label {
  background: linear-gradient(135deg, var(--cyan, #00f0ff), var(--cyanDark, #0077b6));
  box-shadow: 2px 0 10px var(--cyan-glow, rgba(0, 240, 255, 0.4));
  color: #030812;
}
.notice-bar.theme-cyan .marquee-content {
  color: var(--cyan, #00f0ff);
}

.notice-bar.theme-amber {
  border-color: rgba(245, 158, 11, 0.45);
}
.notice-bar.theme-amber .notice-label {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  box-shadow: 2px 0 10px rgba(245, 158, 11, 0.4);
  color: #000;
}
.notice-bar.theme-amber .marquee-content {
  color: #fcd34d;
}

.notice-bar.theme-emerald {
  border-color: rgba(16, 185, 129, 0.45);
}
.notice-bar.theme-emerald .notice-label {
  background: linear-gradient(135deg, #10b981, #059669);
  box-shadow: 2px 0 10px rgba(16, 185, 129, 0.4);
  color: #fff;
}
.notice-bar.theme-emerald .marquee-content {
  color: #6ee7b7;
}

/* ================= GRID & CARDS ================= */
.grid {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 0 20px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: start;
}

@media (min-width: 580px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    align-items: start;
  }
}

.post-outer {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 20px;
  background: var(--card-bg, #080d1a);
  border: 1.5px solid var(--border);
  box-shadow: 0 8px 24px -6px rgba(0, 0, 0, 0.7);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.post-outer:hover {
  transform: translateY(-3px);
  border-color: var(--border-focus);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.8), 0 0 20px var(--cyan-glow);
}

.post-thumbnail {
  width: 100%;
  min-height: 140px;
  display: block;
  background-color: #0b1329;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.post-thumb-img {
  width: 100%;
  height: auto;
  max-height: 520px;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.post-outer:hover .post-thumb-img {
  transform: scale(1.05);
}

.post-thumbnail::after {
  display: none !important;
}

.favorite-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
  width: 38px;
  height: 38px;
  display: flex !important;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  background: rgba(3, 7, 18, 0.72);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  transition: var(--transition);
}

.favorite-btn:hover {
  transform: scale(1.08);
  background: rgba(3, 7, 18, 0.9);
  border-color: rgba(255, 255, 255, 0.35);
}

.favorite-btn i {
  display: block !important;
  font-size: 1.15rem;
  color: #cbd5e1;
  transition: var(--transition);
}

.favorite-btn.favorited {
  background: rgba(244, 63, 94, 0.25);
  border-color: rgba(244, 63, 94, 0.6);
  box-shadow: 0 0 15px var(--danger-glow);
}

.favorite-btn.favorited i {
  color: #f43f5e !important;
  transform: scale(1.15);
  filter: drop-shadow(0 0 6px var(--danger));
}

.post-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 16px 16px;
  text-align: center;
}

.post-title {
  color: #ffffff;
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 12px;
  text-align: center;
  width: 100%;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.post-desc {
  display: none !important;
}

.link-container {
  width: 100%;
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.get-link-btn {
  flex: 1;
  width: 100%;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1.5px solid var(--cyan);
  border-radius: 9999px;
  background: var(--card-hover, rgba(0, 240, 255, 0.04));
  color: var(--cyan);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.6px;
  cursor: pointer;
  box-shadow: 0 4px 16px var(--cyan-glow);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.get-link-btn:hover {
  background: var(--cyan);
  color: var(--bg, #030712);
  border-color: var(--cyan);
  box-shadow: 0 6px 25px var(--cyan-glow);
  transform: translateY(-2px);
}

.get-link-btn:active {
  transform: translateY(0);
}

.copy-btn {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  display: none !important;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--border);
  border-radius: 50%;
  background: var(--card-hover, rgba(0, 240, 255, 0.08));
  color: var(--cyan);
  cursor: pointer;
  transition: var(--transition);
}

.copy-btn:hover {
  background: var(--cyan);
  color: var(--bg, #030712);
  border-color: var(--cyan);
  transform: translateY(-2px);
}

.copy-btn i {
  display: inline-block !important;
  font-size: 1.1rem;
}

body.copy-link-authorized .copy-btn {
  display: flex !important;
}

#siteToast {
  position: fixed;
  bottom: 82px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(15, 23, 42, 0.95);
  color: #fff;
  border: 1px solid var(--border-focus, var(--cyan));
  padding: 10px 20px;
  border-radius: 9999px;
  font-size: 0.88rem;
  font-weight: 700;
  z-index: 999999;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 8px;
}

#siteToast.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

body.secret-single-view .favorite-btn,
body.hide-card-fav #postsGrid .favorite-btn {
  display: none !important;
}

html.site-offline-mode,
body.site-offline-mode {
  overflow: hidden !important;
  height: 100% !important;
  height: 100dvh !important;
  max-height: 100dvh !important;
  margin: 0 !important;
  padding: 0 !important;
  overscroll-behavior: none !important;
  touch-action: none !important;
}

body.is-loading #postsGrid {
  display: none !important;
}

/* ================= LOADER ================= */
#premiumLoadingArea {
  display: none;
}

.premium-loader-container {
  max-width: 380px;
  margin: 20px auto;
  padding: 36px 24px;
  border-radius: 24px;
  background: var(--card-bg, #ffffff);
  border: 1.5px solid var(--border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  text-align: center;
  transition: var(--transition);
}

.premium-ring-wrapper {
  position: relative;
  width: 100%;
  min-height: 90px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.premium-ring-outer {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px dashed var(--border);
  animation: spin 10s linear infinite;
}

.premium-ring-inner {
  position: absolute;
  inset: 10%;
  border-radius: 50%;
  border-top: 3px solid var(--spr-color, var(--cyan));
  border-right: 3px solid transparent;
  border-bottom: 3px solid var(--cyan2);
  border-left: 3px solid transparent;
  animation: spin 1.4s linear infinite;
}

.premium-percent {
  color: var(--spr-color, var(--cyan));
  font-size: 1.3rem;
  font-weight: 900;
  z-index: 2;
  font-variant-numeric: tabular-nums;
}

.premium-text {
  color: var(--text, #0f172a);
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 6px;
}

.premium-subtext {
  color: var(--text-secondary, #64748b);
  font-size: 0.85rem;
  margin-bottom: 18px;
}

.progress-bar-bg {
  height: 6px;
  width: 100%;
  overflow: hidden;
  border-radius: 10px;
  background: var(--border, rgba(15, 23, 42, 0.08));
}

.progress-bar-fill {
  width: 0;
  height: 100%;
  border-radius: 10px;
  background: linear-gradient(90deg, var(--spr-color, var(--cyanDark)), var(--spr-color, var(--cyan)), #fff);
  box-shadow: 0 0 10px var(--spr-glow, var(--cyan-glow));
  transition: width 0.15s ease;
}

/* ================= ADVANCED DYNAMIC SPINNERS ================= */
.spr-ring-pulse {
  position: relative;
  width: 90px;
  height: 90px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}
.spr-ring-pulse .spr-outer {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px dashed var(--border, rgba(37, 99, 235, 0.2));
  animation: spr-spin calc(var(--spr-speed, 1s) * 8) linear infinite;
}
.spr-ring-pulse .spr-inner {
  position: absolute;
  inset: 10%;
  border-radius: 50%;
  border-top: 3px solid var(--spr-color, var(--cyan, #2563eb));
  border-right: 3px solid transparent;
  border-bottom: 3px solid var(--spr-color, var(--cyan, #2563eb));
  border-left: 3px solid transparent;
  box-shadow: 0 0 16px var(--spr-glow, var(--cyan-glow, rgba(37, 99, 235, 0.35)));
  animation: spr-spin var(--spr-speed, 1s) linear infinite;
}

.spr-classic-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.spr-classic {
  width: var(--spr-size, 48px);
  height: var(--spr-size, 48px);
  border-radius: 50%;
  border: 3.5px solid var(--border, rgba(37, 99, 235, 0.15));
  border-top-color: var(--spr-color, var(--cyan, #2563eb));
  box-shadow: 0 0 16px var(--spr-glow, var(--cyan-glow, rgba(37, 99, 235, 0.35)));
  animation: spr-spin var(--spr-speed, 1s) linear infinite;
}

.spr-dual-wrap {
  position: relative;
  width: 86px;
  height: 86px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}
.spr-dual-outer {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid transparent;
  border-top-color: var(--spr-color, var(--cyan, #2563eb));
  border-bottom-color: var(--spr-color, var(--cyan, #2563eb));
  box-shadow: 0 0 15px var(--spr-glow, var(--cyan-glow, rgba(37, 99, 235, 0.35)));
  animation: spr-spin var(--spr-speed, 1s) linear infinite;
}
.spr-dual-inner {
  position: absolute;
  inset: 16%;
  border-radius: 50%;
  border: 3px solid transparent;
  border-left-color: var(--spr-color, var(--cyan, #2563eb));
  border-right-color: var(--spr-color, var(--cyan, #2563eb));
  opacity: 0.85;
  animation: spr-spin-rev calc(var(--spr-speed, 1s) * 0.7) linear infinite;
}

.spr-dots-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 52px;
}
.spr-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--spr-color, var(--cyan, #2563eb));
  box-shadow: 0 0 14px var(--spr-glow, var(--cyan-glow, rgba(37, 99, 235, 0.35)));
  animation: spr-dot-pulse var(--spr-speed, 1s) ease-in-out infinite;
}
.spr-dot:nth-child(2) { animation-delay: calc(var(--spr-speed, 1s) * 0.2); }
.spr-dot:nth-child(3) { animation-delay: calc(var(--spr-speed, 1s) * 0.4); }

.spr-bars-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 56px;
}
.spr-bar {
  width: 5px;
  height: 14px;
  border-radius: 99px;
  background: var(--spr-color, var(--cyan, #2563eb));
  box-shadow: 0 0 10px var(--spr-glow, var(--cyan-glow, rgba(37, 99, 235, 0.35)));
  animation: spr-bar-bounce var(--spr-speed, 1s) ease-in-out infinite;
}
.spr-bar:nth-child(1) { animation-delay: 0s; }
.spr-bar:nth-child(2) { animation-delay: calc(var(--spr-speed, 1s) * 0.15); }
.spr-bar:nth-child(3) { animation-delay: calc(var(--spr-speed, 1s) * 0.3); }
.spr-bar:nth-child(4) { animation-delay: calc(var(--spr-speed, 1s) * 0.45); }
.spr-bar:nth-child(5) { animation-delay: calc(var(--spr-speed, 1s) * 0.6); }

.spr-radar-wrap {
  position: relative;
  width: 86px;
  height: 86px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}
.spr-radar-circle {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--spr-color, var(--cyan, #2563eb));
  box-shadow: 0 0 15px var(--spr-glow, var(--cyan-glow, rgba(37, 99, 235, 0.35)));
  animation: spr-radar-pulse calc(var(--spr-speed, 1s) * 1.5) cubic-bezier(0, 0.2, 0.8, 1) infinite;
  opacity: 0;
}
.spr-radar-circle:nth-child(2) { animation-delay: calc(var(--spr-speed, 1s) * 0.5); }
.spr-radar-circle:nth-child(3) { animation-delay: calc(var(--spr-speed, 1s) * 1.0); }

@keyframes spr-spin { to { transform: rotate(360deg); } }
@keyframes spr-spin-rev { to { transform: rotate(-360deg); } }
@keyframes spr-dot-pulse {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.35; }
  40% { transform: scale(1.25); opacity: 1; }
}
@keyframes spr-bar-bounce {
  0%, 100% { height: 10px; opacity: 0.35; }
  50% { height: 42px; opacity: 1; }
}
@keyframes spr-radar-pulse {
  0% { transform: scale(0.2); opacity: 1; }
  100% { transform: scale(1.15); opacity: 0; }
}

/* ================= PAGES (FAVORITES, LINKS, PROFILE) ================= */
.page-view {
  display: none;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  flex: 1 0 auto;
  padding: 0 0 16px;
}
