/* ============================================
   ФИРМЕННЫЙ СТИЛЬ "ВМЕСТЕ" - ЕДИНЫЙ ДЛЯ ВСЕХ СТРАНИЦ
   Основан на index-v2.html
   ============================================ */

/* === ПОДКЛЮЧЕНИЕ GOOGLE FONTS === */
@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@400;600;700&family=Days+One&family=Handlee&family=Kalam:wght@300;400;700&family=Open+Sans:wght@400;500;600;700&family=Montserrat:wght@400;600;700;800&family=Nunito:wght@400;600;700;800&family=Poppins:wght@400;600;700;800;900&family=Permanent+Marker&display=swap');

/* === БАЗОВЫЕ СТИЛИ === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Новая цветовая палитра */
    --color-dark: #393639;
    --color-coral: #fb6c6b;
    --color-coral-alt: #fa5734;
    --color-lime: #abf67c;
    --color-green: #2fb95d;
    --color-green-alt: #2fb95d;
    --color-beige: #f2f2f2;
    --color-bg: #f2f2f2;
    --color-white: #FFFFFF;
    --color-black: #000000;
    --color-yellow: #fb906b;
    --color-caveat: #354fba;
    --color-floating-1: #d6fbbf;
    --color-floating-2: #fececd;
    --color-floating-3: #fb906b;
}

body {
    font-family: 'Montserrat', sans-serif;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    background: var(--color-bg);
    color: var(--color-dark);
}

/* Парящие элементы перенесены в hub-layout.css */

/* === ЗАГОЛОВКИ === */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Days One', sans-serif;
}

h1 {
    font-size: 48px;
    margin-bottom: 16px;
    text-align: center;
    font-weight: 700;
}

h2 {
    font-size: 36px;
    margin-bottom: 16px;
    font-weight: 600;
}

h3 {
    font-size: 24px;
    margin-bottom: 12px;
    font-weight: 600;
}

/* === ЗАГОЛОВОК "ВМЕСТЕ" === */
.main-title {
    margin-bottom: 20px;
    animation: fadeInDown 0.8s ease;
    text-align: center;
}

.main-title .hey {
    font-family: 'Days One', sans-serif;
    font-size: 116px;
    font-weight: 700;
    color: var(--color-dark);
    display: inline-block;
    transform: rotate(-2deg);
    letter-spacing: 16px;
    text-shadow: 4px 4px 0px var(--color-coral);
    position: relative;
    text-transform: uppercase;
}

.letter-m {
    position: relative;
    display: inline-block;
}

.letter-m::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 20%;
    transform: translateX(calc(-50% - 5.5px));
    width: 35px;
    height: 35px;
    background: var(--color-lime);
    border-radius: 50%;
    z-index: 10;
    box-shadow: 
        2px 1px 0 0 #000,
        1px 2px 0 0 #000,
        -1px 1px 0 0 #000,
        0.5px -1px 0 0 #000,
        -1.5px 0.5px 0 0 #000,
        1.5px -0.5px 0 0 #000,
        -0.5px 1.5px 0 0 #000;
}

.letter-m::after {
    content: '';
    position: absolute;
    top: -5px;
    left: 70%;
    transform: translateX(calc(-50% + 3.5px));
    width: 35px;
    height: 35px;
    background: var(--color-coral-alt);
    border-radius: 50%;
    z-index: 10;
    box-shadow: 
        2px 1px 0 0 #000,
        1px 2px 0 0 #000,
        -1px 1px 0 0 #000,
        0.5px -1px 0 0 #000,
        -1.5px 0.5px 0 0 #000,
        1.5px -0.5px 0 0 #000,
        -0.5px 1.5px 0 0 #000;
}

.subtitle {
    font-family: 'Caveat', cursive;
    font-size: 52px;
    color: var(--color-dark);
    margin-bottom: 50px;
    font-weight: 400;
    animation: fadeInDown 1s ease;
    text-shadow: none;
    position: relative;
    display: block;
    text-align: center;
}

/* === КОНТЕЙНЕРЫ === */
.container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 80px 20px 40px;
    position: relative;
    z-index: 2;
    text-align: center;
}

.container.compact {
    max-width: 600px;
}

.container.full-width {
    max-width: 100%;
}

/* === КНОПКИ === */
.btn {
    background: rgba(245, 245, 245, 0.85);
    color: var(--color-dark);
    border: none;
    padding: 14px 32px;
    font-size: 17px;
    font-weight: 500;
    font-family: 'Days One', sans-serif;
    border-radius: 12px;
    cursor: pointer;
    margin: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 6px 0px rgba(0, 0, 0, 0.3),
        0 8px 16px rgba(0, 0, 0, 0.1);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.btn:hover:not(:disabled) {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 
        0 8px 0px rgba(0, 0, 0, 0.4),
        0 12px 24px rgba(0, 0, 0, 0.15);
    background: rgba(245, 245, 245, 0.6);
}

.btn:active:not(:disabled) {
    transform: translateY(-4px) scale(0.98);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn.full-width {
    width: 100%;
    margin: 8px 0;
}

.btn.secondary {
    background: rgba(255, 255, 255, 0.85);
}

/* === ФОРМЫ === */
.input-group {
    margin: 24px 0;
}

label {
    display: block;
    margin-bottom: 8px;
    font-size: 15px;
    font-weight: 500;
    font-family: 'Montserrat', sans-serif;
    color: var(--color-dark);
}

input[type="text"],
input[type="number"],
input[type="email"],
textarea,
select {
    width: 100%;
    padding: 14px 16px;
    font-size: 17px;
    border: 3px solid var(--color-black);
    border-radius: 12px;
    background: var(--color-white);
    color: var(--color-dark);
    transition: all 0.2s;
    font-family: 'Montserrat', sans-serif;
    box-shadow: 
        0 4px 0px rgba(0, 0, 0, 0.2),
        0 6px 12px rgba(0, 0, 0, 0.1);
}

input[type="text"]::placeholder,
input[type="number"]::placeholder,
input[type="email"]::placeholder,
textarea::placeholder {
    color: rgba(56, 54, 56, 0.5);
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="email"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--color-green);
    box-shadow: 
        0 4px 0px rgba(0, 193, 89, 0.3),
        0 8px 16px rgba(0, 193, 89, 0.15);
}

/* === КАРТОЧКИ === */
.quiz-card,
.card {
    background: rgba(245, 245, 245, 0.85);
    border-radius: 25px;
    padding: 25px 20px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    box-shadow: 
        0 6px 0px rgba(0, 0, 0, 0.3),
        0 8px 16px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.6s ease;
    animation-fill-mode: both;
}

.quiz-card:hover,
.card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 
        0 8px 0px rgba(0, 0, 0, 0.4),
        0 12px 24px rgba(0, 0, 0, 0.15);
    background: rgba(245, 245, 245, 0.6);
}

.quiz-card:active,
.card:active {
    transform: translateY(-4px) scale(0.98);
}

.quiz-title {
    font-family: 'Days One', sans-serif;
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--color-black);
    line-height: 1.2;
}

.quiz-description {
    font-family: 'Days One', sans-serif;
    font-size: 22px;
    color: #333;
    margin-bottom: 10px;
    line-height: 1.5;
    font-weight: 400;
}

.quiz-info {
    display: flex;
    justify-content: space-around;
    margin-top: auto;
    padding-top: 12px;
    border-top: 3px solid var(--color-black);
    font-size: 20px;
    width: 100%;
    font-weight: 600;
    font-family: 'Days One', sans-serif;
}

.quiz-info-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--color-black);
    font-family: 'Days One', sans-serif;
}

.quiz-info-icon {
    font-size: 20px;
    opacity: 1;
}

/* === КНОПКИ ВАРИАНТОВ ОТВЕТА С МЕТКАМИ А/Б/В/Г === */
.options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 30px 0;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.option-btn {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 20px;
    padding: 20px 24px;
    font-size: 17px;
    font-weight: 500;
    font-family: 'Days One', sans-serif;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 80px;
    text-align: left;
    box-shadow: 
        0 4px 0px rgba(0, 0, 0, 0.2),
        0 6px 12px rgba(0, 0, 0, 0.1);
    border: 3px solid;
    position: relative;
    width: 100%;
}

.option-label {
    font-size: 56px;
    font-weight: 900;
    font-family: 'Days One', sans-serif;
    line-height: 1;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
    min-width: 70px;
    text-align: center;
}

.option-text {
    font-size: 18px;
    font-weight: 500;
    font-family: 'Days One', sans-serif;
    line-height: 1.4;
    word-wrap: break-word;
    overflow-wrap: break-word;
    flex: 1;
}

/* Кнопка А - Мягкий розовый */
.option-btn.option-a {
    background: #FFE5E5;
    border-color: #FFB3B3;
    color: #8B3A3A;
}

.option-btn.option-a:hover:not(:disabled) {
    background: #FFD9D9;
    transform: translateY(-4px) scale(1.01);
    box-shadow: 
        0 6px 0px rgba(255, 179, 179, 0.4),
        0 8px 16px rgba(255, 179, 179, 0.25);
}

/* Кнопка Б - Мягкий голубой */
.option-btn.option-b {
    background: #E5F0FF;
    border-color: #B3D9FF;
    color: #3A5A8B;
}

.option-btn.option-b:hover:not(:disabled) {
    background: #D9E9FF;
    transform: translateY(-4px) scale(1.01);
    box-shadow: 
        0 6px 0px rgba(179, 217, 255, 0.4),
        0 8px 16px rgba(179, 217, 255, 0.25);
}

/* Кнопка В - Мягкий зеленый */
.option-btn.option-c {
    background: #E5FFE5;
    border-color: #B3FFB3;
    color: #3A8B3A;
}

.option-btn.option-c:hover:not(:disabled) {
    background: #D9FFD9;
    transform: translateY(-4px) scale(1.01);
    box-shadow: 
        0 6px 0px rgba(179, 255, 179, 0.4),
        0 8px 16px rgba(179, 255, 179, 0.25);
}

/* Кнопка Г - Мягкий желтый */
.option-btn.option-d {
    background: #FFF9E5;
    border-color: #FFE5B3;
    color: #8B6B3A;
}

.option-btn.option-d:hover:not(:disabled) {
    background: #FFF5D9;
    transform: translateY(-4px) scale(1.01);
    box-shadow: 
        0 6px 0px rgba(255, 229, 179, 0.4),
        0 8px 16px rgba(255, 229, 179, 0.25);
}

/* Подсветка при нажатии физической кнопки */
.option-btn.gamepad-highlight {
    animation: gamepadPulse 0.3s ease-out;
    transform: scale(1.1);
    box-shadow: 
        0 0 30px rgba(255, 255, 255, 0.8),
        0 6px 0px rgba(0, 0, 0, 0.3),
        0 8px 16px rgba(0, 0, 0, 0.25);
}

@keyframes gamepadPulse {
    0% {
        transform: scale(1);
        box-shadow: 
            0 4px 0px rgba(0, 0, 0, 0.2),
            0 6px 12px rgba(0, 0, 0, 0.1);
    }
    50% {
        transform: scale(1.15);
        box-shadow: 
            0 0 40px rgba(255, 255, 255, 1),
            0 6px 0px rgba(0, 0, 0, 0.3),
            0 8px 16px rgba(0, 0, 0, 0.25);
    }
    100% {
        transform: scale(1);
        box-shadow: 
            0 4px 0px rgba(0, 0, 0, 0.2),
            0 6px 12px rgba(0, 0, 0, 0.1);
    }
}

.option-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.option-btn.selected {
    background: rgba(0, 193, 89, 0.25);
    border-color: var(--color-green-alt);
    box-shadow: 
        0 4px 0px rgba(0, 193, 89, 0.3),
        0 8px 16px rgba(0, 193, 89, 0.2);
}

.option-btn.correct {
    background: rgba(47, 185, 93, 0.95) !important;
    border-color: #1E7A3D !important;
    box-shadow: 
        0 4px 0px rgba(47, 185, 93, 0.4),
        0 8px 16px rgba(47, 185, 93, 0.25) !important;
}

.option-btn.incorrect {
    background: rgba(251, 108, 107, 0.95) !important;
    border-color: #d85a5a !important;
    box-shadow: 
        0 4px 0px rgba(251, 108, 107, 0.4),
        0 8px 16px rgba(251, 108, 107, 0.25) !important;
}

/* Адаптивность */
@media (max-width: 768px) {
    .options {
        gap: 12px;
    }
    
    .option-btn {
        min-height: 70px;
        padding: 16px 20px;
        gap: 15px;
    }
    
    .option-label {
        font-size: 48px;
        min-width: 60px;
    }
    
    .option-text {
        font-size: 16px;
    }
}

/* Изображения вопросов */
.question-image-container {
    width: 100%;
    max-width: 900px;
    margin: 25px auto;
    text-align: center;
}

.question-image {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 16px;
    object-fit: contain;
    box-shadow: 
        0 4px 0px rgba(0, 0, 0, 0.2),
        0 8px 16px rgba(0, 0, 0, 0.1);
    border: 3px solid var(--color-black);
}

@media (max-width: 768px) {
    .question-image-container {
        margin: 20px 0;
    }
    
    .question-image {
        border-radius: 12px;
    }
}

/* === ТАЙМЕР === */
.timer {
    font-size: 48px;
    font-weight: 600;
    margin: 20px 0;
    text-align: center;
    font-family: 'Days One', sans-serif;
    background: rgba(245, 245, 245, 0.85);
    border-radius: 16px;
    padding: 12px 24px;
    display: inline-block;
    min-width: 80px;
    border: 3px solid var(--color-black);
    box-shadow: 
        0 4px 0px rgba(0, 0, 0, 0.2),
        0 6px 12px rgba(0, 0, 0, 0.1);
    color: var(--color-dark);
}

.timer.urgent {
    background: rgba(255, 118, 116, 0.35);
    border-color: var(--color-coral);
    color: var(--color-coral);
}

/* === СТАТУСЫ И СООБЩЕНИЯ === */
.error {
    background: var(--color-coral-alt);
    border: 4px solid var(--color-black);
    color: var(--color-white);
    padding: 20px;
    border-radius: 25px;
    margin: 20px 0;
    text-align: center;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    box-shadow: 
        0 6px 0px rgba(0, 0, 0, 0.3),
        0 8px 16px rgba(0, 0, 0, 0.2);
}

.success {
    background: var(--color-green-alt);
    border: 4px solid var(--color-black);
    color: var(--color-white);
    padding: 20px;
    border-radius: 25px;
    margin: 20px 0;
    text-align: center;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    box-shadow: 
        0 6px 0px rgba(0, 0, 0, 0.3),
        0 8px 16px rgba(0, 0, 0, 0.2);
}

.warning {
    background: var(--color-yellow);
    border: 4px solid var(--color-black);
    color: var(--color-dark);
    padding: 20px;
    border-radius: 25px;
    margin: 20px 0;
    text-align: center;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    box-shadow: 
        0 6px 0px rgba(0, 0, 0, 0.3),
        0 8px 16px rgba(0, 0, 0, 0.2);
}

/* === ЛИДЕРБОРД === */
.leaderboard-item {
    background: rgba(245, 245, 245, 0.85);
    padding: 20px 24px;
    margin: 12px 0;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 18px;
    transition: all 0.2s;
    border: 3px solid var(--color-black);
    box-shadow: 
        0 4px 0px rgba(0, 0, 0, 0.2),
        0 6px 12px rgba(0, 0, 0, 0.1);
    font-family: 'Days One', sans-serif;
}

.leaderboard-item:hover {
    transform: translateX(4px) translateY(-2px);
    box-shadow: 
        0 6px 0px rgba(0, 0, 0, 0.3),
        0 8px 16px rgba(0, 0, 0, 0.15);
}

.leaderboard-item.first {
    background: rgba(255, 235, 201, 0.85);
    font-weight: 600;
    border-color: var(--color-yellow);
    box-shadow: 
        0 6px 0px rgba(255, 118, 100, 0.3),
        0 8px 16px rgba(255, 118, 100, 0.15);
    position: relative;
    padding-left: 60px;
}

.leaderboard-item.first::before {
    content: '🥇';
    position: absolute;
    left: 20px;
    font-size: 32px;
}

.leaderboard-item.second {
    background: rgba(255, 255, 255, 0.85);
    border-color: var(--color-dark);
}

.leaderboard-item.second::before {
    content: '🥈';
    position: absolute;
    left: 20px;
    font-size: 32px;
}

.leaderboard-item.third {
    background: rgba(255, 235, 201, 0.85);
    border-color: var(--color-coral);
}

.leaderboard-item.third::before {
    content: '🥉';
    position: absolute;
    left: 20px;
    font-size: 32px;
}

/* === ПРОГРЕСС БАР === */
.progress-bar-container {
    width: 100%;
    height: 6px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    margin: 20px 0;
    overflow: hidden;
    border: 2px solid var(--color-black);
}

.progress-bar {
    height: 100%;
    background: var(--color-green-alt);
    border-radius: 10px;
    transition: width 0.3s ease;
}

/* === СТАТУСЫ === */
.status {
    font-size: 17px;
    margin: 16px 0;
    text-align: center;
    line-height: 1.5;
    font-family: 'Montserrat', sans-serif;
    color: var(--color-dark);
}

.status.small {
    font-size: 15px;
    margin: 8px 0;
}

/* === АНИМАЦИИ === */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Анимация wobble перенесена в hub-layout.css */

/* === АДАПТИВНОСТЬ === */
@media (max-width: 1024px) {
    .main-title .hey {
        font-size: 96px;
        letter-spacing: 12px;
    }

    .subtitle {
        font-size: 44px;
    }
}

@media (max-width: 768px) {
    .main-title .hey {
        font-size: 76px;
        letter-spacing: 10px;
    }

    .subtitle {
        font-size: 38px;
    }

    .container {
        padding: 60px 15px 30px;
    }

    h1 {
        font-size: 36px;
    }

    h2 {
        font-size: 28px;
    }

    .btn {
        padding: 12px 24px;
        font-size: 16px;
    }

    .timer {
        font-size: 36px;
    }
}

@media (max-width: 480px) {
    .main-title .hey {
        font-size: 56px;
        letter-spacing: 6px;
    }

    .subtitle {
        font-size: 28px;
    }

    .container {
        padding: 50px 10px 20px;
    }

    h1 {
        font-size: 28px;
    }

    .btn {
        padding: 12px 20px;
        font-size: 15px;
        margin: 6px 0;
    }

    .option-btn {
        padding: 16px 20px;
        font-size: 16px;
    }

    .letter-m::before,
    .letter-m::after {
        width: 23px;
        height: 23px;
        top: -3px;
        box-shadow: 
            1.25px 0.625px 0 0 #000,
            0.625px 1.25px 0 0 #000,
            -0.625px 0.625px 0 0 #000,
            0.3125px -0.625px 0 0 #000,
            -0.9375px 0.3125px 0 0 #000,
            0.9375px -0.3125px 0 0 #000,
            -0.3125px 0.9375px 0 0 #000;
    }

    .letter-m::before {
        left: 18%;
        transform: translateX(calc(-50% - 4px));
    }

    .letter-m::after {
        left: 72%;
        transform: translateX(calc(-50% + 2.5px));
    }
}

