/* === Root Color System === */
:root {
  /* Main Theme Colors */
  --primary-color: #6366f1;
  --primary-hover: #5854ec;
  --secondary-color: #64748b;
  --accent-color: #f59e0b;
  
  /* Background Colors */
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #f1f5f9;
  --bg-overlay: rgba(0, 0, 0, 0.5);
  
  /* Text Colors */
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --text-inverse: #ffffff;
  --sliderOutputText: #1e293b;
  
  /* Border Colors */
  --border-light: #e2e8f0;
  --border-medium: #cbd5e1;
  --border-dark: #94a3b8;
  
  /* Navigation Colors */
  --nav-bg: #ffffff;
  --nav-border: #e2e8f0;
  --nav-item-hover: #f1f5f9;
  --nav-item-active: var(--primary-color);
  --nav-text: #64748b;
  --nav-text-active: #ffffff;
  
  /* Panel Colors */
  --panel-bg: #ffffff;
  --panel-header-bg: #f8fafc;
  --panel-border: #e2e8f0;
  
  /* Tab Colors */
  --tab-bg: #f8fafc;
  --tab-border: #e2e8f0;
  --tab-text: #64748b;
  --tab-text-active: var(--primary-color);
  --tab-bg-hover: #f1f5f9;
  
  /* Form Colors */
  --form-bg: #ffffff;
  --form-border: #d1d5db;
  --form-border-focus: var(--primary-color);
  --form-text: #374151;
  --form-label: #374151;
  --form-placeholder: #9ca3af;
  
  /* Button Colors */
  --button-primary-bg: var(--primary-color);
  --button-primary-hover: var(--primary-hover);
  --button-primary-text: #ffffff;
  --button-secondary-bg: #f3f4f6;
  --button-secondary-hover: #e5e7eb;
  --button-secondary-text: #374151;
  
  /* Status Colors */
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --error-color: #ef4444;
  --info-color: #3b82f6;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);


  /* Variables for users */
  
  /* Slider Colors */
  --slider-track: #cccccc;
  --slider-progress: #ff0000;
  --slider-thumb: #000000;

  /* Thumb Radius */
  --thumb-radius: 50%;
  --thumb-width: 20px;

  /* Slider Height */
  --slider-height: 8px;
}

[data-theme="dark"] {
  /* Background Colors */
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary: #334155;
  --bg-overlay: rgba(0, 0, 0, 0.8);
  
  /* Text Colors */
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-inverse: #0f172a;
  
  /* Border Colors */
  --border-light: #334155;
  --border-medium: #475569;
  --border-dark: #64748b;
  
  /* Navigation Colors */
  --nav-bg: #1e293b;
  --nav-border: #334155;
  --nav-item-hover: #334155;
  --nav-text: #94a3b8;
  
  /* Panel Colors */
  --panel-bg: #1e293b;
  --panel-header-bg: #334155;
  --panel-border: #475569;
  
  /* Tab Colors */
  --tab-bg: #334155;
  --tab-border: #475569;
  --tab-text: #94a3b8;
  --tab-bg-hover: #475569;
  
  /* Form Colors */
  --form-bg: #334155;
  --form-border: #475569;
  --form-text: #f1f5f9;
  --form-label: #cbd5e1;
  --form-placeholder: #64748b;
  
  /* Button Colors */
  --button-secondary-bg: #334155;
  --button-secondary-hover: #475569;
  --button-secondary-text: #f1f5f9;
}

/* === Base Styles === */
* {
  box-sizing: border-box;
  font-family: "Geist", "Noto Sans", sans-serif;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  transition: background-color 0.3s ease, color 0.3s ease;
  font-size: 16px;
  line-height: 1.5;
}

/* === App Layout === */
.app-container {
  display: flex;
  height: 100vh;
}

/* === Header === */
.site-header {
  position: fixed;
  top: 0;
  right: 0;
  padding: 1rem;
  z-index: 1001;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-light);
}

.site-header a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.site-header a:hover {
  color: var(--primary-color);
}

/* === Side Navigation === */
.sidenav {
  width: 60px;
  background: var(--nav-bg);
  display: flex;
  flex-direction: column;
  padding: 20px 0;
  transition: all 0.3s ease;
  position: relative;
  z-index: 1000;
  border-right: 1px solid var(--nav-border);
  box-shadow: var(--shadow-sm);
  align-items: center;
}

.nav-item {
  width: 90%;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: all 0.3s ease;
  margin-bottom: 8px;
  color: var(--nav-text);
  border-radius: 8px;
  margin: 4px 0;
}

.nav-item:hover {
  background: var(--nav-item-hover);
  color: var(--text-primary);
}

.nav-item.active {
  background: var(--nav-item-active);
  color: var(--nav-text-active);
  box-shadow: var(--shadow-md);
}

.nav-item svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

/* === Expanded Panel === */
.expanded-panel {
  width: 0;
  background: var(--panel-bg);
  transition: all 0.3s ease;
  overflow: hidden;
  border-right: 1px solid var(--panel-border);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
}

.expanded-panel.open {
  width: 320px;
}

.panel-header {
  padding: 20px;
  border-bottom: 1px solid var(--panel-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--panel-header-bg);
}

.panel-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.close-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 8px;
  border-radius: 6px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-btn:hover {
  background: var(--nav-item-hover);
  color: var(--text-primary);
}

/* === Tab System === */
.tab-navigation {
  display: flex;
  border-bottom: 1px solid var(--tab-border);
  background: var(--tab-bg);
}

.tab-btn {
  flex: 1;
  padding: 16px 20px;
  background: none;
  border: none;
  color: var(--tab-text);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
  border-bottom: 2px solid transparent;
  position: relative;
}

.tab-btn:hover {
  color: var(--text-primary);
  background: var(--tab-bg-hover);
}

.tab-btn.active {
  color: var(--tab-text-active);
  border-bottom-color: var(--tab-text-active);
  background: var(--panel-bg);
}

/* === Panel Content === */
.panel-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  background: var(--panel-bg);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

/* === Form Elements === */
.form-group {
  margin-bottom: 24px;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--form-label);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--form-bg);
  border: 1px solid var(--form-border);
  border-radius: 8px;
  color: var(--form-text);
  font-size: 14px;
  transition: all 0.3s ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--form-border-focus);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--form-placeholder);
}

.form-select {
  cursor: pointer;
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
  font-family: inherit;
}

/* === Main Content === */
.main-content {
  flex: 1;
  background: var(--bg-primary);
  overflow-y: auto;
  padding-top: 80px; /* Account for fixed header */
}

/* === Container === */
.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* === Typography === */
h1, h2 {
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

h1 {
  font-size: 2rem;
}

h2 {
  font-size: 1.5rem;
}

p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

/* === Form Layout === */
.inputs {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.discounts {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

/* === Slider Styles === */
.sliderConfig,
#sliderConfig {
  width: 100%;
  margin-top: 20px;
}

#pricingSlider {
  --slider-track: #cccccc;
  --slider-progress: #ff0000;
  --slider-thumb: #000000;

  /* Thumb Radius */
  --thumb-radius: 50%;
  --thumb-width: 20px;

  /* Slider Height */
  --slider-height: 8px;
}

input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: var(--slider-height);
  border-radius: 4px;
  outline: none;
  margin: 20px 0;
  background: var(--slider-track-gradient, linear-gradient(to right, #ccc 0%, #ccc 100%));
}

/* WebKit Thumb */
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  position: relative;
  top: 50%; /* start halfway down the track */
  transform: translateY(-50%); /* center the thumb */
  width: var(--thumb-width);
  height: var(--thumb-width);
  border-radius: var(--thumb-radius);
  background-color: var(--slider-thumb);
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: all 0.2s ease;
  z-index: 2;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: translateY(-50%) scale(1.1); /* keep vertical alignment during hover */
  box-shadow: var(--shadow-lg);
}

/* Firefox Thumb */
input[type="range"]::-moz-range-thumb {
  width: var(--thumb-width);
  height: var(--thumb-width);
  border-radius: 50%;
  background-color: var(--slider-thumb);
  cursor: pointer;
  border: none;
  box-shadow: var(--shadow-md);
  transform: translateY(-50%);
}

/* WebKit Track */
input[type="range"]::-webkit-slider-runnable-track {
  background: var(--slider-track-gradient, linear-gradient(to right, #ccc 0%, #ccc 100%));
  height: var(--slider-height);
  border-radius: 4px;
}

/* Firefox Track */
input[type="range"]::-moz-range-track {
  background: var(--slider-track-gradient, linear-gradient(to right, #ccc 0%, #ccc 100%));
  height: var(--slider-height);
  border-radius: 4px;
  border: none;
}
#thumbRadiusInput {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 4px;
  outline: none;
  margin: 10px 0;
  background: #ddd;
}
#thumbRadiusInput::-webkit-slider-runnable-track {
  height: 6px;
}

/* Thumb style for #thumbRadiusInput */
#thumbRadiusInput::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #888;
  cursor: pointer;
  box-shadow: none;
}

#thumbRadiusInput::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #888;
  border: none;
  cursor: pointer;
}
#sliderOutputText {
  color: var(--sliderOutputText);
}

.tooltip {
  position: absolute;
  top: -30px;
  transform: translateX(-50%);
  background: var(--primary-color);
  color: #fff;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  pointer-events: none;
  transition: opacity 0.2s;
}

.tooltip::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px 6px 0 6px;
  border-style: solid;
  border-color: var(--primary-color) transparent transparent transparent;
}

.hidden {
  display: none;
}

/* === Buttons === */
button,
#btnGetCode {
  background: var(--button-primary-bg);
  color: var(--button-primary-text);
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 14px;
}

button:hover,
#btnGetCode:hover {
  background: var(--button-primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* === Code Popup === */
.codeParent {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 700px;
  width: 90%;
  background-color: var(--panel-bg);
  border-radius: 16px;
  border: 1px solid var(--border-light);
  padding: 32px;
  z-index: 9999;
  flex-direction: column;
  gap: 20px;
  box-shadow: var(--shadow-lg);
  max-height: 80vh;
  overflow-y: auto;
}

.codeParent-flex {
  display: flex;
}

.codeoutput {
  border: 1px solid var(--border-light);
  border-radius: 12px;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  padding: 16px;
  margin-bottom: 20px;
  text-align: left;
  background: var(--bg-tertiary);
  font-size: 13px;
  line-height: 1.4;
}

.code {
  margin: 0;
  color: var(--text-primary);
}

#closePopup {
  background: var(--button-secondary-bg);
  color: var(--button-secondary-text);
  border: none;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  float: right;
  font-size: 16px;
  line-height: 1;
  transition: all 0.2s ease;
}

#closePopup:hover {
  background: var(--button-secondary-hover);
}

/* === Form Elements in Main Content === */
#display label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--form-label);
  text-align: left;
}

#display input,
#display textarea,
#display select {
  width: 100%;
  padding: 12px 14px;
  background: var(--form-bg);
  border: 1px solid var(--form-border);
  border-radius: 8px;
  color: var(--form-text);
  font-size: 14px;
  margin-bottom: 16px;
  transition: all 0.3s ease;
}

#display input:focus,
#display textarea:focus,
#display select:focus {
  outline: none;
  border-color: var(--form-border-focus);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* === Color Picker === */
#color-picker-button {
  background: var(--button-secondary-bg);
  color: var(--button-secondary-text);
  padding: 12px 24px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-block;
  font-weight: 500;
}

#color-picker-button:hover {
  background: var(--button-secondary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

#box {
  margin-top: 16px;
  min-height: 40px;
  border-radius: 8px;
  border: 1px solid var(--border-light);
}

/* === Scrollbar Styling === */
.panel-content::-webkit-scrollbar,
.codeParent::-webkit-scrollbar {
  width: 6px;
}

.panel-content::-webkit-scrollbar-track,
.codeParent::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

.panel-content::-webkit-scrollbar-thumb,
.codeParent::-webkit-scrollbar-thumb {
  background: var(--border-medium);
  border-radius: 3px;
}

.panel-content::-webkit-scrollbar-thumb:hover,
.codeParent::-webkit-scrollbar-thumb:hover {
  background: var(--border-dark);
}

/* === Responsive Design === */
@media (max-width: 768px) {
  .expanded-panel.open {
    width: 280px;
  }
  
  .container {
    padding: 1rem;
  }
  
  .main-content {
    padding-top: 60px;
  }
  
  .codeParent {
    width: 95%;
    padding: 20px;
  }
}

/* The switch - the box around the slider */
.switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
}

/* Hide default HTML checkbox */
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

/* The slider */
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  -webkit-transition: .4s;
  transition: .4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  -webkit-transition: .4s;
  transition: .4s;
}

input:checked + .slider {
  background-color: #2196F3;
}

input:focus + .slider {
  box-shadow: 0 0 1px #2196F3;
}

input:checked + .slider:before {
  -webkit-transform: translateX(26px);
  -ms-transform: translateX(26px);
  transform: translateX(26px);
}

/* Rounded sliders */
.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}

.switch-div {
  display: flex;
  flex-direction: column;
  gap: 35px;
}

.interval {
  padding: 15px; 
  border-radius: 15px;
  border: 1px dotted var(--border-dark);
}

.exitbutton {
  width: 100%;
  display: flex;
  justify-content: end;
  color: var(--border-dark);
}

.exitbutton:hover {
  scale: 1.03;
  color: black;
  transition: 300ms;
}

.varaible_text {
  color: var(--accent-color);
}
 .variable_text {
  font-size: 12px;
 }