/* =====================================================================
   ЦВЕТА И ШРИФТЫ. Поменяй их здесь — и перекрасится весь сайт
   ===================================================================== */

:root {
  --bg: #2f7ad6;         /* фон страницы — синий */
  --card: #ffffff;       /* фон карточек */
  --ink: #1d3557;        /* текст и обводки — тёмно-синий */
  --accent: #4a90e2;     /* синий */
  --accent-2: #2563c7;   /* тёмно-синий */
  --accent-3: #cfe5ff;   /* светло-голубой */
  --accent-4: #dbeafe;   /* очень светлый синий */
  --radius: 22px;        /* скругление углов */
  --font-title: "Unbounded", "Arial Black", sans-serif;
  --font-text: "Onest", "Segoe UI", Arial, sans-serif;
}


/* =====================================================================
   ОСНОВА
   ===================================================================== */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background-color: var(--bg);
  background-image: radial-gradient(rgba(0, 0, 0, 0.13) 1.3px, transparent 1.8px);
  background-size: 22px 22px;          /* узор в точку */
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 18px;
  line-height: 1.5;
}

h1, h2 {
  font-family: var(--font-title);
  line-height: 1.1;
  margin: 0 0 16px;
}

h2 {
  display: inline-block;
  font-size: 28px;
  padding: 2px 14px;
  border-radius: 12px;
  background: #ffffff;                 /* белая подложка под заголовком */
  box-shadow: 0 4px 12px rgba(29, 53, 87, 0.18);   /* тень, чтобы подложка выделялась */
}

main, .hero {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

.card {
  background: var(--card);
  border: 1px solid #d6e4f5;
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(29, 53, 87, 0.10);   /* мягкая тень, как в стиле Apple */
  padding: 28px 32px;
  animation: rise 0.6s ease-out both;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

/* При наведении карточка приподнимается и её тень становится глубже */
.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 36px rgba(29, 53, 87, 0.22);
}

.button {
  font-family: var(--font-title);
  font-size: 16px;
  color: white;
  background: var(--accent-2);
  border: 3px solid var(--ink);
  border-radius: 14px;
  box-shadow: 5px 5px 0 var(--ink);
  padding: 14px 24px;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.1s;
}

.button:hover {
  transform: translate(-2px, -2px);
  box-shadow: 7px 7px 0 var(--ink);
}

.button:active {
  transform: translate(4px, 4px);
  box-shadow: 1px 1px 0 var(--ink);
}


/* =====================================================================
   БЕГУЩАЯ СТРОКА
   ===================================================================== */

.ticker {
  background: var(--ink);
  color: var(--accent-4);
  font-family: var(--font-title);
  font-size: 15px;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  padding: 10px 0;
}

.ticker-text {
  display: inline-block;
  animation: run 30s linear infinite;
}

.ticker-text span {
  padding-right: 40px;
}


/* =====================================================================
   ШАПКА
   ===================================================================== */

.hero {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 40px;
  padding-top: 56px;
  padding-bottom: 56px;
}

.hero h1 {
  font-size: clamp(38px, 6vw, 68px);
  font-weight: 800;
  margin-top: 20px;
}

.highlight {
  display: inline-block;
  background: var(--accent);
  color: white;
  border: 3px solid var(--ink);
  border-radius: 16px;
  box-shadow: 6px 6px 0 var(--ink);
  padding: 4px 16px 10px;
  margin-top: 10px;
  rotate: -2deg;
}

.tagline {
  font-size: 21px;
  max-width: 600px;
  margin: 24px 0 0;
  background: #ffffff;                 /* белая подложка под фразой */
  border-radius: 16px;
  padding: 14px 20px;
  box-shadow: 0 8px 24px rgba(29, 53, 87, 0.18);
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.badge {
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 15px;
  font-weight: 600;
}

.badge.off {
  background: var(--accent);
  color: white;
}

.avatar {
  width: 240px;
  height: 240px;
  display: grid;
  place-items: center;
  font-size: 130px;
  background: #ffffff;
  border: 4px solid var(--ink);
  border-radius: 50%;
  box-shadow: 10px 10px 0 var(--ink);
  animation: wobble 3s ease-in-out infinite;
  cursor: pointer;
}

.avatar:hover {
  animation: spin 0.8s ease-in-out;
}


/* =====================================================================
   КАРТОЧКИ: сетка из двух колонок
   ===================================================================== */

main {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 32px;
  padding-bottom: 60px;
  align-items: start;                  /* карточки не тянутся по высоте соседей */
}

.game, .wall {
  grid-column: 1 / -1;                 /* эти карточки — во всю ширину */
}

.like-box {
  animation-delay: 0.1s;
}

.game {
  animation-delay: 0.2s;
}

.wall {
  animation-delay: 0.3s;
}

.school {
  animation-delay: 0.15s;
}

.school-points {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
}

.school-points li {
  padding: 12px 18px;
  border-radius: 14px;
  color: #0f2340;
  margin-bottom: 10px;
  border-left: 6px solid var(--ink);
}

.school-points li:nth-child(5n+1) { background: #ffe8a3; }
.school-points li:nth-child(5n+2) { background: #c8f7e4; }
.school-points li:nth-child(5n+3) { background: #ffd1dc; }
.school-points li:nth-child(5n+4) { background: #d6e8ff; }
.school-points li:nth-child(5n)   { background: #e6d9ff; }

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 20px 0 0;
}

.tags li {
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 4px 14px;
  font-weight: 600;
  color: #0f2340;
  background: #ffffff;
}

/* Разные цвета для тегов по кругу */
.tags li:nth-child(6n+1) { background: #ffd166; }
.tags li:nth-child(6n+2) { background: #06d6a0; }
.tags li:nth-child(6n+3) { background: #ef476f; color: #ffffff; }
.tags li:nth-child(6n+4) { background: #118ab2; color: #ffffff; }
.tags li:nth-child(6n+5) { background: #ffb4a2; }
.tags li:nth-child(6n)   { background: #b8f2e6; }


/* =====================================================================
   ЛАЙКИ
   ===================================================================== */

.like-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  background: var(--accent-4);
}

.like-button {
  width: 130px;
  height: 130px;
  font-size: 64px;
  background: var(--card);
  border: 3px solid var(--ink);
  border-radius: 50%;
  box-shadow: 6px 6px 0 var(--ink);
  cursor: pointer;
  filter: grayscale(1);                /* пока лайка нет — сердце серое */
  transition: transform 0.1s, box-shadow 0.1s;
}

.like-button.liked {
  background: var(--accent);
  filter: none;
}

.like-button:active {
  transform: translate(4px, 4px);
  box-shadow: 1px 1px 0 var(--ink);
}

.like-button.pop {
  animation: pop 0.4s ease-out;
}

.like-count {
  font-family: var(--font-title);
  font-size: 72px;
  font-weight: 800;
  line-height: 1;
}

.like-label {
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}


/* =====================================================================
   ДВЕ ПРАВДЫ И ОДНА ЛОЖЬ
   ===================================================================== */

.facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 28px;
}

.fact {
  position: relative;
  min-height: 170px;
  text-align: left;
  font-family: var(--font-text);
  font-size: 19px;
  font-weight: 600;
  color: #0f2340;
  background: #ffffff;
  border: 3px solid var(--ink);
  border-radius: 18px;
  box-shadow: 6px 6px 0 var(--ink);
  padding: 36px 22px 22px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, background 0.3s;
}

.fact:hover {
  transform: translate(-3px, -3px) rotate(-1deg);
  box-shadow: 9px 9px 0 var(--ink);
}

/* Номер факта в кружке: берётся из data-fact="1" в index.html */
.fact::before {
  content: attr(data-fact);
  position: absolute;
  top: -18px;
  left: 18px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  font-family: var(--font-title);
  color: white;
  background: var(--accent-2);
  border: 3px solid var(--ink);
  border-radius: 50%;
}

.fact.truth {
  background: var(--accent-3);
}

.fact.lie {
  background: var(--accent);
  color: white;
}

/* Штамп «ПРАВДА» или «ЛОЖЬ!» после ответа */
.fact.truth::after,
.fact.lie::after {
  position: absolute;
  right: 16px;
  bottom: -16px;
  font-family: var(--font-title);
  font-size: 18px;
  color: var(--ink);
  background: var(--card);
  border: 3px solid var(--ink);
  border-radius: 10px;
  padding: 2px 12px;
  rotate: -8deg;
  animation: stamp 0.35s ease-out;
}

.fact.truth::after {
  content: "ПРАВДА";
}

.fact.lie::after {
  content: "ЛОЖЬ!";
}

.fact.picked {
  outline: 4px dashed var(--ink);
  outline-offset: 6px;
}

.game-result {
  font-size: 22px;
  font-weight: 800;
  min-height: 33px;
  margin: 34px 0 0;
}


/* =====================================================================
   СТЕНА
   ===================================================================== */

.wall-form {
  display: grid;
  grid-template-columns: 220px 1fr auto;
  gap: 14px;
  margin: 10px 0 28px;
}

.wall-form input,
.wall-form textarea {
  font: inherit;
  color: #0f2340;
  background: #ffffff;
  border: 3px solid var(--ink);
  border-radius: 14px;
  padding: 12px 16px;
}

.wall-form textarea {
  height: 58px;
  resize: vertical;
}

.wall-form input:focus,
.wall-form textarea:focus {
  outline: none;
  background: white;
  box-shadow: 4px 4px 0 var(--accent-2);
}

.messages {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}

.message {
  background: var(--accent-4);
  border: 3px solid var(--ink);
  border-radius: 18px 18px 18px 4px;  /* уголок, как у облачка в чате */
  padding: 14px 18px;
  animation: rise 0.4s ease-out both;
  overflow-wrap: anywhere;
}

.message:nth-child(3n + 2) {
  background: var(--accent-3);
}

.message:nth-child(3n) {
  background: #ffd0e1;
}

.message-head {
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.message p {
  margin: 6px 0 0;
}

.message a {
  display: inline-block;
  margin-top: 8px;
  font-size: 14px;
  font-weight: 800;
  color: var(--accent-2);
}

.empty {
  color: #6b655a;
}

footer {
  text-align: center;
  font-size: 15px;
  padding: 24px;
  border-top: 3px dashed var(--ink);
}


/* =====================================================================
   АНИМАЦИИ
   ===================================================================== */

@keyframes run {
  to { transform: translateX(-50%); }
}

@keyframes rise {
  from { opacity: 0; translate: 0 40px; }
}

@keyframes wobble {
  0%, 100% { rotate: -3deg; }
  50%      { rotate: 3deg; }
}

@keyframes spin {
  to { rotate: 360deg; }
}

@keyframes pop {
  50% { scale: 1.3; }
}

@keyframes stamp {
  from { opacity: 0; scale: 2.5; }
}

/* Выскакивание: иконка появляется с небольшим «отскоком» */
@keyframes pop-in {
  0%   { opacity: 0; scale: 0.2; }
  70%  { opacity: 1; scale: 1.15; }
  100% { scale: 1; }
}

.tags li {
  animation: pop-in 0.5s ease-out both;
}

/* Смайлик: сначала выскакивает, потом продолжает покачиваться */
.avatar {
  animation: pop-in 0.5s ease-out both, wobble 3s ease-in-out 0.5s infinite;
}

.tags li:nth-child(2) { animation-delay: 0.1s; }
.tags li:nth-child(3) { animation-delay: 0.2s; }
.tags li:nth-child(4) { animation-delay: 0.3s; }
.tags li:nth-child(5) { animation-delay: 0.4s; }
.tags li:nth-child(6) { animation-delay: 0.5s; }


/* =====================================================================
   ТЕЛЕФОН: всё в одну колонку
   ===================================================================== */

/* =====================================================================
   ВОЛШЕБНЫЕ ЭФФЕКТЫ
   ===================================================================== */

@keyframes aurora {
  0%, 100% { background-position: 0 0, 0% 50%; }
  50%      { background-position: 0 0, 100% 50%; }
}

@keyframes float {
  0%, 100% { translate: 0 0; }
  50%      { translate: 40px 30px; }
}

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

@keyframes title-glow {
  0%, 100% { box-shadow: 0 4px 12px rgba(29, 53, 87, 0.18); }
  50%      { box-shadow: 0 6px 22px rgba(127, 209, 255, 0.85); }
}

/* Фон: движущийся синий градиент с узором в точку */
body {
  background-image:
    radial-gradient(rgba(255, 255, 255, 0.16) 1.3px, transparent 1.8px),
    linear-gradient(120deg, #1f5fb8, #2f7ad6, #4fa3ff, #1d4fa0);
  background-size: 22px 22px, 400% 400%;
  animation: aurora 16s ease infinite;
}

/* Два светящихся пятна, которые медленно плывут по фону */
body::before,
body::after {
  content: "";
  position: fixed;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.45;
  z-index: -1;
  pointer-events: none;
  animation: float 14s ease-in-out infinite;
}

body::before {
  background: #7fd1ff;
  top: -120px;
  left: -120px;
}

body::after {
  background: #b59cff;
  bottom: -140px;
  right: -120px;
  animation-delay: -7s;
}

/* Заголовки: переливающийся фон и мерцающая тень */
h2 {
  animation: title-glow 3s ease-in-out infinite;
}

/* Подсветка слова в шапке переливается */
.highlight {
  background: linear-gradient(90deg, #4a90e2, #7fd1ff, #2563c7, #4a90e2);
  background-size: 300% 100%;
  animation: shimmer 4s linear infinite;
}

/* Карточки при наведении светятся по краю */
.card:hover {
  border-color: #7fb8ee;
}

/* Смайлик: вокруг него крутится пунктирное кольцо */
.avatar {
  position: relative;
}

.avatar::after {
  content: "";
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  border: 3px dashed #ffffff;
  opacity: 0.8;
  animation: spin 12s linear infinite;
}

/* Кнопки: блик пробегает при наведении */
.button {
  position: relative;
  overflow: hidden;
}

.button::after {
  content: "";
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.6), transparent);
  transform: skewX(-20deg);
  transition: left 0.6s ease;
}

.button:hover::after {
  left: 125%;
}

/* Сердечко и счётчик лайков */
.like-button:hover {
  transform: scale(1.08) rotate(-4deg);
}

.like-count {
  background: linear-gradient(90deg, #2563c7, #4a90e2, #7fd1ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Факты: при наведении светятся */
.fact:hover {
  box-shadow: 9px 9px 0 var(--ink), 0 0 26px rgba(127, 209, 255, 0.9);
}

/* Теги и пункты школы: подпрыгивают и сдвигаются при наведении */
.tags li {
  transition: transform 0.2s ease;
}

.tags li:hover {
  transform: translateY(-4px) scale(1.06);
}

.school-points li {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.school-points li:hover {
  transform: translateX(8px);
  box-shadow: 0 6px 16px rgba(29, 53, 87, 0.2);
}

/* Сообщения на стене: приподнимаются и чуть наклоняются */
.message {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.message:hover {
  transform: translateY(-4px) rotate(-1deg);
  box-shadow: 0 10px 20px rgba(29, 53, 87, 0.25);
}

/* Для тех, кому мешает движение: отключаем все анимации */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}


@media (max-width: 800px) {
  .hero, main, .facts, .wall-form {
    grid-template-columns: 1fr;
  }

  .avatar {
    width: 160px;
    height: 160px;
    font-size: 86px;
  }
}
