/* =============================================================
   PoppyPlaytimeGame mobile-first stylesheet
   Palette: #6A5ACD | #212F3D | #800080 | #7B68EE
   All custom classes use the s365- prefix.
   Canvas: 320 - 430px (kept centered on wider screens).
   ============================================================= */

:root {
  --s365-orchid: #6A5ACD;
  --s365-orchid-soft: #7B68EE;
  --s365-magenta: #800080;
  --s365-ink: #212F3D;
  --s365-ink-deep: #18222D;
  --s365-ink-soft: #2A3C4D;
  --s365-text: #F4F2FF;
  --s365-text-dim: #B9B6D8;
  --s365-gold: #FFD56B;
  --s365-card: #243341;
  --s365-card-2: #2B3C4E;
  --s365-line: rgba(123, 104, 238, 0.22);
  --s365-radius: 14px;
  --s365-radius-lg: 22px;
  --s365-shadow: 0 10px 26px rgba(0, 0, 0, 0.32);
  --s365-header-h: 58px;
  --s365-bottom-h: 66px;
  --s365-max: 430px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: #0F1620;
  color: var(--s365-text);
  font-family: "Segoe UI", "Helvetica Neue", Roboto, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(1100px 480px at 50% -120px, rgba(123, 104, 238, 0.28), transparent 60%),
    radial-gradient(900px 380px at 100% 8%, rgba(128, 0, 128, 0.18), transparent 60%),
    linear-gradient(180deg, #131E29 0%, #0F1620 40%, #0C121B 100%);
  padding-bottom: calc(var(--s365-bottom-h) + 24px);
}

a { color: var(--s365-orchid-soft); text-decoration: none; }
a:focus-visible { outline: 2px solid var(--s365-gold); outline-offset: 2px; border-radius: 6px; }
img { max-width: 100%; display: block; }

/* Phone canvas wrapper - keeps mobile layout on wider screens */
.s365-shell {
  width: 100%;
  max-width: var(--s365-max);
  margin: 0 auto;
  position: relative;
  min-height: 100vh;
}

/* ============================================================= Header */
.s365-header {
  position: sticky;
  top: 0;
  z-index: 60;
  height: var(--s365-header-h);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  background: linear-gradient(180deg, rgba(33, 47, 61, 0.97), rgba(24, 34, 45, 0.95));
  border-bottom: 1px solid var(--s365-line);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.s365-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 1;
  min-width: 0;
}
.s365-brand img {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid rgba(255, 213, 107, 0.45);
  box-shadow: 0 0 0 2px rgba(123, 104, 238, 0.25);
}
.s365-brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.s365-brand-name {
  font-size: 15px;
  font-weight: 800;
  color: var(--s365-text);
  letter-spacing: 0.3px;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.s365-brand-tag {
  font-size: 10px;
  color: var(--s365-gold);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  line-height: 1.2;
}

.s365-header-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}
.s365-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border: none;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  color: #fff;
  font-family: inherit;
}
.s365-btn:active { transform: scale(0.96); }
.s365-btn-login {
  background: rgba(123, 104, 238, 0.16);
  border: 1px solid rgba(123, 104, 238, 0.55);
  color: var(--s365-text);
  padding: 0 12px;
}
.s365-btn-register {
  background: linear-gradient(135deg, var(--s365-orchid) 0%, var(--s365-magenta) 100%);
  box-shadow: 0 6px 14px rgba(128, 0, 128, 0.35);
}

.s365-hamburger {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(123, 104, 238, 0.14);
  border: 1px solid var(--s365-line);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
}
.s365-hamburger span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--s365-text);
  border-radius: 2px;
  transition: transform 0.22s ease, opacity 0.22s ease;
}
.s365-burger-active span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.s365-burger-active span:nth-child(2) { opacity: 0; }
.s365-burger-active span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ============================================================= Full-height menu */
.s365-menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(8, 12, 18, 0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.s365-menu-overlay.app365-menu-open {
  opacity: 1;
  pointer-events: auto;
}
.s365-menu-panel {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: 84%;
  max-width: 340px;
  background: linear-gradient(180deg, #1B2935 0%, #0F1822 100%);
  border-left: 1px solid var(--s365-line);
  transform: translateX(110%);
  transition: transform 0.28s cubic-bezier(0.22, 0.9, 0.3, 1);
  display: flex;
  flex-direction: column;
  padding: 18px 18px 28px;
  overflow-y: auto;
}
.s365-menu-overlay.app365-menu-open .s365-menu-panel { transform: translateX(0); }
.s365-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.s365-menu-head h3 {
  margin: 0;
  font-size: 14px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--s365-gold);
}
.s365-menu-close {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(123, 104, 238, 0.16);
  border: 1px solid var(--s365-line);
  color: var(--s365-text);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.s365-menu-cta {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}
.s365-menu-cta .s365-btn { flex: 1; padding: 0 10px; }
.s365-menu-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.s365-menu-list li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 12px;
  border-radius: 12px;
  color: var(--s365-text);
  font-weight: 600;
  background: rgba(123, 104, 238, 0.06);
  border: 1px solid transparent;
}
.s365-menu-list li a:active { background: rgba(123, 104, 238, 0.18); }
.s365-menu-list li a span.s365-menu-ico {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--s365-orchid), var(--s365-magenta));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
}
.s365-menu-section-title {
  margin: 14px 6px 6px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: var(--s365-text-dim);
}

/* ============================================================= Hero / Carousel */
.s365-hero {
  padding: 14px 12px 4px;
}
.s365-hero-title-wrap { text-align: center; margin-bottom: 10px; }
.s365-hero-eyebrow {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 10px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--s365-gold);
  background: rgba(255, 213, 107, 0.10);
  border: 1px solid rgba(255, 213, 107, 0.32);
}
.s365-hero h1 {
  margin: 8px 0 4px;
  font-size: 22px;
  line-height: 1.25;
  font-weight: 800;
  background: linear-gradient(135deg, #FFFFFF 0%, var(--s365-orchid-soft) 60%, var(--s365-magenta) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.s365-hero p {
  margin: 0 auto 6px;
  color: var(--s365-text-dim);
  font-size: 13px;
  max-width: 340px;
}

.s365-carousel {
  position: relative;
  border-radius: var(--s365-radius-lg);
  overflow: hidden;
  box-shadow: var(--s365-shadow);
  border: 1px solid var(--s365-line);
}
.s365-carousel-track {
  display: flex;
  transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: transform;
}
.s365-slide {
  flex: 0 0 100%;
  position: relative;
  aspect-ratio: 16 / 9;
}
.s365-slide img { width: 100%; height: 100%; object-fit: cover; }
.s365-slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(8, 12, 18, 0.85) 0%, rgba(8, 12, 18, 0.15) 55%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 14px;
}
.s365-slide-title { font-size: 16px; font-weight: 800; color: #fff; margin: 0 0 2px; }
.s365-slide-sub { font-size: 12px; color: var(--s365-text-dim); margin: 0 0 8px; }
.s365-slide-cta {
  align-self: flex-start;
  background: linear-gradient(135deg, var(--s365-gold), #FF9F2E);
  color: #1a1208;
  border: none;
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.s365-carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(15, 22, 32, 0.65);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.s365-carousel-nav.s365-prev { left: 8px; }
.s365-carousel-nav.s365-next { right: 8px; }

.s365-carousel-dots {
  position: absolute;
  bottom: 8px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 6px;
  z-index: 2;
}
.s365-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}
.s365-dot.app365-dot-active,
.s365-dot.s365-dot-active {
  width: 20px;
  border-radius: 4px;
  background: var(--s365-gold);
}

/* ============================================================= Quick search */
.s365-quick {
  margin: 12px 12px 4px;
  display: flex;
  gap: 8px;
  align-items: center;
}
.s365-quick input {
  flex: 1;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--s365-line);
  background: rgba(36, 51, 65, 0.7);
  color: var(--s365-text);
  padding: 0 14px;
  font-size: 13px;
}
.s365-quick input::placeholder { color: var(--s365-text-dim); }
.s365-quick-cta {
  height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, var(--s365-orchid) 0%, var(--s365-magenta) 100%);
  color: #fff;
  font-weight: 800;
  font-size: 12px;
  cursor: pointer;
}

/* ============================================================= Stats strip */
.s365-stats {
  margin: 10px 12px 4px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.s365-stat {
  background: linear-gradient(180deg, rgba(43, 60, 78, 0.7), rgba(33, 47, 61, 0.7));
  border: 1px solid var(--s365-line);
  border-radius: var(--s365-radius);
  padding: 10px 6px;
  text-align: center;
}
.s365-stat b {
  display: block;
  font-size: 16px;
  color: var(--s365-gold);
  line-height: 1.1;
}
.s365-stat small {
  display: block;
  font-size: 10px;
  color: var(--s365-text-dim);
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

/* ============================================================= Section header */
.s365-section {
  padding: 18px 12px 6px;
}
.s365-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.s365-section-head h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: var(--s365-text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.s365-section-head h2::before {
  content: "";
  width: 4px;
  height: 16px;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--s365-orchid-soft), var(--s365-magenta));
}
.s365-section-link {
  font-size: 11px;
  color: var(--s365-orchid-soft);
  font-weight: 700;
}
.s365-section-sub {
  margin: -4px 0 10px;
  font-size: 12px;
  color: var(--s365-text-dim);
}

/* ============================================================= Game grid */
.s365-game-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
@media (min-width: 360px) { .s365-game-grid { gap: 9px; } }
@media (min-width: 400px) { .s365-game-grid { grid-template-columns: repeat(5, 1fr); } }

.s365-game-card {
  background: linear-gradient(180deg, var(--s365-card-2), var(--s365-card));
  border: 1px solid var(--s365-line);
  border-radius: 12px;
  padding: 6px;
  text-align: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.18s ease, border-color 0.18s ease;
}
.s365-game-card:active { transform: scale(0.96); border-color: var(--s365-gold); }
.s365-game-thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 9px;
  overflow: hidden;
  background: #0E1722;
  margin-bottom: 5px;
}
.s365-game-thumb img { width: 100%; height: 100%; object-fit: cover; }
.s365-game-name {
  font-size: 10.5px;
  line-height: 1.25;
  color: var(--s365-text);
  font-weight: 600;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 26px;
}
.s365-game-badge {
  position: absolute;
  top: 4px;
  left: 4px;
  background: linear-gradient(135deg, var(--s365-magenta), var(--s365-orchid));
  color: #fff;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 2px 6px;
  border-radius: 6px;
  text-transform: uppercase;
}

/* ============================================================= Promo winners / banners */
.s365-promo-strip {
  margin: 14px 12px 4px;
  border-radius: var(--s365-radius-lg);
  padding: 14px;
  background:
    radial-gradient(420px 160px at 0% 0%, rgba(128, 0, 128, 0.35), transparent 60%),
    radial-gradient(420px 160px at 100% 100%, rgba(123, 104, 238, 0.35), transparent 60%),
    linear-gradient(135deg, #28384A, #1C2834);
  border: 1px solid var(--s365-line);
  box-shadow: var(--s365-shadow);
}
.s365-promo-strip h3 { margin: 0 0 4px; font-size: 15px; color: #fff; }
.s365-promo-strip p { margin: 0 0 10px; font-size: 12px; color: var(--s365-text-dim); }
.s365-promo-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.s365-promo-actions .s365-btn { flex: 1; min-width: 110px; }

.s365-winners {
  margin: 14px 12px 4px;
  background: rgba(36, 51, 65, 0.5);
  border: 1px solid var(--s365-line);
  border-radius: var(--s365-radius);
  padding: 10px 12px;
  overflow: hidden;
}
.s365-winners h3 {
  margin: 0 0 6px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--s365-gold);
}
.s365-winners-list {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}
.s365-winner {
  flex: 0 0 auto;
  min-width: 150px;
  background: linear-gradient(135deg, rgba(43, 60, 78, 0.95), rgba(33, 47, 61, 0.95));
  border: 1px solid var(--s365-line);
  border-radius: 10px;
  padding: 8px 10px;
}
.s365-winner-name { font-size: 11px; color: var(--s365-text-dim); }
.s365-winner-game { font-size: 12px; font-weight: 700; color: #fff; margin: 1px 0; }
.s365-winner-amount { font-size: 13px; font-weight: 800; color: var(--s365-gold); }

/* ============================================================= Promo grid */
.s365-promo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.s365-promo-card {
  border-radius: var(--s365-radius);
  padding: 12px;
  border: 1px solid var(--s365-line);
  background: linear-gradient(180deg, var(--s365-card-2), var(--s365-card));
  position: relative;
  overflow: hidden;
}
.s365-promo-card::after {
  content: "";
  position: absolute;
  top: -30px;
  right: -30px;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 213, 107, 0.2), transparent 70%);
}
.s365-promo-card h4 { margin: 0 0 3px; font-size: 13px; color: #fff; }
.s365-promo-card p { margin: 0 0 8px; font-size: 11px; color: var(--s365-text-dim); }
.s365-promo-card .s365-btn { width: 100%; padding: 0 8px; min-height: 32px; font-size: 11px; }

/* ============================================================= CTA block */
.s365-cta-block {
  margin: 16px 12px 4px;
  padding: 18px 16px;
  border-radius: var(--s365-radius-lg);
  text-align: center;
  background:
    radial-gradient(360px 160px at 50% -40px, rgba(255, 213, 107, 0.28), transparent 60%),
    linear-gradient(135deg, #4B2E83 0%, #2E1849 60%, #1A0F2C 100%);
  border: 1px solid var(--s365-line);
  box-shadow: var(--s365-shadow);
}
.s365-cta-block h3 { margin: 0 0 6px; font-size: 17px; color: #fff; }
.s365-cta-block p { margin: 0 auto 12px; font-size: 12px; color: var(--s365-text-dim); max-width: 320px; }
.s365-cta-block .s365-btn { padding: 0 22px; min-height: 42px; font-size: 14px; }

/* ============================================================= FAQ */
.s365-faq-list { display: flex; flex-direction: column; gap: 8px; }
.s365-faq-item {
  background: rgba(36, 51, 65, 0.55);
  border: 1px solid var(--s365-line);
  border-radius: 12px;
  overflow: hidden;
}
.s365-faq-question {
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  color: var(--s365-text);
  font-size: 13px;
  font-weight: 700;
  padding: 12px 14px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-family: inherit;
}
.s365-faq-question::after {
  content: "+";
  font-size: 18px;
  color: var(--s365-gold);
  transition: transform 0.2s ease;
}
.s365-faq-open .s365-faq-question::after { transform: rotate(45deg); }
.s365-faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  padding: 0 14px;
  color: var(--s365-text-dim);
  font-size: 12.5px;
}
.s365-faq-open .s365-faq-answer { max-height: 320px; padding: 0 14px 12px; }

/* ============================================================= SEO content */
.s365-seo {
  padding: 14px 12px 4px;
}
.s365-seo h2 { font-size: 15px; margin: 12px 0 6px; color: var(--s365-text); }
.s365-seo h3 { font-size: 13px; margin: 10px 0 4px; color: var(--s365-orchid-soft); }
.s365-seo p { font-size: 13px; color: var(--s365-text-dim); margin: 0 0 8px; }
.s365-seo ul { padding-left: 18px; margin: 0 0 8px; color: var(--s365-text-dim); font-size: 13px; }
.s365-seo a { color: var(--s365-orchid-soft); font-weight: 700; }

/* ============================================================= Extended footer */
.s365-ext-footer {
  margin: 16px 12px 4px;
  padding: 16px 14px;
  border-radius: var(--s365-radius-lg);
  background: linear-gradient(180deg, rgba(33, 47, 61, 0.85), rgba(15, 22, 32, 0.95));
  border: 1px solid var(--s365-line);
}
.s365-ext-footer .s365-brand-row {
  display: flex; align-items: center; gap: 10px; margin-bottom: 10px;
}
.s365-ext-footer .s365-brand-row img { width: 42px; height: 42px; border-radius: 10px; object-fit: cover; }
.s365-ext-footer h3 { margin: 0; font-size: 14px; color: #fff; }
.s365-ext-footer p { margin: 0; font-size: 12px; color: var(--s365-text-dim); }
.s365-ext-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 12px 0;
}
.s365-ext-col h4 {
  margin: 0 0 6px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--s365-gold);
}
.s365-ext-col a {
  display: block;
  font-size: 12px;
  color: var(--s365-text);
  padding: 4px 0;
  border-bottom: 1px dashed rgba(123, 104, 238, 0.18);
}
.s365-ext-col a:last-child { border-bottom: none; }
.s365-ext-promos {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin: 10px 0;
}
.s365-ext-promos .s365-btn { min-height: 36px; padding: 0 8px; font-size: 11px; }
.s365-ext-disclaimer {
  font-size: 11px;
  color: var(--s365-text-dim);
  border-top: 1px solid var(--s365-line);
  padding-top: 10px;
  margin-top: 6px;
}

/* ============================================================= Footer */
.s365-footer {
  padding: 18px 14px 8px;
  text-align: center;
  color: var(--s365-text-dim);
  font-size: 11px;
}
.s365-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 12px;
  margin-bottom: 8px;
}
.s365-footer-links a { color: var(--s365-text-dim); font-size: 11px; }
.s365-footer-copy { color: var(--s365-text-dim); }

/* ============================================================= Bottom nav */
.s365-bottom-nav {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 100%;
  max-width: var(--s365-max);
  height: var(--s365-bottom-h);
  background: linear-gradient(180deg, rgba(24, 34, 45, 0.98), rgba(15, 22, 32, 1));
  border-top: 1px solid var(--s365-line);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  z-index: 70;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.s365-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--s365-text-dim);
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  background: transparent;
  border: none;
  font-family: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.s365-nav-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 26px;
  height: 3px;
  border-radius: 0 0 4px 4px;
  background: transparent;
  transition: background 0.22s ease;
}
.s365-nav-item.s365-nav-current,
.s365-nav-item.app365-nav-current {
  color: var(--s365-gold);
}
.s365-nav-item.s365-nav-current::before,
.s365-nav-item.app365-nav-current::before {
  background: linear-gradient(90deg, var(--s365-gold), var(--s365-magenta));
}
.s365-nav-item:active { color: var(--s365-orchid-soft); }

.s365-nav-ico {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.s365-nav-ico svg { width: 22px; height: 22px; }
.s365-nav-label { font-size: 10px; line-height: 1; }

.s365-nav-promo {
  position: relative;
}
.s365-nav-promo .s365-nav-promo-flag {
  position: absolute;
  top: -2px;
  right: 12px;
  background: var(--s365-magenta);
  color: #fff;
  font-size: 8px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 6px;
  letter-spacing: 0.5px;
}

/* ============================================================= Back to top */
.s365-back-top {
  position: fixed;
  right: 14px;
  bottom: calc(var(--s365-bottom-h) + 12px);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--s365-orchid), var(--s365-magenta));
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
  z-index: 55;
}
.s365-back-top.app365-back-show { opacity: 1; pointer-events: auto; }

/* ============================================================= Utilities */
.s365-reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.s365-reveal.app365-revealed,
.s365-reveal.s365-revealed { opacity: 1; transform: translateY(0); }

.s365-no-scroll { overflow: hidden; }

.s365-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--s365-line), transparent);
  margin: 14px 0;
}

.s365-tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 10px; }
.s365-tag {
  font-size: 10px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(123, 104, 238, 0.12);
  border: 1px solid var(--s365-line);
  color: var(--s365-text);
}

.s365-visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0; padding: 0; margin: -1px;
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
