.ytka-widget,
.ytka-widget * {
  box-sizing: border-box;
}

.ytka-widget {
  --ytka-bg: #ffffff;
  --ytka-text: #101828;
  --ytka-muted: #667085;
  --ytka-border: rgba(16, 24, 40, 0.12);
  --ytka-primary: #ff0033;
  --ytka-primary-dark: #c90029;
  --ytka-soft: #fff1f3;
  --ytka-chip: #f2f4f7;
  --ytka-shadow: 0 24px 80px rgba(16, 24, 40, 0.16);
  position: relative;
  isolation: isolate;
  width: min(100%, 860px);
  margin: 36px auto;
  padding: clamp(22px, 4vw, 38px);
  border: 1px solid var(--ytka-border);
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(255,255,255,0.98), rgba(248,250,252,0.96));
  color: var(--ytka-text);
  box-shadow: var(--ytka-shadow);
  overflow: hidden;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.ytka-bg-orb {
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 999px;
  filter: blur(12px);
  opacity: 0.24;
  z-index: -1;
  pointer-events: none;
}

.ytka-orb-one {
  top: -92px;
  right: -70px;
  background: radial-gradient(circle, #ff0033, transparent 72%);
}

.ytka-orb-two {
  bottom: -110px;
  left: -80px;
  background: radial-gradient(circle, #2563eb, transparent 70%);
}

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

.ytka-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 0, 51, 0.18);
  border-radius: 999px;
  background: var(--ytka-soft);
  color: var(--ytka-primary-dark);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.ytka-header h2 {
  margin: 0;
  color: var(--ytka-text);
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.05;
  letter-spacing: -0.04em;
  font-weight: 900;
}

.ytka-header p {
  max-width: 580px;
  margin: 12px auto 0;
  color: var(--ytka-muted);
  font-size: 16px;
  line-height: 1.6;
}

.ytka-form {
  display: grid;
  gap: 16px;
}

.ytka-hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
}

.ytka-label,
.ytka-control label {
  display: block;
  margin-bottom: 8px;
  color: #344054;
  font-size: 14px;
  font-weight: 800;
}

.ytka-title-input,
.ytka-select,
.ytka-number {
  width: 100%;
  border: 1px solid var(--ytka-border);
  border-radius: 18px;
  background: rgba(255,255,255,0.88);
  color: var(--ytka-text);
  font-size: 16px;
  outline: none;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.ytka-title-input {
  min-height: 110px;
  resize: vertical;
  padding: 16px 18px;
  line-height: 1.55;
}

.ytka-select,
.ytka-number {
  min-height: 52px;
  padding: 0 14px;
}

.ytka-title-input:focus,
.ytka-select:focus,
.ytka-number:focus {
  border-color: rgba(255, 0, 51, 0.55);
  box-shadow: 0 0 0 4px rgba(255, 0, 51, 0.10);
}

.ytka-controls {
  display: grid;
  grid-template-columns: 1fr 170px;
  gap: 14px;
}

.ytka-button {
  position: relative;
  display: inline-flex;
  min-height: 58px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  border: 0;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--ytka-primary), var(--ytka-primary-dark));
  color: #ffffff;
  cursor: pointer;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: -0.01em;
  box-shadow: 0 18px 35px rgba(255, 0, 51, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.ytka-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 42px rgba(255, 0, 51, 0.34);
}

.ytka-button:disabled {
  cursor: not-allowed;
  opacity: 0.74;
  transform: none;
}

.ytka-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: #ffffff;
  border-radius: 999px;
  animation: ytka-spin 0.8s linear infinite;
}

.ytka-widget.is-loading .ytka-spinner {
  display: inline-block;
}

@keyframes ytka-spin {
  to { transform: rotate(360deg); }
}

.ytka-alert {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(185, 28, 28, 0.16);
  background: #fef2f2;
  color: #991b1b;
  font-size: 14px;
  line-height: 1.5;
}

.ytka-alert.is-success {
  border-color: rgba(22, 163, 74, 0.18);
  background: #f0fdf4;
  color: #166534;
}

.ytka-results {
  margin-top: 24px;
  padding: clamp(16px, 3vw, 24px);
  border: 1px solid var(--ytka-border);
  border-radius: 24px;
  background: rgba(255,255,255,0.72);
}

.ytka-result-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.ytka-result-head h3 {
  margin: 0;
  color: var(--ytka-text);
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.ytka-result-meta {
  margin: 5px 0 0;
  color: var(--ytka-muted);
  font-size: 13px;
}

.ytka-copy-all {
  flex: 0 0 auto;
  border: 1px solid rgba(255, 0, 51, 0.18);
  border-radius: 999px;
  background: var(--ytka-soft);
  color: var(--ytka-primary-dark);
  cursor: pointer;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 900;
}

.ytka-section {
  margin-top: 18px;
}

.ytka-section[hidden] {
  display: none !important;
}

.ytka-section-title {
  margin-bottom: 10px;
  color: #344054;
  font-size: 14px;
  font-weight: 900;
}

.ytka-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.ytka-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 9px 12px;
  border: 1px solid rgba(16, 24, 40, 0.08);
  border-radius: 999px;
  background: var(--ytka-chip);
  color: #1d2939;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.2;
  word-break: break-word;
}

.ytka-title-ideas {
  display: grid;
  gap: 10px;
}

.ytka-title-card {
  padding: 13px 14px;
  border: 1px solid rgba(16, 24, 40, 0.08);
  border-radius: 16px;
  background: #ffffff;
  color: #1d2939;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
}

@media (max-width: 680px) {
  .ytka-widget {
    margin: 22px auto;
    border-radius: 22px;
  }

  .ytka-controls {
    grid-template-columns: 1fr;
  }

  .ytka-result-head {
    flex-direction: column;
  }

  .ytka-copy-all {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 420px) {
  .ytka-widget {
    padding: 18px;
  }

  .ytka-header h2 {
    font-size: 26px;
  }

  .ytka-title-input {
    min-height: 100px;
  }
}
