* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: linear-gradient(180deg, #0f1626 0%, #1b2a4a 100%);
  color: #eaf0fb;
  min-height: 100vh;
}

.page {
  max-width: 560px;
  margin: 0 auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.ad-slot {
  background: rgba(255, 255, 255, 0.06);
  border: 1px dashed rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(234, 240, 251, 0.4);
  font-size: 0.85rem;
  min-height: 60px;
}

.ad-slot.ad-slot-active {
  border: none;
  background: transparent;
  padding: 0;
  min-height: auto;
  display: block;
}

header {
  text-align: center;
  padding-top: 8px;
}

h1 {
  margin: 0;
  font-size: 1.9rem;
}

.subtitle {
  color: rgba(234, 240, 251, 0.75);
  margin-top: 6px;
}

.input-card {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.field-label {
  font-size: 0.9rem;
  color: rgba(234, 240, 251, 0.75);
  margin-top: 8px;
}

.field-label:first-child {
  margin-top: 0;
}

.field-hint {
  font-size: 0.78rem;
  color: rgba(234, 240, 251, 0.5);
  margin: -4px 0 0;
  line-height: 1.4;
}

.text-input,
.business-input {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(234, 240, 251, 0.3);
  border-radius: 10px;
  padding: 12px 14px;
  color: #eaf0fb;
  font-size: 1rem;
  font-family: inherit;
}

.business-input {
  resize: vertical;
  min-height: 120px;
}

.text-input:focus,
.business-input:focus {
  outline: none;
  border-color: #5b8def;
}

.submit-btn,
.reset-btn {
  background: #5b8def;
  color: #0f1626;
  border: none;
  border-radius: 10px;
  padding: 14px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.1s ease;
  margin-top: 8px;
}

.submit-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.submit-btn:not(:disabled):hover,
.reset-btn:hover {
  opacity: 0.9;
}

.submit-btn:not(:disabled):active,
.reset-btn:active {
  transform: scale(0.98);
}

.loading {
  text-align: center;
  padding: 30px 0;
}

.chart {
  font-size: 3rem;
  animation: pulse 1.2s infinite ease-in-out;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  50% { transform: scale(1.15); opacity: 1; }
}

.result-card {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.result-card h2 {
  margin: 0;
}

.result-text {
  white-space: pre-wrap;
  line-height: 1.6;
  color: rgba(234, 240, 251, 0.9);
}

.error-box {
  background: rgba(200, 60, 60, 0.2);
  border: 1px solid rgba(200, 60, 60, 0.5);
  border-radius: 10px;
  padding: 14px;
  color: #ffb3b3;
}

footer {
  text-align: center;
  font-size: 0.75rem;
  color: rgba(234, 240, 251, 0.45);
  padding-bottom: 16px;
}

footer a {
  color: rgba(234, 240, 251, 0.6);
}
