/* ═══════════════════════════════════════════════════════════════════════════
   Personalization page — Premium UI
   ═══════════════════════════════════════════════════════════════════════════ */

/* Loading */
.ps-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: 300px;
  color: rgba(255,255,255,.3);
  font-size: 13px;
}
.ps-spinner {
  width: 20px; height: 20px;
  border: 2px solid rgba(255,255,255,.1);
  border-top-color: #00d26a;
  border-radius: 50%;
  animation: ps-spin .6s linear infinite;
}
@keyframes ps-spin { to { transform: rotate(360deg); } }

/* Page layout */
.ps-page {
  padding: 24px 28px;
  max-width: 960px;
  animation: ps-fadeIn .2s ease;
}
@keyframes ps-fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Header */
.ps-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.ps-header-left { display: flex; align-items: baseline; gap: 12px; }
.ps-title {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin: 0;
}
.ps-badge {
  font-size: 11px;
  color: rgba(255,255,255,.35);
  background: rgba(255,255,255,.05);
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,.06);
}

/* Search */
.ps-search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px;
  padding: 8px 14px;
  width: 220px;
  transition: border-color .2s;
}
.ps-search-box:focus-within { border-color: rgba(0,210,106,.4); }
.ps-search-box svg { color: rgba(255,255,255,.3); flex-shrink: 0; }
.ps-search-input {
  background: none;
  border: none;
  outline: none;
  color: #fff;
  font-size: 12px;
  width: 100%;
}
.ps-search-input::placeholder { color: rgba(255,255,255,.25); }

/* Tabs */
.ps-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  overflow-x: auto;
  padding-bottom: 2px;
}
.ps-tabs::-webkit-scrollbar { height: 0; }
.ps-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 12px;
  color: rgba(255,255,255,.5);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: all .15s;
}
.ps-tab:hover { color: #fff; background: rgba(255,255,255,.04); }
.ps-tab-active {
  color: #00d26a;
  background: rgba(0,210,106,.08);
  border-color: rgba(0,210,106,.15);
}
.ps-tab svg { width: 14px; height: 14px; }

/* Content area */
.ps-content { min-height: 300px; }
.ps-empty {
  text-align: center;
  color: rgba(255,255,255,.25);
  font-size: 13px;
  padding: 60px 20px;
}

/* ─── Grid & Cards ─── */
.ps-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.ps-card {
  background: rgba(255,255,255,.025);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 12px;
  padding: 18px;
}
.ps-card-wide { grid-column: 1 / -1; }
.ps-card-title {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  margin: 0 0 14px;
}

/* ─── Colors ─── */
.ps-colors {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 12px;
}
.ps-color-btn {
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .12s, border-color .12s, box-shadow .12s;
}
.ps-color-btn:hover { transform: scale(1.18); }
.ps-color-btn.ps-color-active {
  border-color: #fff;
  box-shadow: 0 0 0 3px rgba(255,255,255,.15);
}
.ps-color-custom {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.ps-color-input {
  width: 34px; height: 34px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  background: transparent;
  padding: 0;
}
.ps-color-input::-webkit-color-swatch-wrapper { padding: 0; }
.ps-color-input::-webkit-color-swatch { border: none; border-radius: 8px; }
.ps-color-hex {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: rgba(255,255,255,.4);
}

/* ─── Toggles ─── */
.ps-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 0;
  cursor: pointer;
  border-bottom: 1px solid rgba(255,255,255,.03);
}
.ps-toggle:last-child { border-bottom: none; }
.ps-toggle span:first-child {
  font-size: 12px;
  color: rgba(255,255,255,.65);
}
.ps-toggle input[type="checkbox"] { display: none; }
.ps-slider {
  width: 38px; height: 20px;
  background: rgba(255,255,255,.1);
  border-radius: 10px;
  position: relative;
  transition: background .2s;
  flex-shrink: 0;
}
.ps-slider::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: rgba(255,255,255,.5);
  transition: transform .2s, background .2s;
}
.ps-toggle input:checked + .ps-slider { background: #00d26a; }
.ps-toggle input:checked + .ps-slider::after {
  transform: translateX(18px);
  background: #fff;
}
.ps-toggles-row {
  border-top: 1px solid rgba(255,255,255,.04);
  padding-top: 4px;
}

/* ─── Profiles ─── */
.ps-profiles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}
.ps-profile-card {
  background: rgba(255,255,255,.025);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color .2s, transform .15s;
}
.ps-profile-card:hover {
  border-color: rgba(0,210,106,.2);
  transform: translateY(-2px);
}
.ps-profile-icon {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,210,106,.1);
  border-radius: 10px;
  color: #00d26a;
}
.ps-profile-icon svg { width: 18px; height: 18px; }
.ps-profile-name {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  margin: 4px 0 0;
}
.ps-profile-desc {
  font-size: 11px;
  color: rgba(255,255,255,.4);
  line-height: 1.5;
  margin: 0;
  flex: 1;
}
.ps-profile-meta {
  margin-top: 4px;
}
.ps-profile-count {
  font-size: 10px;
  color: rgba(255,255,255,.3);
  background: rgba(255,255,255,.05);
  padding: 2px 8px;
  border-radius: 10px;
}
.ps-profile-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.ps-profile-actions .ps-btn {
  flex: 1;
  justify-content: center;
  padding: 8px 12px;
  font-size: 12px;
}

/* ─── Tweaks List ─── */
.ps-tweaks-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ps-tweak-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  background: rgba(255,255,255,.02);
  border: 1px solid rgba(255,255,255,.05);
  border-radius: 10px;
  transition: background .15s, border-color .15s;
}
.ps-tweak-item:hover { background: rgba(255,255,255,.04); }
.ps-tweak-item.ps-tweak-enabled {
  border-color: rgba(0,210,106,.15);
  background: rgba(0,210,106,.03);
}
.ps-tweak-info { flex: 1; min-width: 0; }
.ps-tweak-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 3px;
}
.ps-tweak-name {
  font-size: 13px;
  font-weight: 500;
  color: #fff;
}
.ps-tweak-safety {
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.ps-tweak-desc {
  font-size: 11px;
  color: rgba(255,255,255,.35);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ps-tweak-toggle { padding: 0; border: none; }

/* ─── Buttons ─── */
.ps-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 8px;
  color: #fff;
  font-size: 12px;
  cursor: pointer;
  transition: background .15s, transform .1s;
}
.ps-btn:hover { background: rgba(255,255,255,.09); }
.ps-btn:active { transform: scale(.97); }
.ps-btn:disabled { opacity: .5; pointer-events: none; }
.ps-btn-accent {
  background: rgba(0,210,106,.1);
  border-color: rgba(0,210,106,.2);
  color: #00d26a;
}
.ps-btn-accent:hover { background: rgba(0,210,106,.18); }
.ps-btn-small {
  padding: 4px 10px;
  font-size: 10px;
  border-radius: 6px;
}
.ps-btn-danger {
  background: rgba(255,68,68,.1);
  border-color: rgba(255,68,68,.2);
  color: #ff4444;
}
.ps-btn-danger:hover { background: rgba(255,68,68,.2); }

/* ─── Wallpaper stack ─── */
.ps-wp-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ps-wp-current {
  font-size: 11px;
  color: rgba(255,255,255,.3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ps-video-status {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  color: rgba(255,255,255,.35);
}

/* ─── Misc ─── */
.ps-hint {
  font-size: 10px;
  color: rgba(255,255,255,.2);
}
