/* Uygulama ana sayfası — renkler styles.css'teki tema değişkenlerinden gelir. */

#view-home.active { display: flex; flex-direction: column; gap: 16px; }

/* ---------- selamlama + günlük hedef ---------- */

.home-hero {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px 20px;
  border: 1px solid var(--gold);
  border-radius: 22px;
  background: linear-gradient(135deg, var(--cobalt), #0F4C5C);
  color: var(--side-text);
  box-shadow: var(--card-shadow);
  overflow: hidden;
  --focus-ring: var(--side-accent);
}

/* köşede soluk lale deseni */
.home-hero::after {
  content: "";
  position: absolute;
  right: -40px;
  bottom: -60px;
  width: 220px;
  height: 220px;
  background: url("/img/pattern.jpg") center / cover;
  border-radius: 50%;
  opacity: 0.08;
  pointer-events: none;
}

.home-hero-text { position: relative; z-index: 1; flex: 1; min-width: 0; }
.home-greeting { margin: 0; font-size: 0.85rem; font-weight: 700; color: var(--gold); letter-spacing: 0.02em; overflow-wrap: anywhere; }
.home-title { margin: 4px 0 6px; font-size: 1.35rem; line-height: 1.25; color: var(--side-text); }

.home-sub {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 16px;
  font-size: 0.85rem;
  color: var(--side-muted);
}

.home-sub svg { flex-shrink: 0; color: var(--gold); }

.home-cta {
  background: var(--side-text);
  color: var(--cobalt);
  border-color: var(--side-text);
}

.home-cta:hover { background: #FFFFFF; }

.home-ring { position: relative; z-index: 1; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.home-ring .stats-ring-track { fill: none; stroke: rgba(251, 247, 238, 0.16); }
.home-ring .stats-ring-bar { fill: none; stroke: var(--side-accent); stroke-linecap: round; transition: stroke-dashoffset 0.6s ease; }
.home-ring .stats-ring-bar.is-complete { stroke: var(--gold); }

.home-ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.1;
}

.home-ring-value { font-family: var(--font-display); font-size: 1.9rem; font-weight: 600; color: var(--side-text); }
.home-ring-caption { font-size: 0.7rem; color: var(--side-muted); }

/* ---------- kartlar ---------- */

.home-card {
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--card-shadow);
}

/* günün kelimesi */
.home-word { border-color: var(--gold); }
.home-word-head { display: flex; align-items: center; gap: 8px; }

.home-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-text);
}

.home-level {
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-text);
  font-size: 0.72rem;
  font-weight: 700;
}

.home-word-save { margin-left: auto; margin-right: -8px; }
.home-word-en { margin: 6px 0 2px; font-family: var(--font-display); font-size: 2rem; font-weight: 600; line-height: 1.15; color: var(--heading); overflow-wrap: anywhere; }
.home-word-pos { font-family: var(--font-body); font-size: 0.9rem; font-weight: 400; font-style: italic; color: var(--text-muted); }
.home-word-tr { margin: 0 0 10px; font-size: 1.1rem; font-weight: 700; color: var(--primary-text); }
.home-word-ex { margin: 0; font-size: 0.95rem; color: var(--text); }
.home-word-ex-tr { margin: 4px 0 0; font-size: 0.88rem; font-style: italic; color: var(--text-muted); }
.home-word-actions { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.home-word-known { font-size: 0.85rem; font-weight: 600; color: var(--success-text); }

/* hızlı geçiş kutuları */
.home-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }

.home-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-height: 118px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 10px 24px -22px rgba(20, 57, 91, 0.45);
  transition: border-color 0.15s, transform 0.15s;
}

.home-tile:hover { border-color: var(--primary); }
.home-tile:active { transform: scale(0.98); }

.home-tile-ico {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-bottom: 4px;
  border-radius: 12px;
  background: var(--primary-soft);
  color: var(--primary-text);
}

.home-tile-title { font-size: 1rem; font-weight: 700; color: var(--heading); }
.home-tile-sub { font-size: 0.78rem; line-height: 1.35; color: var(--text-subtle); }

/* yolculuk kartında stats-journey kendi üst boşluğunu sıfırlıyor */
#homeJourney .stats-journey { padding-bottom: 0; }

/* ---------- Instagram ---------- */

.home-insta {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  box-shadow: 0 10px 24px -22px rgba(20, 57, 91, 0.45);
}

.home-insta:hover { border-color: #DD2A7B; }

.home-insta-ico {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(45deg, #F58529, #DD2A7B 55%, #8134AF);
  color: #FFFFFF;
}

.home-insta-text { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.3; }
.home-insta-text strong { font-size: 0.98rem; color: var(--heading); }
.home-insta-text span { font-size: 0.8rem; color: var(--text-subtle); }
.home-insta-arrow { font-size: 1.8rem; line-height: 1; color: var(--text-subtle); }

/* ---------- Mobil uygulama (Google Play) ---------- */

.home-app:hover { border-color: var(--primary); }

.home-app-img {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  object-fit: cover;
  box-shadow: 0 6px 14px -8px rgba(20, 57, 91, 0.6);
}

.home-app-get {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  padding: 9px 14px;
  border-radius: 999px;
  background: var(--btn-primary-bg);
  color: var(--on-primary);
  font-size: 0.86rem;
  font-weight: 700;
}

/* masaüstü yan menü */
.side-insta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  padding: 10px 12px;
  border: 1px solid var(--side-line);
  border-radius: 12px;
  color: var(--side-text);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
}

.side-insta:hover { border-color: var(--side-accent); color: var(--side-accent); }
.side-insta span { display: flex; flex-direction: column; line-height: 1.25; }
.side-insta small { font-weight: 500; color: var(--side-muted); }

@media (max-width: 380px) {
  .home-hero { padding: 18px 16px; gap: 10px; }
  .home-title { font-size: 1.2rem; }
  .home-ring .stats-ring-svg { width: 96px; height: 96px; }
  .home-ring-value { font-size: 1.6rem; }
  .home-tile { min-height: 108px; padding: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .home-tile, .home-ring .stats-ring-bar { transition: none; }
}

/* ---------- sınav geri sayımı ---------- */

.home-countdown { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.home-countdown:empty { display: none; }

.home-cd {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas: "name name" "num unit" "date date";
  align-items: baseline;
  gap: 0 6px;
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, var(--error) 45%, var(--border));
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 10px 24px -22px rgba(20, 57, 91, 0.45);
}

.home-cd-name { grid-area: name; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; color: var(--text-subtle); }

.home-cd-num {
  grid-area: num;
  font-family: var(--font-display);
  font-size: 2.1rem;
  font-weight: 600;
  line-height: 1.05;
  color: var(--error);
  font-variant-numeric: tabular-nums;
  animation: home-cd-blink 1.6s ease-in-out infinite;
}

.home-cd-unit { grid-area: unit; font-size: 0.85rem; font-weight: 700; color: var(--text); }
.home-cd-date { grid-area: date; margin-top: 2px; font-size: 0.72rem; color: var(--text-subtle); }

.home-cd.is-waiting { border-color: var(--border); }
.home-cd-wait { grid-area: num; padding: 6px 0 2px; font-size: 0.9rem; font-weight: 600; color: var(--text-subtle); }

@keyframes home-cd-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}

@media (prefers-reduced-motion: reduce) {
  .home-cd-num { animation: none; }
}

.home-cd-name { display: flex; align-items: center; gap: 6px; }
.home-cd-est {
  padding: 0 6px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--gold) 18%, var(--surface));
  color: var(--gold-text);
  font-size: 0.62rem;
  letter-spacing: 0.02em;
}

/* ---------- sınav takvimi ---------- */

.home-cal-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.home-cal-head h3 { margin: 0; font-family: var(--font-display); font-size: 1.1rem; font-weight: 600; color: var(--heading); }
.home-cal-src { font-size: 0.72rem; color: var(--text-subtle); }

.home-cal-list { display: flex; flex-direction: column; gap: 10px; margin: 12px 0 0; padding: 0; list-style: none; }

.home-cal-row { display: flex; align-items: center; gap: 12px; }
.home-cal-row.is-past { opacity: 0.55; }

.home-cal-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 54px;
  height: 58px;
  border-radius: 14px;
  background: var(--primary-soft);
  color: var(--primary-text);
  line-height: 1.05;
}

.home-cal-day { font-family: var(--font-display); font-size: 1.45rem; font-weight: 600; }
.home-cal-mon { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; }

.home-cal-body { flex: 1; min-width: 0; }
.home-cal-title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.home-cal-title strong { font-size: 0.98rem; color: var(--heading); }

.home-cal-tag {
  padding: 0 7px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--success) 45%, var(--border));
  color: var(--success-text);
  font-size: 0.66rem;
  font-weight: 700;
}

.home-cal-tag.is-est { border-color: color-mix(in srgb, var(--gold) 55%, var(--border)); color: var(--gold-text); }
.home-cal-line { margin: 2px 0 0; font-size: 0.78rem; color: var(--text-subtle); }
.home-cal-line.is-open { font-weight: 700; color: var(--error); }
.home-cal-left { flex-shrink: 0; font-size: 0.8rem; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.home-cal-empty { font-size: 0.85rem; color: var(--text-subtle); }

/* masaüstü yan menüdeki kısa takvim (footer telefonda zaten gizli) */
.side-cal { margin-bottom: 14px; padding: 12px; border: 1px solid var(--side-line); border-radius: 12px; }
.side-cal-title { margin: 0 0 8px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold); }
.side-cal-list { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }

.side-cal-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "name days" "date days";
  gap: 0 8px;
  color: var(--side-text);
}

.side-cal-name { grid-area: name; font-size: 0.85rem; font-weight: 700; }
.side-cal-name small { font-weight: 500; color: var(--side-muted); }
.side-cal-date { grid-area: date; font-size: 0.72rem; color: var(--side-muted); }
.side-cal-days { grid-area: days; align-self: center; font-size: 0.85rem; font-weight: 700; color: var(--side-accent); font-variant-numeric: tabular-nums; }

/* ---------- Sınav rehberi ---------- */

#view-guide.active { display: flex; flex-direction: column; gap: 14px; }
.home-guide-link { min-height: 32px; padding: 0 4px; border: none; background: none; color: var(--primary-text); font: inherit; font-size: 0.82rem; font-weight: 700; cursor: pointer; }
.home-guide-link:hover { text-decoration: underline; }
.guide-h { margin: 0 0 8px; font-family: var(--font-display); font-size: 1.1rem; font-weight: 600; color: var(--heading); }
.guide-muted { margin: 0 0 10px; font-size: 0.82rem; color: var(--text-subtle); }
.guide-table-wrap { overflow-x: auto; }
.guide-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.guide-table th, .guide-table td { padding: 8px 6px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.guide-table th { font-size: 0.75rem; color: var(--text-subtle); font-weight: 700; }
.guide-table td:first-child { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.guide-lv { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 0.75rem; font-weight: 700; white-space: nowrap; }
.guide-lv.lv-c { background: color-mix(in srgb, var(--gold) 20%, var(--surface)); color: var(--gold-text); }
.guide-lv.lv-b { background: var(--primary-soft); color: var(--primary-text); }
.guide-lv.lv-a { background: var(--bg); color: var(--text-subtle); border: 1px solid var(--border); }
.guide-note { margin: 10px 0 0; font-size: 0.78rem; color: var(--text-subtle); }
.guide-facts { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 0.9rem; }
.guide-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; padding: 0; list-style: none; }
.guide-chips li { padding: 3px 10px; border-radius: 999px; background: var(--primary-soft); color: var(--primary-text); font-size: 0.78rem; font-weight: 600; }
.guide-src { margin: 0; font-size: 0.75rem; color: var(--text-subtle); text-align: center; }
