:root {
  --page-bg: #ffffff;
  --section-bg: #ffffff;
  --section-alt-bg: #f9fafb;
  --card-bg: rgba(15, 23, 42, 0.08);
  --card-border: rgba(148, 163, 184, 0.45);

  --text-main: #1f2933;
  --text-muted: #111827;
  --text-strong: #111827;

  --button-radius: 0px;
  --card-radius: 1rem;
  --shadow-soft: none;
  --shadow-button: none;
  --shadow-button-alt: none;
  --border-soft: 1px solid rgba(148, 163, 184, 0.45);
  --transition-base: 180ms ease-out;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: 
  radial-gradient(circle at top, #eee 0, #ffffff 48%), 
  radial-gradient(circle at bottom, rgba(15, 23, 42, 0.08) 0, #f9fafb 52%);
  color: var(--text-main);
  min-height: 100%;
  scroll-behavior: smooth;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

main {
  padding-bottom: 1rem;
}

.page-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 0.5rem;
}

/* ==== SIMPLE SIDE MENU (Ultra Minimalist) ==== */
.sidemenu-toggle {
  position: relative;
  left: 0;
  top: 0;
  z-index: 1;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin-right: 0.75rem;
}

.sidemenu-toggle span,
.sidemenu-toggle span::before,
.sidemenu-toggle span::after {
  display: block;
  width: 26px;
  height: 2px;
  background: #000;
  position: relative;
}

.sidemenu-toggle span::before,
.sidemenu-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
}

.sidemenu-toggle span::before {
  top: -7px;
}

.sidemenu-toggle span::after {
  top: 7px;
}

.sidemenu-open #sidemenuToggle {
  visibility: hidden;
  pointer-events: none;
}

.sidemenu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.3);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
  z-index: 58;
}

.sidemenu-open .sidemenu-overlay {
  opacity: 1;
  pointer-events: auto;
}

.sidemenu {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 240px;
  max-width: 80%;
  background: #fff;
  transform: translateX(-100%);
  transition: transform .25s ease-out;
  z-index: 59;
  padding: 1rem;
  font-size: 1.05rem;
}

.sidemenu-open .sidemenu {
  transform: translateX(0);
}

.sidemenu-header {
  font-size: 1.1rem;
  font-weight: 700;
  padding-bottom: .8rem;
  border-bottom: 1px solid #000;
  margin-bottom: 1rem;
  position: relative;
}

.sidemenu-close {
  position: absolute;
  right: 0;
  top: 0;
  background: none;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
}

.sidemenu-item-header {
  padding: .7rem 0;
  cursor: pointer;
  font-size: 1rem;
  border-bottom: 1px solid #000;
  display: flex;
  justify-content: space-between;
  font-weight: 600;
}

.sidemenu-item-icon {
  display: none;
}

.sidemenu-item-chevron {
  font-size: .8rem;
}

.sidemenu-submenu {
  max-height: 0;
  overflow: hidden;
  transition: max-height .25s ease-out;
}

.sidemenu-item.open .sidemenu-submenu {
  max-height: 300px;
  overflow-y: auto;
}

.sidemenu-submenu a {
  display: block;
  padding: .45rem 0 .45rem .8rem;
  font-size: 0.95rem;
  border-bottom: 1px solid #eee;
  color: #000;
}

.sidemenu-contact a {
  display: block;
  margin-top: 1rem;
  padding-bottom: .7rem;
  border-bottom: 1px solid #000;
  font-weight: 600;
  font-size: 1rem;
}

/* Header */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0.9rem 0 0.6rem;
  gap: 1rem;
}

.brand-area {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-right: auto;
}

.brand-logo {
  display: block;
  max-width: 280px;
  height: auto;
  border-radius: 0;
  overflow: visible;
  box-shadow: none;
  background: transparent;
}

.brand-logo img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.cta-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
}

.pill-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 0.9rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--button-radius);
  white-space: nowrap;
  cursor: pointer;
  color: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background-image: linear-gradient(120deg, #0ea5e9, #22c55e);
  box-shadow: var(--shadow-button);
  transition: transform var(--transition-base),
    box-shadow var(--transition-base),
    border-color var(--transition-base),
    background-position 500ms linear;
  background-size: 180% 180%;
  background-position: left center;
}

/* Floating side links */
.floating-links {
  position: fixed;
  right: 0;
  bottom: 5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  z-index: 50;
  pointer-events: none;
}

.floating-link {
  width: 35px;
  border-radius: 8px 0 0 8px;
  overflow: hidden;
  pointer-events: auto;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.3);
  transform: translateX(0);
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.6);
}

.floating-link img {
  width: 100%;
  height: auto;
}

.floating-link--tiktok {
  animation: floatY 8s ease-in-out infinite;
}

@keyframes floatY {
  0% { transform: translateX(0) translateY(0); }
  50% { transform: translateX(0) translateY(-150px); }
  100% { transform: translateX(0) translateY(0); }
}

/* Marquee */
.marquee-bar {
  background: rgb(0 0 0);
  border-top: 1px solid rgba(148, 163, 184, 0.5);
  border-bottom: 1px solid rgba(148, 163, 184, 0.5);
  padding: 0.8rem 0;
  overflow: hidden;
  position: relative;
}

.marquee-inner {
  display: inline-block;
  white-space: nowrap;
  animation: marquee-scroll 26s linear infinite;
  font-size: 0.95rem;
  color: rgb(255 255 255);
  font-weight: 700;
}

@keyframes marquee-scroll {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

/* Hero */
.hero {
  text-align: center;
  padding-top: 1rem;
}

.hero-title {
  font-size: 1.4rem;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-strong);
}

@media (min-width: 640px) {
  .hero-title { font-size: 1.4rem; }
}

.hero-banner {
  margin-top: 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}

.hero-banner a {
  display: block;
  width: 100%;
  max-width: 1140px;
  overflow: hidden;
  transform: translateY(0);
  transition: transform var(--transition-base),
    box-shadow var(--transition-base), border-color var(--transition-base);
  margin-left: auto;
  margin-right: auto;
}

.hero-banner img {
  margin: 0 auto;
}

.section {
  margin-top: 2rem;
  background: transparent;
  border-radius: 1.4rem;
  padding: 1rem;
  box-shadow: var(--shadow-soft);
  border: none;
}

@media (min-width: 640px) {
  .section { padding: 1.3rem 1.5rem 1.4rem; }
}

.section + .section {
  margin-top: 1.2rem;
}

.section-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0.3rem 0 0.8rem;
  color: var(--text-strong);
  text-align: center;
}

.brand-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
}

@media (min-width: 768px) {
  .brand-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
  }
}

.brand-card {
  background: var(--card-bg);
  border-radius: var(--card-radius);
  padding: 0.7rem 0.7rem 0.9rem;
  border: var(--card-border);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.brand-card-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.brand-cover {
  border-radius: 0.9rem;
  overflow: hidden;
  border: none;
  box-shadow: none;
  background: transparent;
}

.brand-name {
  margin-top: 0.6rem;
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.03em;
  color: var(--text-strong);
}

.brand-desc {
  margin-top: 0.3rem;
  margin-bottom: 0.4rem;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--text-muted);
  min-height: 1.6rem;
}

.brand-cta-wrap {
  margin-top: auto;
  display: flex;
  justify-content: center;
}

.brand-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.45rem 0.85rem;
  border-radius: var(--button-radius);
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  letter-spacing: 0.04em;
  color: #ffffff;
  background-image: linear-gradient(0deg, rgb(9 128 53), #1dd761);
  border: none;
  box-shadow: none;
  text-transform: uppercase;
  cursor: pointer;
  transform: translateY(0);
  transition: transform var(--transition-base),
    box-shadow var(--transition-base),
    background-position 450ms linear;
  background-size: 180% 180%;
  background-position: left center;
}

/* RTP meter */
.rtp-meter {
  margin-top: 0.65rem;
}

.rtp-track {
  width: 100%;
  height: 0.95rem;
  border-radius: 999px;
  background: #e5e7eb;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(148, 163, 184, 0.9);
}

.rtp-fill {
  height: 100%;
  border-radius: inherit;
  background-image: linear-gradient(
    120deg,
    #ef4444,
    #f97316,
    #eab308,
    #ef4444
  );
  background-size: 200% 200%;
  animation: rtpPulse 4s ease-in-out infinite;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 600;
  color: #111827;
}

@keyframes rtpPulse {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  margin: 1rem auto 0;
  max-width: 900px;
}

.pagination button {
  padding: 0.4rem 1rem;
  border-radius: 0px;
  border: none;
  background-image: linear-gradient(120deg, #070bd4, #070bd4);
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: none;
  transition: transform 160ms ease-out, box-shadow 160ms ease-out,
    opacity 160ms ease-out;
}

.pagination button:disabled {
  opacity: 0.4;
  cursor: default;
  box-shadow: none;
}

.pagination-info {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Footer */
footer {
  margin-top: 1rem;
}

.footer-shell {
  background: #f9fafb;
  border-radius: 1.5rem 1.5rem 0 0;
  border-top: 1px solid rgba(209, 213, 219, 0.9);
  padding: 1.5rem 1rem 2.5rem;
  box-shadow: 0 -10px 25px rgba(15, 23, 42, 0.06);
}

.footer-title {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: var(--text-strong);
  margin-bottom: 0.75rem;
}

.footer-columns {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.footer-col {
  flex: 1 1 260px;
  min-width: 0;
}

.footer-box {
  background: #ffffff;
  border-radius: 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(209, 213, 219, 0.95);
  margin-bottom: 0.9rem;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

.footer-box-title {
  font-weight: 700;
  margin-bottom: 0.4rem;
  color: var(--text-strong);
  font-size: 0.9rem;
}

.footer-box ul {
  margin: 0;
  padding-left: 1.1rem;
  list-style: disc;
}

.footer-box li {
  margin-bottom: 0.25rem;
}

.footer-disclaimer {
  margin-top: 1.1rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  border-top: 1px solid rgba(209, 213, 219, 0.9);
  padding-top: 0.7rem;
}

.footer-bottom {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 0.8rem;
  color: #6b7280;
}

.footer-social {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.footer-social-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-strong);
  margin-bottom: 0.25rem;
}

.footer-social-icons {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.footer-social-icon {
  width: 2.4rem;
  height: 2.4rem;
  overflow: hidden;
  transition: transform var(--transition-base),
    box-shadow var(--transition-base),
    border-color var(--transition-base);
}

.footer-readmore-shell {
  margin-top: 0.5rem;
}

.footer-readmore-content {
  max-height: 190px;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.footer-readmore-content.expanded {
  max-height: 5000px;
}

.readmore-btn {
  margin-top: 0.65rem;
  padding: 0.4rem 1.1rem;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 0px;
  border: none;
  cursor: pointer;
  background-image: linear-gradient(120deg, #070bd4, #070bd4);
  color: #ffffff;
  box-shadow: none;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

@media (max-width: 640px) {
  .top-bar {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    padding-top: 0.8rem;
    padding-bottom: 0.8rem;
  }
  .brand-area {
    margin-right: auto;
  }
  .cta-group {
    display: none;
  }
  .floating-links {
    bottom: 4.5rem;
  }
  .brand-cta {
    padding: 0.35rem 0.55rem;
    font-size: 0.75rem;
    border-radius: 0px;
  }
  .brand-cta span:last-child {
    font-size: 0.78rem;
  }
}

/* ===== Share Popup ===== */
.share-popup {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 120;
}

.share-popup.active {
  display: flex;
}

.share-popup-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
}

.share-popup-box {
  position: relative;
  width: 90%;
  max-width: 420px;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 20px 45px rgba(0,0,0,0.6);
  background: #000;
}

.share-popup-banner {
  display: block;
  width: 100%;
}

.share-popup-banner img {
  width: 100%;
  height: auto;
  display: block;
}

.share-popup-close {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: none;
  background: rgba(0,0,0,0.6);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
}

.author-section {
  background: linear-gradient(to right, #ffffff, #f9fafb);
  border: 1px solid rgba(148, 163, 184, 0.3);
  margin-top: 1rem;
  overflow: hidden;
}

.author-content {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.author-avatar-wrapper {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.author-avatar {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.verified-badge {
  font-size: 0.65rem;
  background: #0ea5e9;
  color: #fff;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.author-details {
  flex: 1;
}

.author-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.8rem;
  margin-bottom: 0.5rem;
}

.author-name {
  margin: 0;
  font-size: 1.15rem;
  color: var(--text-main);
  font-weight: 600;
}

.author-name span {
  color: #000;
  font-weight: 800;
  text-decoration-color: #22c55e;
  text-decoration-thickness: 3px;
}

.author-role {
  font-size: 0.85rem;
  color: #64748b;
  font-weight: 500;
  border-left: 2px solid #cbd5e1;
  padding-left: 0.8rem;
}

.author-bio {
  margin: 0 0 0.8rem 0;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.author-expertise {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.expertise-tag {
  font-size: 0.75rem;
  background: #f1f5f9;
  color: #334155;
  padding: 4px 10px;
  border-radius: 6px;
  font-weight: 600;
  border: 1px solid #e2e8f0;
}

/* ==== Author Section Mobile Optimization (Left-Right Layout) ==== */
@media (max-width: 640px) {

  .author-content {
    flex-direction: row;
    align-items: flex-start;
    text-align: left;
    gap: 1rem;
    padding: 0.5rem 0;
  }

  .author-avatar-wrapper {
    flex-shrink: 0;
    margin-top: 0.2rem;
  }

  .author-avatar {
    width: 70px;
    height: 70px;
    border-width: 2px;
  }

  .verified-badge {
    font-size: 0.55rem;
    padding: 2px 6px;
  }

  .author-header {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 0.1rem;
    margin-bottom: 0.5rem;
  }

  .author-name {
    font-size: 1.1rem;
  }

  .author-role {
    border-left: none;
    padding-left: 0;
    display: block;
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 0;
  }

  .author-bio {
    font-size: 0.85rem;
    line-height: 1.5;
    padding: 0;
    margin-bottom: 0.8rem;
  }

  .author-expertise {
    justify-content: flex-start;
    gap: 0.4rem;
  }

  .expertise-tag {
    font-size: 0.7rem;
    padding: 3px 8px;
  }

  .top-bar {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    padding-top: 0.8rem;
    padding-bottom: 0.8rem;
  }

  .brand-area {
    margin-right: auto;
  }

  .cta-group {
    display: none;
  }

  .floating-links {
    bottom: 4.5rem;
  }

  .brand-cta {
    padding: 0.35rem 0.55rem;
    font-size: 0.75rem;
    border-radius: 0px;
  }

  .brand-cta span:last-child {
    font-size: 0.78rem;
  }
}

/* Spinner Animation (moved from JS) */
@keyframes spinner {
  to { transform: rotate(360deg); }
}
