/*
 Theme Name:   GeneratePress Child
 Theme URI:    https://generatepress.com
 Description:  Default GeneratePress child theme
 Author:       Tom Usborne
 Author URI:   https://tomusborne.com
 Template:     generatepress
 Version:      0.1
*/

/* =========================================================
   Box Model
   ========================================================= */

.sph-level-page,
.sph-level-page *,
.sph-home-page,
.sph-home-page * {
  box-sizing: border-box;
}

/* =========================================================
   CSS Variables
   Shared between all page types.
   ========================================================= */

.sph-level-page,
.sph-home-page {
  --sph-bg:            #f7f8fc;
  --sph-card:          #ffffff;
  --sph-text:          #172033;
  --sph-muted:         #5e6b7c;
  --sph-border:        #dde4f2;
  --sph-border-strong: #cfd8ec;
  --sph-accent:        #5f5cf1;
  --sph-accent-2:      #8b5cf6;
  --sph-accent-3:      #22c7e8;
  --sph-pink:          #ec4899;
  --sph-good:          #16a34a;
  --sph-warning:       #f59e0b;
  --sph-danger:        #ef4444;
  --sph-radius:        24px;
  --sph-radius-sm:     16px;
  --sph-shadow:        0 14px 38px rgba(28, 36, 66, 0.08);
  --sph-shadow-soft:   0 8px 20px rgba(28, 36, 66, 0.05);

  /* Game palette shortcuts */
  --game-navy:         #03071e;
  --game-navy-mid:     #0a1560;
  --game-glass:        rgba(85, 138, 255, 0.62);

  margin: 0 auto;
  padding: 18px;
  color: var(--sph-text);
  font-size: 17px;
  line-height: 1.65;
}

.sph-level-page { max-width: 1040px; }
.sph-home-page  { max-width: 1120px; }

/* =========================================================
   Typography — shared
   ========================================================= */

.sph-level-page p,
.sph-home-page p {
  margin: 0 0 16px;
}

.sph-level-page h1,
.sph-level-page h2,
.sph-level-page h3,
.sph-home-page h1,
.sph-home-page h2,
.sph-home-page h3 {
  margin-top: 0;
  color: var(--sph-text);
  line-height: 1.18;
}

.sph-level-page h1,
.sph-home-page h1 {
  font-size: clamp(30px, 5vw, 50px);
  letter-spacing: -0.04em;
  margin-bottom: 14px;
}

.sph-level-page h2,
.sph-home-page h2 {
  font-size: clamp(22px, 3.4vw, 32px);
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}

.sph-level-page h3,
.sph-home-page h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

/* =========================================================
   GeneratePress layout overrides
   ========================================================= */

@media (max-width: 768px) {
  .inside-article,
  .entry-content {
    padding-left:  8px !important;
    padding-right: 8px !important;
  }
}

/* =========================================================
   HERO — page-level call-to-action banner
   ========================================================= */

.sph-hero {
  padding: clamp(28px, 5vw, 48px);
  border: 1px solid var(--sph-border);
  border-radius: var(--sph-radius);
  box-shadow: var(--sph-shadow);
  margin-bottom: 22px;
  background:
    radial-gradient(circle at  0%   0%, rgba(95, 92, 241, 0.17), transparent 34%),
    radial-gradient(circle at 100%  0%, rgba(236, 72, 153, 0.12), transparent 30%),
    radial-gradient(circle at 100% 100%, rgba(34, 199, 232, 0.10), transparent 32%),
    linear-gradient(135deg, #ffffff 0%, #f8f9ff 55%, #f7fbff 100%);
  position: relative;
  overflow: hidden;
}

/* Decorative orb */
.sph-hero::after {
  content: "";
  position: absolute;
  right: -80px;
  bottom: -90px;
  width: 260px;
  height: 260px;
  border-radius: 999px;
  background: radial-gradient(
    circle,
    rgba(34, 199, 232, 0.28),
    rgba(95, 92, 241, 0.08) 55%,
    transparent 70%
  );
  pointer-events: none;
}

/* Level-specific hero — slightly stronger accents */
.sph-hero-level {
  background:
    radial-gradient(circle at  5%  10%, rgba(95, 92, 241, 0.22), transparent 32%),
    radial-gradient(circle at 95%  8%,  rgba(236, 72, 153, 0.16), transparent 28%),
    radial-gradient(circle at 80% 90%,  rgba(34, 199, 232, 0.18), transparent 34%),
    linear-gradient(135deg, #ffffff 0%, #f8f7ff 50%, #f2fbff 100%);
}

/* =========================================================
   EYEBROW — hero badge (top of page)
   ========================================================= */

.sph-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin-bottom: 14px !important;
  padding: 7px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(95, 92, 241, 0.10), rgba(236, 72, 153, 0.10));
  border: 1px solid rgba(95, 92, 241, 0.18);
  color: #4e44d8;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.10em;
  text-transform: uppercase;
}

/* =========================================================
   CARD EYEBROW — label inside content cards
   ========================================================= */

.sph-card-eyebrow {
  display: inline-block;
  margin-bottom: 10px !important;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  background: rgba(95, 92, 241, 0.08);
  color: #4e44d8;
  border: 1px solid rgba(95, 92, 241, 0.14);
}

/* Dark card variant — white eyebrow */
.sph-visual-card .sph-card-eyebrow {
  background: rgba(120, 170, 255, 0.14);
  color: rgba(180, 210, 255, 0.90);
  border-color: rgba(100, 150, 255, 0.22);
}

/* =========================================================
   INTRO TEXT
   ========================================================= */

.sph-intro {
  max-width: 760px;
  color: var(--sph-muted);
  font-size: clamp(16px, 2vw, 19px);
  margin-bottom: 0 !important;
}

/* =========================================================
   META ROW — pill badges in hero
   ========================================================= */

.sph-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.sph-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 7px 14px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid var(--sph-border);
  box-shadow: var(--sph-shadow-soft);
  color: #28344e;
  font-size: 14px;
  font-weight: 800;
}

/* Difficulty color coding */
.sph-pill-easy   { color: var(--sph-good);    border-color: rgba(22,163,74,0.28);   background: rgba(22,163,74,0.06); }
.sph-pill-medium { color: #b45309;            border-color: rgba(245,158,11,0.28);  background: rgba(245,158,11,0.06); }
.sph-pill-hard   { color: var(--sph-danger);  border-color: rgba(239,68,68,0.28);   background: rgba(239,68,68,0.06); }

/* =========================================================
   CARD — base
   ========================================================= */

.sph-card {
  padding: clamp(22px, 4vw, 36px);
  border: 1px solid var(--sph-border);
  border-radius: var(--sph-radius);
  box-shadow: var(--sph-shadow);
  margin-bottom: 22px;
  background: #ffffff;
}

/* =========================================================
   VISUAL GUIDE CARD — dark, game-themed
   ========================================================= */

.sph-visual-card {
  padding: 0;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 28% 18%, rgba(28, 48, 160, 0.72) 0%, transparent 52%),
    radial-gradient(ellipse at 80% 82%, rgba(10, 20, 100, 0.60) 0%, transparent 50%),
    var(--game-navy);
  border-color: rgba(60, 100, 200, 0.28);
}

/* Padded text header inside the dark card */
.sph-visual-header {
  padding: clamp(22px, 4vw, 34px);
  padding-bottom: 8px;
}

.sph-visual-header h2 {
  color: rgba(220, 235, 255, 0.96);
  letter-spacing: -0.03em;
}

.sph-visual-header p {
  color: rgba(155, 185, 255, 0.80);
  margin-bottom: 0 !important;
  font-size: 15px;
}

/* Preview fills the full card width edge-to-edge */
.sph-visual-card .ms-preview {
  border-radius: 0;
  border-bottom-left-radius:  var(--sph-radius);
  border-bottom-right-radius: var(--sph-radius);
  border: none;
}

/* =========================================================
   DETAIL LIST — key / value stat grid
   ========================================================= */

.sph-details-summary {
  color: var(--sph-muted);
  font-size: 16px;
  margin-bottom: 20px !important;
}

.sph-detail-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.sph-detail-list li {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid var(--sph-border);
  border-radius: 16px;
  background: #f9faff;
  box-shadow: var(--sph-shadow-soft);
}

.sph-detail-key {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--sph-muted);
}

.sph-detail-val {
  font-size: 20px;
  font-weight: 900;
  color: var(--sph-text);
  line-height: 1.1;
}

/* =========================================================
   LEVEL NAVIGATION — Prev / Master / Next
   ========================================================= */

.sph-level-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 22px;
}

.sph-nav-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 86px;
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid var(--sph-border);
  background: #ffffff;
  color: var(--sph-text);
  text-decoration: none;
  box-shadow: var(--sph-shadow-soft);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.sph-nav-card:hover {
  transform: translateY(-3px);
  border-color: rgba(95, 92, 241, 0.32);
  box-shadow: 0 16px 30px rgba(28, 36, 66, 0.12);
  text-decoration: none;
}

.sph-nav-label {
  display: inline-flex;
  width: fit-content;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.sph-nav-card strong {
  color: #172033;
  font-size: 15px;
  line-height: 1.35;
}

/* Previous */
.sph-nav-prev {
  background:
    radial-gradient(circle at top left, rgba(95, 92, 241, 0.10), transparent 36%),
    #ffffff;
}

.sph-nav-prev .sph-nav-label {
  color: #4f46e5;
  background: rgba(95, 92, 241, 0.10);
}

/* Master index */
.sph-nav-master {
  background:
    radial-gradient(circle at top, rgba(34, 199, 232, 0.12), transparent 38%),
    #ffffff;
  text-align: center;
  align-items: center;
}

.sph-nav-master .sph-nav-label {
  color: #0784a2;
  background: rgba(34, 199, 232, 0.12);
}

/* Next */
.sph-nav-next {
  background:
    radial-gradient(circle at top right, rgba(236, 72, 153, 0.10), transparent 36%),
    #ffffff;
  text-align: right;
  align-items: flex-end;
}

.sph-nav-next .sph-nav-label {
  color: #be185d;
  background: rgba(236, 72, 153, 0.11);
}

/* =========================================================
   WALKTHROUGH
   ========================================================= */

.sph-walkthrough p {
  color: var(--sph-muted);
  font-size: 16px;
}

.sph-solution-data {
  display: none;
}

/* =========================================================
   TIPS — game-color bullet list
   ========================================================= */

.sph-tips-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sph-tips-list li {
  position: relative;
  padding: 14px 16px 14px 52px;
  border-radius: 16px;
  border: 1px solid var(--sph-border);
  background: #f9faff;
  font-size: 16px;
  color: #2a3650;
  line-height: 1.55;
}

/* Colored bullet dot — cycles through bottle colors */
.sph-tips-list li::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  box-shadow: 0 3px 8px rgba(0,0,0,0.20);
}

.sph-tips-list li:nth-child(1)::before { background: linear-gradient(180deg, #ff7272, #e01e1e); }
.sph-tips-list li:nth-child(2)::before { background: linear-gradient(180deg, #6cb8ff, #1a6ae6); }
.sph-tips-list li:nth-child(3)::before { background: linear-gradient(180deg, #4eea7e, #0eb83e); }
.sph-tips-list li:nth-child(4)::before { background: linear-gradient(180deg, #ffe25e, #efa010); }
.sph-tips-list li:nth-child(5)::before { background: linear-gradient(180deg, #cc80ff, #9228f0); }
.sph-tips-list li:nth-child(6)::before { background: linear-gradient(180deg, #ff9a42, #e04000); }

/* =========================================================
   FAQ — bordered Q&A list
   ========================================================= */

.sph-faq-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 4px;
}

.sph-faq-item {
  padding: 20px 0;
  border-bottom: 1px solid var(--sph-border);
}

.sph-faq-item:first-child {
  padding-top: 0;
}

.sph-faq-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.sph-faq-item h3 {
  font-size: 17px;
  font-weight: 800;
  color: var(--sph-text);
  margin-bottom: 8px;
  line-height: 1.4;
  /* Colored left accent */
  padding-left: 14px;
  border-left: 3px solid var(--sph-accent);
}

.sph-faq-item p {
  margin-bottom: 0 !important;
  color: var(--sph-muted);
  font-size: 16px;
  padding-left: 14px;
}

/* Cycle accent colors on FAQ questions */
.sph-faq-item:nth-child(1) h3 { border-left-color: #5f5cf1; }
.sph-faq-item:nth-child(2) h3 { border-left-color: #22c7e8; }
.sph-faq-item:nth-child(3) h3 { border-left-color: #ec4899; }
.sph-faq-item:nth-child(4) h3 { border-left-color: #16a34a; }

/* =========================================================
   CTA Buttons — shared
   ========================================================= */

.sph-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.sph-main-btn,
.sph-secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 20px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 900;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.sph-main-btn {
  color: #ffffff;
  background: linear-gradient(135deg, #5f5cf1 0%, #22c7e8 100%);
  box-shadow: 0 14px 26px rgba(95, 92, 241, 0.22);
}

.sph-secondary-btn {
  color: #2f3a58;
  background: #ffffff;
  border: 1px solid var(--sph-border);
  box-shadow: var(--sph-shadow-soft);
}

.sph-main-btn:hover,
.sph-secondary-btn:hover {
  transform: translateY(-1px);
  text-decoration: none;
}

/* =========================================================
   FEATURE GRID & BOXES — homepage / master topic
   ========================================================= */

.sph-feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.sph-feature-box {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--sph-border);
  box-shadow: var(--sph-shadow-soft);
}

.sph-feature-icon {
  display: inline-flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(95, 92, 241, 0.12), rgba(236, 72, 153, 0.10));
  font-size: 21px;
}

.sph-feature-box h3 {
  margin-bottom: 7px;
  font-size: 18px;
  color: #202a56;
}

.sph-feature-box p {
  margin-bottom: 0;
  color: var(--sph-muted);
  font-size: 15px;
  line-height: 1.55;
}

.sph-feature-callout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 20px;
  padding: 18px;
  border-radius: 22px;
  background:
    radial-gradient(circle at top right, rgba(34, 199, 232, 0.13), transparent 30%),
    #ffffff;
  border: 1px solid var(--sph-border);
  box-shadow: var(--sph-shadow-soft);
}

.sph-feature-callout h3 { margin-bottom: 6px; color: #202a56; }
.sph-feature-callout p  { margin-bottom: 0; }

/* =========================================================
   MASTER TOPIC PAGE
   ========================================================= */

.sph-master-hero {
  position: relative;
  overflow: hidden;
}

.sph-level-index-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.sph-level-link-card {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 16px;
  border-radius: 18px;
  background:
    radial-gradient(circle at top right, rgba(34, 199, 232, 0.13), transparent 32%),
    #ffffff;
  border: 1px solid var(--sph-border);
  box-shadow: var(--sph-shadow-soft);
  color: var(--sph-text);
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.sph-level-link-card:hover {
  transform: translateY(-2px);
  border-color: rgba(95, 92, 241, 0.30);
  box-shadow: 0 14px 28px rgba(28, 36, 66, 0.10);
  text-decoration: none;
}

.sph-level-link-number {
  display: inline-flex;
  width: fit-content;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(95, 92, 241, 0.10);
  color: #4f46e5;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.sph-level-link-card strong {
  color: #19223b;
  font-size: 17px;
  line-height: 1.3;
}

.sph-level-link-card span:last-child {
  color: var(--sph-muted);
  font-size: 14px;
  line-height: 1.45;
}

/* =========================================================
   HOMEPAGE
   ========================================================= */

.sph-home-hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 22px;
  padding: clamp(28px, 6vw, 58px);
  border: 1px solid var(--sph-border);
  border-radius: 30px;
  box-shadow: var(--sph-shadow);
  background:
    radial-gradient(circle at  8% 12%, rgba(95, 92, 241, 0.22), transparent 32%),
    radial-gradient(circle at 92%  8%, rgba(236, 72, 153, 0.16), transparent 30%),
    radial-gradient(circle at 80% 88%, rgba(34, 199, 232, 0.18), transparent 36%),
    linear-gradient(135deg, #ffffff 0%, #f8f7ff 50%, #f2fbff 100%);
}

.sph-home-hero::after {
  content: "";
  position: absolute;
  right: -80px;
  bottom: -95px;
  width: 300px;
  height: 300px;
  border-radius: 999px;
  background: radial-gradient(
    circle,
    rgba(34, 199, 232, 0.30),
    rgba(95, 92, 241, 0.10) 58%,
    transparent 72%
  );
  pointer-events: none;
}

.sph-home-hero-content {
  position: relative;
  z-index: 2;
  max-width: 860px;
}

.sph-home-hero h1 { max-width: 880px; }

/* =========================================================
   GAME GRID — color-themed cards, one per sort game
   Each card uses CSS custom properties for its color.
   ========================================================= */

.sph-game-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
}

/* ---- Base card ---- */
.sph-game-card {
  /* Color theme — overridden per variant */
  --gc-color:        #5f5cf1;
  --gc-bg:           rgba(95, 92, 241, 0.07);
  --gc-border:       rgba(95, 92, 241, 0.20);
  --gc-hover-border: rgba(95, 92, 241, 0.48);
  --gc-hover-shadow: rgba(95, 92, 241, 0.14);
  --gc-icon-bg:      rgba(95, 92, 241, 0.12);

  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: 20px;
  border: 1.5px solid var(--gc-border);
  background: #ffffff;
  overflow: hidden;
  text-decoration: none;
  color: var(--sph-text);
  box-shadow: var(--sph-shadow-soft);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.sph-game-card:hover {
  transform: translateY(-4px);
  border-color: var(--gc-hover-border);
  box-shadow: 0 16px 36px var(--gc-hover-shadow), var(--sph-shadow-soft);
  text-decoration: none;
}

/* ---- Colored visual header ---- */
.sph-game-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 26px 20px 22px;
  background: var(--gc-bg);
  /* subtle inner top border matching the card color */
  border-bottom: 1px solid var(--gc-border);
}

/* Large emoji icon */
.sph-game-emoji {
  font-size: 42px;
  line-height: 1;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.12));
  transition: transform .2s ease;
}

.sph-game-card:hover .sph-game-emoji {
  transform: scale(1.12) rotate(-4deg);
}

/* Status badge — top right corner */
.sph-game-status {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--gc-bg);
  color: var(--gc-color);
  border: 1px solid var(--gc-border);
}

.sph-status-live {
  background: rgba(22, 163, 74, 0.10);
  color: #15803d;
  border-color: rgba(22, 163, 74, 0.28);
}

/* ---- Text body ---- */
.sph-game-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px;
  flex: 1;
}

.sph-game-body h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 900;
  color: var(--sph-text);
  line-height: 1.2;
}

.sph-game-body p {
  margin: 0;
  font-size: 13px;
  color: var(--sph-muted);
  line-height: 1.5;
}

.sph-game-cta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: auto;
  padding-top: 10px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  color: var(--gc-color);
  text-transform: uppercase;
}

/* ---- Per-game color variants ---- */

/* Magic Sort — blue (water) */
.sph-gc-blue {
  --gc-color:        #1a6ae6;
  --gc-bg:           rgba(26, 106, 230, 0.07);
  --gc-border:       rgba(26, 106, 230, 0.20);
  --gc-hover-border: rgba(26, 106, 230, 0.50);
  --gc-hover-shadow: rgba(26, 106, 230, 0.14);
}

/* Bus Sort — amber (school bus) */
.sph-gc-amber {
  --gc-color:        #c07800;
  --gc-bg:           rgba(217, 119, 6, 0.07);
  --gc-border:       rgba(217, 119, 6, 0.22);
  --gc-hover-border: rgba(217, 119, 6, 0.50);
  --gc-hover-shadow: rgba(217, 119, 6, 0.14);
}

/* Car Sort — red */
.sph-gc-red {
  --gc-color:        #dc2626;
  --gc-bg:           rgba(220, 38, 38, 0.07);
  --gc-border:       rgba(220, 38, 38, 0.20);
  --gc-hover-border: rgba(220, 38, 38, 0.48);
  --gc-hover-shadow: rgba(220, 38, 38, 0.14);
}

/* Goods Sort — green */
.sph-gc-green {
  --gc-color:        #16a34a;
  --gc-bg:           rgba(22, 163, 74, 0.07);
  --gc-border:       rgba(22, 163, 74, 0.20);
  --gc-hover-border: rgba(22, 163, 74, 0.48);
  --gc-hover-shadow: rgba(22, 163, 74, 0.14);
}

/* Jam Sort — pink */
.sph-gc-pink {
  --gc-color:        #db2777;
  --gc-bg:           rgba(219, 39, 119, 0.07);
  --gc-border:       rgba(219, 39, 119, 0.20);
  --gc-hover-border: rgba(219, 39, 119, 0.48);
  --gc-hover-shadow: rgba(219, 39, 119, 0.14);
}

/* Ball Sort — purple */
.sph-gc-purple {
  --gc-color:        #7c3aed;
  --gc-bg:           rgba(124, 58, 237, 0.07);
  --gc-border:       rgba(124, 58, 237, 0.20);
  --gc-hover-border: rgba(124, 58, 237, 0.48);
  --gc-hover-shadow: rgba(124, 58, 237, 0.14);
}

/* Hoop Sort — teal */
.sph-gc-teal {
  --gc-color:        #0f766e;
  --gc-bg:           rgba(15, 118, 110, 0.07);
  --gc-border:       rgba(15, 118, 110, 0.20);
  --gc-hover-border: rgba(15, 118, 110, 0.48);
  --gc-hover-shadow: rgba(15, 118, 110, 0.14);
}

/* Hidden Object — gold */
.sph-gc-gold {
  --gc-color:        #92580a;
  --gc-bg:           rgba(180, 83, 9, 0.07);
  --gc-border:       rgba(180, 83, 9, 0.20);
  --gc-hover-border: rgba(180, 83, 9, 0.48);
  --gc-hover-shadow: rgba(180, 83, 9, 0.14);
}

/* =========================================================
   MAGIC SORT PREVIEW WIDGET
   Dark navy — matches Normal_BG.png game background.
   ========================================================= */

.magic-sort-preview-root {
  margin-top: 0;
}

.ms-preview {
  --ms-bottle-w: clamp(40px, 9vw, 62px);
  --ms-bottle-h: clamp(110px, 25vw, 168px);
  --ms-slot-h:   clamp(20px,  5vw,  33px);

  background:
    radial-gradient(ellipse at 28% 18%, rgba(28,  48, 160, 0.72) 0%, transparent 52%),
    radial-gradient(ellipse at 80% 82%, rgba(10,  20, 100, 0.60) 0%, transparent 50%),
    radial-gradient(ellipse at 60% 50%, rgba(5,   12,  80, 0.80) 0%, transparent 70%),
    var(--game-navy);

  border-radius: 24px;
  padding: clamp(16px, 3vw, 28px);
  overflow: hidden;
  position: relative;
  border: none;
}

/* Star speckle */
.ms-preview::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(255,255,255,0.60) 1px, transparent 1px),
    radial-gradient(circle, rgba(255,255,255,0.35) 1px, transparent 1px),
    radial-gradient(circle, rgba(255,255,255,0.20) 1px, transparent 1px);
  background-size: 130px 110px, 85px 95px, 65px 75px;
  background-position: 12px 18px, 44px 58px, 74px 28px;
  pointer-events: none;
  opacity: 0.45;
  z-index: 0;
}

/* ---- Toolbar ---- */

.ms-toolbar {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 28px;
}

.ms-status {
  color: rgba(180, 205, 255, 0.90);
  font-size: 14px;
  font-weight: 800;
  text-shadow: 0 1px 8px rgba(0, 0, 80, 0.70);
}

.ms-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ---- Buttons ---- */

.ms-btn {
  appearance: none;
  border: 2px solid rgba(100, 145, 255, 0.38);
  border-radius: 999px;
  padding: 9px 18px;
  background: rgba(18, 36, 115, 0.55);
  color: rgba(200, 220, 255, 0.95);
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.14),
    0 4px 16px rgba(0, 0, 60, 0.45);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease,
              opacity .15s ease, border-color .15s ease;
}

.ms-btn:hover {
  transform: translateY(-2px);
  background: rgba(38, 66, 175, 0.65);
  border-color: rgba(130, 175, 255, 0.58);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.20),
    0 8px 24px rgba(0, 0, 80, 0.55);
}

.ms-btn:disabled {
  opacity: 0.38;
  cursor: default;
  transform: none;
  box-shadow: none;
}

.ms-btn-primary {
  border-color: rgba(110, 158, 255, 0.65);
  background: linear-gradient(135deg, #3248cc 0%, #1e82e8 100%);
  color: #ffffff;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.26),
    0 6px 20px rgba(40, 80, 220, 0.48);
}

.ms-btn-primary:hover {
  background: linear-gradient(135deg, #4258dc 0%, #2e92f8 100%);
  border-color: rgba(155, 200, 255, 0.78);
}

/* ---- Board ---- */

.ms-board-scroll {
  position: relative;
  z-index: 2;
  overflow-x: hidden;
  overflow-y: visible;
  padding: 8px 0 10px;
  -webkit-overflow-scrolling: touch;
}

.ms-board-stage {
  position: relative;
  width: 100%;
  min-width: 0;
  padding-top: 26px;
}

.ms-arrow-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
  z-index: 20;
}

.ms-board {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--ms-bottle-w), 1fr));
  gap: clamp(10px, 2.5vw, 24px) clamp(6px, 1.8vw, 14px);
  align-items: end;
  min-width: 0;
  width: 100%;
}

/* ---- Bottle Card ---- */

.ms-bottle-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: var(--ms-bottle-w);
  transition: opacity .22s ease, transform .22s ease, filter .22s ease;
}

/* ---- Bottle Cap ---- */

.ms-bottle-cap {
  position: absolute;
  top: -26px;
  left: 50%;
  transform: translateX(-50%);
  width: clamp(14px, 30%, 22px);
  height: 11px;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, rgba(110, 155, 255, 0.85), rgba(65, 108, 228, 0.78));
  border: 1.5px solid rgba(130, 175, 255, 0.48);
  border-bottom: 0;
  box-shadow: 0 -2px 8px rgba(70, 120, 255, 0.30);
}

/* ---- Bottle Shell ---- */

.ms-bottle {
  position: relative;
  width: var(--ms-bottle-w);
  height: var(--ms-bottle-h);
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-start;
  gap: 2px;
  padding: 6px 5px 10px;
  border: 2.5px solid rgba(85, 138, 255, 0.62);
  border-top: 0;
  border-radius: 0 0 28px 28px;
  background:
    linear-gradient(
      90deg,
      rgba(120, 172, 255, 0.18) 0%,
      rgba(60,  102, 220, 0.04) 45%,
      rgba(80,  135, 255, 0.12) 100%
    ),
    rgba(6, 12, 52, 0.60);
  box-shadow:
    inset  5px 0 10px rgba(160, 205, 255, 0.18),
    inset -4px 0  8px rgba(0,   0,  40, 0.32),
    0 0 0 1px rgba(50, 95, 200, 0.18),
    0 8px 28px rgba(0,  0,  80, 0.50);
}

/* Neck */
.ms-bottle::before {
  content: "";
  position: absolute;
  top: -16px;
  left: clamp(8px, 20%, 14px);
  right: clamp(8px, 20%, 14px);
  height: 17px;
  border: 2.5px solid rgba(85, 138, 255, 0.62);
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
  background:
    linear-gradient(90deg, rgba(120,172,255,0.18), rgba(60,102,220,0.04) 50%, rgba(80,135,255,0.12)),
    rgba(6, 12, 52, 0.60);
}

/* Gloss streak */
.ms-bottle::after {
  content: "";
  position: absolute;
  top: 10px;
  bottom: 14px;
  left: 7px;
  width: clamp(4px, 12%, 8px);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(200, 224, 255, 0.44), rgba(160, 195, 255, 0.05));
  pointer-events: none;
}

/* ---- Color Slot ---- */

.ms-slot {
  width: 100%;
  height: var(--ms-slot-h);
  border-radius: 9px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  position: relative;
  overflow: hidden;
}

/* Liquid gloss */
.ms-slot[class*="ms-color-"]::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 5px;
  right: 5px;
  height: 38%;
  border-radius: 5px 5px 999px 999px;
  background: rgba(255,255,255,0.26);
  pointer-events: none;
}

/* ---- Label ---- */

.ms-label {
  color: rgba(155, 190, 255, 0.72);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-shadow: 0 1px 6px rgba(0, 0, 60, 0.85);
}

/* ---- Note ---- */

.ms-note {
  position: relative;
  z-index: 2;
  margin-top: 14px;
  color: rgba(140, 172, 255, 0.68);
  font-size: 14px;
  text-shadow: 0 1px 5px rgba(0, 0, 45, 0.70);
}

/* =========================================================
   BOTTLE STATES
   ========================================================= */

.ms-covered .ms-bottle { border-color: rgba(200, 155, 255, 0.52); }
.ms-covered .ms-bottle > .ms-slot { opacity: 0.14; }

.ms-covered .ms-bottle-cover {
  position: absolute;
  inset: -20px -8px -6px;
  border-radius: 20px 20px 30px 30px;
  background: linear-gradient(180deg, rgba(255, 240, 248, 0.97), rgba(255, 218, 236, 0.95));
  border: 1.5px solid rgba(236, 72, 153, 0.20);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.60),
    0 8px 20px rgba(100, 0, 60, 0.24);
  z-index: 8;
}

.ms-covered .ms-bottle-cover::before {
  content: "";
  position: absolute;
  top: 20px;
  left: 50%;
  width: 30px;
  height: 44px;
  transform: translateX(-50%);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(106, 125, 214, 0.90), rgba(118, 128, 188, 0.96));
  box-shadow:
    inset 0 0 0 2px rgba(255,255,255,0.65),
    0 0 0 2px rgba(95, 92, 241, 0.20);
}

.ms-covered .ms-bottle-cover::after {
  content: "";
  position: absolute;
  top: 13px;
  left: 50%;
  width: 16px;
  height: 9px;
  transform: translateX(-50%);
  border-radius: 0 0 7px 7px;
  background: linear-gradient(180deg, #f6c44f, #d59c1d);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.50);
}

.ms-covered.ms-revealed .ms-bottle-cover { display: none; }

.ms-complete .ms-bottle {
  border-color: rgba(48, 220, 136, 0.82);
  box-shadow:
    inset  5px 0 10px rgba(160, 205, 255, 0.18),
    inset -4px 0  8px rgba(0,   0,  40, 0.30),
    0 0 0 3px rgba(48, 220, 136, 0.22),
    0 0 22px rgba(48, 220, 136, 0.32),
    0 8px 26px rgba(0,  0,  80, 0.48);
}

.ms-faded {
  opacity: 0.20;
  filter: saturate(0.4);
}

.ms-active-source,
.ms-active-target {
  opacity: 1 !important;
  transform: translateY(-7px) scale(1.045);
  z-index: 16;
}

.ms-active-source .ms-bottle {
  border-color: rgba(75, 158, 255, 0.96);
  box-shadow:
    inset  5px 0 10px rgba(160, 205, 255, 0.24),
    inset -4px 0  8px rgba(0,   0,  40, 0.28),
    0 0 0 3px rgba(75, 158, 255, 0.26),
    0 0 26px rgba(75, 158, 255, 0.42),
    0 10px 30px rgba(0,  0, 100, 0.52);
}

.ms-active-target .ms-bottle {
  border-color: rgba(236, 72, 153, 0.96);
  box-shadow:
    inset  5px 0 10px rgba(255, 155, 200, 0.18),
    inset -4px 0  8px rgba(40,  0,  20, 0.28),
    0 0 0 3px rgba(236, 72, 153, 0.24),
    0 0 26px rgba(236, 72, 153, 0.38),
    0 10px 30px rgba(80,  0,  40, 0.44);
}

/* =========================================================
   ARROW OVERLAY
   ========================================================= */

.ms-arrow-path-secondary {
  fill: none;
  stroke: rgba(3, 7, 30, 0.75);
  stroke-width: 10;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ms-arrow-path {
  fill: none;
  stroke: #5888ff;
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 2px 10px rgba(70, 120, 255, 0.65));
}

.ms-arrow-dot-source,
.ms-arrow-dot-target { r: 6; }
.ms-arrow-dot-source { fill: #58a0ff; }
.ms-arrow-dot-target { fill: #f472b6; }

/* =========================================================
   BOTTLE COLOR PALETTE
   Saturated for legibility on dark background.
   ========================================================= */

.ms-color-0  { background: linear-gradient(180deg, #ff7272, #e01e1e); }
.ms-color-1  { background: linear-gradient(180deg, #6cb8ff, #1a6ae6); }
.ms-color-2  { background: linear-gradient(180deg, #4eea7e, #0eb83e); }
.ms-color-3  { background: linear-gradient(180deg, #ffe25e, #efa010); }
.ms-color-4  { background: linear-gradient(180deg, #cc80ff, #9228f0); }
.ms-color-5  { background: linear-gradient(180deg, #ff9a42, #e04000); }
.ms-color-6  { background: linear-gradient(180deg, #ff82c2, #e81880); }
.ms-color-7  { background: linear-gradient(180deg, #2cdecc, #089880); }
.ms-color-8  { background: linear-gradient(180deg, #a060ff, #5010d0); }
.ms-color-9  { background: linear-gradient(180deg, #b2f240, #50a000); }
.ms-color-10 { background: linear-gradient(180deg, #28e2ff, #0090c0); }
.ms-color-11 { background: linear-gradient(180deg, #b2bed2, #607080); }
.ms-color-12 { background: linear-gradient(180deg, #ffea92, #c08000); }
.ms-color-13 { background: linear-gradient(180deg, #ff7292, #d01040); }
.ms-color-14 { background: linear-gradient(180deg, #5858ff, #200090); }
.ms-color-15 { background: linear-gradient(180deg, #90ffb2, #108040); }

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 980px) {
  .sph-game-grid,
  .sph-feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sph-feature-callout {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 900px) {
  .sph-level-index-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .sph-level-page {
    padding: 12px 8px;
    font-size: 16px;
  }

  .sph-hero,
  .sph-card {
    border-radius: 18px;
    margin-bottom: 16px;
  }

  .sph-detail-list {
    grid-template-columns: 1fr;
  }

  .ms-preview {
    border-radius: 18px;
    padding: 14px 10px;
  }

  .ms-toolbar {
    gap: 10px;
    margin-bottom: 22px;
  }

  .ms-controls { width: 100%; }

  .ms-btn {
    flex: 1;
    min-width: 84px;
    justify-content: center;
  }

  .ms-note { font-size: 13px; }

  .sph-visual-card .ms-preview {
    border-bottom-left-radius:  18px;
    border-bottom-right-radius: 18px;
  }
}

@media (max-width: 720px) {
  .sph-level-nav {
    grid-template-columns: 1fr;
  }

  .sph-nav-master,
  .sph-nav-next {
    text-align: left;
    align-items: flex-start;
  }
}

@media (max-width: 560px) {
  .sph-home-page {
    padding-left:  8px;
    padding-right: 8px;
  }

  .sph-home-hero {
    border-radius: 22px;
    padding: 26px 18px;
  }

  .sph-game-grid,
  .sph-feature-grid,
  .sph-level-index-grid {
    grid-template-columns: 1fr;
  }

  .sph-hero-actions { flex-direction: column; }

  .sph-main-btn,
  .sph-secondary-btn { width: 100%; }

  .sph-game-card { min-height: auto; }
}

/* =========================================================
   MASTER TOPIC — Color strip (bottle palette reference)
   ========================================================= */

.sph-color-strip {
  display: flex;
  gap: 5px;
  margin: 20px 0 4px;
  height: 8px;
}

.sph-color-strip span {
  flex: 1;
  border-radius: 999px;
  opacity: 0.82;
}

/* =========================================================
   HOMEPAGE — VS YouTube section
   ========================================================= */

.sph-vs-section {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
  padding: clamp(20px, 4vw, 32px);
  border: 1px solid var(--sph-border);
  border-radius: var(--sph-radius);
  box-shadow: var(--sph-shadow);
  background: #ffffff;
}

.sph-vs-col {}

.sph-vs-label {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 14px !important;
}

.sph-vs-them .sph-vs-label { color: var(--sph-muted); }
.sph-vs-us  .sph-vs-label  { color: var(--sph-accent); }

.sph-vs-divider {
  font-size: 11px;
  font-weight: 900;
  color: var(--sph-muted);
  letter-spacing: 0.1em;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--sph-border);
  background: var(--sph-bg);
  text-align: center;
  align-self: center;
}

.sph-vs-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sph-vs-list li {
  padding: 9px 12px 9px 34px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.45;
  position: relative;
}

.sph-vs-list li::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Bad side — red crosses */
.sph-vs-bad li {
  background: rgba(239, 68, 68, 0.05);
  color: #4a3030;
}

.sph-vs-bad li::before {
  background: rgba(239, 68, 68, 0.18);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M3 3l8 8M11 3l-8 8' stroke='%23ef4444' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-size: contain;
}

/* Good side — green checks */
.sph-vs-good li {
  background: rgba(22, 163, 74, 0.05);
  color: #1a3a25;
}

.sph-vs-good li::before {
  background: rgba(22, 163, 74, 0.18);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M2 7l4 4 6-6' stroke='%2316a34a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: contain;
}

/* =========================================================
   HOMEPAGE — How It Works steps
   ========================================================= */

.sph-steps {
  display: flex;
  align-items: flex-start;
  gap: 0;
  margin-top: 24px;
}

.sph-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  padding: 0 12px;
}

.sph-step-number {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 20px;
  font-weight: 900;
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
  flex-shrink: 0;
}

.sph-step-body h3 {
  font-size: 16px;
  margin-bottom: 6px;
  color: var(--sph-text);
}

.sph-step-body p {
  font-size: 14px;
  color: var(--sph-muted);
  margin-bottom: 0 !important;
  line-height: 1.5;
}

.sph-step-arrow {
  font-size: 22px;
  color: var(--sph-border-strong);
  padding-top: 14px;
  flex-shrink: 0;
  align-self: flex-start;
}



/* ── Responsive ── */

@media (max-width: 768px) {
  .sph-vs-section {
    grid-template-columns: 1fr;
  }

  .sph-vs-divider {
    justify-self: center;
    width: fit-content;
  }

  .sph-steps {
    flex-direction: column;
    gap: 20px;
  }

  .sph-step {
    flex-direction: row;
    text-align: left;
    padding: 0;
  }

  .sph-step-arrow {
    display: none;
  }
}

/* =========================================================
   FOOTER WIDGETS
   ========================================================= */

.sph-footer-widget {
  font-size: 14px;
  line-height: 1.6;
}

/* ---- Brand widget ---- */
.sph-fw-brand {
  font-size: 16px;
  font-weight: 900;
  color: #ffffff;
  margin: 0 0 8px !important;
  letter-spacing: -0.02em;
}

.sph-fw-tagline {
  font-size: 13px;
  color: rgba(255,255,255,0.58);
  margin: 0 0 14px !important;
  line-height: 1.55;
}

.sph-fw-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.sph-fw-pills span {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.14);
  color: rgba(255,255,255,0.60);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

/* ---- Section titles ---- */
.sph-fw-title {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.40);
  margin: 0 0 12px !important;
}

/* ---- Link lists ---- */
.sph-fw-links {
  list-style: none;
  padding: 0;
  margin: 0 0 12px !important;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.sph-fw-links li a {
  color: rgba(255,255,255,0.72);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: color .15s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.sph-fw-links li a:hover {
  color: #ffffff;
  text-decoration: none;
}

/* Live badge inside game list */
.sph-fw-live {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #16a34a;
  background: rgba(22,163,74,0.14);
  border: 1px solid rgba(22,163,74,0.28);
  border-radius: 999px;
  padding: 2px 7px;
  margin-left: 2px;
}

/* "View all" link */
.sph-fw-more {
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  color: rgba(95, 92, 241, 0.90);
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: color .15s ease;
}

.sph-fw-more:hover {
  color: #ffffff;
  text-decoration: none;
}

/* Copyright line */
.sph-fw-copy {
  font-size: 12px;
  color: rgba(255,255,255,0.30);
  margin: 14px 0 0 !important;
}
/* Footer disclaimer widget */
.sph-fw-disclaimer-text {
  font-size: 12px;
  color: rgba(255,255,255,0.38);
  line-height: 1.6;
  margin: 0 0 10px !important;
}

.sph-fw-disclaimer-text:last-child {
  margin-bottom: 0 !important;
}
/* =========================================================
   FOOTER — Dark background + GeneratePress overrides
   ========================================================= */

/* Dark navy footer background */
.site-footer {
  background: #080e2e !important;
  border-top: 1px solid rgba(255,255,255,0.06);
}

/* Footer widget area padding */
.footer-widgets {
	  background: #080e2e !important;
  padding: 48px 0 32px;
}

/* GeneratePress widget title → override with our style */
.site-footer .widget-title {
  font-size: 12px !important;
  font-weight: 900 !important;
  letter-spacing: 0.10em !important;
  text-transform: uppercase !important;
  color: rgba(255,255,255,0.38) !important;
  margin-bottom: 16px !important;
  border: none !important;
  padding: 0 !important;
}

/* Footer bottom bar */
.footer-bar {
  background: rgba(0,0,0,0.25) !important;
  border-top: 1px solid rgba(255,255,255,0.06) !important;
  color: rgba(255,255,255,0.30) !important;
}

.footer-bar a {
  color: rgba(255,255,255,0.45) !important;
}

.footer-bar a:hover {
  color: #ffffff !important;
}
/* =========================================================
   CONTACT FORM 7 — sph styled
   ========================================================= */

.sph-cf7-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.sph-cf7-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.sph-cf7-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sph-cf7-label {
  font-size: 13px;
  font-weight: 800;
  color: var(--sph-text);
  letter-spacing: 0.02em;
}

.sph-cf7-label abbr {
  color: var(--sph-accent);
  text-decoration: none;
  margin-left: 2px;
}

.sph-cf7-optional {
  font-size: 12px;
  font-weight: 400;
  color: var(--sph-muted);
}

/* All inputs, selects, textareas */
.sph-cf7-form input[type="text"],
.sph-cf7-form input[type="email"],
.sph-cf7-form select,
.sph-cf7-form textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--sph-border);
  border-radius: 12px;
  background: #f9faff;
  color: var(--sph-text);
  font-size: 15px;
  font-family: inherit;
  transition: border-color .15s ease, box-shadow .15s ease;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}

.sph-cf7-form input:focus,
.sph-cf7-form select:focus,
.sph-cf7-form textarea:focus {
  border-color: var(--sph-accent);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(95, 92, 241, 0.10);
}

.sph-cf7-form textarea {
  min-height: 140px;
  resize: vertical;
  line-height: 1.6;
}

/* Select arrow */
.sph-cf7-form select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235e6b7c' stroke-width='1.5' stroke-linecap='round' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}

/* Acceptance checkbox */
.sph-cf7-accept .wpcf7-list-item {
  margin: 0;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.sph-cf7-accept .wpcf7-list-item-label {
  font-size: 13px;
  color: var(--sph-muted);
  line-height: 1.5;
}

.sph-cf7-accept a {
  color: var(--sph-accent);
  text-decoration: underline;
}

/* Submit button */
.sph-cf7-submit input[type="submit"] {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #5f5cf1 0%, #22c7e8 100%);
  color: #ffffff;
  font-size: 15px;
  font-weight: 900;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(95, 92, 241, 0.28);
  transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}

.sph-cf7-submit input[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(95, 92, 241, 0.35);
}

/* CF7 validation messages */
.wpcf7-not-valid-tip {
  font-size: 12px;
  color: var(--sph-danger);
  margin-top: 4px;
  display: block;
}

.wpcf7-response-output {
  margin-top: 16px !important;
  padding: 12px 16px !important;
  border-radius: 12px !important;
  font-size: 14px !important;
  border: 1.5px solid !important;
}

.wpcf7-mail-sent-ok {
  background: rgba(22,163,74,0.08) !important;
  border-color: rgba(22,163,74,0.30) !important;
  color: #15803d !important;
}

.wpcf7-mail-sent-ng,
.wpcf7-spam-blocked {
  background: rgba(239,68,68,0.08) !important;
  border-color: rgba(239,68,68,0.30) !important;
  color: #b91c1c !important;
}

@media (max-width: 560px) {
  .sph-cf7-row-2 {
    grid-template-columns: 1fr;
  }
}
