/* ===============================================
   ГЛОБАЛЬНЫЕ СТИЛИ И CSS ПЕРЕМЕННЫЕ
   =============================================== */

:root {
    /* Основные цвета */
    --color-bg: #FFFFFF;
    --color-text: #2C3E50;
    --color-accent-1: #FF6B6B;
    --color-accent-2: #4ECDC4;
    --color-section-bg: #F8F9FA;
    --color-text-secondary: #6C757D;
    --color-border: #E0E0E0;
    
    /* Цвета для колеса */
    --wheel-color-1: #FF6B6B;
    --wheel-color-2: #FFD93D;
    --wheel-color-3: #6BCF7F;
    --wheel-color-4: #4ECDC4;
    --wheel-color-5: #A8E6CF;
    --wheel-color-6: #FF8B94;
    --wheel-color-7: #B4A7D6;
    --wheel-color-8: #FFA07A;
    
    /* Шрифты */
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', sans-serif;
    
    /* Размеры */
    --container-max-width: 1200px;
    --section-spacing: 80px;
    --mobile-section-spacing: 40px;
    --side-padding: 40px;
    --mobile-side-padding: 20px;
}

/* Сброс стилей */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Оптимизация для мобильных устройств */
button, a, .control-btn {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

textarea, input {
    touch-action: manipulation;
}

/* ===============================================
   УТИЛИТЫ
   =============================================== */

.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 var(--side-padding);
}

.hidden {
    display: none !important;
}

/* ===============================================
   HEADER
   =============================================== */

#header {
    position: sticky;
    top: 0;
    background-color: var(--color-bg);
    height: 70px;
    z-index: 1000;
    transition: box-shadow 0.3s ease;
}

#header.scrolled {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
    color: var(--color-text);
    text-decoration: none;
    height: 100%;
}

.logo-icon {
    font-size: 28px;
    display: flex;
    align-items: center;
}

.nav {
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav-link {
    font-size: 16px;
    color: var(--color-text);
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.nav-link:hover {
    color: var(--color-accent-2);
}

/* Кнопки управления (звук и тема) */
.header-controls {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-left: 15px;
    height: 100%;
}

.control-btn {
    background: transparent;
    border: 2px solid var(--color-text);
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 18px;
    padding: 0;
}

.control-btn:hover {
    background: var(--color-text);
    transform: scale(1.1);
}

.control-btn:hover .sound-icon,
.control-btn:hover .theme-icon {
    filter: grayscale(1) brightness(10);
}

.control-btn.muted .sound-icon {
    display: none;
}

.control-btn.muted::after {
    content: '🔇';
}

/* Dark theme */
body.dark-theme {
    --color-bg: #1a1a2e;
    --color-text: #e8e8e8;
    --color-text-secondary: #b8b8b8;
    --color-section-bg: #16213e;
    --color-border: #3a3a5a;
}

body.dark-theme .header {
    background-color: #16213e;
}

body.dark-theme .history-container {
    background: linear-gradient(135deg, #4a4a7a 0%, #5a3a7a 100%);
}

body.dark-theme .faq-item {
    background: #16213e;
    color: #e8e8e8;
}

body.dark-theme .faq-question {
    color: #e8e8e8;
}

body.dark-theme .control-btn {
    border-color: #e8e8e8;
}

body.dark-theme .control-btn:hover {
    background: #e8e8e8;
}

/* ===============================================
   HERO SECTION
   =============================================== */

.hero {
    padding: 60px 0 40px;
    text-align: center;
    animation: fadeIn 0.8s ease-out;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 36px;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 16px;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--color-text-secondary);
}

/* ===============================================
   WHEEL SECTION
   =============================================== */

.wheel-section {
    padding: var(--section-spacing) 0;
}

/* Двухколоночный grid-контейнер */
.wheel-layout-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
    margin-bottom: 60px;
}

/* Левая колонка: Колесо */
.wheel-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    position: sticky;
    top: 100px;
}

/* Правая колонка: Настройки */
.settings-column {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.wheel-container {
    position: relative;
    display: inline-block;
    margin-bottom: 20px;
    text-align: center;
}

/* Стрелка-указатель */
.wheel-arrow {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-top: 30px solid var(--color-accent-1);
    z-index: 10;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* Canvas колеса */
#wheelCanvas {
    display: block;
    border-radius: 50%;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    margin: 0 auto;
}

/* Кнопка "Крутить" */
.btn-primary {
    width: 200px;
    height: 55px;
    background: linear-gradient(135deg, #FF6B6B, #FF8E8E);
    border: none;
    border-radius: 28px;
    color: white;
    font-size: 18px;
    font-weight: 700;
    font-family: var(--font-heading);
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
    transition: all 0.3s ease;
    margin-top: 30px;
    animation: pulse 2s infinite;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.5);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    animation: none;
}

/* Блок результата */
.result {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    margin-top: 30px;
    animation: bounceIn 0.6s ease-out;
    width: 100%;
    max-width: 450px;
}

.result-text {
    font-size: 28px;
    font-weight: 700;
    font-family: var(--font-heading);
}

/* Счетчик вращений */
.spin-counter {
    font-size: 18px;
    color: var(--color-text-secondary);
    font-weight: 600;
    text-align: center;
    padding: 20px;
    background: var(--color-section-bg);
    border-radius: 16px;
}

.spin-counter span {
    font-weight: 700;
    color: var(--color-accent-1);
    font-size: 24px;
}

/* История результатов */
.history-container {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 25px;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.history-title {
    color: white;
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 15px;
    text-align: center;
}

.history-list {
    color: white;
    font-size: 18px;
    text-align: center;
    line-height: 1.8;
}

.history-item {
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 14px;
    border-radius: 8px;
    display: inline-block;
    margin: 4px;
    font-weight: 600;
}

/* Блок "Как пользоваться" */
.how-to-use {
    margin-top: 60px;
    margin-bottom: 60px;
    padding-top: 40px;
    border-top: 2px solid var(--color-border);
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.step-card {
    text-align: center;
    padding: 30px 20px;
    background: var(--color-section-bg);
    border-radius: 16px;
    transition: all 0.3s ease;
}

.step-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.step-number {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--color-accent-1), #FF8E8E);
    color: white;
    font-size: 32px;
    font-weight: 700;
    font-family: var(--font-heading);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.step-title {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 12px;
}

.step-description {
    font-size: 16px;
    color: var(--color-text-secondary);
    line-height: 1.6;
}

/* Форма создания колеса */
.custom-wheel-form {
    padding: 40px 30px;
    background: var(--color-section-bg);
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 12px;
}

.section-description {
    font-size: 15px;
    color: var(--color-text-secondary);
    margin-bottom: 24px;
}

/* Textarea */
.options-textarea {
    width: 100%;
    max-width: 600px;
    height: 120px;
    border: 2px solid var(--color-border);
    border-radius: 12px;
    padding: 16px;
    font-size: 16px;
    font-family: var(--font-body);
    resize: vertical;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.options-textarea:focus {
    outline: none;
    border-color: var(--color-accent-2);
    box-shadow: 0 0 0 3px rgba(78, 205, 196, 0.1);
}

/* Таймер контроль */
.timer-control {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin: 25px 0;
}

.timer-label {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text);
}

.timer-input {
    width: 80px;
    padding: 10px 15px;
    font-size: 18px;
    font-weight: 600;
    border: 2px solid var(--color-border);
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
    color: var(--color-text);
}

.timer-input:hover {
    border-color: var(--color-accent-2);
}

.timer-input:focus {
    outline: none;
    border-color: var(--color-accent-1);
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1);
}

/* Вторичная кнопка */
.btn-secondary {
    width: 180px;
    height: 50px;
    border: 2px solid var(--color-accent-2);
    background: transparent;
    color: var(--color-accent-2);
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    font-family: var(--font-heading);
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: var(--color-accent-2);
    color: white;
    transform: translateY(-2px);
}

.btn-secondary:active {
    transform: scale(0.98);
}

/* Кнопка "Поделиться" */
.btn-share {
    width: 180px;
    height: 50px;
    border: 2px solid var(--color-text);
    background: transparent;
    color: var(--color-text);
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    font-family: var(--font-heading);
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 15px;
}

.btn-share:hover {
    background: var(--color-text);
    color: white;
    transform: translateY(-2px);
}

.btn-share:active {
    transform: scale(0.98);
}

/* Уведомление о копировании */
.copy-notification {
    background: #4ECDC4;
    color: white;
    padding: 16px 32px;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 700;
    font-family: var(--font-heading);
    position: fixed;
    top: 100px;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    z-index: 10000;
    animation: slideDown 0.3s ease-out;
}

/* Уведомления валидации */
.validation-notification {
    padding: 16px 32px;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 700;
    font-family: var(--font-heading);
    position: fixed;
    top: 100px;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    z-index: 10000;
    animation: slideDown 0.3s ease-out;
    transition: opacity 0.3s ease;
}

.validation-notification.success {
    background: #4ECDC4;
    color: white;
}

.validation-notification.error {
    background: #FF6B6B;
    color: white;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Блок "Примеры использования" */
.use-cases {
    margin-top: 60px;
    margin-bottom: 40px;
}

.use-cases-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    margin-top: 30px;
}

.use-case-card {
    background: white;
    border-radius: 16px;
    padding: 25px 20px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.use-case-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.use-case-icon {
    font-size: 48px;
    margin-bottom: 15px;
    line-height: 1;
}

.use-case-title {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 10px;
    line-height: 1.3;
}

.use-case-text {
    font-size: 15px;
    color: var(--color-text-secondary);
    line-height: 1.5;
    margin: 0;
}

/* Кнопка "Назад к шаблонам" */
.btn-back {
    display: inline-block;
    padding: 14px 32px;
    background: transparent;
    border: 2px solid var(--color-accent-2);
    color: var(--color-accent-2);
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    font-family: var(--font-heading);
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-back:hover {
    background: var(--color-accent-2);
    color: white;
    transform: translateY(-2px);
}

/* ===============================================
   TEMPLATES SECTION
   =============================================== */

.templates-section {
    padding: var(--section-spacing) 0;
    background-color: var(--color-section-bg);
    text-align: center;
}

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

/* Карточка шаблона */
.template-card {
    background: white;
    border-radius: 16px;
    padding: 32px 24px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    text-align: center;
    display: flex;
    flex-direction: column;
}

.template-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.template-icon {
    font-size: 56px;
    margin-bottom: 16px;
}

.template-title {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 12px;
}

.template-description {
    font-size: 16px;
    color: var(--color-text-secondary);
    margin-bottom: 24px;
    flex-grow: 1;
}

.btn-template {
    width: 100%;
    height: 48px;
    background: var(--color-accent-2);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 16px;
    font-weight: 700;
    font-family: var(--font-heading);
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-template:hover {
    background: #3db8b0;
    transform: translateY(-2px);
}

.btn-template:active {
    transform: scale(0.98);
}

/* Секция со ссылками на специальные шаблоны */
.templates-links-section {
    padding: var(--section-spacing) 0;
    background-color: white;
}

.templates-links-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.template-link-card {
    position: relative;
    display: block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 30px 25px;
    text-align: center;
    text-decoration: none;
    color: white;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.25);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.template-link-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.template-link-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.4);
}

.template-link-card:hover::before {
    opacity: 1;
}

.template-link-card .template-icon {
    font-size: 56px;
    margin-bottom: 20px;
    line-height: 1;
    display: block;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.template-link-card .template-title {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 700;
    color: white;
    margin-bottom: 12px;
    line-height: 1.3;
}

.template-link-card .template-description {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    margin-bottom: 20px;
}

.template-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    font-family: var(--font-heading);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-template-link {
    display: inline-block;
    padding: 12px 28px;
    background: white;
    color: #667eea;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    font-family: var(--font-heading);
    transition: all 0.3s ease;
}

.template-link-card:hover .btn-template-link {
    background: rgba(255, 255, 255, 0.95);
    transform: scale(1.05);
}

/* ===============================================
   ABOUT SECTION
   =============================================== */

.about-section {
    padding: var(--section-spacing) 0;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    font-size: 18px;
    line-height: 1.8;
}

.about-content p {
    margin-bottom: 20px;
}

.about-list {
    list-style: none;
    margin-top: 20px;
}

.about-list li {
    padding: 12px 0;
    font-size: 18px;
    border-bottom: 1px solid var(--color-border);
}

.about-list li:last-child {
    border-bottom: none;
}

/* ===============================================
   FAQ SECTION
   =============================================== */

.faq-section {
    padding: var(--section-spacing) 0;
    background: var(--color-section-bg);
}

.faq-list {
    max-width: 900px;
    margin: 40px auto 0;
}

.faq-item {
    background: white;
    padding: 30px;
    margin-bottom: 20px;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.faq-item:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.faq-question {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 15px;
    line-height: 1.4;
}

.faq-answer {
    font-size: 16px;
    color: var(--color-text-secondary);
    line-height: 1.8;
}

.faq-answer p {
    margin: 0;
}

/* ===============================================
   FOOTER
   =============================================== */

.footer {
    background-color: #333;
    color: white;
    padding: 60px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 50px;
    margin-bottom: 40px;
}

.footer-column {
    text-align: left;
}

.footer-title {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    color: white;
}

.footer-text {
    font-size: 16px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
}

.footer-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-list li {
    padding: 10px 0;
    font-size: 16px;
}

.footer-list a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.footer-list a:hover {
    color: #4ECDC4;
    transform: translateX(5px);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
}

.footer-bottom p {
    margin: 0;
}

.footer-metrika {
    text-align: center;
    padding: 20px 0;
}

/* Кнопка "Наверх" */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--color-accent-1);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    z-index: 9999;
}

.scroll-to-top:hover {
    background: #FF5555;
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.scroll-to-top.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Header Dropdown */
.nav-dropdown {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.nav-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.nav-dropdown-arrow {
    font-size: 10px;
    transition: transform 0.3s ease;
}

.nav-dropdown.active .nav-dropdown-arrow {
    transform: rotate(180deg);
}

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    min-width: 240px;
    padding: 12px 0;
    margin-top: 10px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.nav-dropdown.active .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown-item {
    display: block;
    padding: 14px 20px;
    color: var(--color-text);
    text-decoration: none;
    font-size: 15px;
    transition: all 0.2s ease;
    min-height: 48px;
}

.nav-dropdown-item:hover {
    background: var(--color-section-bg);
    color: var(--color-accent-2);
}

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

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

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
}

/* ===============================================
   АДАПТИВНЫЙ ДИЗАЙН (MOBILE)
   =============================================== */

@media (max-width: 768px) {
    :root {
        --section-spacing: var(--mobile-section-spacing);
        --side-padding: var(--mobile-side-padding);
    }

    /* Двухколоночный layout на мобильных - превращается в одну колонку */
    .wheel-layout-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    /* Убираем sticky на мобильных */
    .wheel-column {
        position: static;
    }

    /* Dropdown на мобильных */
    .nav-dropdown-menu {
        position: fixed;
        left: 50%;
        right: auto;
        transform: translateX(-50%) translateY(-10px);
        width: 90%;
        max-width: 320px;
    }

    .nav-dropdown.active .nav-dropdown-menu {
        transform: translateX(-50%) translateY(0);
    }

    .nav-dropdown-item {
        padding: 16px 20px;
        min-height: 56px;
        font-size: 16px;
        text-align: center;
    }

    /* Hero */
    .hero-title {
        font-size: 24px;
    }

    .hero-subtitle {
        font-size: 15px;
    }

    /* Header */
    #header {
        height: 60px;
    }

    .header-content {
        height: 60px;
    }

    .logo {
        font-size: 18px;
    }

    .logo-icon {
        font-size: 24px;
    }

    .logo-text {
        display: none;
    }

    .nav {
        gap: 10px;
        align-items: center;
        justify-content: center;
    }

    .nav-link {
        font-size: 13px;
        padding: 6px 4px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
    }

    .nav-dropdown-toggle {
        justify-content: center;
    }
    
    /* Колесо */
    #wheelCanvas {
        width: 300px !important;
        height: 300px !important;
    }
    
    .wheel-arrow {
        top: -15px;
        border-left-width: 15px;
        border-right-width: 15px;
        border-top-width: 25px;
    }
    
    /* Кнопки */
    .btn-primary {
        width: 100%;
        max-width: 100%;
        font-size: 16px;
        min-height: 50px;
        padding: 14px 20px;
    }

    .btn-secondary {
        width: 100%;
        max-width: 100%;
        min-height: 50px;
        padding: 14px 20px;
        font-size: 15px;
    }

    .btn-share {
        width: 100%;
        max-width: 100%;
        min-height: 50px;
        padding: 14px 20px;
        font-size: 15px;
    }
    
    /* Header controls */
    .header-controls {
        gap: 6px;
        margin-left: 6px;
    }

    .control-btn {
        width: 40px;
        height: 40px;
        font-size: 18px;
        min-width: 40px;
        min-height: 40px;
    }
    
    /* Результат */
    .result-text {
        font-size: 24px;
    }
    
    /* Секции */
    .section-title {
        font-size: 22px;
    }

    .section-description {
        font-size: 14px;
    }

    /* Результат */
    .result-text {
        font-size: 22px;
    }
    
    /* Форма создания колеса */
    .custom-wheel-form {
        padding: 30px 20px;
        margin-bottom: 30px;
    }

    .options-textarea {
        font-size: 16px;
        padding: 16px;
        min-height: 120px;
    }
    
    /* Таймер контроль (мобильная версия) */
    .timer-control {
        flex-direction: column;
        gap: 10px;
        margin: 20px 0;
    }
    
    .timer-label {
        font-size: 14px;
        text-align: center;
    }
    
    .timer-input {
        width: 70px;
        font-size: 16px;
    }
    
    /* Шаблоны */
    .templates-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    /* Шаги */
    .steps-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    /* FAQ на мобильных */
    .faq-item {
        padding: 20px;
    }
    
    .faq-question {
        font-size: 16px;
    }
    
    .faq-answer {
        font-size: 14px;
    }
    
    /* История результатов */
    .result-history {
        padding: 15px;
        font-size: 14px;
    }
    
    /* Footer на мобильных */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
    
    .footer-column h3 {
        font-size: 16px;
    }
    
    .footer-link {
        font-size: 14px;
    }
    
    .footer-bottom {
        font-size: 13px;
        padding: 15px 20px;
    }
    
    .scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 56px;
        height: 56px;
        font-size: 24px;
        min-width: 56px;
        min-height: 56px;
    }
    
    /* Отступы для безопасной зоны iPhone */
    @supports (padding: max(0px)) {
        body {
            padding-left: env(safe-area-inset-left);
            padding-right: env(safe-area-inset-right);
            padding-bottom: env(safe-area-inset-bottom);
        }

        #header {
            padding-left: max(20px, env(safe-area-inset-left));
            padding-right: max(20px, env(safe-area-inset-right));
            padding-top: env(safe-area-inset-top);
        }

        .footer {
            padding-bottom: max(30px, env(safe-area-inset-bottom));
        }
    }
    
    .step-number {
        width: 50px;
        height: 50px;
        font-size: 28px;
    }
    
    .step-title {
        font-size: 18px;
    }
    
    .step-description {
        font-size: 14px;
    }
    
    /* Примеры использования */
    .use-cases-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .use-case-icon {
        font-size: 42px;
    }
    
    .use-case-title {
        font-size: 16px;
    }
    
    .use-case-text {
        font-size: 14px;
    }
    
    .btn-back {
        width: 100%;
        max-width: 300px;
        text-align: center;
    }
    
    /* Готовые шаблоны (ссылки) */
    .templates-links-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .template-link-card {
        padding: 25px 20px;
    }
    
    .template-link-card .template-icon {
        font-size: 48px;
        margin-bottom: 15px;
    }
    
    .template-link-card .template-title {
        font-size: 20px;
    }
    
    .template-link-card .template-description {
        font-size: 14px;
    }
    
    .template-link-icon {
        font-size: 56px;
    }
    
    .template-link-title {
        font-size: 18px;
    }
    
    .template-link-description {
        font-size: 14px;
    }
    
    .btn-template-link {
        width: 100%;
    }
    
    /* About */
    .about-content {
        font-size: 16px;
    }
    
    .about-list li {
        font-size: 16px;
    }
    
    /* FAQ */
    .faq-item {
        padding: 20px;
        margin-bottom: 15px;
    }
    
    .faq-question {
        font-size: 18px;
    }
    
    .faq-answer {
        font-size: 15px;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .footer-column {
        text-align: center;
    }
    
    .footer-title {
        font-size: 18px;
        margin-bottom: 15px;
    }
    
    .footer-text {
        font-size: 15px;
    }
    
    .footer-list li {
        padding: 8px 0;
        font-size: 15px;
    }
    
    .scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 56px;
        height: 56px;
        font-size: 24px;
        min-width: 56px;
        min-height: 56px;
    }
    
    .footer-column {
        text-align: center;
    }
    
    body {
        font-size: 16px;
    }
}

/* Tablet размер */
@media (min-width: 769px) and (max-width: 1024px) {
    .templates-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
