.section-title {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--light-black-color);
  text-align: center;
  margin-bottom: 1.25rem;
  position: relative;
  display: inline-block;
}

.section-title-wrapper {
  text-align: center;
  margin-bottom: 0.5rem;
}

.section-title::after {
  content: "";
  display: block;
  width: 40px;
  height: 3px;
  background: var(--main-color);
  border-radius: 2px;
  margin: 8px auto 0;
}

.top-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

.card {
  border-radius: 16px;
  overflow: hidden;
  border: none;
  background: #fff;
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.08),
    0 1px 4px rgba(0, 0, 0, 0.04);
  transition: box-shadow 0.25s ease;
}

.card:hover {
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.12),
    0 2px 8px rgba(0, 0, 0, 0.06);
}

thead th {
  position: sticky;
  top: 0;
  z-index: 2;
}

.table thead th {
  background-color: var(--light-gray-color);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: #888;
  padding: 14px 10px;
  border-bottom: 2px solid var(--gray-color);
}

.table tbody td {
  padding: 16px 10px;
  border-bottom: 1px solid var(--gray-color);
  font-size: 0.95rem;
}

.table tbody tr {
  transition: background-color 0.2s ease;
}

.table tbody tr:hover {
  background-color: var(--main-color-soft) !important;
}

.table tbody tr:last-child td {
  border-bottom: none;
}

.currency-icon {
  width: 52px;
  height: 30px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.8rem;
  background: linear-gradient(
    135deg,
    var(--main-color),
    var(--light-main-color)
  ) !important;
  color: #fff !important;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12);
}

.price-up {
  color: #16a34a;
  font-weight: 700;
  font-family: "Monaco", "Consolas", monospace;
  font-size: 0.9rem;
}

.price-down {
  color: #dc2626;
  font-weight: 700;
  font-family: "Monaco", "Consolas", monospace;
  font-size: 0.9rem;
}

.card .form-label,
.card label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #888;
  margin-bottom: 6px;
}

.form-control {
  border-radius: 12px;
  border: 1.5px solid #e0e0e0;
  padding: 12px 16px;
  font-size: 1rem;
  font-weight: 500;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
  background: var(--light-gray-color);
}

.form-control:focus {
  border-color: var(--main-color);
  box-shadow: 0 0 0 3px var(--main-color-glow);
  background: #fff;
}

.form-control::placeholder {
  color: #bbb;
  font-weight: 400;
}

.form-control.is-invalid {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
}

.form-control.is-invalid:focus {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.25);
}

.ts-wrapper.is-invalid .ts-control {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
}

.invalid-feedback {
  color: #dc2626;
  font-size: 0.8rem;
  font-weight: 500;
  margin-top: 6px;
}

.buy-sell-switch-wrapper {
  display: flex;
  flex-direction: column;
}

.buy-sell-switch {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: var(--light-gray-color);
  border: 1.5px solid #e0e0e0;
  border-radius: 14px;
  padding: 12px 20px;
}

.switch-text {
  font-size: 0.85rem;
  font-weight: 600;
  color: #aaa;
  letter-spacing: 1px;
  transition:
    color 0.25s ease,
    transform 0.25s ease;
  user-select: none;
}

.switch-text.active {
  color: var(--main-color);
  font-weight: 800;
  transform: scale(1.05);
}

.custom-switch {
  width: 3.2rem !important;
  height: 1.6rem;
  cursor: pointer;
  box-shadow: none !important;
  border-color: #ccc !important;
  background-color: #ddd !important;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e") !important;
}

.custom-switch:checked {
  background-color: var(--main-color) !important;
  border-color: var(--main-color) !important;
}

.custom-switch:focus {
  box-shadow: 0 0 0 3px var(--main-color-glow) !important;
}

.btn-main {
  background: linear-gradient(
    135deg,
    var(--main-color),
    var(--light-main-color)
  );
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 14px 24px;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  transition:
    transform 0.15s ease,
    box-shadow 0.2s ease,
    opacity 0.2s ease;
  cursor: pointer;
}

.btn-main:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px var(--main-color-glow);
  opacity: 0.92;
  color: #fff;
}

.btn-main:active {
  transform: translateY(0);
  box-shadow: none;
}

#currency-select:hover {
  cursor: pointer;
}

.ts-control,
.ts-wrapper.single .ts-control {
  padding: 10px 14px;
  min-height: 44px;
  border-radius: 12px;
  border: 1.5px solid #e0e0e0;
  background: var(--light-gray-color);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.ts-wrapper.single .ts-control .item {
  font-size: 1rem;
  font-weight: 600;
  margin-top: 2px;
}

.ts-wrapper.single .ts-control:hover {
  border-color: var(--main-color);
}

.ts-wrapper.single.focus .ts-control {
  border-color: var(--main-color);
  box-shadow: 0 0 0 3px var(--main-color-glow);
}

.ts-dropdown {
  max-height: 250px;
  overflow-y: auto;
  border-radius: 12px;
  border: 1.5px solid #e0e0e0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  margin-top: 4px;
  background: #fff;
  z-index: 100;
}

.ts-dropdown .option {
  padding: 10px 14px;
  font-size: 0.95rem;
  transition: background-color 0.15s ease;
}

.ts-dropdown .option.active {
  background-color: var(--main-color-soft);
  color: var(--main-color);
  font-weight: 600;
}

.ts-wrapper.single .ts-control input {
  caret-color: transparent !important;
}

.ts-wrapper.single.dropdown-active .ts-control input {
  caret-color: auto !important;
}

#loading-spinner {
  padding: 2.5rem 0;
}

.spinner-border {
  color: var(--main-color) !important;
  width: 2.5rem;
  height: 2.5rem;
}

#register-btn {
  background: rgba(191, 59, 130, 0.2);
  color: var(--main-color);
  border: 1.5px solid var(--main-color);
  box-shadow: none;
  opacity: 1;
}

#register-btn:hover {
  background: var(--main-color);
  color: #fff;
  opacity: 1;
  box-shadow: 0 6px 20px var(--main-color-glow);
}

#calculator-results {
  scroll-margin-top: 1.5rem;
}

#calculator-results .table tbody td {
  font-weight: 500;
}

#calculator-results .table-responsive {
  max-height: 60vh;
  overflow-y: auto;
}

.results-search-wrapper {
  padding: 1rem 1rem 0.75rem;
  border-bottom: 1px solid var(--gray-color);
}

@media (max-width: 768px) {
  .top-section {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .card {
    border-radius: 12px;
  }

  .table thead th {
    font-size: 0.65rem;
    padding: 10px 6px;
  }

  .table tbody td {
    padding: 12px 6px;
    font-size: 0.85rem;
  }

  .currency-icon {
    width: 60px;
    height: 30px;
    font-size: 0.7rem;
  }
}
