.tt-tool-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 16px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #1A1A2E;
  box-sizing: border-box;
}

.tt-tool-container *, .tt-tool-container *::before, .tt-tool-container *::after {
  box-sizing: border-box;
}

.tt-tool-title {
  font-size: 26px;
  font-weight: 700;
  margin: 0 0 8px 0;
  color: #1A1A2E;
}

.tt-tool-description {
  font-size: 15px;
  color: #6B7280;
  margin: 0 0 16px 0;
  line-height: 1.5;
}

.tt-card {
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 16px;
}

.tt-mb-16 {
  margin-bottom: 16px;
}

.tt-input-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

@media (max-width: 600px) {
  .tt-input-group {
    grid-template-columns: 1fr;
  }
}

.tt-input-wrapper {
  display: flex;
  flex-direction: column;
}

.tt-label {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #1A1A2E;
}

.tt-input, .tt-select {
  height: 44px;
  padding: 0 12px;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  font-size: 15px;
  font-family: inherit;
  color: #1A1A2E;
  background: #FFFFFF;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
}

.tt-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 36px;
  cursor: pointer;
}

.tt-input:focus, .tt-select:focus {
  outline: none;
  border-color: #4F46E5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.tt-button-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tt-btn {
  height: 44px;
  padding: 0 16px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  font-family: inherit;
}

@media (min-width: 601px) {
  .tt-btn {
    flex: 1;
  }
}

@media (max-width: 600px) {
  .tt-button-group {
    flex-direction: column;
  }
  .tt-btn {
    width: 100%;
  }
}

.tt-btn:focus-visible {
  outline: 2px solid #4F46E5;
  outline-offset: 2px;
}

.tt-btn-primary {
  background: #4F46E5;
  color: #FFFFFF;
}

.tt-btn-primary:hover {
  background: #4338CA;
}

.tt-btn-secondary {
  background: #7C3AED;
  color: #FFFFFF;
}

.tt-btn-secondary:hover {
  background: #6D28D9;
}

.tt-btn-outline {
  background: transparent;
  color: #4F46E5;
  border: 1px solid #4F46E5;
}

.tt-btn-outline:hover {
  background: #EEF2FF;
}

#tt-results-section,
#tt-error-msg {
  display: none;
}

#tt-results-section.active,
#tt-error-msg.active {
  display: block;
}

.tt-error-msg {
  color: #DC2626;
  font-size: 14px;
  margin-bottom: 16px;
  font-weight: 500;
  text-align: center;
  background: #FEF2F2;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #FECACA;
}

.tt-results-card {
  margin-bottom: 0;
}

.tt-results-title {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 16px 0;
  color: #1A1A2E;
}

.tt-primary-result {
  text-align: center;
  padding: 24px 16px;
  background: #F9FAFB;
  border-radius: 12px;
  border: 1px solid #F3F4F6;
  margin-bottom: 16px;
}

.tt-primary-value {
  display: block;
  font-size: 36px;
  font-weight: 700;
  color: #4F46E5;
  line-height: 1.2;
  word-break: break-all;
}

.tt-primary-label {
  display: block;
  font-size: 15px;
  font-weight: 500;
  margin-top: 4px;
  color: #6B7280;
}

.tt-metrics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.tt-metric-item {
  text-align: center;
  padding: 16px 8px;
  background: #F9FAFB;
  border-radius: 12px;
  border: 1px solid #F3F4F6;
}

.tt-metric-value {
  display: block;
  font-size: 18px;
  font-weight: 700;
  color: #1A1A2E;
  line-height: 1.2;
  word-break: break-word;
}

.tt-metric-label {
  display: block;
  font-size: 13px;
  color: #6B7280;
  margin-top: 4px;
  font-weight: 500;
}

.tt-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: #1A1A2E;
  color: #FFFFFF;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
  z-index: 9999;
}

.tt-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}