/* Base styles */
:root {
  --primary-color: #499F9F;
  --accentuation-color: #9A3CF4;
  --base-color: #C2D4D4;
  --darker-primary-color: #1A6665;
  --lighter-primary-color: #E7EAEA;
  --light: #F6FEFE;
  --dark: #020D0D;
}

.contentWrapper, .limited-width {
  max-width: 1200px;
  margin: 1em auto 0 auto;
  min-height: 0 !important;
  font-family: Arial, sans-serif;
}

/* Preview panel */
#preview {
  width: 100%;
  height: 15em;
  border-radius: 10px;
  margin-bottom: 1em;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  background: var(--lighter-primary-color);
  background: linear-gradient(90deg, rgba(2, 0, 36, 1) 0%, rgba(6, 6, 97, 1) 41%, rgba(35, 187, 247, 1) 86%, rgba(255, 255, 255, 1) 100%);
}

/* Control panel */
#control-pannel {
  border: 1px solid var(--darker-primary-color);
  max-width: 100%;
  border-radius: 15px;
  padding: 1.5em;
  margin-bottom: 1em;
  background-color: var(--light);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Gradient type selection */
#type-of-gradient {
  display: flex;
  gap: 1em;
  margin-bottom: 1.5em;
  align-items: center;
}

#type-of-gradient button {
  padding: 0.5em 1em;
  border: none;
  border-radius: 5px;
  background-color: var(--primary-color);
  color: white;
  cursor: pointer;
  transition: background-color 0.3s;
}

#type-of-gradient button:hover {
  background-color: var(--darker-primary-color);
}

#type-of-gradient input[type="number"] {
  width: 5em;
  padding: 0.5em;
  border: 1px solid var(--darker-primary-color);
  border-radius: 5px;
}

#color-picker {
  width: 15em;
  height: 15em;
  background: linear-gradient(to bottom, transparent 0%, rgb(0, 0, 0) 100%),
              linear-gradient(to left, transparent 0%, rgb(255, 255, 255) 100%),
              rgb(0, 0, 255);
  position: relative; /* For cursor positioning */
  cursor: crosshair;
}


/* Hex/RGBA inputs */
#hex-code input,
#rgba-code input {
  padding: 0.5em;
  margin-right: 0.5em;
  border: 1px solid var(--darker-primary-color);
  border-radius: 5px;
  width: 5em;
}

/* Sliders */
#hue-slider,
#transparency-slider {
  width: 100%;
  margin-bottom: 1em;
}

/* Color percentages */
#colors-percentages {
    margin-left: 4em;
}
/* Color Stops List */
#color-stops-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5em;
  margin-bottom: 1em;
}

.color-stop-item {
  display: flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.5em;
  background-color: var(--light);
  border: 1px solid var(--darker-primary-color);
  border-radius: 5px;
  width: fit-content;
}

.color-stop-item:hover {
  cursor: grab;
}

.color-preview {
  width: 2em;
  height: 2em;
  border-radius: 50%;
  border: 1px solid var(--darker-primary-color);
}

.percentage-input {
  width: 4em;
  padding: 0.3em;
  border: 1px solid var(--darker-primary-color);
  border-radius: 5px;
}

.remove-color-stop {
  background: none;
  border: none;
  color: var(--darker-primary-color);
  font-size: 1.2em;
  cursor: pointer;
  padding: 0 0.3em;
  transition: color 0.2s;
}

.remove-color-stop:hover {
  color: var(--accentuation-color);
}

#add-color-stop {
  padding: 0.5em 1em;
  border: none;
  border-radius: 5px;
  background-color: var(--primary-color);
  color: white;
  transition: background-color 0.3s;
}

#add-color-stop:hover {
  background-color: var(--darker-primary-color);
}


/* Generated CSS panel */
#generated-css-panel {
  display: flex;
  align-items: center;
  gap: 1em;
  margin-bottom: 1em;
}

#generated-css {
  flex-grow: 1;
  padding: 1em;
  border: 1px solid var(--darker-primary-color);
  border-radius: 5px;
  background-color: var(--light);
  font-family: monospace;
  white-space: pre;
}

#copy-icon {
  padding: 0.5em 1em;
  border: none;
  border-radius: 5px;
  background-color: var(--primary-color);
  color: white;
  cursor: pointer;
  transition: background-color 0.3s;
}

#copy-icon:hover {
  background-color: var(--darker-primary-color);
}


/* Color Picker and Inputs Container */
#pannel-wide-container {
  display: flex;
  gap: 1em;
  margin-bottom: 1em;
}


/* Color Picker */
#color-picker {
  width: 15em;
  height: 15em;
  background: linear-gradient(to bottom, transparent 0%, rgb(0, 0, 0) 100%),
              linear-gradient(to left, transparent 0%, rgb(255, 255, 255) 100%),
              rgb(0, 0, 255);
}

/* Color Inputs */
#color-inputs, .rgba-group {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0.5em;
  height: fit-content;
}

#color-inputs div, .rgba-group label, .rgba-group input {
    margin-bottom: 0.75em;
}

.rgba-group label, .rgba-group input {
    width: 5em;
}



/* Sliders */
#slider-group {
  display: flex;
  flex-direction: column;
  gap: 1em;
  margin-bottom: 1em;
}

.slider-item {
  display: flex;
  flex-direction: column;
  gap: 0.5em;
}

.slider-item label {
  min-width: 6em;
}

.slider-item input[type="range"] {
  flex-grow: 1;
}

/* Hue Slider */
#hue-slider {
  -webkit-appearance: none; /* Hide default slider */
  appearance: none;
  width: 100%;
  height: 10px;
  border-radius: 5px;
  background: linear-gradient(
    90deg,
    red,
    #ff0 17%,
    #0f0 33%,
    #0ff 50%,
    #00f 66%,
    #f0f 83%,
    red
  );
  outline: none;
  margin: 0.5em 0;
}

/* Hide the slider thumb (optional) */
#hue-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 0;
  height: 0;
}

#hue-slider::-moz-range-thumb {
  width: 0;
  height: 0;
  border: none;
}



/* Alpha Slider */
#transparency-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 10px;
  border-radius: 5px;
  background: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 1) 100%
  );
  outline: none;
  margin: 0.5em 0;
}

/* Hide the slider thumb (optional) */
#transparency-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 0;
  height: 0;
}

#transparency-slider::-moz-range-thumb {
  width: 0;
  height: 0;
  border: none;
}


/* Title */
h1 {
  color: var(--darker-primary-color);
  text-align: center;
  margin: 1em auto;
}




#article {
    margin-top: 2rem; 
    margin-bottom: 2rem;
    padding-left: 0;
    padding-right: 0;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

#article h2 {
    font-size: 1.85rem; 
    margin-bottom: 1.5rem;
    color: var(--darker-primary-color);
    font-weight: bold;
    line-height: 1.2;
    padding-top: 0;
}

#article h3 {
    font-size: 22px;
    margin-bottom: 1rem;
    color: var(--darker-primary-color);
    font-weight: 600;
    line-height: 1.3;
    padding-top: 0;
}


#article p {
    font-size: 1rem;
    line-height: 1.7; 
    margin-bottom: 1.5rem;
    color: var(--dark);
}

#article ul {
    margin-left: 2rem; 
    margin-bottom: 1.5rem;
    list-style-type: disc; 
}

#article ul li {
    margin-bottom: 0.5rem;
    font-size: 1rem;
    line-height: 1.7;
    color: #444;
}

#article a {
    color: var(--primary-color); 
    text-decoration: none;
    font-weight: 500; 
}

#article a:hover {
    text-decoration: underline; 
    color: var(--accentuation-color); 
}

#article strong {
    color: #222;
    font-weight: 600;
}

