/* Unit Converter — golden luxury */

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

.unit-converter-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);
}

.category-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 25px;
  flex-wrap: wrap;
}

.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-section {
  background: #fffaf2;
  border-radius: 8px;
  padding: 20px;
  border: 1px solid rgba(145, 103, 48, 0.12);
  margin-top: 20px;
}

.result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

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

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

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

.conversion-card {
  background: rgba(182, 138, 58, 0.06);
  border-radius: 8px;
  padding: 15px;
  border: 1px solid rgba(145, 103, 48, 0.15);
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  transition: all 0.3s ease;
}

.conversion-card:hover {
  background: rgba(182, 138, 58, 0.12);
  border-color: rgba(171, 124, 52, 0.35);
  transform: translateY(-2px);
}

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

.conversion-value {
  color: #7a5526;
  font-size: 1.3rem;
  font-weight: 700;
  font-family: 'Courier New', monospace;
  word-break: break-all;
}

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

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

.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;
  }
}

.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.8);
  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;
}

@media (max-width: 768px) {
  .tool-container {
    padding: 0 15px;
    overflow-x: hidden;
    max-width: 100%;
  }

  .unit-converter-tool {
    padding: 20px;
    overflow-x: hidden;
    max-width: 100%;
  }

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

  .btn {
    width: 100%;
  }

  .category-tabs {
    flex-wrap: wrap;
    gap: 8px;
  }

  .category-tab {
    padding: 8px 15px;
    font-size: 0.85rem;
  }

  .conversion-row {
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
  }

  .input-group {
    flex-direction: column;
    width: 100%;
  }

  .input-group .form-input {
    width: 100%;
    min-width: 0;
  }

  .unit-select {
    width: 100%;
    min-width: 0;
  }

  .swap-btn {
    align-self: center;
    margin: 5px 0;
  }

  .form-input {
    width: 100%;
    min-width: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .conversions-grid {
    grid-template-columns: 1fr;
  }

  .result-header {
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
  }

  .result-header h3 {
    font-size: 1rem;
  }

  .toast {
    top: auto;
    bottom: 100px;
    left: 20px;
    right: 20px;
  }

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

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

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