/* Veylo v1.8 UI Styles — Play Instant, Preferences Panel, What's New Modal
   Theme-aware across all 4 Veylo themes (black, white, gray, sakura) via --v-* tokens. */

/* === 1. Play Instant CTA Button on Detail Pages === */
.veylo-play-instant-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: 10px;
  border: 1px solid var(--v-accent, #c4f366);
  background: var(--v-accent, #c4f366);
  color: var(--v-on-accent, #10150b);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.1px;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(196, 243, 102, 0.28);
  transition: transform 0.16s ease, filter 0.16s ease, box-shadow 0.16s ease;
}
.veylo-play-instant-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
  box-shadow: 0 6px 24px rgba(196, 243, 102, 0.38);
}
.veylo-play-instant-btn:active {
  transform: scale(0.98);
}
.veylo-play-instant-btn.is-loading {
  opacity: 0.78;
  cursor: progress;
}
.veylo-play-instant-btn .v18-pi-icon {
  font-size: 14px;
  line-height: 1;
}

/* === 2. Mod Netflix Auto-Launch Banner === */
.v18-netflix-banner {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000005;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  border-radius: 14px;
  background: var(--v-panel, #111512);
  color: var(--v-text, #f0f2eb);
  border: 1px solid var(--v-accent, #c4f366);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.55);
  font-size: 13.5px;
  font-weight: 600;
  animation: v18FadeUp 0.22s ease;
}
.v18-netflix-cancel {
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--v-border, rgba(255, 255, 255, 0.15));
  background: var(--v-raised, #222b20);
  color: var(--v-text, #f0f2eb);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.v18-netflix-cancel:hover {
  border-color: var(--v-accent, #c4f366);
}

/* === 3. v1.8 Settings Panel ("Play Instant & Redare Smart") === */
#veylo-v18-settings.v18-settings-section {
  position: relative;
  z-index: 1;
  color: var(--v-text, #f0f2eb);
  background: var(--v-panel, #111512);
  border: 1px solid var(--v-border, rgba(255, 255, 255, 0.1));
  border-radius: 16px;
  padding: 22px;
  margin-bottom: 22px;
  overflow: visible;
}
.v18-settings-eyebrow {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--v-accent, #c4f366);
  text-transform: uppercase;
}
.v18-settings-header h2 {
  font-size: 22px;
  font-weight: 750;
  letter-spacing: -0.5px;
  margin: 8px 0 6px;
  color: var(--v-text, #f0f2eb);
}
.v18-settings-header p {
  font-size: 12.5px;
  color: var(--v-muted, #a2ad9c);
  line-height: 1.6;
  margin: 0 0 18px;
}

.v18-settings-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 5px;
  border-radius: 12px;
  background: var(--v-surface, #171d18);
  border: 1px solid var(--v-border, rgba(255, 255, 255, 0.1));
  margin-bottom: 18px;
}
.v18-tab-btn {
  flex: 1 1 130px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 14px;
  border-radius: 9px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--v-muted, #a2ad9c);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.v18-tab-btn:hover {
  color: var(--v-text, #f0f2eb);
  background: rgba(255, 255, 255, 0.04);
}
.v18-tab-btn.is-active {
  background: var(--v-accent, #c4f366);
  color: var(--v-on-accent, #10150b);
}

.v18-tab-pane {
  display: none;
  flex-direction: column;
  gap: 10px;
}
.v18-tab-pane.is-active {
  display: flex;
}

.v18-setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 14px;
  border-radius: 12px;
  background: var(--v-surface, #171d18);
  border: 1px solid var(--v-border, rgba(255, 255, 255, 0.08));
}
.v18-highlight-row {
  border-color: var(--v-accent, #c4f366);
  background: var(--v-soft, #26351c);
}
.v18-setting-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.v18-setting-copy strong {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--v-text, #f0f2eb);
}
.v18-setting-copy small {
  font-size: 11.5px;
  color: var(--v-muted, #a2ad9c);
  line-height: 1.5;
}

.v18-select,
.v18-input-num {
  background: var(--v-bg, #080a09);
  color: var(--v-text, #f0f2eb);
  border: 1px solid var(--v-border, rgba(255, 255, 255, 0.15));
  border-radius: 9px;
  padding: 8px 11px;
  font-size: 13px;
  font-weight: 600;
  outline: none;
  min-width: 170px;
}
.v18-select-sm {
  min-width: 112px;
}
.v18-input-num {
  min-width: 96px;
  width: 110px;
  text-align: center;
}
.v18-select:focus,
.v18-input-num:focus {
  border-color: var(--v-accent, #c4f366);
}

.v18-inline-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* Toggle Switch */
.v18-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 46px;
  height: 26px;
  flex-shrink: 0;
  cursor: pointer;
}
.v18-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}
.v18-switch-track {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: var(--v-raised, #222b20);
  border: 1px solid var(--v-border, rgba(255, 255, 255, 0.15));
  transition: background 0.18s ease, border-color 0.18s ease;
}
.v18-switch-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--v-muted, #a2ad9c);
  transition: transform 0.18s ease, background 0.18s ease;
}
.v18-switch input:checked + .v18-switch-track {
  background: var(--v-accent, #c4f366);
  border-color: var(--v-accent, #c4f366);
}
.v18-switch input:checked + .v18-switch-track::after {
  transform: translateX(20px);
  background: var(--v-on-accent, #10150b);
}

/* Range sliders & Subtitle Preview */
.v18-range-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.v18-range-wrap input[type="range"] {
  width: 130px;
  accent-color: var(--v-accent, #c4f366);
  cursor: pointer;
}
.v18-range-val {
  min-width: 48px;
  text-align: right;
  font-size: 12px;
  font-weight: 700;
  color: var(--v-accent, #c4f366);
}

.v18-color-row {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
}
.v18-swatch {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--v-border, rgba(255, 255, 255, 0.25));
  cursor: pointer;
}
.v18-swatch.is-active {
  border-color: var(--v-accent, #c4f366);
  box-shadow: 0 0 0 2px var(--v-bg, #080a09), 0 0 0 4px var(--v-accent, #c4f366);
}
.v18-color-input {
  width: 30px;
  height: 26px;
  border: 1px solid var(--v-border, rgba(255, 255, 255, 0.2));
  border-radius: 6px;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.v18-sub-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 76px;
  padding: 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, #161e2a 0%, #0b0f16 55%, #1d251b 100%);
  border: 1px solid var(--v-border, rgba(255, 255, 255, 0.1));
  text-align: center;
}
#v18-sub-preview-text {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 6px;
  line-height: 1.35;
}

.v18-settings-status {
  margin: 12px 0 0;
  min-height: 16px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--v-accent, #c4f366);
}

/* === 4. What's New Modal ("Ce e nou în Veylo") === */
.v18-wn-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000020;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
  animation: v18FadeIn 0.2s ease;
}
.v18-wn-card {
  width: 100%;
  max-width: 520px;
  max-height: 86vh;
  overflow-y: auto;
  border-radius: 20px;
  padding: 24px;
  background: var(--v-panel, #111512);
  color: var(--v-text, #f0f2eb);
  border: 1px solid var(--v-border, rgba(255, 255, 255, 0.14));
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.65);
  animation: v18FadeUp 0.24s ease;
}
.v18-wn-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}
.v18-wn-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.4px;
  background: var(--v-soft, #26351c);
  color: var(--v-accent, #c4f366);
  border: 1px solid var(--v-border, rgba(196, 243, 102, 0.35));
}
.v18-wn-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--v-border, rgba(255, 255, 255, 0.12));
  background: var(--v-surface, #171d18);
  color: var(--v-muted, #a2ad9c);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  cursor: pointer;
}
.v18-wn-close:hover {
  color: var(--v-text, #f0f2eb);
  border-color: var(--v-accent, #c4f366);
}
.v18-wn-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.4px;
  margin: 0 0 10px;
  color: var(--v-text, #f0f2eb);
}
.v18-wn-body {
  font-size: 14px;
  line-height: 1.65;
  color: var(--v-muted, #a2ad9c);
  margin: 0 0 16px;
  white-space: pre-line;
}
.v18-wn-list {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.v18-wn-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 11px;
  background: var(--v-surface, #171d18);
  border: 1px solid var(--v-border, rgba(255, 255, 255, 0.08));
  font-size: 13px;
  line-height: 1.5;
  color: var(--v-text, #f0f2eb);
}
.v18-wn-dot {
  width: 8px;
  height: 8px;
  margin-top: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--v-accent, #c4f366);
}
.v18-wn-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.v18-wn-more {
  font-size: 12px;
  color: var(--v-muted, #a2ad9c);
}
.v18-wn-cta {
  padding: 10px 20px;
  border-radius: 11px;
  border: none;
  background: var(--v-accent, #c4f366);
  color: var(--v-on-accent, #10150b);
  font-size: 13.5px;
  font-weight: 800;
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.12s ease;
}
.v18-wn-cta:hover {
  filter: brightness(1.06);
}
.v18-wn-cta:active {
  transform: scale(0.98);
}

@keyframes v18FadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes v18FadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 680px) {
  .v18-setting-row {
    flex-direction: column;
    align-items: flex-start;
  }
  .v18-select,
  .v18-range-wrap {
    width: 100%;
  }
  .v18-range-wrap input[type="range"] {
    flex: 1;
  }
}
