/* ══════════════════════════════════════════
   PURCHTV — MODALS & SETTINGS STYLES
══════════════════════════════════════════ */

/* Overlay */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.88);
  z-index: 2000;
  display: none;
  align-items: center; justify-content: center;
  padding: 20px;
  animation: fadeIn .2s ease;
}
.modal-overlay.active { display: flex; }

/* Box */
.modal-box {
  background: #0d0d10;
  border: 1px solid #1a1a20;
  border-radius: 16px;
  padding: 32px;
  width: 100%;
  max-width: 460px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  animation: fadeIn .2s ease;
}
.modal-wide { max-width: 760px; }

.modal-close {
  position: absolute; top: 16px; right: 16px;
  background: rgba(255,255,255,.06);
  border: none; color: #888;
  width: 30px; height: 30px;
  border-radius: 7px;
  font-size: 15px;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s, color .2s;
}
.modal-close:hover { background: rgba(255,255,255,.12); color: #fff; }

/* Login logo */
.modal-logo { text-align: center; margin-bottom: 28px; }
.modal-logomark {
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 10px;
}
.modal-logotext {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800; font-size: 30px;
  letter-spacing: 3px; color: #fff;
}
.modal-logotext span { color: #f0a500; }
.modal-sub {
  color: #555; font-size: 11px;
  letter-spacing: 3px; margin-top: 5px;
  text-transform: uppercase;
}

/* Modal headings */
.modal-title-row {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 24px;
}
.modal-h2 {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700; font-size: 22px;
  color: #fff; margin-bottom: 3px;
}
.modal-p { font-size: 13px; color: #666; }

/* Tabs */
.tab-row {
  display: flex; gap: 4px;
  background: #111;
  border-radius: 9px;
  padding: 4px;
  margin-bottom: 24px;
}
.tab-btn {
  flex: 1; padding: 7px 8px;
  border: none; background: transparent;
  color: #555; font-size: 12px;
  font-family: 'Barlow Condensed', sans-serif;
  letter-spacing: 1px;
  border-radius: 6px;
  transition: all .2s;
}
.tab-btn:hover { color: #aaa; }
.tab-btn.active { background: #1a1a22; color: #fff; }

/* Form */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block; margin-bottom: 6px;
  font-size: 12px; color: #666;
  font-family: 'Barlow Condensed', sans-serif;
  letter-spacing: 1px; text-transform: uppercase;
}
.form-input {
  width: 100%;
  background: #111;
  border: 1px solid #1e1e26;
  border-radius: 9px;
  padding: 11px 14px;
  color: #e0e0e8;
  font-size: 14px;
  font-family: 'Barlow', sans-serif;
  outline: none;
  transition: border-color .2s;
}
.form-input:focus { border-color: #f0a500; }
.form-input::placeholder { color: #444; }

.form-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 18px 0;
  color: #333; font-size: 12px;
}
.form-divider::before, .form-divider::after {
  content: ''; flex: 1;
  height: 1px; background: #1e1e26;
}

/* Upload area */
.upload-area {
  border: 2px dashed #1e1e26;
  border-radius: 10px;
  padding: 28px 20px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 8px; cursor: pointer;
  text-align: center;
  transition: border-color .2s, background .2s;
}
.upload-area:hover { border-color: #444; background: rgba(255,255,255,.02); }
.upload-area p { color: #555; font-size: 14px; }
.upload-area span { color: #333; font-size: 12px; }
.upload-area.drag-over { border-color: #f0a500; background: rgba(240,165,0,.04); }

/* Playlist preview */
#pl-preview {
  background: #111; border: 1px solid #1e1e26;
  border-radius: 9px; padding: 12px 16px;
  margin: 12px 0;
}
.pl-preview-title { color: #f0a500; font-family: 'Barlow Condensed', sans-serif; font-size: 13px; letter-spacing: 1px; margin-bottom: 4px; }
.pl-preview-count { font-size: 13px; color: #aaa; }

/* Footer note */
.modal-footer-note {
  text-align: center; color: #333;
  font-size: 11px; margin-top: 12px;
  line-height: 1.5;
}

/* ══════════════════════════════════════════
   SETTINGS
══════════════════════════════════════════ */
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-top: 20px;
}
@media (max-width: 600px) { .settings-grid { grid-template-columns: 1fr; } }

.settings-section { }
.settings-h3 {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700; font-size: 13px;
  letter-spacing: 2px; text-transform: uppercase;
  color: #666;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid #1a1a20;
}

.setting-row {
  padding: 10px 0;
  border-bottom: 1px solid #0f0f12;
}
.setting-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }
.setting-info { flex: 1; }
.setting-label { display: block; font-size: 13px; color: #ccc; margin-bottom: 2px; }
.setting-desc { display: block; font-size: 11px; color: #555; }

.setting-select {
  background: #111; border: 1px solid #1e1e26;
  color: #ccc;
  padding: 6px 10px;
  border-radius: 6px;
  font-family: 'Barlow', sans-serif;
  font-size: 12px;
  outline: none;
  cursor: pointer;
  flex-shrink: 0;
}
.setting-input-sm {
  background: #111; border: 1px solid #1e1e26;
  color: #ccc;
  padding: 6px 10px;
  border-radius: 6px;
  font-family: 'Barlow', sans-serif;
  font-size: 12px;
  outline: none;
  width: 100%;
  margin-top: 6px;
}
.setting-range {
  width: 100%; margin-top: 4px;
  -webkit-appearance: none;
  background: #222; height: 3px;
  border-radius: 2px; outline: none; cursor: pointer;
}
.setting-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px; height: 14px;
  background: #f0a500; border-radius: 50%;
}

/* Toggle */
.toggle {
  width: 46px; height: 25px;
  border-radius: 13px;
  background: #222;
  border: none;
  cursor: pointer;
  position: relative;
  transition: background .25s;
  flex-shrink: 0;
}
.toggle.on { background: #f0a500; }
.toggle-knob {
  width: 19px; height: 19px;
  background: #fff; border-radius: 50%;
  position: absolute; top: 3px; left: 3px;
  transition: transform .25s;
}
.toggle.on .toggle-knob { transform: translateX(21px); }

/* Theme picker */
.theme-picker { display: flex; gap: 6px; }
.theme-opt {
  padding: 5px 12px;
  border: 1px solid #2a2a30;
  border-radius: 6px;
  background: transparent;
  color: #666; font-size: 12px;
  font-family: 'Barlow Condensed', sans-serif;
  letter-spacing: 1px;
  transition: all .2s;
}
.theme-opt:hover { border-color: #555; color: #aaa; }
.theme-opt.active { background: #f0a500; border-color: #f0a500; color: #000; font-weight: 700; }

/* Accent color picker */
.accent-picker { display: flex; gap: 8px; }
.accent-opt {
  width: 24px; height: 24px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform .2s, border-color .2s;
}
.accent-opt:hover { transform: scale(1.15); }
.accent-opt.active { border-color: #fff; transform: scale(1.1); }

/* About box */
.about-box {
  background: #111; border: 1px solid #1a1a20;
  border-radius: 10px; padding: 18px;
  text-align: center;
}
.about-logo {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800; font-size: 26px;
  letter-spacing: 3px; color: #fff;
  margin-bottom: 4px;
}
.about-logo span { color: #f0a500; }
.about-version { font-size: 11px; color: #555; letter-spacing: 1px; margin-bottom: 10px; }
.about-desc { font-size: 12px; color: #555; line-height: 1.6; }

/* ══════════════════════════════════════════
   PLAYLIST METHOD NOTE
══════════════════════════════════════════ */
.pl-method-note {
  font-size: 11px;
  color: #555;
  line-height: 1.6;
  margin-top: 10px;
  padding: 8px 12px;
  background: rgba(255,255,255,.02);
  border-radius: 7px;
  border: 1px solid #1a1a22;
}

/* ══════════════════════════════════════════
   LOADING OVERLAY
══════════════════════════════════════════ */
#loading-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.88);
  z-index: 9000;
  display: none;
  align-items: center;
  justify-content: center;
}
.lov-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}
.lov-spinner {
  width: 52px; height: 52px;
  border: 3px solid #222;
  border-top: 3px solid #f0a500;
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
.lov-msg {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700; font-size: 18px;
  color: #fff; letter-spacing: 1px;
  white-space: pre-line;
}
.lov-sub {
  font-size: 12px; color: #555;
}

/* ══════════════════════════════════════════
   ERROR MODAL
══════════════════════════════════════════ */
.err-icon { font-size: 40px; margin-bottom: 6px; text-align: center; }
.err-body {
  font-size: 13px;
  color: #888;
  line-height: 1.7;
  white-space: pre-line;
  text-align: center;
  margin-top: 6px;
}

/* ══════════════════════════════════════════
   URL CONVERTER
══════════════════════════════════════════ */
.btn-convert {
  background: #1a1a24;
  border: 1px solid #2a2a35;
  color: #ccc;
  padding: 0 14px;
  border-radius: 9px;
  font-size: 12px;
  font-family: 'Barlow Condensed', sans-serif;
  letter-spacing: 1px;
  display: flex; align-items: center; gap: 6px;
  white-space: nowrap;
  transition: all .2s;
  cursor: pointer;
}
.btn-convert:hover { border-color: #f0a500; color: #f0a500; }
.btn-convert:disabled { opacity: .5; cursor: default; }

.url-status-box {
  border: 1px solid #333;
  border-radius: 9px;
  padding: 12px 16px;
  margin: 10px 0 6px;
  font-size: 13px;
  color: #ccc;
  line-height: 1.7;
  background: rgba(255,255,255,.02);
}
.url-status-icon { margin-right: 6px; font-size: 16px; }
.url-status-msg strong { color: #fff; }

.btn-load-now {
  display: inline-block;
  margin-top: 10px;
  background: #f0a500;
  border: none;
  color: #000;
  padding: 8px 20px;
  border-radius: 7px;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700; font-size: 14px; letter-spacing: 1px;
  cursor: pointer;
  transition: background .2s;
}
.btn-load-now:hover { background: #d4920a; }

.btn-open-url {
  display: inline-block;
  margin-top: 10px;
  border: 1px solid #555;
  color: #aaa;
  padding: 7px 16px;
  border-radius: 7px;
  font-size: 13px;
  text-decoration: none;
  transition: all .2s;
}
.btn-open-url:hover { border-color: #f0a500; color: #f0a500; }

/* ══════════════════════════════════════════
   PLAYLIST MODAL v2 — clean tabs + drop zone
══════════════════════════════════════════ */
.ptab {
  flex: 1;
  padding: 9px 10px;
  background: transparent;
  border: 1px solid #1e1e26;
  border-radius: 8px;
  color: #555;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all .2s;
  text-transform: uppercase;
}
.ptab:hover { border-color: #333; color: #999; }
.ptab-active {
  background: rgba(240,165,0,.12);
  border-color: rgba(240,165,0,.4) !important;
  color: #f0a500 !important;
}

#drop-zone {
  border: 2px dashed #1e1e26;
  border-radius: 12px;
  padding: 32px 20px;
  text-align: center;
  cursor: pointer;
  transition: all .2s;
  background: rgba(255,255,255,.01);
}
#drop-zone:hover {
  border-color: #f0a500;
  background: rgba(240,165,0,.03);
}
