/* CSS gradient generator — golden luxury */

.tool-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.gradient-generator-tool {
  background: linear-gradient(180deg, rgba(255, 252, 246, 0.97), rgba(248, 238, 222, 0.97));
  border-radius: 16px;
  padding: 40px;
  box-shadow: 0 14px 36px -24px rgba(94, 65, 30, 0.35);
  border: 1px solid rgba(145, 103, 48, 0.15);
}

.gradient-preview-container {
  margin-bottom: 25px;
}

.gradient-preview {
  width: 100%;
  height: 300px;
  border-radius: 12px;
  border: 1px solid rgba(145, 103, 48, 0.22);
  background: linear-gradient(to right, #bc8e3d, #5e4329);
  box-shadow: 0 6px 20px rgba(94, 65, 30, 0.12);
}

.controls-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  border-bottom: 2px solid rgba(145, 103, 48, 0.12);
}

.control-tab {
  padding: 12px 20px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  color: rgba(88, 64, 38, 0.65);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.control-tab:hover {
  color: #4a351f;
}

.control-tab.active {
  color: #7a5526;
  border-bottom-color: #ab7c34;
}

.tab-content {
  display: none;
}

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

.gradient-controls {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 25px;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.control-group label {
  color: #5e4329;
  font-size: 0.95rem;
  font-weight: 600;
}

.form-select {
  padding: 12px 15px;
  background: #fffaf2;
  border: 1px solid rgba(145, 103, 48, 0.22);
  border-radius: 8px;
  color: #4a351f;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.form-select:focus {
  outline: none;
  border-color: #ab7c34;
  box-shadow: 0 0 0 3px rgba(171, 124, 52, 0.14);
}

.form-input {
  padding: 12px 15px;
  background: #fffaf2;
  border: 1px solid rgba(145, 103, 48, 0.22);
  border-radius: 8px;
  color: #4a351f;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.form-input:focus {
  outline: none;
  border-color: #ab7c34;
  box-shadow: 0 0 0 3px rgba(171, 124, 52, 0.14);
}

.control-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.color-stops-container {
  margin-top: 20px;
}

.color-stops-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  gap: 10px;
}

.color-stops-header #addColorBtn {
  flex-shrink: 0;
  white-space: nowrap;
}

.color-stops-header h4 {
  color: #5e4329;
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.color-stops-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.color-stop-item {
  background: rgba(182, 138, 58, 0.06);
  border-radius: 8px;
  padding: 15px;
  border: 1px solid rgba(145, 103, 48, 0.15);
}

.color-stop-controls {
  display: grid;
  grid-template-columns: 60px 1fr 150px auto 100px auto 40px;
  gap: 10px;
  align-items: center;
}

.color-stop-color {
  width: 60px;
  height: 40px;
  border: 1px solid rgba(145, 103, 48, 0.28);
  border-radius: 6px;
  cursor: pointer;
  background: none;
}

.color-stop-text {
  padding: 8px 12px;
  background: #fffaf2;
  border: 1px solid rgba(145, 103, 48, 0.22);
  border-radius: 6px;
  color: #4a351f;
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
}

.color-stop-text:focus {
  outline: none;
  border-color: #ab7c34;
  box-shadow: 0 0 0 3px rgba(171, 124, 52, 0.12);
}

.color-stop-position {
  flex: 1;
  height: 6px;
  background: rgba(145, 103, 48, 0.15);
  border-radius: 3px;
  outline: none;
  -webkit-appearance: none;
}

.color-stop-position::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  background: linear-gradient(180deg, #bc8e3d, #9f742f);
  border-radius: 50%;
  cursor: pointer;
}

.color-stop-position::-moz-range-thumb {
  width: 16px;
  height: 16px;
  background: linear-gradient(180deg, #bc8e3d, #9f742f);
  border-radius: 50%;
  cursor: pointer;
  border: none;
}

.position-value,
.opacity-value {
  color: rgba(88, 64, 38, 0.72);
  font-size: 0.85rem;
  font-weight: 500;
  min-width: 45px;
  text-align: center;
}

.color-stop-opacity {
  flex: 1;
  height: 6px;
  background: rgba(145, 103, 48, 0.15);
  border-radius: 3px;
  outline: none;
  -webkit-appearance: none;
}

.color-stop-opacity::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  background: linear-gradient(180deg, #bc8e3d, #9f742f);
  border-radius: 50%;
  cursor: pointer;
}

.color-stop-opacity::-moz-range-thumb {
  width: 16px;
  height: 16px;
  background: linear-gradient(180deg, #bc8e3d, #9f742f);
  border-radius: 50%;
  cursor: pointer;
  border: none;
}

.remove-color-btn {
  background: rgba(173, 82, 47, 0.1);
  border: 1px solid rgba(154, 63, 43, 0.28);
  color: #9a3f2b;
  padding: 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.remove-color-btn:hover:not(:disabled) {
  background: rgba(173, 82, 47, 0.18);
  border-color: #c94a3a;
}

.remove-color-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.advanced-controls {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.presets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 15px;
}

.preset-item {
  aspect-ratio: 1;
  border-radius: 12px;
  border: 1px solid rgba(145, 103, 48, 0.22);
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: 15px;
}

.preset-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 24px rgba(94, 65, 30, 0.18);
  border-color: #ab7c34;
}

.preset-name {
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  z-index: 1;
}

.color-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.color-group label {
  color: #5e4329;
  font-size: 0.95rem;
  font-weight: 600;
}

.color-group input[type='color'] {
  width: 100%;
  height: 50px;
  border: 1px solid rgba(145, 103, 48, 0.22);
  border-radius: 8px;
  cursor: pointer;
  background: none;
}

.color-text {
  padding: 10px 15px;
  background: #fffaf2;
  border: 1px solid rgba(145, 103, 48, 0.22);
  border-radius: 12px;
  color: #4a351f;
  font-family: 'Courier New', monospace;
  font-size: 0.95rem;
}

.color-text:focus {
  outline: none;
  border-color: #ab7c34;
  box-shadow: 0 0 0 3px rgba(171, 124, 52, 0.14);
}

.css-output {
  margin-top: 25px;
  margin-bottom: 25px;
}

.output-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
  flex-wrap: wrap;
  gap: 15px;
}

.output-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.output-format {
  min-width: 150px;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.9rem;
}

.output-header h3 {
  color: #5e4329;
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.css-code {
  width: 100%;
  padding: 15px;
  background: #fffaf2;
  border: 1px solid rgba(145, 103, 48, 0.22);
  border-radius: 12px;
  color: #7a5526;
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  min-height: 100px;
  resize: vertical;
}

.copy-btn-small {
  background: rgba(182, 138, 58, 0.12);
  border: 1px solid rgba(145, 103, 48, 0.28);
  color: #7a572c;
  padding: 8px 15px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
}

.copy-btn-small:hover {
  background: rgba(182, 138, 58, 0.22);
  border-color: #ab7c34;
}

.category-tab {
  padding: 10px 20px;
  background: #fffaf2;
  border: 1px solid rgba(145, 103, 48, 0.22);
  border-radius: 12px;
  color: rgba(88, 64, 38, 0.72);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.category-tab:hover {
  border-color: rgba(171, 124, 52, 0.45);
  color: #4a351f;
}

.category-tab.active {
  background: linear-gradient(180deg, #bc8e3d 0%, #9f742f 100%);
  border-color: transparent;
  color: #fff8ef;
}

.converter-form {
  margin-bottom: 25px;
}

.conversion-row {
  display: flex;
  align-items: center;
  gap: 15px;
}

.input-group {
  flex: 1;
  display: flex;
  gap: 10px;
}

.input-group .form-input {
  flex: 1;
}

.unit-select {
  padding: 12px 15px;
  background: #fffaf2;
  border: 1px solid rgba(145, 103, 48, 0.22);
  border-radius: 8px;
  color: #4a351f;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 120px;
}

.unit-select:focus {
  outline: none;
  border-color: #ab7c34;
  box-shadow: 0 0 0 3px rgba(171, 124, 52, 0.14);
}

.swap-btn {
  padding: 12px;
  background: rgba(182, 138, 58, 0.12);
  border: 1px solid rgba(145, 103, 48, 0.28);
  border-radius: 12px;
  color: #7a572c;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.swap-btn:hover {
  background: rgba(182, 138, 58, 0.22);
  border-color: #ab7c34;
  transform: rotate(180deg);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  color: #5e4329;
  font-size: 1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-input {
  width: 100%;
  padding: 12px 15px;
  background: #fffaf2;
  border: 1px solid rgba(145, 103, 48, 0.22);
  border-radius: 8px;
  color: #4a351f;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-input:focus {
  outline: none;
  border-color: #ab7c34;
  box-shadow: 0 0 0 3px rgba(171, 124, 52, 0.14);
}

.form-input::placeholder {
  color: #8c7558;
}

.action-buttons {
  display: flex;
  gap: 15px;
  margin-bottom: 25px;
  flex-wrap: wrap;
}

.btn {
  padding: 12px 24px;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary {
  background: linear-gradient(180deg, #bc8e3d 0%, #9f742f 100%);
  color: #fff8ef;
}

.btn-primary:hover {
  background: linear-gradient(180deg, #c89a4a 0%, #aa7d34 100%);
  transform: scale(1.05);
}

.btn-secondary {
  background: transparent;
  color: #7a572c;
  border: 2px solid rgba(145, 103, 48, 0.4);
}

.btn-secondary:hover {
  background: rgba(182, 138, 58, 0.12);
  color: #5e4329;
  transform: scale(1.05);
}

.result-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.result-header h3 {
  color: #5e4329;
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0;
}

.result-card {
  background: rgba(182, 138, 58, 0.06);
  border-radius: 12px;
  padding: 20px;
  border: 1px solid rgba(145, 103, 48, 0.15);
}

.result-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
  border-bottom: 1px solid rgba(145, 103, 48, 0.1);
}

.result-item:last-child {
  border-bottom: none;
}

.result-label {
  color: rgba(88, 64, 38, 0.72);
  font-size: 1rem;
  font-weight: 500;
}

.result-value {
  color: #7a5526;
  font-size: 1.2rem;
  font-weight: 700;
  font-family: 'Courier New', monospace;
}

.hash-type-icon {
  font-size: 2.5rem;
  color: #b98b3b;
}

.hash-type-info h4 {
  color: #4a351f;
  font-size: 1.5rem;
  margin: 0 0 5px 0;
}

.hash-type-info p {
  color: rgba(88, 64, 38, 0.65);
  margin: 0;
  font-size: 0.95rem;
}

.hash-details {
  display: grid;
  gap: 15px;
}

.detail-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  background: rgba(255, 252, 246, 0.85);
  border-radius: 6px;
}

.detail-label {
  color: rgba(88, 64, 38, 0.72);
  font-weight: 500;
}

.detail-value {
  color: #7a5526;
  font-weight: 600;
  font-family: 'Courier New', monospace;
}

.error-message {
  background: rgba(173, 82, 47, 0.12);
  border: 1px solid rgba(154, 63, 43, 0.26);
  color: #9a3f2b;
  padding: 15px;
  border-radius: 12px;
  margin-top: 20px;
}

.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  background: linear-gradient(180deg, #bc8e3d 0%, #9f742f 100%);
  color: #fff8ef;
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: 500;
  z-index: 1000;
  animation: slideIn 0.3s ease;
}

.toast.success {
  background: linear-gradient(180deg, #bc8e3d 0%, #9f742f 100%);
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

@media (max-width: 768px) {
  .tool-container {
    padding: 0 15px;
  }

  .gradient-generator-tool {
    padding: 20px;
  }

  .action-buttons {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .hash-type-card {
    flex-direction: column;
    text-align: center;
  }

  .detail-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }

  .gradient-preview {
    height: 200px;
  }

  .control-row {
    grid-template-columns: 1fr;
  }

  .color-stop-controls {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .color-stop-color {
    width: 100%;
  }

  .controls-tabs {
    flex-wrap: wrap;
  }

  .control-tab {
    flex: 1;
    min-width: 100px;
    font-size: 0.9rem;
    padding: 10px 15px;
  }

  .presets-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }

  .output-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .output-actions {
    width: 100%;
    flex-direction: column;
  }

  .output-format {
    width: 100%;
  }

  .color-stops-header {
    flex-wrap: wrap;
  }

  .color-stops-header #addColorBtn {
    width: auto;
    min-width: auto;
  }

  #clearBtn.btn-secondary,
  #addColorBtn.btn-secondary {
    border-width: 1px;
  }

  .copy-btn-small.copied {
    background: rgba(182, 138, 58, 0.22);
    border-color: #ab7c34;
  }

  .copy-btn-small.copied svg {
    display: inline-block !important;
    vertical-align: middle;
    width: 14px;
    height: 14px;
  }
}
