/* ============================================================
   CSS Variables
   ============================================================ */
:root {
  --brand-start:    #FB0E76;
  --brand-end:      #910694;
  --brand-gradient: linear-gradient(219deg, var(--brand-start) 0%, var(--brand-end) 100%);

  --bg-page:   #f4f6fb;
  --bg-card:   #ffffff;
  --border:    #e5e7eb;
  --text-dark: #111827;
  --text-mid:  #374151;
  --text-muted:#6b7280;

  --radius-card:  18px;
  --radius-inner: 16px;
  --radius-btn:   12px;

  --shadow-card: 0 10px 30px rgba(0,0,0,.06);
  --shadow-style: 0 4px 16px rgba(0,0,0,.07);
  --shadow-hover: 0 12px 32px rgba(0,0,0,.13);
  --shadow-btn:   0 6px 20px rgba(251,14,118,.35);

  --gap: 16px;
  --tr:  0.25s ease;
}




/* Screen-reader only helper */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ============================================================
   Container
   ============================================================ */
.container {
  max-width: 980px;
  margin: 0 auto;
}

/* ============================================================
   Header
   ============================================================ */
.tool-header {
    text-align: center;
    margin-bottom: 28px;
    background: linear-gradient(219deg, #FB0E76 0%, #910694 100%);
    border-radius: 12px;
    padding: 20px !important;
}

.tool-title {
     margin: 0 0 8px;
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.15;
    color: #ffffff !important;
}

.tool-description {
    margin: 0 auto;
    max-width: 620px;
    color: whitesmoke;
    font-size: 15px;
}

/* ============================================================
   Card shell
   ============================================================ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 30px;
  box-shadow: var(--shadow-card);
  margin-bottom: 25px;
}

/* ============================================================
   Textarea
   ============================================================ */
.text-area {
  width: 100%;
  min-height: 160px;
  padding: 16px;
  border: 1.5px solid #ff5f9e99 !important;
  border-radius: 12px !important;
  font-family: inherit;
  font-size: 1rem;
  color: var(--text-dark);
  background: #fafafa;
  resize: vertical;
  outline: none;
  transition: border-color var(--tr), box-shadow var(--tr), background var(--tr);
  line-height: 1.6;
}

.text-area:focus {
  border-color: var(--brand-start);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(251,14,118,.12);
}

.text-area::placeholder { color: var(--text-muted); }

/* ============================================================
   Input meta row (counters + buttons)
   ============================================================ */
.input-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}

.counters {
  font-size: 0.83rem;
  color: var(--text-muted);
  font-weight: 500;
}

.input-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ============================================================
   Results toolbar (search / count / copy-all)
   ============================================================ */
.results-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.search-wrap {
  flex: 1 1 200px;
}

.search-input {
  width: 100%;
  height: 46px;
  padding: 0 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-inner);
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text-dark);
  background: #fff;
  outline: none;
  transition: border-color var(--tr), box-shadow var(--tr);
}

.search-input:focus {
  border-color: var(--brand-start);
  box-shadow: 0 0 0 3px rgba(251,14,118,.12);
}

.search-input::placeholder { color: var(--text-muted); }

.style-count {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

/* ============================================================
   Buttons — shared base
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  border: none;
  border-radius: 12px !important;
  font-family: inherit;
  font-weight: 600;
  background: var(--brand-gradient);
  color: #ffffff;
  transition: transform var(--tr), box-shadow var(--tr), opacity var(--tr);
  user-select: none;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

/* Small variant */
.btn-sm {
  height: 40px;
  padding: 0 18px;
  font-size: 0.85rem;
}

.btn:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: var(--shadow-btn);
}

.btn:active {
  transform: scale(0.97);
  box-shadow: none;
}

/* Ripple overlay on click */
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,.18);
  opacity: 0;
  transition: opacity 0.18s;
}
.btn:active::after { opacity: 1; }

/* Green "copied" state */
.btn.copied {
  background: linear-gradient(219deg, #16a34a 0%, #15803d 100%);
}

/* ============================================================
   Empty State
   ============================================================ */
.empty-state {
  text-align: center;
  padding: 60px 20px;
}

.empty-icon {
  font-size: 3.5rem;
  margin-bottom: 12px;
  line-height: 1;
}

.empty-text {
  color: var(--text-muted);
  font-size: 1rem;
  font-weight: 500;
}

/* ============================================================
   Styles Grid
   ============================================================ */
.styles-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--gap);
}

/* ============================================================
   Style Card
   ============================================================ */
.style-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow-style);
  transition: transform var(--tr), box-shadow var(--tr);
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: cardIn 0.35s ease both;
}

.style-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

/* Stagger card entrance animation */
.style-card:nth-child(1)  { animation-delay: 0.02s; }
.style-card:nth-child(2)  { animation-delay: 0.04s; }
.style-card:nth-child(3)  { animation-delay: 0.06s; }
.style-card:nth-child(4)  { animation-delay: 0.08s; }
.style-card:nth-child(5)  { animation-delay: 0.10s; }
.style-card:nth-child(6)  { animation-delay: 0.12s; }
.style-card:nth-child(7)  { animation-delay: 0.14s; }
.style-card:nth-child(8)  { animation-delay: 0.16s; }
.style-card:nth-child(9)  { animation-delay: 0.18s; }
.style-card:nth-child(10) { animation-delay: 0.20s; }
.style-card:nth-child(n+11) { animation-delay: 0.22s; }

.card-name {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.card-output {
  font-size: 1.1rem;
  line-height: 2.2;          /* extra room for stacked diacritics */
  color: var(--text-dark);
  word-break: break-all;
  min-height: 2.5em;
  flex: 1;
}

.card-footer {
  display: flex;
  justify-content: flex-end;
}

/* Copy button inside card */
.copy-style-btn {
  height: 36px;
  padding: 0 16px;
  font-size: 0.82rem;
  border-radius: 10px;
}

/* ============================================================
   Toast
   ============================================================ */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--text-dark);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 10px 26px;
  border-radius: 50px;
  box-shadow: 0 8px 24px rgba(0,0,0,.2);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 9999;
  white-space: nowrap;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ============================================================
   Keyframes
   ============================================================ */
@keyframes cardIn {
  from { opacity: 0; transform: translateY(14px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0)    scale(1);    }
}

/* ============================================================
   Responsive — Tablet (≤ 700px): single column grid
   ============================================================ */
@media (max-width: 700px) {
  body { padding: 20px 12px 56px; }

  .card { padding: 22px 18px; }

  .styles-grid { grid-template-columns: 1fr; }

  .results-toolbar { flex-direction: column; align-items: stretch; }

  .search-wrap { flex: 1 1 auto; }

  .style-count { text-align: center; }

  #copy-all-btn { width: 100%; }
}

/* ============================================================
   Responsive — Mobile (≤ 480px): stack input actions
   ============================================================ */
@media (max-width: 480px) {
  .input-meta    { flex-direction: column; align-items: flex-start; }
  .input-actions { width: 100%; }
  .input-actions .btn { flex: 1; 
	font-size: 10px;}
}
