/* ==========================================================
   screens.css — стили, которые нужны только конкретным экранам
   ========================================================== */

/* ---------- Главная ---------- */
.profile-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.profile-head .name {
  font-size: 19px;
  font-weight: 800;
  line-height: 1.2;
}

.profile-head .quote {
  font-size: 12.5px;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 2px;
}

.level-card .level-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-weight: 700;
}

.stat-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.stat {
  display: flex;
  align-items: center;
  gap: 10px;
}

.stat .stat-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  color: var(--accent);
}

.stat .stat-icon.fire {
  color: var(--warn);
}

.stat .num {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.1;
}

.stat .lbl {
  font-size: 12px;
  color: var(--text-muted);
}

.today-card {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border: 0;
  color: var(--accent-text);
}

.today-card .small {
  opacity: 0.85;
}

.today-card h3 {
  margin: 4px 0 12px;
  font-size: 17px;
}

.today-card .btn {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}

.tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 6px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 12.5px;
  font-weight: 600;
  transition: transform 0.12s ease, border-color 0.15s ease;
}

.tile:hover {
  border-color: var(--accent);
}

.tile:active {
  transform: scale(0.96);
}

.tile .icon {
  width: 26px;
  height: 26px;
  color: var(--accent);
}

/* ---------- Чат ---------- */
.chat-screen {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.chat-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.chat-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.chat-log {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-chips {
  display: flex;
  gap: 8px;
  padding: 8px 16px 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.chat-chips .chip {
  white-space: nowrap;
}

.msg {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  max-width: 88%;
}

.msg.roman {
  align-self: flex-start;
}

.msg.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.bubble {
  padding: 10px 13px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  white-space: pre-wrap;
  word-break: break-word;
}

.msg.user .bubble {
  background: var(--bubble-user);
  color: var(--bubble-user-text);
  border-color: transparent;
}

.bubble .btn {
  margin-top: 10px;
}

.typing {
  display: inline-flex;
  gap: 4px;
  padding: 4px 2px;
}

.typing i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-muted);
  animation: blink 1s infinite;
}

.typing i:nth-child(2) {
  animation-delay: 0.15s;
}

.typing i:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes blink {
  0%,
  80%,
  100% {
    opacity: 0.25;
  }
  40% {
    opacity: 1;
  }
}

.chat-input {
  display: flex;
  gap: 8px;
  padding: 10px 16px 14px;
}

.chat-input input {
  flex: 1;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  outline: none;
}

.chat-input input:focus {
  border-color: var(--accent);
}

/* ---------- Конспекты ---------- */
.note-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 14px 16px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  margin-bottom: 10px;
}

.note-row .grow {
  flex: 1;
  min-width: 0;
}

.note-row .title {
  font-weight: 700;
}

.note-body h3 {
  margin: 14px 0 6px;
  font-size: 15px;
}

.note-body ol,
.note-body ul {
  padding-left: 20px;
}

.note-body li {
  margin-bottom: 6px;
}

.note-warning {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 181, 71, 0.12);
  border: 1px solid rgba(255, 181, 71, 0.4);
}

.upload-zone {
  display: grid;
  place-items: center;
  gap: 6px;
  padding: 20px;
  margin: 14px 0;
  border: 2px dashed var(--border);
  border-radius: 18px;
  text-align: center;
  color: var(--text-muted);
}

.file-pick {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  text-align: left;
  margin-bottom: 8px;
}

.file-pick.selected {
  border-color: var(--accent);
}

/* ---------- Расписание ---------- */
.week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-bottom: 14px;
}

.day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 0;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-muted);
}

.day b {
  font-size: 15px;
  color: var(--text);
}

.day.today {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: transparent;
  color: var(--accent-text);
}

.day.today b {
  color: var(--accent-text);
}

.day.selected:not(.today) {
  border-color: var(--accent);
}

.task {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  margin-bottom: 8px;
}

.task .check {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: transparent;
}

.task.done .check {
  background: var(--good);
  border-color: var(--good);
  color: #fff;
}

.task.done .title {
  text-decoration: line-through;
  opacity: 0.6;
}

.task .check .icon {
  width: 14px;
  height: 14px;
  stroke-width: 3;
}

.task .grow {
  flex: 1;
  min-width: 0;
}

.task .title {
  font-weight: 600;
}

/* ---------- Экзаменационный режим ---------- */
.exam-hero {
  display: flex;
  align-items: center;
  gap: 14px;
}

.exam-hero .info {
  flex: 1;
}

.exam-hero .row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
}

.stage {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.stage:last-child {
  border-bottom: 0;
}

.stage .dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  color: var(--text-muted);
  flex-shrink: 0;
}

.stage.done .dot {
  background: var(--good);
  color: #fff;
}

.stage.current .dot {
  background: var(--accent);
  color: #fff;
}

.stage .dot .icon {
  width: 14px;
  height: 14px;
  stroke-width: 3;
}

.stage.locked {
  opacity: 0.5;
}

/* ---------- Тест ---------- */
.q-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.q-text {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
  margin: 12px 0 16px;
}

.option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 13px 14px;
  margin-bottom: 8px;
  border-radius: 16px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.option .radio {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--border);
  flex-shrink: 0;
}

.option.selected {
  border-color: var(--accent);
}

.option.selected .radio {
  border-color: var(--accent);
  background: radial-gradient(circle, var(--accent) 45%, transparent 50%);
}

.option.correct {
  border-color: var(--good);
  background: var(--good-bg);
}

.option.wrong {
  border-color: var(--bad);
  background: var(--bad-bg);
}

.feedback {
  margin: 12px 0;
  padding: 12px 14px;
  border-radius: 16px;
}

.feedback.ok {
  background: var(--good-bg);
  border: 1px solid var(--good);
}

.feedback.no {
  background: var(--bad-bg);
  border: 1px solid var(--bad);
}

.feedback b {
  display: block;
  margin-bottom: 4px;
}

.result-score {
  text-align: center;
  padding: 10px 0;
}

.result-score .big {
  font-size: 48px;
  font-weight: 900;
  line-height: 1;
  color: var(--accent);
}

/* ---------- Карточки (флеш-карты) ---------- */
.flash {
  perspective: 900px;
  margin: 8px 0 14px;
}

.flash-inner {
  position: relative;
  min-height: 260px;
  transition: transform 0.5s ease;
  transform-style: preserve-3d;
}

.flash.flipped .flash-inner {
  transform: rotateY(180deg);
}

.flash-face {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 22px;
  text-align: center;
  border-radius: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  font-size: 18px;
  font-weight: 700;
}

.flash-face.back {
  transform: rotateY(180deg);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--accent-text);
  border-color: transparent;
  font-size: 16px;
  font-weight: 600;
}

.flash-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* ---------- Прогресс ---------- */
.subject-row {
  margin-bottom: 14px;
}

.subject-row .top {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  font-weight: 600;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.stat-box {
  padding: 12px 8px;
  text-align: center;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.stat-box .num {
  font-size: 20px;
  font-weight: 800;
}

.stat-box .lbl {
  font-size: 11.5px;
  color: var(--text-muted);
}

.chart {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  height: 120px;
  padding-top: 8px;
}

.chart .col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  height: 100%;
}

.chart .col .fill {
  width: 100%;
  border-radius: 8px 8px 4px 4px;
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  min-height: 4px;
}

.chart .col span {
  font-size: 11.5px;
  color: var(--text-muted);
}

/* ---------- Рейтинг ---------- */
.rank-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  margin-bottom: 8px;
}

.rank-row.me {
  border-color: var(--accent);
  background: var(--surface-2);
}

.rank-row .pos {
  width: 26px;
  text-align: center;
  font-weight: 800;
  color: var(--text-muted);
}

.rank-row .grow {
  flex: 1;
  font-weight: 600;
}

.rank-row .score {
  font-weight: 800;
}

.hidden-box {
  text-align: center;
  padding: 30px 16px;
}

.hidden-box .icon {
  width: 40px;
  height: 40px;
  color: var(--text-muted);
  margin: 0 auto 10px;
}

/* ---------- Профиль / настройки ---------- */
.theme-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.theme-pick {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px 2px;
  border-radius: 14px;
  border: 2px solid transparent;
  font-size: 11px;
  color: var(--text-muted);
}

.theme-pick .swatch {
  width: 100%;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.theme-pick.active {
  border-color: var(--accent);
  color: var(--text);
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
}

.setting-row + .setting-row {
  border-top: 1px solid var(--border);
}

.field {
  width: 100%;
  padding: 11px 13px;
  margin-top: 6px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  outline: none;
}

.field:focus {
  border-color: var(--accent);
}

.seg {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.seg .tab {
  background: var(--surface-2);
}

.seg .tab.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.disclaimer {
  margin-top: 18px;
  font-size: 12px;
  text-align: center;
  color: var(--text-muted);
}
