/* =============================
   Kawaii Font Generator Styles
   Prefix: kfg-
   ============================= */


body {
  font-family: 'Nunito', system-ui, sans-serif;
  background: #fef6fb;

}

/* ---- Root wrapper ---- */
#kfg-root {
  width: 100%;
}

.kfg-wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 56px 24px 72px;
}

/* ---- Heading ---- */
.kfg-heading {
  text-align: center;
  margin-bottom: 8px;
}

.kfg-heading h1 {
  font-size: 2.6rem;
  font-weight: 800;
  color: #1a1a2e;
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.kfg-heading h1 .kfg-dot {
  color: #f7669a;
}

.kfg-subtitle {
  text-align: center;
  color: #6b7280;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 40px;
}

/* ---- Input card ---- */
.kfg-input-card {
  background: #ffffff;
  border: 2px solid #fce7f3;
  border-radius: 20px;
  padding: 32px;
  box-shadow: 0 4px 24px rgba(247, 102, 154, 0.08);
  margin-bottom: 32px;
}

.kfg-input-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: #9ca3af;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.kfg-input-row {
  display: flex;
  gap: 12px;
  align-items: stretch;
}

.kfg-text-input {
  flex: 1;
  border: 2px solid #fce7f3;
  border-radius: 12px;
  padding: 14px 18px;
  font-family: 'Nunito', system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: #1a1a2e;
  background: #fef6fb;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.kfg-text-input::placeholder {
  color: #d1d5db;
  font-weight: 600;
}

.kfg-text-input:focus {
  border-color: #f7669a;
  box-shadow: 0 0 0 4px rgba(247, 102, 154, 0.12);
  background: #ffffff;
}

.kfg-generate-btn {
  background: linear-gradient(135deg, #f7669a 0%, #fb923c 100%);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  padding: 14px 28px;
  font-family: 'Nunito', system-ui, sans-serif;
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s, box-shadow 0.15s, filter 0.15s;
  box-shadow: 0 4px 14px rgba(247, 102, 154, 0.35);
  letter-spacing: 0.02em;
}

.kfg-generate-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(247, 102, 154, 0.45);
  filter: brightness(1.05);
}

.kfg-generate-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(247, 102, 154, 0.3);
}

/* ---- Style pills ---- */
.kfg-styles-section {
  margin-top: 24px;
}

.kfg-styles-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: #9ca3af;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.kfg-style-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.kfg-pill {
  background: #fef6fb;
  border: 2px solid #fce7f3;
  color: #6b7280;
  border-radius: 40px;
  padding: 6px 18px;
  font-family: 'Nunito', system-ui, sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, color 0.18s, transform 0.12s;
  user-select: none;
}

.kfg-pill:hover {
  background: #fce7f3;
  border-color: #f7669a;
  color: #f7669a;
  transform: translateY(-1px);
}

.kfg-pill.kfg-pill--active {
  background: linear-gradient(135deg, #f7669a 0%, #fb923c 100%);
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(247, 102, 154, 0.3);
}

/* ---- Results grid ---- */
.kfg-results {
  display: grid;
  gap: 16px;
}

.kfg-results--hidden {
  display: none;
}

.kfg-result-card {
  background: #ffffff;
  border: 2px solid #fce7f3;
  border-radius: 16px;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: 0 2px 12px rgba(247, 102, 154, 0.06);
  transition: border-color 0.18s, box-shadow 0.18s, transform 0.15s;
  animation: kfg-slide-in 0.22s ease both;
}

.kfg-result-card:hover {
  border-color: #f9a8d4;
  box-shadow: 0 6px 20px rgba(247, 102, 154, 0.13);
  transform: translateY(-2px);
}

@keyframes kfg-slide-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.kfg-result-left {
  flex: 1;
  min-width: 0;
}

.kfg-result-style-name {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #9ca3af;
  margin-bottom: 6px;
}

.kfg-result-text {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1a1a2e;
  word-break: break-all;
  line-height: 1.4;
  cursor: text;
  user-select: all;
  transition: color 0.15s;
}

.kfg-result-text:hover {
  color: #f7669a;
}

.kfg-copy-btn {
  flex-shrink: 0;
  background: #fef6fb;
  border: 2px solid #fce7f3;
  border-radius: 10px;
  padding: 8px 18px;
  font-family: 'Nunito', system-ui, sans-serif;
  font-size: 0.82rem;
  font-weight: 800;
  color: #f7669a;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, color 0.18s, transform 0.12s;
  letter-spacing: 0.02em;
}

.kfg-copy-btn:hover {
  background: #fce7f3;
  border-color: #f7669a;
  transform: translateY(-1px);
}

.kfg-copy-btn.kfg-copy-btn--copied {
  background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.3);
}

/* ---- Empty state ---- */
.kfg-empty {
  text-align: center;
  padding: 48px 24px;
  color: #d1d5db;
}

.kfg-empty-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 12px;
  animation: kfg-bounce 2s infinite;
}

@keyframes kfg-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.kfg-empty-text {
  font-size: 0.95rem;
  font-weight: 700;
  color: #9ca3af;
}

/* ---- Size slider ---- */
.kfg-controls-row {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 2px solid #fce7f3;
}

.kfg-slider-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.kfg-slider-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.kfg-slider-icon {
  font-family: 'Nunito', system-ui, sans-serif;
  font-weight: 800;
  color: #d1d5db;
  font-size: 0.8rem;
  line-height: 1;
  width: 14px;
  text-align: center;
  flex-shrink: 0;
}

.kfg-slider-icon--lg {
  font-size: 1.2rem;
  width: 20px;
  color: #9ca3af;
}

.kfg-size-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 5px;
  border-radius: 999px;
  background: #fce7f3;
  outline: none;
  cursor: pointer;
  transition: background 0.2s;
}

.kfg-size-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f7669a 0%, #fb923c 100%);
  box-shadow: 0 2px 8px rgba(247, 102, 154, 0.35);
  cursor: pointer;
  transition: transform 0.15s;
}

.kfg-size-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.kfg-size-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, #f7669a 0%, #fb923c 100%);
  box-shadow: 0 2px 8px rgba(247, 102, 154, 0.35);
  cursor: pointer;
}

.kfg-size-slider:focus-visible {
  outline: 3px solid rgba(247, 102, 154, 0.4);
  outline-offset: 3px;
  border-radius: 999px;
}

.kfg-slider-value {
  font-size: 0.78rem;
  font-weight: 700;
  color: #9ca3af;
  width: 36px;
  text-align: right;
  flex-shrink: 0;
}

/* ---- Shake animation for last pill protection ---- */
@keyframes kfg-shake {
  0%   { transform: translateX(0); }
  18%  { transform: translateX(-5px); }
  36%  { transform: translateX(5px); }
  54%  { transform: translateX(-4px); }
  72%  { transform: translateX(4px); }
  86%  { transform: translateX(-2px); }
  100% { transform: translateX(0); }
}

.kfg-pill--shake {
  animation: kfg-shake 0.38s ease both !important;
  border-color: #fb923c !important;
  box-shadow: 0 0 0 3px rgba(251, 146, 60, 0.25) !important;
}

/* ---- Decorative accents ---- */
.kfg-accent-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 32px;
}

.kfg-accent-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.kfg-accent-dot:nth-child(1) { background: #f7669a; }
.kfg-accent-dot:nth-child(2) { background: #fb923c; width: 10px; height: 10px; }
.kfg-accent-dot:nth-child(3) { background: #f7669a; }

/* ---- Description section ---- */
.kfg-desc {
  margin-top: 56px;
}

.kfg-desc-divider {
  height: 2px;
  background: linear-gradient(90deg, transparent, #fce7f3 20%, #fce7f3 80%, transparent);
  margin-bottom: 48px;
  border-radius: 999px;
}

.kfg-desc-lead {
  font-size: 1.05rem;
  font-weight: 600;
  color: #374151;
  line-height: 1.7;
  margin-bottom: 32px;
  max-width: 700px;
}

.kfg-desc-lead strong {
  color: #1a1a2e;
  font-weight: 800;
}

.kfg-desc-h2 {
  font-size: 1rem;
  font-weight: 800;
  color: #1a1a2e;
  letter-spacing: -0.2px;
  margin-bottom: 12px;
  margin-top: 32px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.kfg-desc-h2::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 16px;
  border-radius: 999px;
  background: linear-gradient(180deg, #f7669a 0%, #fb923c 100%);
  flex-shrink: 0;
}
.kfg-desc-h3 {
  font-size: 0.8rem;
  font-weight: 800;
  color: #1a1a2e;
  letter-spacing: -0.2px;
  margin-bottom: 12px;
  margin-top: 32px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.kfg-desc-h3::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 16px;
  border-radius: 999px;
  background: linear-gradient(180deg, #f7669a 0%, #fb923c 100%);
  flex-shrink: 0;
}

.kfg-desc-p {
  font-size: 0.95rem;
  font-weight: 600;
  color: #6b7280;
  line-height: 1.75;
  margin-bottom: 20px;
  max-width: 700px;
}

.kfg-desc-link {
  color: #f7669a;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 2px solid #fce7f3;
  transition: border-color 0.18s, color 0.18s;
}

.kfg-desc-link:hover {
  color: #e0457f;
  border-bottom-color: #f7669a;
}

.kfg-desc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 700px;
}

.kfg-desc-list li {
  font-size: 0.95rem;
  font-weight: 600;
  color: #6b7280;
  line-height: 1.6;
  padding-left: 20px;
  position: relative;
}

.kfg-desc-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f7669a 0%, #fb923c 100%);
  flex-shrink: 0;
}

.kfg-desc-list li strong {
  color: #374151;
  font-weight: 800;
}

.kfg-desc-table-wrap {
  overflow-x: auto;
  margin-top: 4px;
  border-radius: 14px;
  border: 2px solid #fce7f3;
  box-shadow: 0 2px 12px rgba(247, 102, 154, 0.06);
}

.kfg-desc-table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'Nunito', system-ui, sans-serif;
  font-size: 0.9rem;
}

.kfg-desc-table thead tr {
  background: #fef6fb;
  border-bottom: 2px solid #fce7f3;
}

.kfg-desc-table th {
  padding: 12px 18px;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 800;
  color: #9ca3af;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.kfg-desc-table td {
  padding: 12px 18px;
  font-weight: 600;
  color: #374151;
  vertical-align: middle;
  border-bottom: 1px solid #fce7f3;
  line-height: 1.5;
}

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

.kfg-desc-table tbody tr:hover td {
  background: #fef6fb;
}

.kfg-desc-table td:first-child {
  font-weight: 800;
  color: #1a1a2e;
  white-space: nowrap;
}

.kfg-desc-table td:nth-child(2) {
  font-size: 1rem;
  color: #f7669a;
  letter-spacing: 0.04em;
}

/* ---- Responsive ---- */
@media (max-width: 600px) {
  .kfg-wrap {
    padding: 40px 16px 56px;
  }

  .kfg-heading h1 {
    font-size: 1.9rem;
  }

  .kfg-input-card {
    padding: 20px 16px;
  }

  .kfg-input-row {
    flex-direction: column;
  }

  .kfg-generate-btn {
    width: 100%;
    text-align: center;
  }

  .kfg-result-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .kfg-copy-btn {
    align-self: flex-end;
  }
}
