﻿/* ============================================================
 * UKGlobalNetwork — PREMIUM SETTINGS MODAL STYLES (Quotex / Binomo Level)
 * Glassmorphic Cards, Neon Accents, Staggered Entrance Animations
 * ============================================================ */

/* ── Modal Overlay & Backdrop ── */
.settings-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(8, 12, 20, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.settings-overlay.show {
  display: flex;
  opacity: 1;
}

/* ── Settings Container ── */
.settings-modal {
  background: rgba(15, 23, 42, 0.85);
  width: 92%;
  max-width: 440px;
  max-height: 88vh;
  border-radius: 24px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.65), 0 0 35px rgba(56, 189, 248, 0.08);
  transform: translateY(28px) scale(0.97);
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), background 0.3s ease;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
}

.settings-overlay.show .settings-modal {
  transform: translateY(0) scale(1);
}

/* ── Modal Header ── */
.settings-header {
  padding: 18px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(30, 41, 59, 0.4);
  backdrop-filter: blur(16px);
  flex-shrink: 0;
}

.settings-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.2px;
}

.settings-close-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text3);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  line-height: 1;
}

.settings-close-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.3);
  transform: rotate(90deg);
}

/* ── Settings Body & Scrollbar ── */
.settings-body {
  padding: 16px 20px 24px;
  overflow-y: auto;
  flex: 1;
}

.settings-body::-webkit-scrollbar {
  width: 5px;
}

.settings-body::-webkit-scrollbar-track {
  background: transparent;
}

.settings-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 10px;
}

.settings-body::-webkit-scrollbar-thumb:hover {
  background: rgba(56, 189, 248, 0.4);
}

/* ══════════════════════════════════════════════════
 * Premium Card Grid Layout
 * ══════════════════════════════════════════════════ */

.st-cards-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.st-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: rgba(30, 41, 59, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  transition: all 0.24s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
  animation: cardStagger 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Staggered entrance animation delays */
.st-card:nth-child(1) { animation-delay: 0.03s; }
.st-card:nth-child(2) { animation-delay: 0.06s; }
.st-card:nth-child(3) { animation-delay: 0.09s; }
.st-card:nth-child(4) { animation-delay: 0.12s; }
.st-card:nth-child(5) { animation-delay: 0.15s; }
.st-card:nth-child(6) { animation-delay: 0.18s; }
.st-card:nth-child(7) { animation-delay: 0.21s; }
.st-card:nth-child(8) { animation-delay: 0.24s; }
.st-card:nth-child(9) { animation-delay: 0.27s; }

@keyframes cardStagger {
  0% {
    opacity: 0;
    transform: translateY(14px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.st-card.clickable {
  cursor: pointer;
}

.st-card.clickable:hover {
  background: rgba(30, 41, 59, 0.75);
  border-color: rgba(56, 189, 248, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35), 0 0 15px rgba(56, 189, 248, 0.12);
}

.st-card.clickable:active {
  transform: scale(0.985);
}

.st-card.logout-card:hover {
  border-color: rgba(244, 63, 94, 0.4);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35), 0 0 15px rgba(244, 63, 94, 0.15);
}

.st-card.delete-card:hover {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.4);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35), 0 0 15px rgba(239, 68, 68, 0.18);
}

/* ── Icon Badges ── */
.st-card-icon-badge {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease;
}

.st-card:hover .st-card-icon-badge {
  transform: scale(1.08);
}

.st-card-icon-badge.emerald {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.25), rgba(5, 150, 105, 0.4));
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #10b981;
}

.st-card-icon-badge.gold {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(217, 119, 6, 0.4));
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fbbf24;
}

.st-card-icon-badge.cyan {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.25), rgba(8, 145, 178, 0.4));
  border: 1px solid rgba(6, 182, 212, 0.35);
  color: #22d3ee;
}

.st-card-icon-badge.blue {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.25), rgba(37, 99, 235, 0.4));
  border: 1px solid rgba(59, 130, 246, 0.35);
  color: #3b82f6;
}

.st-card-icon-badge.violet {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.25), rgba(124, 58, 237, 0.4));
  border: 1px solid rgba(139, 92, 246, 0.35);
  color: #a78bfa;
}

.st-card-icon-badge.amber {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(180, 83, 9, 0.4));
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #f59e0b;
}

.st-card-icon-badge.sky {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.25), rgba(2, 136, 209, 0.4));
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #38bdf8;
}

.st-card-icon-badge.rose {
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.25), rgba(225, 29, 72, 0.4));
  border: 1px solid rgba(244, 63, 94, 0.35);
  color: #fb7185;
}

.st-card-icon-badge.red-glow {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.25), rgba(185, 28, 28, 0.4));
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #ef4444;
}

/* ── Card Content ── */
.st-card-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.st-card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.1px;
}

.st-card-title.danger {
  color: #ff5252;
}

.st-card-sub {
  font-size: 11px;
  color: var(--text3);
  line-height: 1.35;
}

.st-card-arrow {
  color: var(--text3);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, color 0.2s ease;
}

.st-card.clickable:hover .st-card-arrow {
  color: #38bdf8;
  transform: translateX(3px);
}

.st-card-arrow.danger {
  color: rgba(239, 68, 68, 0.6);
}

.st-card.clickable:hover .st-card-arrow.danger {
  color: #ef4444;
}

/* ── Modern Dropdown Select ── */
.st-select-modern {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text);
  padding: 6px 12px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  outline: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.st-select-modern:hover,
.st-select-modern:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.2);
}

/* ── Time Zone Settings Select & Preview ── */
.tz-action-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  max-width: 170px;
}

.tz-action-wrap select.st-select-modern {
  width: 100%;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  font-size: 11px;
  padding: 5px 8px;
}

.tz-preview-badge {
  font-size: 9.5px;
  font-weight: 700;
  font-family: 'Inter', monospace;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 4px;
  padding: 1px 6px;
  white-space: nowrap;
}

/* ── Neon Custom Toggle Switch ── */
.st-neon-toggle {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 24px;
  cursor: pointer;
}

.st-neon-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.st-toggle-track {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.st-toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.st-neon-toggle input:checked + .st-toggle-track {
  background: linear-gradient(135deg, #0095ff, #00d2ff);
  border-color: #0095ff;
  box-shadow: 0 0 12px rgba(0, 149, 255, 0.45);
}

.st-neon-toggle input:checked + .st-toggle-track .st-toggle-thumb {
  transform: translateX(22px);
}

/* ── Status Pill ── */
.st-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.st-status-pill.online {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #10b981;
}

/* ══════════════════════════════════════════════════
 * Sub-Views (Change Password, Delete, Customizer, Sessions)
 * ══════════════════════════════════════════════════ */

.pwd-group {
  position: relative;
}

.pwd-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.pwd-input {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 10px 40px 10px 12px;
  background: rgba(15, 23, 42, 0.6);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  outline: none;
  transition: all 0.2s ease;
}

.pwd-input:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.2);
}

.pwd-toggle {
  position: absolute;
  right: 12px;
  cursor: pointer;
  color: var(--text3);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.pwd-toggle:hover {
  color: var(--text);
}

.pwd-strength-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.pwd-strength-bar {
  flex: 1;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
}

.pwd-strength-fill {
  height: 100%;
  width: 0%;
  background: #ff5252;
  border-radius: 2px;
  transition: width 0.3s ease, background-color 0.3s ease;
}

.pwd-strength-text {
  font-size: 11px;
  font-weight: 600;
  color: var(--text3);
  min-width: 40px;
  text-align: right;
}

.cp-btn {
  flex: 1;
  padding: 12px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.cp-btn:active {
  transform: scale(0.98);
}

.cp-cancel {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text);
}

.cp-cancel:hover {
  background: rgba(255, 255, 255, 0.1);
}

.cp-save {
  background: linear-gradient(135deg, #0095ff, #0066cc);
  color: #fff;
  border: none;
  box-shadow: 0 4px 15px rgba(0, 149, 255, 0.35);
}

.cp-save:hover {
  box-shadow: 0 6px 20px rgba(0, 149, 255, 0.5);
  transform: translateY(-1px);
}

.cp-save:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.cp-loader {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: cpSpin 0.8s linear infinite;
}

@keyframes cpSpin {
  to { transform: rotate(360deg); }
}

/* Toast */
.cp-toast {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: #333;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  gap: 8px;
}

.cp-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.cp-toast.success {
  background: rgba(16, 185, 129, 0.95);
  border: 1px solid rgba(16, 185, 129, 1);
}

.cp-toast.error {
  background: rgba(239, 68, 68, 0.95);
  border: 1px solid rgba(239, 68, 68, 1);
}

/* ── Chart Customization Cards ── */
.cc-section-card {
  background: rgba(30, 41, 59, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 14px;
  backdrop-filter: blur(10px);
}

.cc-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.cc-section-icon {
  font-size: 16px;
}

.cc-section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.cc-color-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.cc-color-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cc-color-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text3);
}

.cc-picker-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 4px 8px;
}

.cc-picker-wrap input[type="color"] {
  -webkit-appearance: none;
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  cursor: pointer;
  background: transparent;
  padding: 0;
}

.cc-picker-wrap input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

.cc-picker-wrap input[type="color"]::-webkit-color-swatch {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
}

.cc-color-hex {
  font-size: 11px;
  font-weight: 700;
  font-family: monospace;
  color: var(--text);
}

.cc-presets-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text3);
  margin-bottom: 8px;
}

.cc-presets-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.cc-preset-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--text);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cc-preset-btn:hover {
  border-color: #38bdf8;
  background: rgba(56, 189, 248, 0.1);
}

.cc-preset-btn.active {
  border-color: #38bdf8;
  background: rgba(56, 189, 248, 0.18);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.25);
}

.cc-preset-swatch {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.3);
}

.cc-upload-area {
  background: rgba(15, 23, 42, 0.5);
  border: 1.5px dashed rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 14px;
  text-align: center;
  transition: border-color 0.2s ease;
}

.cc-upload-area:hover {
  border-color: #38bdf8;
}

.cc-upload-ph {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.cc-upload-icon {
  font-size: 24px;
  margin-bottom: 4px;
}

.cc-upload-btn {
  margin-top: 8px;
  background: linear-gradient(135deg, #0095ff, #0066cc);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 6px 14px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.2s ease;
}

.cc-upload-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.cc-preview-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.cc-preview-wrap img {
  max-height: 100px;
  max-width: 100%;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.cc-remove-img-btn {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cc-remove-img-btn:hover {
  background: #ef4444;
  color: #fff;
}

.cc-slider-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cc-slider-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--text3);
}

.cc-opacity-val {
  color: #38bdf8;
  font-weight: 700;
  font-family: monospace;
}

.cc-range-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.12);
  outline: none;
  margin: 6px 0 2px 0;
}

.cc-range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #38bdf8;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.6);
  transition: transform 0.15s ease;
}

.cc-range-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.cc-slider-ticks {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  color: var(--text3);
}

/* ══════════════════════════════════════════════════
 * Light Theme Customizations
 * ══════════════════════════════════════════════════ */
body.light-mode .settings-modal {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.14);
}

body.light-mode .settings-header {
  background: rgba(245, 247, 250, 0.8);
  border-bottom-color: rgba(0, 0, 0, 0.08);
}

body.light-mode .settings-close-btn {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.08);
  color: var(--text2);
}

body.light-mode .st-card {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}

body.light-mode .st-card.clickable:hover {
  background: #ffffff;
  border-color: rgba(0, 149, 255, 0.35);
  box-shadow: 0 10px 25px rgba(0, 149, 255, 0.12);
}

body.light-mode .st-select-modern {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.12);
}

body.light-mode .cc-section-card {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(0, 0, 0, 0.08);
}

body.light-mode .pwd-input {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.12);
}

/* Responsive Mobile Bottom Sheet */
@media (max-width: 768px) {
  .settings-modal {
    position: absolute;
    bottom: 0;
    width: 100%;
    max-width: 100%;
    border-radius: 24px 24px 0 0;
    transform: translateY(100%);
    max-height: 85vh;
  }
}
