/* ═══════════════════════════════════════════════════════════════════
   AURALIS · Home screen (Task N2)
   ───────────────────────────────────────────────────────────────────
   6 use case cards vertical stack + bottom row (Diary / All sounds).
   Same chat.php 1:1 tokens (glass + shine + neumorphism light / dark).
   ═══════════════════════════════════════════════════════════════════ */

.home-screen {
  padding: 12px 0 40px;
  animation: homeFadeIn 0.35s ease;
}

.home-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.005em;
  color: var(--text);
  margin: 12px 4px 16px;
  padding: 0 4px;
}

/* ═══ CATEGORY LIST ═══ */
.home-cat-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 28px;
}

/* Card wrapper — съдържа main button + info (i) button странично.
   Wrapper е <div>, защото <button> вътре в <button> не е валиден HTML. */
.home-cat-card-wrap {
  position: relative;
  border-radius: var(--radius-sm);
}

/* Recommended ring сега се прилага на wrapper-а (за да включи и info button) */
.home-cat-card-wrap.is-recommended .home-cat-card {
  box-shadow: var(--shadow-card), 0 0 0 2px hsl(var(--hue3) 70% 55% / 0.6);
}
[data-theme="dark"] .home-cat-card-wrap.is-recommended .home-cat-card {
  box-shadow: var(--shadow-card), 0 0 18px hsl(var(--hue3) 70% 55% / 0.5);
}

.home-cat-card {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 14px 16px 14px;
  /* Right pad с място за (i) бутон + arrow */
  padding-right: 64px;
  min-height: 88px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  color: var(--text);
  transition: transform var(--dur-fast) var(--ease);
}
.home-cat-card > * { position: relative; z-index: 5; }
.home-cat-card:active { transform: scale(0.99); }

/* (i) info button — top-right corner на wrapper */
.home-cat-info {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-icon);
  border: 1px solid hsl(var(--hue3) 60% 55% / 0.4);
  display: grid;
  place-items: center;
  color: hsl(var(--hue3) 65% 38%);
  cursor: pointer;
  font-family: inherit;
  z-index: 15;
  transition: transform var(--dur-fast) var(--ease), background var(--dur) var(--ease);
}
[data-theme="light"] .home-cat-info,
:root:not([data-theme]) .home-cat-info {
  background: hsl(var(--hue3) 55% 95%);
  box-shadow: 0 2px 6px hsl(var(--hue3) 50% 50% / 0.18);
}
[data-theme="dark"] .home-cat-info {
  background: hsl(var(--hue3) 30% 14% / 0.85);
  color: hsl(var(--hue3) 70% 75%);
  backdrop-filter: blur(4px);
}
.home-cat-info:hover {
  background: hsl(var(--hue3) 60% 50%);
  color: white;
}
.home-cat-info:active { transform: scale(0.96); }
.home-cat-info:focus { outline: none; }
.home-cat-info:focus-visible {
  outline: 2px solid hsl(var(--hue3) 70% 55%);
  outline-offset: 3px;
}
.home-cat-info svg { width: 20px; height: 20px; }

.home-cat-icon {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  color: var(--accent);
}
[data-theme="light"] .home-cat-icon,
:root:not([data-theme]) .home-cat-icon {
  background: hsl(var(--hue2) 55% 92%);
  color: hsl(var(--hue2) 60% 38%);
}
[data-theme="dark"] .home-cat-icon {
  background: hsl(var(--hue1) 40% 14% / 0.6);
  color: hsl(var(--hue3) 70% 70%);
}
.home-cat-icon svg { width: 26px; height: 26px; }

/* Uniform icon container: всички 6 икони (recommended или не) имат един
   и същ фон + color. Recommendation indication остава САМО на ниво card
   (ring + ★ badge горе вдясно). */

/* Force stroke width on all home cat icons за consistent визуална тежест.
   Override на 1.8 inline attribute (parent + всички SVG children). */
.home-cat-icon svg,
.home-cat-icon svg path,
.home-cat-icon svg line,
.home-cat-icon svg polyline,
.home-cat-icon svg circle,
.home-cat-icon svg polygon {
  stroke-width: 2.1;
}

.home-cat-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.home-cat-name {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.005em;
  line-height: 1.2;
}
.home-cat-subtitle {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  line-height: 1.3;
}
.home-cat-count {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 0.04em;
  margin-top: 2px;
}

/* Recommended badge — top-left corner на wrapper (sibling на card).
   Когато (i) бутонът е горе-вдясно, ★ балансира композицията. */
.home-cat-badge {
  position: absolute;
  top: 10px;
  left: 12px;
  z-index: 10;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-icon);
  background: linear-gradient(135deg, hsl(var(--hue3) 70% 55%), hsl(var(--hue1) 70% 65%));
  color: white;
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 2px 8px hsl(var(--hue3) 50% 45% / 0.35);
}

.home-cat-arrow {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  color: var(--text-faint);
}
.home-cat-arrow svg { width: 18px; height: 18px; }
.home-cat-card:hover .home-cat-arrow { color: var(--accent); }

/* ═══ BOTTOM ROW (Diary / All sounds) ═══ */
.home-bottom-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 8px;
}

.home-bottom-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 12px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-pill);
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  color: var(--text);
  font-family: inherit;
  transition: transform var(--dur-fast) var(--ease);
}
.home-bottom-icon {
  display: grid;
  place-items: center;
  color: var(--accent);
}
.home-bottom-icon svg { width: 18px; height: 18px; }
.home-bottom-text {
  white-space: nowrap;
}
[data-theme="light"] .home-bottom-btn,
:root:not([data-theme]) .home-bottom-btn {
  background: var(--surface);
  box-shadow: var(--shadow-card-sm);
  border: none;
}
[data-theme="dark"] .home-bottom-btn {
  background: hsl(220 25% 6% / 0.6);
  backdrop-filter: blur(8px);
}
.home-bottom-btn:active { transform: scale(0.98); }
.home-bottom-btn:hover { color: var(--accent); }

@keyframes homeFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .home-screen { animation: none; }
}
