/* StreamTranslate Config Panel */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: #0e0e10;
  color: #efeff1;
  font-family: 'Inter', 'Segoe UI', -apple-system, sans-serif;
  font-size: 14px;
  min-height: 100%;
}

.config-panel {
  max-width: 320px;
  margin: 0 auto;
  padding: 16px;
}

/* Header */
.config-header {
  text-align: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 6px;
}

.logo-text {
  font-size: 18px;
  font-weight: 700;
  background: linear-gradient(135deg, #9147ff, #772ce8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.tagline {
  font-size: 12px;
  color: #adadb8;
}

/* Sections */
.config-section {
  margin-bottom: 20px;
}

.config-section h3 {
  font-size: 13px;
  font-weight: 600;
  color: #adadb8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

/* Fields */
.field {
  margin-bottom: 14px;
}

.field > label {
  display: block;
  font-size: 13px;
  color: #dedee3;
  margin-bottom: 6px;
}

/* Select */
select {
  width: 100%;
  padding: 8px 12px;
  background: #1f1f23;
  color: #efeff1;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  outline: none;
}

select:focus {
  border-color: #9147ff;
}

/* Range */
.range-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

input[type="range"] {
  flex: 1;
  -webkit-appearance: none;
  height: 4px;
  background: #3a3a3d;
  border-radius: 2px;
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  background: #9147ff;
  border-radius: 50%;
  cursor: pointer;
}

.range-val {
  min-width: 40px;
  text-align: right;
  font-size: 13px;
  color: #adadb8;
  font-variant-numeric: tabular-nums;
}

/* Color */
.color-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

input[type="color"] {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  background: none;
  padding: 0;
}

input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 2px;
}

input[type="color"]::-webkit-color-swatch {
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.15);
}

/* Toggle switch */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
}

.toggle-row label:first-child {
  font-size: 13px;
  color: #dedee3;
}

.switch {
  position: relative;
  width: 42px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #3a3a3d;
  border-radius: 24px;
  transition: 0.3s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: 0.3s;
}

input:checked + .slider {
  background: #9147ff;
}

input:checked + .slider:before {
  transform: translateX(18px);
}

/* Position buttons */
.btn-group {
  display: flex;
  gap: 8px;
}

.pos-btn {
  flex: 1;
  padding: 8px;
  background: #1f1f23;
  color: #adadb8;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.pos-btn:hover {
  border-color: #9147ff;
  color: #efeff1;
}

.pos-btn.active {
  background: #9147ff;
  color: white;
  border-color: #9147ff;
}

/* Preview */
#preview-box {
  background: #18181b;
  border-radius: 8px;
  padding: 24px 16px;
  text-align: center;
  position: relative;
  overflow: hidden;
  min-height: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.preview-line {
  padding: 4px 12px;
  border-radius: 4px;
  background: rgba(0,0,0,0.55);
  color: #ccc;
  font-size: 14px;
  display: inline-block;
}

.preview-line.translated {
  background: rgba(0,0,0,0.7);
  color: #fff;
  font-size: 18px;
  font-weight: 600;
}

/* Footer */
.config-footer {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.save-btn {
  flex: 2;
  padding: 10px;
  background: #9147ff;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.save-btn:hover {
  background: #772ce8;
}

.reset-btn {
  flex: 1;
  padding: 10px;
  background: #1f1f23;
  color: #adadb8;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.reset-btn:hover {
  border-color: #9147ff;
  color: #efeff1;
}

/* Powered by */
.powered-by {
  text-align: center;
  font-size: 11px;
  color: #53535f;
  padding: 8px 0;
}

.powered-by a {
  color: #9147ff;
  text-decoration: none;
}

.powered-by a:hover {
  text-decoration: underline;
}

/* Saved toast */
.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #00c853;
  color: white;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  transition: transform 0.3s ease;
  z-index: 999;
}

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

/* ===== SETUP SCREEN ===== */
.setup-hero {
  text-align: center;
  padding: 24px 0 20px;
}

.logo-big {
  margin-bottom: 12px;
}

.setup-title {
  font-size: 24px;
  font-weight: 800;
  background: linear-gradient(135deg, #9147ff, #772ce8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 6px;
}

.setup-subtitle {
  font-size: 13px;
  color: #adadb8;
  line-height: 1.4;
}

.setup-instructions {
  background: #1f1f23;
  border-radius: 10px;
  padding: 18px;
  margin-bottom: 16px;
  border: 1px solid rgba(255,255,255,0.06);
}

.setup-text {
  font-size: 13px;
  color: #dedee3;
  line-height: 1.5;
  margin-bottom: 14px;
}

.setup-btn {
  display: block;
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, #9147ff, #772ce8);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: opacity 0.2s;
  margin-bottom: 16px;
}

.setup-btn:hover {
  opacity: 0.9;
}

.setup-steps {
  margin-bottom: 14px;
}

.setup-step {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.step-num {
  width: 24px;
  height: 24px;
  background: #9147ff;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.step-text {
  font-size: 13px;
  color: #dedee3;
}

.pricing-note {
  background: rgba(145, 71, 255, 0.1);
  border: 1px solid rgba(145, 71, 255, 0.2);
  border-radius: 8px;
  padding: 12px;
  font-size: 12px;
  color: #dedee3;
  line-height: 1.5;
  text-align: center;
}

.pricing-note strong {
  color: #bf94ff;
}

.setup-features {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-bottom: 16px;
}

.feature-pill {
  background: rgba(145, 71, 255, 0.12);
  border: 1px solid rgba(145, 71, 255, 0.2);
  color: #bf94ff;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}

.setup-skip {
  display: block;
  width: 100%;
  padding: 10px;
  background: transparent;
  color: #adadb8;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.setup-skip:hover {
  border-color: #9147ff;
  color: #efeff1;
}
