
/* Шрифт Nunito (variable, wght 200–1000) — хостим локально, чтобы не зависеть
   от Google Fonts (недоступен в РФ). Браузер скачивает только нужный сабсет. */
@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
  src: url('/static/fonts/nunito-cyrillic-ext.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
  src: url('/static/fonts/nunito-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
  src: url('/static/fonts/nunito-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
  src: url('/static/fonts/nunito-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

* { box-sizing: border-box; }

@keyframes float {
0%, 100% { transform: translateY(0px) rotate(0deg); }
50% { transform: translateY(-15px) rotate(5deg); }
}
@keyframes pulse {
0%, 100% { transform: scale(1); }
50% { transform: scale(1.15); }
}
@keyframes sparkle {
0%, 100% { opacity: 1; transform: scale(1); }
50% { opacity: 0.5; transform: scale(1.3); }
}
@keyframes bounceIn {
0% { transform: scale(0.3); opacity: 0; }
50% { transform: scale(1.05); }
70% { transform: scale(0.95); }
100% { transform: scale(1); opacity: 1; }
}
@keyframes gradientShift {
0% { background-position: 0% 50%; }
50% { background-position: 100% 50%; }
100% { background-position: 0% 50%; }
}
@keyframes wiggle {
0%, 100% { transform: rotate(-3deg); }
50% { transform: rotate(3deg); }
}

body {
margin: 0;
font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
background: linear-gradient(135deg, #0f1a13 0%, #1a2e22 50%, #0f1a13 100%);
background-size: 200% 200%;
animation: gradientShift 15s ease infinite;
color: white;
min-height: 100vh;
display: flex;
flex-direction: column;
overflow-x: hidden;
}

/* ДЕКОРАТИВНЫЕ ЭЛЕМЕНТЫ */
.floating-decor {
position: fixed;
font-size: 2rem;
opacity: 0.15;
pointer-events: none;
z-index: 0;
animation: float 4s ease-in-out infinite;
}
.floating-decor:nth-child(1) { top: 10%; left: 5%; animation-delay: 0s; font-size: 2.5rem; }
.floating-decor:nth-child(2) { top: 20%; right: 8%; animation-delay: 0.8s; font-size: 1.8rem; }
.floating-decor:nth-child(3) { top: 50%; left: 3%; animation-delay: 1.6s; font-size: 2.2rem; }
.floating-decor:nth-child(4) { top: 70%; right: 5%; animation-delay: 2.4s; font-size: 2rem; }
.floating-decor:nth-child(5) { top: 85%; left: 10%; animation-delay: 3.2s; font-size: 1.5rem; }
.floating-decor:nth-child(6) { top: 35%; right: 3%; animation-delay: 1.2s; font-size: 2.8rem; }

/* ШАПКА */
.top-header {
background: linear-gradient(90deg, #17241d, #1e3328, #17241d);
border-bottom: 2px solid #2ecc71;
padding: 0.8rem 1.8rem;
display: flex;
align-items: center;
box-shadow: 0 4px 20px rgba(46, 204, 113, 0.15);
position: relative;
z-index: 10;
}
.top-header .back-link {
color: #a3c2b0;
text-decoration: none;
font-size: 0.95rem;
display: flex;
align-items: center;
gap: 0.4rem;
transition: all 0.3s ease;
padding: 0.4rem 0.8rem;
border-radius: 8px;
}
.top-header .back-link:hover {
color: #f1c40f;
background: rgba(241, 196, 15, 0.1);
transform: translateX(-3px);
}
.top-header .logo {
margin-left: 1.2rem;
font-size: 1.5rem;
font-weight: 900;
color: #ffffff;
text-decoration: none;
display: flex;
align-items: center;
gap: 0.5rem;
text-shadow: 0 0 20px rgba(46, 204, 113, 0.5);
}
.top-header .logo span.cactus-icon {
animation: wiggle 2s ease-in-out infinite;
display: inline-block;
}

/* ИКОНКИ СОЦСЕТЕЙ В ШАПКЕ */
.social-links {
margin-left: auto;
display: flex;
align-items: center;
gap: 0.5rem;
}
.social-links a {
display: flex;
align-items: center;
justify-content: center;
width: 38px;
height: 38px;
border-radius: 10px;
color: #a3c2b0; /* приглушённый цвет в тон темы */
transition: color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}
.social-links a:hover {
transform: translateY(-2px);
}
.social-links a.vk:hover {
color: #0077ff; /* фирменный VK */
background: rgba(0, 119, 255, 0.12);
}
.social-links a.tg:hover {
color: #26a5e4; /* фирменный Telegram */
background: rgba(38, 165, 228, 0.12);
}

/* ФУТЕР */
.site-footer {
background: #17241d;
border-top: 2px solid #2ecc71; /* зеркало линии шапки */
padding: 1rem 1.8rem;
position: relative;
z-index: 1; /* поверх летающих декораций */
}
.footer-inner {
max-width: 1200px;
margin: 0 auto;
display: flex;
align-items: center;
justify-content: space-between;
gap: 1rem;
flex-wrap: wrap;
}
.footer-copy {
color: #7a9a86;
font-size: 0.9rem;
}
.footer-social {
display: flex;
gap: 0.5rem;
}
.footer-social a {
display: flex;
align-items: center;
justify-content: center;
width: 36px;
height: 36px;
border-radius: 10px;
color: #a3c2b0;
transition: color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}
.footer-social a:hover {
transform: translateY(-2px);
}
.footer-social a.vk:hover {
color: #0077ff;
background: rgba(0, 119, 255, 0.12);
}
.footer-social a.tg:hover {
color: #26a5e4;
background: rgba(38, 165, 228, 0.12);
}

/* ОСНОВНОЙ КОНТЕНТ */
.quiz-page {
max-width: 1200px;
margin: 0 auto;
padding: 1rem 1.5rem 4rem;
width: 100%;
position: relative;
z-index: 1;
}

/* ЗАГОЛОВОК КВИЗА */
.quiz-header {
text-align: center;
margin-bottom: 0.5rem;
animation: bounceIn 0.8s ease-out;
}

/* МЕТА-ИНФО КВИЗА */
.quiz-meta {
text-align: center;
margin-bottom: 2rem;
color: #a3c2b0;
font-size: 1rem;
display: flex;
justify-content: center;
gap: 1rem;
flex-wrap: wrap;
}

/* ВВОДНЫЙ ТЕКСТ (под картинкой в правой колонке) */
.quiz-intro {
color: #cfe3d6;
font-size: 1.1rem;
line-height: 1.65;
}
.quiz-intro p {
margin: 0 0 0.9rem;
}
.quiz-intro p:last-child {
margin-bottom: 0;
}
.quiz-header h1 {
font-size: 2.8rem;
font-weight: 900;
background: linear-gradient(135deg, #ffffff, #2ecc71, #f1c40f);
background-size: 200% 200%;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
animation: gradientShift 4s ease infinite;
margin: 0 0 0.5rem 0;
line-height: 1.2;
text-shadow: none;
filter: drop-shadow(0 0 10px rgba(46, 204, 113, 0.3));
}
.quiz-header .excitement-emojis {
font-size: 1.8rem;
letter-spacing: 0.3rem;
animation: sparkle 2s ease-in-out infinite;
}

/* ПРЕВЬЮ */
.preview-section {
margin-bottom: 0;
}
.preview-layout {
display: flex;
gap: 2rem;
align-items: flex-start;
}
.preview-left {
width: 66.666%;
display: flex;
flex-direction: column;
gap: 1.5rem;
}
.examples-title {
font-size: 1.4rem;
color: #f1c40f;
margin: 0;
}
.preview-questions {
display: flex;
flex-direction: column;
gap: 1.2rem;
}
.preview-image {
width: 33.333%;
flex-shrink: 0;
display: flex;
flex-direction: column;
align-items: center;
justify-content: flex-start;
gap: 1.5rem;
margin-top: 0;
}
.preview-image img {
width: 100%;
}
.examples-hint {
font-size: 0.9rem;
color: #7a9a86;
margin: 0.3rem 0 1rem 0.5rem;
}

/* ФЛИП-КАРТОЧКИ ВОПРОСОВ (3D-переворот снизу вверх) */
.flip-card {
--fan: 0deg;
perspective: 1200px;
transform: rotate(var(--fan));
transition: transform 0.3s ease;
cursor: pointer;
border-radius: 16px;
outline: none;
}
/* Веер: средняя (3-я) карточка ровно горизонтальная, остальные расходятся симметрично */
.flip-card:nth-child(1) { --fan: 5deg; }
.flip-card:nth-child(2) { --fan: 2.5deg; }
.flip-card:nth-child(3) { --fan: 0deg; }
.flip-card:nth-child(4) { --fan: -2.5deg; }
.flip-card:nth-child(5) { --fan: -5deg; }
/* При перевороте карточка выравнивается по горизонтали */
.flip-card.flipped { --fan: 0deg; }
.flip-card:hover,
.flip-card:focus-visible {
transform: rotate(var(--fan)) scale(1.03);
}
.flip-inner {
position: relative;
display: grid;
transform-style: preserve-3d;
transition: transform 0.7s cubic-bezier(0.35, 0.1, 0.25, 1);
border-radius: 16px;
}
.flip-card.flipped .flip-inner {
transform: rotateX(180deg);
}
.flip-face {
grid-area: 1 / 1;
backface-visibility: hidden;
-webkit-backface-visibility: hidden;
background: linear-gradient(135deg, #1c2c23, #243829);
border: 2px solid #2e4739;
border-radius: 16px;
padding: 1.1rem 1.8rem;
position: relative;
overflow: hidden;
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}
.flip-card:hover .flip-face {
border-color: #2ecc71;
box-shadow: 0 6px 25px rgba(46, 204, 113, 0.2);
}
.flip-front::before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 0;
height: 100%;
background: linear-gradient(90deg, rgba(46, 204, 113, 0.15), transparent);
transition: width 0.4s ease;
}
.flip-card:hover .flip-front::before {
width: 100%;
}
/* Оборот карточки: правильный ответ + пояснение */
.flip-back {
transform: rotateX(-180deg);
background: linear-gradient(135deg, #1e3325, #24402e);
border-color: rgba(46, 204, 113, 0.6);
}
.flip-card .q-corner {
position: absolute;
top: -2px;
right: -2px;
width: 40px;
height: 40px;
overflow: hidden;
}
.flip-card .q-corner::after {
content: '❓';
position: absolute;
top: -15px;
right: -5px;
font-size: 2.5rem;
transform: rotate(15deg);
opacity: 0.6;
}
.flip-card .q-number {
font-size: 0.85rem;
color: #2ecc71;
font-weight: bold;
margin-bottom: 0.5rem;
text-transform: uppercase;
letter-spacing: 0.1rem;
display: flex;
align-items: center;
gap: 0.5rem;
}
.flip-card .q-number::before {
content: '▸';
color: #f1c40f;
font-size: 1.2rem;
}
.flip-card .q-text {
font-size: 1.15rem;
font-weight: 700;
color: #ffffff;
margin: 0 0 0.5rem 0;
line-height: 1.5;
padding-left: 0.5rem;
}
.flip-card .a-number {
font-size: 0.85rem;
color: #f1c40f;
font-weight: bold;
margin-bottom: 0.5rem;
text-transform: uppercase;
letter-spacing: 0.1rem;
display: flex;
align-items: center;
gap: 0.5rem;
}
.flip-card .a-answer {
font-size: 1.3rem;
font-weight: 900;
color: #2ecc71;
margin: 0 0 0.6rem 0;
padding-left: 0.5rem;
line-height: 1.3;
}
.flip-card .a-comment {
font-size: 1rem;
color: #cfe3d6;
line-height: 1.5;
margin: 0 0 0.5rem 0;
padding-left: 0.5rem;
}

/* КНОПКА НАЧАТЬ КВИЗ */
.start-btn-section {
text-align: left;
}
.btn-create-room {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 0.8rem;
background: linear-gradient(135deg, #27ae60 0%, #2ecc71 33%, #f1c40f 50%, #2ecc71 67%, #27ae60 100%);
background-size: 200% 200%;
animation: gradientShift 4s ease-in-out infinite;
color: #0f1a13;
text-decoration: none;
padding: 1rem 2rem;
border-radius: 50px;
font-family: 'Nunito', sans-serif;
font-size: 1.3rem;
font-weight: 900;
box-shadow: 0 8px 30px rgba(46, 204, 113, 0.4), 0 0 60px rgba(46, 204, 113, 0.1);
border: 3px solid rgba(255, 255, 255, 0.2);
transition: all 0.3s ease;
position: relative;
overflow: hidden;
text-transform: uppercase;
letter-spacing: 0.05rem;
cursor: pointer;
}
.btn-create-room::before {
content: '';
position: absolute;
top: -50%;
left: -50%;
width: 200%;
height: 200%;
background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 60%);
transform: scale(0);
transition: transform 0.5s ease;
}
.btn-create-room:hover::before {
transform: scale(1);
}
.btn-create-room:hover {
transform: translateY(-4px) scale(1.05);
box-shadow: 0 12px 40px rgba(46, 204, 113, 0.6), 0 0 80px rgba(46, 204, 113, 0.2);
}
.btn-create-room .rocket {
font-size: 1.8rem;
animation: rocket-bounce 2s ease-in-out infinite;
display: inline-block;
}
@keyframes rocket-bounce {
0%, 100% { transform: translateY(0); }
50% { transform: translateY(-4px); }
}
.btn-create-room .fire-trail {
animation: sparkle 0.5s ease-in-out infinite;
display: inline-block;
}

/* АДАПТИВНОСТЬ */
@media (max-width: 900px) {
.preview-layout {
flex-direction: column;
align-items: stretch;
}
.preview-left {
width: 100%;
}
.preview-image {
width: 100%;
max-width: 400px;
margin-top: 2rem;
}
}
@media (max-width: 600px) {
.social-links a { width: 32px; height: 32px; }
.social-links a svg { width: 20px; height: 20px; }
.quiz-header h1 { font-size: 1.8rem; }
.quiz-meta { font-size: 0.85rem; gap: 0.5rem; }
.btn-create-room { font-size: 1rem; padding: 0.8rem 1.4rem; }
.floating-decor { display: none; }
.flip-face { padding: 0.8rem 1rem; }
.examples-title { font-size: 1.2rem; }
/* На узких экранах веер поменьше, чтобы углы не вылезали */
.flip-card:nth-child(1) { --fan: 3deg; }
.flip-card:nth-child(2) { --fan: 1.5deg; }
.flip-card:nth-child(4) { --fan: -1.5deg; }
.flip-card:nth-child(5) { --fan: -3deg; }
.flip-card.flipped { --fan: 0deg; }
}

/* ХЛЕБНЫЕ КРОШКИ */
.breadcrumbs {
max-width: 1200px;
margin: 0 auto;
padding: 0.5rem 1.5rem 0;
font-size: 0.9rem;
position: relative;
z-index: 1;
}
.breadcrumbs a {
color: #7a9a86;
text-decoration: none;
}
.breadcrumbs a:hover {
text-decoration: underline;
}
.breadcrumbs span[aria-current="page"] {
color: #a3c2b0;
}

