/* ================================================
   SETTINGS PAGE — VinAPIay
   ================================================ */

.settings-wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 12px 16px 60px;
}

.settings-group {
  margin-bottom: 22px;
}

.settings-group-title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #94a3b8;
  text-transform: uppercase;
  padding: 0 8px 8px;
  margin-top: 8px;
}

.settings-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.9);
  border-bottom: 1px solid rgba(148,163,184,0.1);
  transition: background .2s;
}
.settings-item:first-of-type { border-radius: 16px 16px 0 0; }
.settings-item:last-of-type { border-radius: 0 0 16px 16px; border-bottom: 1px solid rgba(255,255,255,0.9); }
.settings-item:only-of-type { border-radius: 16px; }
.settings-item:not(:last-of-type) { border-bottom: 1px solid rgba(148,163,184,0.08); }

.settings-item-col {
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
}

.settings-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.settings-icon {
  font-size: 20px;
  flex-shrink: 0;
  width: 26px;
  text-align: center;
  margin-top: 1px;
}

.settings-name {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 2px;
  letter-spacing: -0.2px;
}

.settings-sub {
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.4;
  font-weight: 500;
}

.settings-value {
  font-size: 13px;
  font-weight: 700;
  color: #64748b;
  flex-shrink: 0;
}
.settings-value.status-online { color: #16a34a; }
.settings-value.status-offline { color: #dc2626; }

/* ==== Switch iOS style ==== */
.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 30px;
  flex-shrink: 0;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #cbd5e1;
  border-radius: 30px;
  transition: 0.3s;
}
.slider:before {
  content: '';
  position: absolute;
  height: 24px;
  width: 24px;
  left: 3px;
  top: 3px;
  background: white;
  border-radius: 50%;
  transition: 0.3s;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}
input:checked + .slider {
  background: #34c759;
}
input:checked + .slider:before {
  transform: translateX(20px);
}

/* ==== Segmented control ==== */
.seg-control {
  display: flex;
  gap: 4px;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 12px;
  width: 100%;
}
.seg-control button {
  flex: 1;
  padding: 9px 8px;
  background: transparent;
  border: 0;
  border-radius: 9px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.seg-control button.active {
  background: #fff;
  color: #0f172a;
  box-shadow: 0 2px 6px rgba(15,23,42,0.08);
}
.seg-control button:hover:not(.active) {
  color: #0f172a;
}

/* ==== Button mini ==== */
.btn-mini {
  padding: 8px 14px;
  background: linear-gradient(135deg, #0EA5E9, #6366F1);
  color: #fff;
  border: 0;
  border-radius: 10px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(14,165,233,0.25);
}
.btn-mini:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(14,165,233,0.4); }
.btn-mini:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-mini.ghost {
  background: #f1f5f9;
  color: #475569;
  box-shadow: none;
}

/* ==== Footer ==== */
.settings-footer {
  text-align: center;
  font-size: 11px;
  color: #94a3b8;
  padding: 30px 0 10px;
  font-weight: 600;
}

/* ==== Dark theme ==== */
body.theme-dark {
  background: #0a0616;
  background-image: radial-gradient(ellipse 800px 600px at 10% 0%, rgba(99,102,241,0.2), transparent 60%), radial-gradient(ellipse 700px 500px at 90% 10%, rgba(139,92,246,0.15), transparent 60%);
  color: #f1f5f9;
}
body.theme-dark .fx-header { background: rgba(15,23,42,0.85); border-color: rgba(148,163,184,0.1); }
body.theme-dark .fx-header h1 { color: #f1f5f9; }
body.theme-dark .fx-icon-btn { background: rgba(255,255,255,0.08); color: #f1f5f9; border-color: rgba(255,255,255,0.1); }
body.theme-dark .settings-item { background: rgba(30,41,59,0.7); border-color: rgba(255,255,255,0.08); }
body.theme-dark .settings-name { color: #f1f5f9; }
body.theme-dark .settings-sub { color: #94a3b8; }
body.theme-dark .settings-value { color: #cbd5e1; }
body.theme-dark .settings-value.status-online { color: #4ade80; }
body.theme-dark .seg-control { background: rgba(15,23,42,0.6); }
body.theme-dark .seg-control button { color: #94a3b8; }
body.theme-dark .seg-control button.active { background: rgba(99,102,241,0.3); color: #f1f5f9; }
body.theme-dark .slider { background: #475569; }
body.theme-dark .btn-mini.ghost { background: rgba(255,255,255,0.08); color: #cbd5e1; }
body.theme-dark .settings-group-title { color: #64748b; }

/* ==== Scale ==== */
body.scale-12 { font-size: 14.4px; }
body.scale-12 .settings-name { font-size: 15px; }
body.scale-14 { font-size: 16.8px; }
body.scale-14 .settings-name { font-size: 16px; }

/* ==== iOS UI mode (extra rounding) ==== */
body.ui-ios .settings-item { border-radius: 16px !important; margin-bottom: 8px; border: 1px solid rgba(255,255,255,0.9); }
body.ui-ios .settings-item:first-of-type, body.ui-ios .settings-item:last-of-type { border-radius: 16px !important; }
body.ui-ios .seg-control { border-radius: 14px; }
body.ui-ios .seg-control button { border-radius: 11px; }

/* ==== 3D Button ==== */
body.anim-3d .btn-mini:active,
body.anim-3d .seg-control button:active,
body.anim-3d .settings-item:active {
  transform: scale(0.97);
}

@media (max-width: 480px) {
  .settings-wrap { padding: 8px 12px 50px; }
  .settings-item { padding: 12px 14px; }
  .settings-icon { font-size: 18px; width: 22px; }
  .settings-name { font-size: 13.5px; }
  .settings-sub { font-size: 10.5px; }
  .btn-mini { padding: 7px 11px; font-size: 10.5px; }
  .seg-control button { font-size: 11px; padding: 8px 4px; }
}
