/* ─── Home page specific styles ─── */

/* ─── Tracker hero ─── */
.tracker-hero { text-align: center; margin: 0 0 20px; }
.tracker-hero-tag { font-size: 11px; font-weight: 700; color: var(--pink); text-transform: uppercase; letter-spacing: .6px; margin: 0 0 8px; }
.tracker-hero-title { font-size: 20px; font-weight: 800; color: var(--text); margin: 0; line-height: 1.3; letter-spacing: -0.3px; }

/* ─── Ввод даты ─── */
.input-section {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 24px;
  margin-bottom: 28px;
  border: 1px solid rgba(200,100,150,0.06);
  transition: box-shadow var(--transition), transform var(--transition);
}
.input-section:hover {
  box-shadow: var(--shadow-lg);
}

.input-section label {
  display: block;
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 12px;
  color: var(--text);
  letter-spacing: -0.1px;
}

.input-row {
  display: flex;
  gap: 10px;
}

/* ─── Обёртка для ввода даты (текст + кнопка-календарь) ─── */
.date-input-wrap {
  position: relative;
  flex: 1;
  display: flex;
}

.date-input-wrap input[type="text"] {
  flex: 1;
  width: 100%;
  padding: 12px 44px 12px 16px;
  border: 2px solid rgba(200,100,150,0.2);
  border-radius: 14px;
  font-size: 16px;
  color: var(--text);
  background: var(--pink-light);
  outline: none;
  transition: all var(--transition);
  font-family: inherit;
}

.date-input-wrap input[type="text"]:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 4px rgba(192,132,252,0.12);
}

.cal-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.6;
  padding: 4px 6px;
  border-radius: 6px;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  user-select: none;
  overflow: hidden;
}

.cal-btn:hover {
  opacity: 1;
  background: rgba(200, 100, 150, 0.12);
}

.cal-inside {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  border: none;
  padding: 0;
  font-size: 16px;
}

input[type="date"] {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid rgba(200,100,150,0.2);
  border-radius: 14px;
  font-size: 16px;
  color: var(--text);
  background: var(--pink-light);
  outline: none;
  transition: all var(--transition);
}

input[type="date"]:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 4px rgba(192,132,252,0.12);
}
/* ─── Результат ─── */
.result { display: flex; flex-direction: column; gap: 20px; }

/* Шапка с неделей */
.week-header {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  border: 1px solid rgba(200,100,150,0.06);
  transition: all var(--transition);
}
.week-header:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.week-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #ec4899, #a855f7);
  color: white;
  border-radius: 50%;
  width: 84px;
  height: 84px;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(168,85,247,0.3);
}

.week-badge span {
  font-size: 36px;
  font-weight: 800;
  line-height: 1;
}

.week-badge small {
  font-size: 11px;
  font-weight: 600;
  opacity: 0.9;
  letter-spacing: 0.3px;
}

.week-meta { display: flex; flex-direction: column; gap: 6px; }

.week-meta p:first-child {
  font-size: 18px;
  font-weight: 700;
  color: var(--purple);
  letter-spacing: -0.3px;
}

.week-meta p:last-child {
  font-size: 14px;
  color: var(--muted);
}

/* Карточка с фруктом */
.fruit-card {
  background: linear-gradient(135deg, #fdf2f8 0%, #faf5ff 50%, #ede9fe 100%);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
  border: 1px solid rgba(200,100,150,0.08);
  transition: all var(--transition);
}
[data-theme="dark"] .fruit-card {
  background: linear-gradient(135deg, #2d1b3d 0%, #1e0d30 50%, #1a0b2e 100%);
}
.fruit-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.fruit-emoji {
  font-size: 88px;
  line-height: 1;
  filter: drop-shadow(0 6px 16px rgba(200,100,150,0.25));
  flex-shrink: 0;
  animation: float 3s ease-in-out infinite;
}
.fruit-emoji img {
  width: 88px;
  height: 88px;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

.fruit-details h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text);
  letter-spacing: -0.3px;
}

.fruit-details h2 span { color: #ec4899; }

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

.pill {
  background: white;
  border-radius: 24px;
  padding: 6px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  box-shadow: 0 2px 8px rgba(200,100,150,0.12);
  border: 1px solid rgba(200,100,150,0.08);
}
[data-theme="dark"] .pill {
  background: var(--card-bg);
}

/* Прогресс */
.progress-wrap {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 24px;
  border: 1px solid rgba(200,100,150,0.06);
  transition: all var(--transition);
}
.progress-wrap:hover {
  box-shadow: var(--shadow-lg);
}

.progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 10px;
}

.progress-labels span:nth-child(2) { color: var(--purple); font-size: 15px; font-weight: 700; }

.progress-bar {
  height: 12px;
  background: var(--pink-light);
  border-radius: 10px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #ec4899, #a855f7, #7c3aed);
  background-size: 200% 100%;
  border-radius: 10px;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  animation: shimmer 2s ease-in-out infinite;
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.progress-weeks {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
}

/* Карточки */
.cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 20px;
  border: 1px solid rgba(200,100,150,0.06);
  transition: all var(--transition);
}
.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

.card-icon { font-size: 28px; margin-bottom: 10px; }
.card h3   { font-size: 16px; font-weight: 700; margin-bottom: 8px; color: var(--text); letter-spacing: -0.2px; }
.card p    { font-size: 15px; color: var(--muted); line-height: 1.65; }

/* Навигация по неделям */
.week-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 20px;
  gap: 10px;
  border: 1px solid rgba(200,100,150,0.06);
}

.week-nav button {
  padding: 10px 18px;
  font-size: 14px;
  background: var(--purple-light);
  color: var(--purple);
  border-radius: 12px;
  font-weight: 600;
  border: 1px solid transparent;
}

.week-nav button:hover {
  background: var(--pink-light);
  color: #ec4899;
  box-shadow: none;
  transform: translateY(-1px);
}
.week-nav button:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

#navWeekLabel {
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
  text-align: center;
}

/* ─── Счётчик шевелений ─── */
.kick-counter {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  border: 1px solid rgba(200,100,150,0.06);
  transition: all var(--transition);
}
.kick-counter:hover {
  box-shadow: var(--shadow-lg);
}

.kick-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.kick-header h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.2px;
}

.kick-subtitle {
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
}

.kick-reset-btn {
  padding: 8px 16px;
  font-size: 13px;
  background: var(--pink-light);
  color: #ec4899;
  border-radius: 12px;
  flex-shrink: 0;
  font-weight: 600;
  border: 1px solid rgba(200,100,150,0.1);
}

.kick-reset-btn:hover {
  background: #fce7f3;
  box-shadow: none;
  transform: translateY(-1px);
}

.kick-main {
  display: flex;
  align-items: center;
  gap: 20px;
}

/* Большая кнопка тапа */
.kick-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ec4899, #a855f7);
  color: white;
  flex-shrink: 0;
  box-shadow: 0 8px 28px rgba(168,85,247,0.35);
  transition: all 0.15s ease;
  position: relative;
  overflow: hidden;
}

.kick-btn:hover {
  box-shadow: 0 10px 36px rgba(168,85,247,0.45);
  transform: translateY(-2px);
}

.kick-btn:active {
  transform: scale(0.92);
  box-shadow: 0 4px 14px rgba(168,85,247,0.35);
}

.kick-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: white;
  opacity: 0;
  transition: opacity 0.3s;
}

.kick-btn.tapped::after { opacity: 0.25; }

.kick-count {
  font-size: 40px;
  font-weight: 800;
  line-height: 1;
}

.kick-label {
  font-size: 12px;
  font-weight: 600;
  opacity: 0.9;
}

.kick-tap {
  font-size: 11px;
  opacity: 0.7;
  margin-top: 2px;
}

/* Правая часть */
.kick-stats {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.kick-goal-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.kick-goal-bar {
  flex: 1;
  height: 10px;
  background: var(--pink-light);
  border-radius: 8px;
  overflow: hidden;
}

.kick-goal-fill {
  height: 100%;
  background: linear-gradient(90deg, #ec4899, #a855f7);
  border-radius: 8px;
  transition: width 0.4s ease;
}

#kickGoalText {
  font-size: 13px;
  font-weight: 700;
  color: var(--purple);
  white-space: nowrap;
}

.kick-last {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}

/* Лог шевелений */
.kick-log {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.kick-log-item {
  background: var(--purple-light);
  color: var(--purple);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  animation: popIn 0.2s ease;
}

@keyframes popIn {
  from { transform: scale(0.6); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

.kick-achieved {
  background: linear-gradient(135deg, #bbf7d0, #86efac);
  color: #166534;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  padding: 12px 16px;
  border-radius: 14px;
  animation: popIn 0.3s ease;
}

/* ─── Блок автора (E-E-A-T) ─── */
.wk-author {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 24px;
  margin-bottom: 18px;
  border: 1px solid rgba(200,100,150,0.06);
  transition: all var(--transition);
}
.wk-author:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.wk-author-avatar {
  font-size: 40px;
  line-height: 1;
  flex-shrink: 0;
}
.wk-author strong {
  font-size: 15px;
  color: var(--text);
  display: block;
  margin-bottom: 4px;
  letter-spacing: -0.1px;
}
.wk-author p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
}
.wk-date {
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
}

/* ─── Блок источников ─── */
.wk-sources {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 24px;
  margin-bottom: 18px;
  border: 1px solid rgba(200,100,150,0.06);
  transition: all var(--transition);
}
.wk-sources:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.wk-sources h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
  letter-spacing: -0.2px;
}
.wk-sources ul {
  padding-left: 20px;
  margin: 0;
}
.wk-sources li {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 4px;
}

/* ─── Блок "Когда обращаться к врачу" ─── */
.wk-warning {
  background: #fff5f5;
  border-left: 4px solid #e53e3e;
  border-radius: 0 var(--radius) var(--radius) 0;
  box-shadow: var(--shadow);
  padding: 22px 24px;
  margin-bottom: 18px;
  transition: all var(--transition);
}
.wk-warning:hover {
  box-shadow: var(--shadow-lg);
}
[data-theme="dark"] .wk-warning {
  background: #2d1b1b;
  border-left-color: #fc8181;
}
.wk-warning h2 {
  font-size: 16px;
  font-weight: 700;
  color: #c53030;
  margin-bottom: 10px;
  letter-spacing: -0.2px;
}
[data-theme="dark"] .wk-warning h2 { color: #fc8181; }
.wk-warning ul {
  padding-left: 20px;
  margin: 0;
}
.wk-warning li {
  font-size: 15px;
  color: var(--text);
  line-height: 1.65;
  margin-bottom: 6px;
}

/* ─── Блок "Читайте также" ─── */
.wk-related {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 24px;
  margin-bottom: 18px;
  border: 1px solid rgba(200,100,150,0.06);
  transition: all var(--transition);
}
.wk-related:hover {
  box-shadow: var(--shadow-lg);
}
.wk-related h2 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 14px;
  letter-spacing: -0.2px;
}
.wk-related-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.wk-related-links a {
  display: inline-block;
  padding: 10px 18px;
  min-height: 44px;
  line-height: 24px;
  background: var(--purple-light);
  color: var(--purple);
  border-radius: 14px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition);
  border: 1px solid transparent;
}
.wk-related-links a:hover {
  background: var(--pink-light);
  color: #ec4899;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(200,100,150,0.15);
}

/* ─── История шевелений ─── */
.kick-history {
  border-top: 1px solid rgba(200,100,150,0.1);
  padding-top: 14px;
}

.kick-history-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 8px;
}

.kick-history svg { display: block; }

/* ─── Кнопка "Поделиться" ─── */
.share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 20px;
  background: var(--card-bg);
  color: var(--purple);
  border: 2px solid rgba(192,132,252,0.2);
  border-radius: 16px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: var(--shadow);
}
.share-btn:hover {
  background: var(--purple-light);
  border-color: var(--purple);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* ─── Стаття тижня ─── */
.week-article {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  border: 1px solid rgba(200,100,150,0.06);
  transition: all var(--transition);
}
.week-article:hover {
  box-shadow: var(--shadow-lg);
}

.article-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 20px;
  background: transparent;
  border: none;
  font-size: 15px;
  font-weight: 600;
  color: var(--purple);
  cursor: pointer;
  text-align: left;
  transition: background var(--transition);
  min-width: unset;
  box-shadow: none;
  min-height: auto;
}

.article-toggle:hover { background: var(--pink-light); transform: none; }

.article-arrow {
  margin-left: auto;
  font-size: 12px;
  transition: transform 0.3s ease;
}

.article-arrow.open { transform: rotate(180deg); }

.article-body {
  padding: 0 20px 18px;
  border-top: 1px solid rgba(200,100,150,0.08);
}

.article-body p {
  margin: 16px 0 0;
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
}

/* ─── Онбординг ─── */
.onboard-overlay {
  position: fixed;
  inset: 0;
  background: rgba(14,1,24,0.6);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.onboard-overlay.visible {
  opacity: 1;
  pointer-events: all;
}

.onboard-card {
  background: var(--card-bg);
  border-radius: 28px;
  box-shadow: 0 24px 80px rgba(168,85,247,0.2), 0 4px 20px rgba(0,0,0,0.1);
  padding: 40px 32px;
  max-width: 400px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
  animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(200,100,150,0.08);
}

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

.onboard-emoji { font-size: 64px; }

.onboard-card h2 {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.5px;
}

.onboard-card p {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.65;
}

.onboard-card .form-group {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}

.onboard-card .form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.onboard-card input[type="date"] {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid rgba(200,100,150,0.2);
  border-radius: 14px;
  font-size: 16px;
  color: var(--text);
  background: var(--pink-light);
  outline: none;
  transition: all var(--transition);
}

.onboard-card input[type="date"]:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 4px rgba(192,132,252,0.12);
}

.btn-onboard {
  width: 100%;
  padding: 15px;
  background: linear-gradient(135deg, #ec4899, #a855f7);
  color: white;
  border: none;
  border-radius: 16px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: 0 4px 16px rgba(168,85,247,0.25);
}
.btn-onboard:hover {
  opacity: 0.92;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(168,85,247,0.35);
}

.btn-skip {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
  padding: 6px;
  min-height: auto;
  font-weight: 500;
}
.btn-skip:hover {
  color: var(--text);
  transform: none;
  box-shadow: none;
}


/* ─── Home responsive ─── */
@media (min-width: 481px) and (max-width: 768px) {
  .cards-grid      { gap: 20px; }
  .fruit-card      { padding: 28px 24px; }
  .kick-counter    { padding: 28px 24px; }
  .week-nav        { gap: 12px; }
}

@media (max-width: 480px) {
  .input-section   { padding: 20px 16px; }
  .input-row       { flex-direction: column; }
  .result          { gap: 16px; }
  .week-header     { flex-direction: column; text-align: center; padding: 20px 16px; gap: 12px; }
  .week-badge      { width: 72px; height: 72px; }
  .week-badge span { font-size: 30px; }
  .week-meta       { align-items: center; }
  .progress-wrap   { padding: 18px 16px; }
  .card            { padding: 18px 16px; }
  .fruit-card      { flex-direction: column; text-align: center; padding: 24px 16px; gap: 14px; }
  .fruit-emoji     { font-size: 72px; }
  .fruit-emoji img { width: 72px; height: 72px; }
  .size-pills      { justify-content: center; }
  .fruit-details h2 { font-size: 17px; }
  .cards-grid      { grid-template-columns: 1fr; }
  .kick-btn        { width: 100px; height: 100px; }
  .kick-count      { font-size: 34px; }
  .kick-main       { gap: 14px; }
  .kick-counter    { padding: 20px 16px; }
  .week-nav        { padding: 14px 12px; gap: 6px; }
  .week-nav button { padding: 9px 14px; font-size: 13px; }
  #navWeekLabel    { font-size: 13px; }
  .onboard-card    { padding: 28px 20px; gap: 16px; }
  .onboard-emoji   { font-size: 52px; }
  .onboard-card h2 { font-size: 20px; }
  .onboard-card p  { font-size: 14px; }
  .card:hover,
  .week-header:hover,
  .fruit-card:hover {
    transform: none;
  }
}
