/* ============================================================
   YKS Hızlı Okuma — WORLD-CLASS SETTINGS PANEL SYSTEM
   Premium visual controls: segmented pickers, option tiles,
   animated sliders, preset cards, live-value displays
   ============================================================ */

/* ═══════════════════════════════════════════════════════════════
   SETTINGS PAGE LAYOUT
   ═══════════════════════════════════════════════════════════════ */

.settings-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  animation: settingsPageIn 0.5s var(--ease-elastic-2) both;
}

@keyframes settingsPageIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════════════════════════════════
   SETTINGS HERO HEADER
   ═══════════════════════════════════════════════════════════════ */

.sp-hero {
  position: relative;
  border-radius: var(--radius-xl);
  padding: var(--space-8) var(--space-6);
  overflow: hidden;
  background: linear-gradient(135deg,
    hsla(225, 30%, 10%, 0.9) 0%,
    hsla(225, 25%, 14%, 0.7) 100%);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  text-align: center;
  order: -2;
}

.sp-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%,
    hsla(210, 100%, 60%, 0.12) 0%,
    transparent 70%);
  pointer-events: none;
}

.sp-hero-icon {
  font-size: 3.5rem;
  display: block;
  margin-bottom: var(--space-3);
  filter: drop-shadow(0 0 20px hsla(210, 100%, 60%, 0.5));
  animation: heroIconFloat 3s ease-in-out infinite;
}

@keyframes heroIconFloat {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
}

.sp-hero-title {
  font-family: var(--font-ui);
  font-size: var(--text-3xl);
  font-weight: 800;
  background: linear-gradient(135deg, var(--color-primary-light), var(--color-secondary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0 0 var(--space-2);
  line-height: 1.2;
}

.sp-hero-subtitle {
  font-size: var(--text-base);
  color: var(--text-secondary);
  margin: 0;
  font-weight: 400;
}

/* ═══════════════════════════════════════════════════════════════
   SETTINGS SECTION
   ═══════════════════════════════════════════════════════════════ */

.sp-section {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.sp-section:hover {
  border-color: var(--glass-border-hover);
  box-shadow: 0 8px 40px hsla(225, 30%, 6%, 0.4);
}

.sp-section-title {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  margin-bottom: var(--space-5);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--glass-border);
}

.sp-section-title-icon {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.sp-section-title-icon.primary {
  background: hsla(210, 100%, 60%, 0.15);
  color: var(--color-primary);
}
.sp-section-title-icon.secondary {
  background: hsla(270, 100%, 65%, 0.15);
  color: var(--color-secondary);
}
.sp-section-title-icon.accent {
  background: hsla(175, 80%, 55%, 0.15);
  color: var(--color-accent);
}
.sp-section-title-icon.warning {
  background: hsla(35, 100%, 60%, 0.15);
  color: var(--color-warning);
}
.sp-section-title-icon.success {
  background: hsla(145, 70%, 55%, 0.15);
  color: var(--color-success);
}

.sp-controls-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-5);
}

/* ═══════════════════════════════════════════════════════════════
   CONTROL FIELD WRAPPER
   ═══════════════════════════════════════════════════════════════ */

.sp-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.sp-field-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}

.sp-field-label-text {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-secondary);
}

.sp-field-value-badge {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: hsla(210, 100%, 60%, 0.12);
  color: var(--color-primary-light);
  border: 1px solid hsla(210, 100%, 60%, 0.2);
  transition: all 0.2s ease;
}

/* ═══════════════════════════════════════════════════════════════
   SEGMENTED CONTROL (replaces <select>)
   ═══════════════════════════════════════════════════════════════ */

.sp-segmented {
  display: flex;
  background: hsla(225, 25%, 8%, 0.8);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 3px;
  gap: 2px;
  position: relative;
}

.sp-segmented-option {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: var(--space-3) var(--space-2);
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  font-weight: 600;
  border-radius: calc(var(--radius-lg) - 3px);
  cursor: pointer;
  transition: all 0.25s var(--ease-elastic-1);
  text-align: center;
  line-height: 1.2;
  position: relative;
}

.sp-segmented-option:hover {
  color: var(--text-secondary);
  background: hsla(210, 100%, 60%, 0.06);
}

.sp-segmented-option.active {
  background: linear-gradient(135deg,
    hsla(210, 100%, 60%, 0.22),
    hsla(260, 100%, 65%, 0.18));
  color: var(--color-primary-light);
  box-shadow:
    0 1px 8px hsla(210, 100%, 60%, 0.15),
    inset 0 1px 0 hsla(255, 100%, 100%, 0.06);
  border: 1px solid hsla(210, 100%, 60%, 0.25);
}

.sp-segmented-option .sp-seg-icon {
  font-size: 1.1rem;
  line-height: 1;
}

.sp-segmented-option .sp-seg-label {
  font-size: 0.72rem;
}

/* Color variants */
.sp-segmented.secondary .sp-segmented-option.active {
  background: linear-gradient(135deg,
    hsla(270, 100%, 65%, 0.2),
    hsla(210, 100%, 60%, 0.15));
  color: var(--color-secondary-light);
  border-color: hsla(270, 100%, 65%, 0.3);
  box-shadow: 0 1px 8px hsla(270, 100%, 65%, 0.15);
}

.sp-segmented.accent .sp-segmented-option.active {
  background: linear-gradient(135deg,
    hsla(175, 80%, 55%, 0.2),
    hsla(175, 80%, 45%, 0.12));
  color: var(--color-accent-light);
  border-color: hsla(175, 80%, 55%, 0.3);
  box-shadow: 0 1px 8px hsla(175, 80%, 55%, 0.15);
}

/* ═══════════════════════════════════════════════════════════════
   OPTION TILES (visual card-based selection)
   ═══════════════════════════════════════════════════════════════ */

.sp-option-tiles {
  display: grid;
  gap: var(--space-3);
  /* Default 3-col, override with sp-col-2, sp-col-4 etc */
  grid-template-columns: repeat(3, 1fr);
}

.sp-option-tiles.sp-col-2 { grid-template-columns: repeat(2, 1fr); }
.sp-option-tiles.sp-col-4 { grid-template-columns: repeat(4, 1fr); }
.sp-option-tiles.sp-col-auto { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }

.sp-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-3);
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--glass-border);
  background: hsla(225, 25%, 10%, 0.5);
  cursor: pointer;
  transition: all 0.25s var(--ease-elastic-1);
  text-align: center;
  user-select: none;
  position: relative;
  overflow: hidden;
}

.sp-tile::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: inherit;
}

.sp-tile:hover {
  border-color: var(--glass-border-hover);
  background: hsla(225, 25%, 14%, 0.6);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px hsla(225, 30%, 4%, 0.3);
}

.sp-tile:hover::before {
  opacity: 1;
}

.sp-tile.active {
  border-color: hsla(210, 100%, 60%, 0.45);
  background: linear-gradient(135deg,
    hsla(210, 100%, 60%, 0.14),
    hsla(210, 100%, 55%, 0.06));
  box-shadow:
    0 4px 20px hsla(210, 100%, 60%, 0.12),
    0 0 0 1px hsla(210, 100%, 60%, 0.2) inset;
  transform: translateY(-2px);
}

.sp-tile.active::before {
  background: radial-gradient(circle at 50% 0%,
    hsla(210, 100%, 70%, 0.1) 0%,
    transparent 60%);
  opacity: 1;
}

.sp-tile-icon {
  font-size: 1.6rem;
  line-height: 1;
  transition: transform 0.3s var(--ease-elastic-2);
  filter: grayscale(0.4) opacity(0.7);
}

.sp-tile.active .sp-tile-icon {
  filter: grayscale(0) opacity(1);
  transform: scale(1.1);
  filter: drop-shadow(0 0 8px hsla(210, 100%, 60%, 0.4));
}

.sp-tile-label {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: color 0.2s ease;
}

.sp-tile.active .sp-tile-label {
  color: var(--color-primary-light);
}

.sp-tile-desc {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 500;
  line-height: 1.3;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.sp-tile.active .sp-tile-desc {
  color: var(--text-secondary);
  opacity: 1;
}

/* Check mark on active tile */
.sp-tile .sp-tile-check {
  position: absolute;
  top: 6px;
  right: 8px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  font-size: 0.6rem;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 8px hsla(210, 100%, 60%, 0.5);
  animation: tileCheckPop 0.3s var(--ease-elastic-2);
}

.sp-tile.active .sp-tile-check {
  display: flex;
}

@keyframes tileCheckPop {
  from { transform: scale(0); }
  to { transform: scale(1); }
}

/* Color variants for tiles */
.sp-tile-tiles.secondary .sp-tile.active {
  border-color: hsla(270, 100%, 65%, 0.45);
  background: linear-gradient(135deg, hsla(270, 100%, 65%, 0.14), hsla(270, 100%, 55%, 0.06));
}

/* ═══════════════════════════════════════════════════════════════
   NEON SLIDER
   ═══════════════════════════════════════════════════════════════ */

.sp-slider-wrap {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.sp-slider-track-wrap {
  position: relative;
  padding: var(--space-2) 0;
}

.sp-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg,
    var(--color-primary) var(--sp-slider-pct, 50%),
    hsla(210, 100%, 60%, 0.12) var(--sp-slider-pct, 50%));
  outline: none;
  cursor: pointer;
  transition: background 0.1s ease;
}

.sp-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: radial-gradient(circle,
    hsl(210, 100%, 80%) 0%,
    hsl(210, 100%, 60%) 50%,
    hsl(210, 100%, 45%) 100%);
  box-shadow:
    0 0 0 3px hsla(210, 100%, 60%, 0.2),
    0 0 15px hsla(210, 100%, 60%, 0.4),
    0 2px 8px rgba(0,0,0,0.4);
  cursor: pointer;
  transition: transform 0.2s var(--ease-elastic-2), box-shadow 0.2s ease;
}

.sp-slider::-webkit-slider-thumb:hover {
  transform: scale(1.25);
  box-shadow:
    0 0 0 5px hsla(210, 100%, 60%, 0.2),
    0 0 25px hsla(210, 100%, 60%, 0.5),
    0 2px 12px rgba(0,0,0,0.5);
}

.sp-slider::-webkit-slider-thumb:active {
  transform: scale(1.1);
  cursor: grabbing;
}

.sp-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: none;
  background: radial-gradient(circle,
    hsl(210, 100%, 80%) 0%,
    hsl(210, 100%, 60%) 50%,
    hsl(210, 100%, 45%) 100%);
  box-shadow:
    0 0 0 3px hsla(210, 100%, 60%, 0.2),
    0 0 15px hsla(210, 100%, 60%, 0.4);
  cursor: pointer;
  transition: transform 0.2s var(--ease-elastic-2);
}

.sp-slider:focus::-webkit-slider-thumb {
  box-shadow:
    0 0 0 6px hsla(210, 100%, 60%, 0.25),
    0 0 30px hsla(210, 100%, 60%, 0.5);
}

/* Slider color variants */
.sp-slider.secondary {
  background: linear-gradient(90deg,
    var(--color-secondary) var(--sp-slider-pct, 50%),
    hsla(270, 100%, 65%, 0.12) var(--sp-slider-pct, 50%));
}
.sp-slider.secondary::-webkit-slider-thumb {
  background: radial-gradient(circle,
    hsl(270, 100%, 85%) 0%,
    hsl(270, 100%, 65%) 50%,
    hsl(270, 100%, 50%) 100%);
  box-shadow:
    0 0 0 3px hsla(270, 100%, 65%, 0.2),
    0 0 15px hsla(270, 100%, 65%, 0.4);
}

.sp-slider.accent {
  background: linear-gradient(90deg,
    var(--color-accent) var(--sp-slider-pct, 50%),
    hsla(175, 80%, 55%, 0.12) var(--sp-slider-pct, 50%));
}
.sp-slider.accent::-webkit-slider-thumb {
  background: radial-gradient(circle,
    hsl(175, 80%, 80%) 0%,
    hsl(175, 80%, 55%) 50%,
    hsl(175, 80%, 40%) 100%);
  box-shadow:
    0 0 0 3px hsla(175, 80%, 55%, 0.2),
    0 0 15px hsla(175, 80%, 55%, 0.4);
}

.sp-slider-ticks {
  display: flex;
  justify-content: space-between;
  padding: 0 8px;
  margin-top: 4px;
}

.sp-slider-tick {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1;
}

/* ═══════════════════════════════════════════════════════════════
   STEPPER (increment/decrement button)
   ═══════════════════════════════════════════════════════════════ */

.sp-stepper {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  background: hsla(225, 25%, 8%, 0.8);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-1);
  width: 100%;
}

.sp-stepper-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  border: none;
  background: hsla(210, 100%, 60%, 0.08);
  color: var(--color-primary);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s var(--ease-elastic-1);
  flex-shrink: 0;
  line-height: 1;
}

.sp-stepper-btn:hover {
  background: hsla(210, 100%, 60%, 0.18);
  box-shadow: 0 0 12px hsla(210, 100%, 60%, 0.2);
  transform: scale(1.08);
}

.sp-stepper-btn:active {
  transform: scale(0.95);
}

.sp-stepper-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  transform: none;
}

.sp-stepper-value {
  flex: 1;
  text-align: center;
  font-family: var(--font-mono);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text-primary);
  background: none;
  border: none;
  outline: none;
  cursor: default;
}

.sp-stepper-unit {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-weight: 500;
  margin-right: var(--space-2);
  white-space: nowrap;
}

/* ═══════════════════════════════════════════════════════════════
   DIFFICULTY SELECTOR (special 3-card layout)
   ═══════════════════════════════════════════════════════════════ */

.sp-difficulty {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
}

.sp-diff-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-3);
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--glass-border);
  background: hsla(225, 25%, 10%, 0.5);
  cursor: pointer;
  transition: all 0.3s var(--ease-elastic-1);
  text-align: center;
  overflow: hidden;
}

.sp-diff-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.sp-diff-card.easy::after   { background: var(--color-success); }
.sp-diff-card.medium::after { background: var(--color-warning); }
.sp-diff-card.hard::after   { background: var(--color-danger); }

.sp-diff-card.active::after { opacity: 1; }

.sp-diff-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px hsla(225, 30%, 4%, 0.3);
}

.sp-diff-card.active.easy {
  border-color: hsla(145, 70%, 55%, 0.4);
  background: linear-gradient(135deg,
    hsla(145, 70%, 55%, 0.12),
    hsla(145, 70%, 45%, 0.05));
  box-shadow: 0 0 20px hsla(145, 70%, 55%, 0.1);
}

.sp-diff-card.active.medium {
  border-color: hsla(35, 100%, 60%, 0.4);
  background: linear-gradient(135deg,
    hsla(35, 100%, 60%, 0.12),
    hsla(35, 100%, 50%, 0.05));
  box-shadow: 0 0 20px hsla(35, 100%, 60%, 0.1);
}

.sp-diff-card.active.hard {
  border-color: hsla(0, 80%, 60%, 0.4);
  background: linear-gradient(135deg,
    hsla(0, 80%, 60%, 0.12),
    hsla(0, 80%, 50%, 0.05));
  box-shadow: 0 0 20px hsla(0, 80%, 60%, 0.1);
}

.sp-diff-icon {
  font-size: 1.8rem;
  line-height: 1;
  transition: transform 0.3s var(--ease-elastic-2);
}

.sp-diff-card.active .sp-diff-icon {
  transform: scale(1.15) translateY(-2px);
}

.sp-diff-name {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.sp-diff-card.active.easy .sp-diff-name    { color: var(--color-success); }
.sp-diff-card.active.medium .sp-diff-name  { color: var(--color-warning); }
.sp-diff-card.active.hard .sp-diff-name    { color: var(--color-danger); }

.sp-diff-desc {
  font-size: 0.68rem;
  color: var(--text-muted);
  line-height: 1.4;
  font-weight: 500;
}

/* ═══════════════════════════════════════════════════════════════
   PRESET CARDS (quick selection presets)
   ═══════════════════════════════════════════════════════════════ */

.sp-presets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--space-3);
}

.sp-preset-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  border: 1px solid var(--glass-border);
  background: hsla(225, 25%, 10%, 0.5);
  cursor: pointer;
  transition: all 0.25s var(--ease-elastic-1);
  overflow: hidden;
}

.sp-preset-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  opacity: 0.6;
  transition: opacity 0.3s ease;
}

.sp-preset-card:hover {
  border-color: var(--glass-border-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px hsla(225, 30%, 4%, 0.3);
}

.sp-preset-card:hover::before {
  opacity: 1;
}

.sp-preset-card.active {
  border-color: hsla(210, 100%, 60%, 0.35);
  box-shadow: 0 4px 20px hsla(210, 100%, 60%, 0.1);
}

.sp-preset-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  width: fit-content;
}

.sp-preset-badge.beginner  { background: hsla(145, 70%, 55%, 0.2); color: var(--color-success); }
.sp-preset-badge.standard  { background: hsla(210, 100%, 60%, 0.2); color: var(--color-primary); }
.sp-preset-badge.advanced  { background: hsla(35, 100%, 60%, 0.2); color: var(--color-warning); }
.sp-preset-badge.elite     { background: hsla(0, 80%, 60%, 0.2); color: var(--color-danger); }
.sp-preset-badge.custom    { background: hsla(270, 100%, 65%, 0.2); color: var(--color-secondary); }

.sp-preset-name {
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.sp-preset-info {
  font-size: var(--text-xs);
  color: var(--text-muted);
  line-height: 1.4;
}

/* ═══════════════════════════════════════════════════════════════
   TOGGLE SWITCH
   ═══════════════════════════════════════════════════════════════ */

.sp-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  background: hsla(225, 25%, 10%, 0.4);
  border: 1px solid var(--glass-border);
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.sp-toggle-row:hover {
  border-color: var(--glass-border-hover);
}

.sp-toggle-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.sp-toggle-label {
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
}

.sp-toggle-desc {
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-weight: 400;
}

.sp-switch {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.sp-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.sp-switch-track {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-full);
  background: hsla(225, 25%, 20%, 0.8);
  border: 1px solid var(--glass-border);
  transition: all 0.3s ease;
  cursor: pointer;
}

.sp-switch-track::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--text-muted);
  top: 2px;
  left: 2px;
  transition: all 0.3s var(--ease-elastic-2);
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.sp-switch input:checked + .sp-switch-track {
  background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
  border-color: hsla(210, 100%, 60%, 0.4);
  box-shadow: 0 0 10px hsla(210, 100%, 60%, 0.25);
}

.sp-switch input:checked + .sp-switch-track::before {
  transform: translateX(20px);
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4), 0 0 8px hsla(210, 100%, 60%, 0.3);
}

/* ═══════════════════════════════════════════════════════════════
   INFO PANEL (scientific guide)
   ═══════════════════════════════════════════════════════════════ */

.sp-info-panel {
  display: flex;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  background: linear-gradient(135deg,
    hsla(210, 100%, 60%, 0.06) 0%,
    hsla(270, 100%, 65%, 0.04) 100%);
  border: 1px solid hsla(210, 100%, 60%, 0.15);
  border-left: 3px solid var(--color-primary);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
}

.sp-info-panel::before {
  content: '';
  position: absolute;
  top: -20px;
  right: -20px;
  width: 100px;
  height: 100px;
  background: radial-gradient(circle, hsla(210, 100%, 60%, 0.08), transparent 70%);
  pointer-events: none;
}

.sp-info-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
  line-height: 1;
  margin-top: 2px;
}

.sp-info-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.sp-info-title {
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-primary-light);
  margin: 0;
}

.sp-info-text {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

.sp-info-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.sp-info-list li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.5;
}

.sp-info-list li::before {
  content: '▸';
  color: var(--color-primary);
  flex-shrink: 0;
  font-size: 0.8em;
  margin-top: 2px;
}

/* ═══════════════════════════════════════════════════════════════
   START BUTTON (Premium Launch Button)
   ═══════════════════════════════════════════════════════════════ */

.sp-start-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) 0 var(--space-4) 0;
  order: -1;
  width: 100%;
}

/* Baslat dugmesinin sayfa basindaki yuvasi (app.js render sonrasi tasir).
   Kaydirirken de erisilebilir kalmasi icin ustte sabitlenir. */
.sp-start-dock {
  display: flex;
  justify-content: center;
  position: sticky;
  top: 8px;
  z-index: 60;
  margin: 0 0 var(--space-5);
  pointer-events: none;
}

.sp-start-dock > * {
  pointer-events: auto;
  margin: 0 !important;
}

/* Sarmalayici (ornegin .sp-start-area) tam genislige yayilinca dugme
   egzersizden egzersize 240px ile 460px arasinda degisiyordu; yuvada
   tum egzersizlerde ayni olcu kullanilir. */
.sp-start-dock > *:not(.sp-start-btn) {
  display: flex;
  justify-content: center;
  width: auto;
}

.sp-start-dock .sp-start-btn {
  width: auto !important;
  min-width: 240px !important;
  max-width: 320px;
  flex: 0 0 auto;
}

@media (max-width: 767px) {
  .sp-start-dock .sp-start-btn {
    min-width: 200px !important;
  }
}

@media (max-width: 767px) {
  .sp-start-dock {
    top: 60px; /* mobil ust bar (52px) altinda kalmasin */
    margin-bottom: var(--space-4);
  }
}

.sp-start-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  /* 16px/40px + 280px genislik + text-lg/900 fazla iriydi; olculu boyut */
  padding: 12px 28px;
  min-width: 200px;
  border: none;
  border-radius: var(--radius-full);
  font-family: var(--font-ui);
  font-size: var(--text-base);
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #fff;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  /* Neon yesil->camgobegi animasyonlu gradyan marka rengiyle uyumsuzdu ve
     surekli hareket ediyordu; sabit birincil mavi, olculu golge. */
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  box-shadow:
    0 4px 16px hsla(210, 100%, 60%, 0.30),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  transition: transform 0.2s var(--ease-elastic-1), box-shadow 0.2s ease;
}

.sp-start-btn::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -60%;
  width: 50%;
  height: 200%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.18), transparent);
  transform: skewX(-15deg);
  animation: none;
  opacity: 0;
}

@keyframes spBtnGradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes spBtnShimmer {
  0%   { left: -60%; }
  100% { left: 160%; }
}

.sp-start-btn:hover {
  transform: translateY(-2px);
  box-shadow:
    0 6px 22px hsla(210, 100%, 60%, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.sp-start-btn:active {
  transform: translateY(0) scale(0.98);
  box-shadow:
    0 0 15px rgba(0, 255, 135, 0.4);
}

.sp-start-btn-icon {
  font-size: 1.2rem;
  line-height: 1;
}

.sp-start-hint {
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-weight: 500;
}

.sp-start-hint kbd {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-secondary);
}

/* ═══════════════════════════════════════════════════════════════
   LIVE PREVIEW STRIP (optional below sliders)
   ═══════════════════════════════════════════════════════════════ */

.sp-preview-strip {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  background: hsla(225, 25%, 8%, 0.6);
  border: 1px solid var(--glass-border);
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.sp-preview-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-primary);
  box-shadow: 0 0 8px hsla(210, 100%, 60%, 0.5);
  animation: spPreviewPulse 1s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes spPreviewPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.7; }
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE ADJUSTMENTS
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 600px) {
  .sp-controls-grid {
    grid-template-columns: 1fr;
  }

  .sp-option-tiles {
    grid-template-columns: repeat(2, 1fr);
  }

  .sp-option-tiles.sp-col-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .sp-difficulty {
    grid-template-columns: repeat(3, 1fr);
  }

  .sp-presets {
    grid-template-columns: repeat(2, 1fr);
  }

  .sp-start-btn {
    width: 100%;
    min-width: unset;
  }

  /* Mobilde giris karti ekranin ~%65'ini kaplayip asil icerigi asagi
     itiyordu (ilk icerik 524px'de basliyordu). Kart sikilastirildi. */
  .sp-hero {
    padding: var(--space-5) var(--space-4);
  }

  .sp-hero-title {
    font-size: var(--text-xl);
    line-height: 1.25;
  }

  .sp-hero-icon {
    font-size: 2.2rem;
    margin-bottom: var(--space-2);
  }

  .sp-hero-subtitle {
    font-size: var(--text-sm);
    line-height: 1.45;
  }
}

@media (max-width: 400px) {
  .sp-difficulty {
    grid-template-columns: 1fr;
  }
  .sp-option-tiles {
    grid-template-columns: 1fr;
  }
}
