* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', sans-serif;
  background: #f0f4f8;
  color: #333;
  min-height: 100vh;
  padding: 24px 16px;
}

.container {
  max-width: 760px;
  margin: 0 auto;
}

header {
  text-align: center;
  margin-bottom: 28px;
}

header h1 {
  font-size: 2rem;
  color: #1a73e8;
}

header p {
  color: #666;
  margin-top: 6px;
}

/* Card */
.card {
  background: #fff;
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  margin-bottom: 32px;
}

.form-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.form-group {
  flex: 1;
  min-width: 140px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #555;
}

input, select {
  padding: 10px 12px;
  border: 1.5px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.2s;
  outline: none;
}

input:focus, select:focus {
  border-color: #1a73e8;
}

.btn {
  width: 100%;
  padding: 14px;
  background: #1a73e8;
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s;
  margin-top: 4px;
}

.btn:hover {
  background: #1558b0;
}

/* Result */
.result {
  text-align: center;
  margin-top: 28px;
  padding: 24px;
  background: #e8f0fe;
  border-radius: 12px;
  animation: fadeIn 0.3s ease;
}

.result.hidden {
  display: none;
}

.result-icon {
  font-size: 2.5rem;
  margin-bottom: 8px;
}

.result-label {
  font-size: 0.9rem;
  color: #555;
  margin-bottom: 4px;
}

.result-value {
  font-size: 2.4rem;
  font-weight: 700;
  color: #1a73e8;
}

.result-note {
  margin-top: 8px;
  font-size: 0.85rem;
  color: #666;
}

/* Affiliate Section */
.affiliate-section {
  margin-bottom: 32px;
}

.affiliate-section h2 {
  font-size: 1.2rem;
  margin-bottom: 4px;
  color: #222;
}

.affiliate-note {
  font-size: 0.75rem;
  color: #999;
  margin-bottom: 16px;
}

.affiliate-grid {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.affiliate-card {
  flex: 1;
  min-width: 180px;
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  text-decoration: none;
  color: #333;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.2s, box-shadow 0.2s;
  border: 2px solid transparent;
}

.affiliate-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
  border-color: #1a73e8;
}

.affiliate-badge {
  background: #1a73e8;
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
  padding: 6px 12px;
  border-radius: 8px;
  display: inline-block;
  width: fit-content;
}

.affiliate-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.affiliate-info strong {
  font-size: 0.95rem;
}

.affiliate-info span {
  font-size: 0.82rem;
  color: #777;
}

.affiliate-cta {
  color: #1a73e8 !important;
  font-weight: 600;
  font-size: 0.85rem !important;
  margin-top: 4px;
}

footer {
  text-align: center;
  font-size: 0.78rem;
  color: #aaa;
  padding-bottom: 16px;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 480px) {
  header h1 { font-size: 1.5rem; }
  .card { padding: 20px; }
  .result-value { font-size: 1.8rem; }
}
