.gts-fx-app {
  --gts-fx-main: #ffc107;
  --gts-fx-accent: #e91e63;
  max-width: 480px;
  margin: 20px auto;
}

.gts-fx-theme-blue {
  --gts-fx-sub: #0288d1;
  --gts-fx-dash: #b3e5fc;
}

.gts-fx-theme-green {
  --gts-fx-sub: #009688;
  --gts-fx-dash: #b2dfdb;
}

.gts-fx-theme-navy {
  --gts-fx-sub: #303f9f;
  --gts-fx-dash: #c5cae9;
}

.gts-fx-theme-red {
  --gts-fx-sub: #c62828;
  --gts-fx-dash: #ffcdd2;
}

.gts-fx-theme-orange {
  --gts-fx-sub: #ef6c00;
  --gts-fx-dash: #ffe0b2;
}

.gts-fx-summary {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.gts-fx-badge {
  flex: 1;
  background: #fff;
  border: 3px solid var(--gts-fx-main);
  padding: 10px 5px;
  border-radius: 14px;
  text-align: center;
}

.gts-fx-badge-label {
  display: block;
  font-size: 18px;
  font-weight: bold;
  color: #555;
}

.gts-fx-badge-value {
  display: block;
  font-weight: 800;
  font-size: 26px;
  color: #333;
  line-height: 1.2;
  margin-top: 4px;
}

.gts-fx-card {
  background: #fff;
  border-radius: 20px;
  padding: 15px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  border: 3px solid var(--gts-fx-sub);
  position: relative;
  overflow: visible;
}

.gts-fx-main-title {
  font-size: 18px;
  text-align: center;
  margin: 0 0 12px 0;
  font-weight: 900;
  color: var(--gts-fx-sub);
}

.gts-fx-pair-switch {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.gts-fx-pair-select {
  position: relative;
  width: 100%;
}

.gts-fx-app .gts-fx-pair-select-btn {
  width: 100%;
  height: 48px;
  padding: 8px 40px 8px 16px;
  border: 2px solid var(--gts-fx-main);
  border-radius: 50px;
  background: #fff;
  color: #ffb300;
  font-size: 18px;
  font-weight: bold !important;
  cursor: pointer;
  position: relative;
  text-align: center;
  -webkit-appearance: none;
  appearance: none;
}

.gts-fx-pair-select-btn::after {
  content: "";
  position: absolute;
  right: 16px;
  top: 50%;
  margin-top: -2px;
  border: 6px solid transparent;
  border-top-color: #ffb300;
}

.gts-fx-pair-select.is-open .gts-fx-pair-select-btn::after {
  margin-top: -8px;
  border-top-color: transparent;
  border-bottom-color: #ffb300;
}

.gts-fx-pair-select-list {
  position: absolute;
  z-index: 20;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  background: #fff;
  border: 2px solid var(--gts-fx-main);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.gts-fx-pair-select-opt {
  display: block;
  width: 100%;
  border: none;
  background: #fff;
  padding: 12px 14px;
  text-align: center;
  font-size: 13px;
  font-weight: bold;
  color: #333;
  cursor: pointer;
}

.gts-fx-pair-select-opt + .gts-fx-pair-select-opt {
  border-top: 1px solid #eee;
}

.gts-fx-pair-select-opt.is-on {
  background: var(--gts-fx-main);
  color: #333;
}

.gts-fx-pair-toggle {
  flex: 1;
  border: none;
  background: #f1f2f6;
  padding: 8px;
  border-radius: 50px;
  cursor: pointer;
  font-weight: bold;
  font-size: 13px;
  color: #333;
}

.gts-fx-pair-toggle.is-on {
  background: var(--gts-fx-main);
  color: #333;
}

.gts-fx-mode-switch {
  display: flex;
  background: #f1f2f6;
  border-radius: 50px;
  padding: 3px;
  margin-bottom: 12px;
}

.gts-fx-mode-switch label {
  flex: 1;
  text-align: center;
  padding: 8px;
  border-radius: 50px;
  cursor: pointer;
  font-size: 13px;
  font-weight: bold;
}

.gts-fx-mode-switch input:checked + label {
  background: var(--gts-fx-sub);
  color: #fff;
}

.gts-fx-mode-switch input {
  display: none;
}

.gts-fx-ui {
  width: 100%;
  height: 44px;
  font-size: 16px;
  border: 2px solid #ccc;
  border-radius: 10px;
  text-align: center;
  color: #333;
  margin-bottom: 10px;
}

.gts-fx-digit-board {
  display: flex;
  gap: 2px;
  margin-bottom: 10px;
  justify-content: center;
  align-items: center;
  min-height: 44px;
}

.gts-fx-digit {
  flex: 1;
  max-width: 38px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px dashed var(--gts-fx-dash);
  border-radius: 4px;
  font-size: 18px;
  font-weight: bold;
  background: #fff;
}

.gts-fx-comma {
  font-size: 20px;
  font-weight: bold;
  color: var(--gts-fx-sub);
  padding: 0 1px;
  margin-top: 10px;
}

.gts-fx-custom-display {
  background: #f8f9fa;
  border: 2px solid #eee;
  border-radius: 10px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: bold;
  color: #333;
  margin-bottom: 10px;
}

.gts-fx-keyboard-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
}

.gts-fx-keyboard-grid button {
  height: 42px;
  border-radius: 8px;
  border: 1px solid #ddd;
  background: #f8f9fa;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  color: #333;
}

.gts-fx-keyboard-grid button:active {
  background: var(--gts-fx-main);
}

.gts-fx-keyboard-grid button.gts-fx-btn-clear {
  background: #ffe6e6;
  color: #e53935;
}

.gts-fx-keyboard-grid button.gts-fx-btn-clear:active {
  background: #ffcdd2;
}

.gts-fx-keyboard-grid button.gts-fx-btn-del {
  background: #e0e0e0;
  color: #333;
}

.gts-fx-keyboard-grid button.gts-fx-btn-del:active {
  background: #bdbdbd;
}

.gts-fx-btn-wide {
  grid-column: span 4;
  font-size: 14px;
}

.gts-fx-arrow {
  text-align: center;
  font-size: 18px;
  color: var(--gts-fx-sub);
  margin: 4px 0;
}

.gts-fx-result-area {
  background: var(--gts-fx-main);
  border-radius: 12px;
  padding: 10px;
  text-align: center;
}

.gts-fx-result-value {
  font-size: 32px;
  font-weight: 900;
  color: var(--gts-fx-accent);
  line-height: 1.1;
}

.gts-fx-result-unit {
  font-size: 16px;
  margin-left: 4px;
  color: #333;
}

.gts-fx-footer,
.gts-fx-credit {
  margin-top: 8px;
  font-size: 12px;
  color: #666;
  text-align: center;
}

.gts-fx-credit a {
  color: #64748b;
  text-decoration: underline;
}

.gts-fx-unavailable {
  color: #64748b;
}
