/* ================================================= */
/* Глобальные переменные и базовые стили */
/* ================================================= */
:root {
    /* Цветовая палитра */
    --primary: #4361EE;
    --primary-light: #4895EF;
    --primary-dark: #3A0CA3;
    --secondary: #F72585;
    --accent: #4CC9F0;
    --dark: #212529;
    --light: #F8F9FA;
    --gray: #6C757D;
    --success: #38B000;
    
    /* Тени */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.12);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
    
    /* Скругления */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    
    /* Отступы */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Roboto Flex', sans-serif;
    color: var(--dark);
    background-color: var(--light);
    line-height: 1.6;
}

h1, h2, h3, h4 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

/* ================================================= */
/* Стили для хедера */
/* ================================================= */
.main-header {
    background-color: white;
    box-shadow: var(--shadow-md);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.header-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md) 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.logo-icon {
    color: var(--primary);
    font-size: 1.8rem;
}

.logo-text {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.main-menu ul {
    display: flex;
    list-style: none;
    gap: var(--space-lg);
}

.main-menu a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 600;
    font-size: 1rem;
    position: relative;
    padding: var(--space-sm) 0;
}

.main-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transition: width 0.3s;
}

.main-menu a:hover::after {
    width: 100%;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.action-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--gray);
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.action-btn:hover {
    color: var(--primary);
    transform: translateY(-2px);
}

.badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: var(--secondary);
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--dark);
    cursor: pointer;
}

/* ================================================= */
/* Стили для герой-секции */
/* ================================================= */
.hero-section {
    padding: 120px 0 80px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    position: relative;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
}

.hero-image {
    position: absolute;
    right: 20%;
    top: 50%;
    transform: translateY(-50%);
    width: 40%;
    max-width: 500px;
    z-index: 1;
}

.hero-image img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.hero-title {
    font-size: 2.5rem;
    margin-bottom: var(--space-md);
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--gray);
    margin-bottom: var(--space-xl);
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: var(--radius-lg);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    color: white;
    box-shadow: 0 4px 14px rgba(67, 97, 238, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(67, 97, 238, 0.4);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

/* ================================================= */
/* Стили для плиточной сетки */
/* ================================================= */
.tile-section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: var(--space-xl);
    font-size: 2rem;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    margin: var(--space-md) auto 0;
    border-radius: 2px;
}

.tile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-lg);
}

.tile-item {
    background: white;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
    text-decoration: none;
    color: var(--dark);
    display: flex;
    flex-direction: column;
}

.tile-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.tile-icon {
    background: linear-gradient(135deg, var(--primary-light), var(--accent));
    color: white;
    padding: var(--space-lg);
    text-align: center;
    font-size: 2rem;
}

.tile-content {
    padding: var(--space-md);
    flex-grow: 1;
}

.tile-title {
    font-size: 1.2rem;
    margin-bottom: var(--space-sm);
}

.tile-description {
    color: var(--gray);
    font-size: 0.9rem;
}

/* ================================================= */
/* Стили для формы заказа */
/* ================================================= */
.order-section {
    padding: 80px 0;
    background-color: #f8f9fa;
}

.order-container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.order-header {
    background: linear-gradient(90deg, var(--primary), var(--primary-dark));
    color: white;
    padding: var(--space-lg);
    text-align: center;
}

.order-form {
    padding: var(--space-lg);
}

.form-group {
    margin-bottom: var(--space-md);
}

.form-row {
    display: flex;
    gap: var(--space-md);
}

.form-row .form-group {
    flex: 1;
}

label {
    display: block;
    margin-bottom: var(--space-xs);
    font-weight: 600;
    color: var(--dark);
}

input, select, textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

textarea {
    min-height: 120px;
    resize: vertical;
}

.file-upload {
    position: relative;
}

.file-upload input {
    opacity: 0;
    position: absolute;
    width: 1px;
    height: 1px;
}

.file-upload label {
    display: inline-block;
    padding: 12px 24px;
    background: var(--light);
    border: 1px dashed var(--gray);
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-align: center;
    width: 100%;
}

.file-upload label:hover {
    border-color: var(--primary);
}

.submit-btn {
    width: 100%;
    margin-top: var(--space-md);
}

/* ================================================= */
/* Стили для калькулятора */
/* ================================================= */
.calculator-section {
    padding: 80px 0;
    background: white;
}

.calculator-container {
    max-width: 900px;
    margin: 0 auto;
    background: var(--light);
    border-radius: var(--radius-xl);
    padding: var(--space-lg);
    box-shadow: var(--shadow-md);
}

.calculator-steps {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.calculator-step {
    display: none;
}

.calculator-step.active {
    display: block;
}

.step-title {
    font-size: 1.2rem;
    margin-bottom: var(--space-md);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.step-number {
    background: var(--primary);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-md);
}

.option-card {
    background: white;
    border-radius: var(--radius-md);
    padding: var(--space-md);
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid #eee;
}

.option-card.selected {
    border-color: var(--primary);
    background-color: rgba(67, 97, 238, 0.05);
}

.option-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-sm);
    border-color: var(--primary-light);
}

.option-card i {
    font-size: 1.8rem;
    color: var(--primary);
    margin-bottom: var(--space-sm);
}

.option-card h4 {
    margin-bottom: var(--space-xs);
    font-size: 1rem;
}

.option-card p {
    color: var(--gray);
    font-size: 0.9rem;
}

.calculator-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: var(--space-xl);
}

.calculator-result {
    text-align: center;
    margin-top: var(--space-xl);
    padding-top: var(--space-lg);
    border-top: 1px solid #eee;
    display: none;
}

.price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin: var(--space-sm) 0;
}

.note {
    color: var(--gray);
    font-size: 0.9rem;
    display: block;
    margin-bottom: var(--space-md);
}

#prevStep {
    display: none;
}

#prevStep:not([disabled]) {
    display: block;
    opacity: 1;
    pointer-events: auto;
}

.calculator-step {
    transition: opacity 0.3s, transform 0.3s;
}

.calculator-step:not(.active) {
    opacity: 0;
    transform: translateX(20px);
    pointer-events: none;
    position: absolute;
}

.calculator-step.active {
    opacity: 1;
    transform: translateX(0);
    position: relative;
}

/* ================================================= */
/* Стили для отзывов */
/* ================================================= */
.reviews-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.reviews-container {
    max-width: 1000px;
    margin: 0 auto;
}

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-lg);
}

.review-card {
    background: white;
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    box-shadow: var(--shadow-sm);
    position: relative;
}

.review-card::before {
    content: '"';
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 4rem;
    color: rgba(67, 97, 238, 0.1);
    font-family: serif;
    line-height: 1;
}

.review-content {
    margin-bottom: var(--space-md);
    position: relative;
    z-index: 1;
}

.review-author {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    overflow: hidden;
}

.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-info h4 {
    font-size: 1rem;
    margin-bottom: 2px;
}

.author-info p {
    color: var(--gray);
    font-size: 0.8rem;
}

.review-rating {
    color: #FFD700;
    margin-top: var(--space-xs);
}

.review-author .author-avatar {
    display: none;
}

.review-content {
    margin-bottom: 20px;
}

/* ================================================= */
/* Стили для платежной системы */
/* ================================================= */
.payments-section {
    padding: 60px 0;
    background: white;
}

.payments-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-md);
    max-width: 800px;
    margin: 0 auto;
}

.payment-method {
    background: white;
    border-radius: var(--radius-sm);
    padding: var(--space-sm);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 120px;
    height: 60px;
}

.payment-method img {
    max-width: 100%;
    max-height: 100%;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: all 0.3s;
}

.payment-method:hover img {
    filter: grayscale(0%);
    opacity: 1;
}

/* ================================================= */
/* Стили для футера */
/* ================================================= */
.footer {
    background: var(--dark);
    color: white;
    padding: 60px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
}

.footer-column h3 {
    color: white;
    margin-bottom: var(--space-md);
    font-size: 1.2rem;
    position: relative;
    padding-bottom: var(--space-sm);
}

.footer-column h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--accent);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: var(--space-sm);
}

.footer-links a {
    color: #adb5bd;
    text-decoration: none;
    transition: color 0.3s;
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--accent);
}

.social-links {
    display: flex;
    gap: var(--space-md);
    margin-top: var(--space-md);
}

.social-links a {
    color: white;
    font-size: 1.2rem;
    transition: color 0.3s;
}

.social-links a:hover {
    color: var(--accent);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: var(--space-md) 0;
    text-align: center;
    font-size: 0.9rem;
    color: #adb5bd;
}

/* ================================================= */
/* Стили для рекламного блока */
/* ================================================= */
.promo-section {
    padding: 40px 0;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
}

.promo-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
    border-radius: var(--radius-xl);
    padding: var(--space-md);
    box-shadow: var(--shadow-lg);
    color: var(--dark);
    min-height: 180px;
}

.promo-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 15px;
    max-width: 400px;
    text-align: center;
    position: relative;
    color: #333;
}

.modal-content h3 {
    color: var(--primary-dark);
    margin-bottom: 15px;
}

.modal-content p {
    color: #555;
    margin-bottom: 20px;
}

.promo-code {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--secondary);
    margin: 10px 0;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 5px;
    letter-spacing: 1px;
}

.promo-modal .modal-content {
    color: #333;
}

.promo-modal .modal-content h3 {
    color: var(--primary-dark);
}

.promo-modal .modal-content p {
    color: #555;
}

.promo-modal .promo-code {
    color: var(--secondary);
}

.promo-content {
    flex: 1;
    padding: var(--space-md);
}

.promo-content h3 {
    font-size: 1.3rem;
    margin-bottom: var(--space-sm);
    color: var(--primary-dark);
}

.promo-content p {
    margin-bottom: var(--space-md);
    color: var(--gray);
    font-size: 0.9rem;
}

.promo-image {
    width: 250px;
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 10rem;
    position: relative !important;
    left: -65px !important;
    margin-left: 0 !important;
}

.promo-section {
    padding: 80px 0 40px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    position: relative;
    overflow: visible;
}

.promo-banner {
    background: white;
    border-radius: 16px;
    padding: 40px;
    position: relative;
    z-index: 1;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-top: 60px;
}

.sticker-image {
    position: absolute;
    top: 0;
    left: 55%;
    transform: translateX(-50%);
    z-index: 10;
    pointer-events: none;
    max-height: 100%;
    overflow: hidden;
}

.sticker-image img {
    width: 450px;
    height: auto;
    display: block;
    object-fit: cover;
    object-position: bottom;
    position: relative;
    top: -20%;
}

#promoGift i.fas {
    font-size: 10rem;
    color: rgb(247, 37, 133);
}

/* ================================================= */
/* Стили для блока заказа и игры */
/* ================================================= */
.order-game-section {
    padding: 80px 0;
    background: var(--light);
}

.order-game-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
}

.order-container {
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.game-container {
    background: white;
    border-radius: var(--radius-xl);
    padding: var(--space-lg);
    box-shadow: var(--shadow-md);
}

.order-form {
    padding: var(--space-md);
}

.order-form .form-group {
    margin-bottom: var(--space-sm);
}

.order-form input,
.order-form select,
.order-form textarea {
    padding: 10px 12px;
    font-size: 0.9rem;
}

.order-form textarea {
    min-height: 80px;
}

/* ================================================= */
/* Стили для карусели отзывов */
/* ================================================= */
.reviews-carousel {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    overflow: hidden;
    padding: 0 50px;
}

.reviews-track {
    display: flex;
    transition: transform 0.5s ease;
    gap: var(--space-md);
}

.review-card {
    min-width: 100%;
    box-sizing: border-box;
    padding: 0 var(--space-sm);
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow: var(--shadow-md);
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.prev-btn {
    left: 0;
}

.next-btn {
    right: 0;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    margin-top: var(--space-md);
    gap: var(--space-sm);
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ddd;
    border: none;
    cursor: pointer;
    padding: 0;
}

.dot.active {
    background: var(--primary);
}

/* ================================================= */
/* Стили для блока "Как мы работаем" */
/* ================================================= */
.process-section {
    padding: 80px 0;
    background: white;
}

.process-steps {
    position: relative;
    display: flex;
    justify-content: space-between;
    margin-top: 60px;
}

.process-line {
    position: absolute;
    top: 40px;
    left: 0;
    right: 0;
    height: 4px;
    background: #eee;
    z-index: 1;
}

.process-line-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    width: 0;
    transition: width 0.5s;
}

.process-step {
    position: relative;
    z-index: 2;
    width: 18%;
    text-align: center;
}

.step-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 4px solid #eee;
    position: relative;
    transition: all 0.3s;
}

.process-step:hover .step-icon {
    border-color: var(--primary-light);
    transform: scale(1.1);
}

.step-icon i {
    font-size: 1.8rem;
    color: var(--primary);
}

.step-number {
    position: absolute;
    top: -10px;
    right: -10px;
    background: var(--secondary);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.process-step h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--dark);
}

.process-step p {
    font-size: 0.9rem;
    color: var(--gray);
}

/* ================================================= */
/* Стили для мини-игры */
/* ================================================= */
.game-title {
    font-size: 1.5rem;
    margin-bottom: var(--space-md);
    color: var(--primary-dark);
    text-align: center;
}

.game-description {
    text-align: center;
    margin-bottom: var(--space-lg);
    color: var(--gray);
}

.game-area {
    background: #f8f9fa;
    border-radius: var(--radius-md);
    padding: var(--space-md);
}

.game-objective {
    font-weight: 600;
    margin-bottom: var(--space-md);
    color: var(--dark);
}

.bibliography-items {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

.bib-item {
    background: white;
    border: 1px solid #ddd;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    cursor: grab;
    transition: all 0.2s;
}

.bib-item:active {
    cursor: grabbing;
}

.bib-item:hover {
    background: var(--primary-light);
    color: white;
    border-color: var(--primary-light);
}

.bibliography-target {
    min-height: 100px;
    border: 2px dashed #ddd;
    border-radius: var(--radius-md);
    padding: var(--space-sm);
    margin-bottom: var(--space-md);
    transition: border-color 0.3s;
}

.bibliography-target.highlight {
    border-color: var(--primary);
    background-color: rgba(67, 97, 238, 0.05);
}

.game-feedback {
    text-align: center;
    margin: var(--space-md) 0;
    font-weight: 600;
    min-height: 24px;
}

#checkBibBtn {
    display: block;
    margin: 0 auto;
    background: var(--primary);
    color: white;
}

#checkBibBtn:hover {
    background: var(--primary-dark);
}

.game-success {
    text-align: center;
    padding: var(--space-md);
    background: rgba(56, 176, 0, 0.1);
    border-radius: var(--radius-md);
    margin-top: var(--space-md);
    display: none;
}

.game-success h3 {
    color: var(--success);
    margin-bottom: var(--space-sm);
}

.coupon-code {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark);
    margin: var(--space-sm) 0;
    letter-spacing: 1px;
}

/* ================================================= */
/* Стили для AI ассистента */
/* ================================================= */
.ai-assistant {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
}

.ai-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(67, 97, 238, 0.3);
    transition: all 0.3s;
    border: none;
}

.ai-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(67, 97, 238, 0.4);
}

.ai-chat {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.ai-header {
    padding: var(--space-md);
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ai-title {
    font-weight: 600;
    font-size: 1.1rem;
}

.ai-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
}

.ai-messages {
    padding: var(--space-md);
    height: 300px;
    overflow-y: auto;
    background: #f8f9fa;
}

.message {
    margin-bottom: var(--space-sm);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    max-width: 80%;
}

.ai-message {
    background: white;
    align-self: flex-start;
    border: 1px solid #eee;
}

.user-message {
    background: var(--primary);
    color: white;
    align-self: flex-end;
    margin-left: auto;
}

.ai-input {
    display: flex;
    padding: var(--space-md);
    border-top: 1px solid #eee;
}

.ai-input input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: var(--radius-sm);
    margin-right: var(--space-sm);
}

.ai-send {
    background: var(--primary);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.3s;
}

.ai-send:hover {
    background: var(--primary-dark);
}

/* ================================================= */
/* Стили для анимации подарка */
/* ================================================= */
.promo-image {
    width: 150px;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 4rem;
    cursor: pointer;
    animation: shake 3s infinite;
    transition: transform 0.3s;
}

.promo-image:hover {
    animation: shake 1s infinite;
    transform: scale(1.1);
}

@keyframes shake {
    0%, 100% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
}

/* ================================================= */
/* Стили для модального окна */
/* ================================================= */
.promo-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 15px;
    max-width: 400px;
    text-align: center;
    position: relative;
    animation: modalFadeIn 0.5s;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-50px); }
    to { opacity: 1; transform: translateY(0); }
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 1.5rem;
    cursor: pointer;
}

.promo-code-wrapper {
    margin: 20px 0;
}

.promo-code {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--secondary);
    margin: 10px 0;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 5px;
    letter-spacing: 1px;
}

.copy-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 10px;
    transition: background 0.3s;
}

.copy-btn:hover {
    background: var(--primary-dark);
}

/* ================================================= */
/* Стили для конфетти */
/* ================================================= */
.confetti {
    position: fixed;
    width: 12px;
    height: 12px;
    opacity: 1;
    z-index: 10001;
    animation: confettiFall 3s linear forwards;
    pointer-events: none;
}

@keyframes confettiFall {
    0% {
        transform: translateY(-100px) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* ================================================= */
/* Стили для формы отправки письма */
/* ================================================= */
.feedback-form .btn-primary,
.auth-form .btn-primary,
.author-form .btn-primary {
    width: auto;
    padding: 12px 40px;
    margin: 20px auto 0;
    display: block;
}

/* ================================================= */
/* Стили для модального окна авторизации */
/* ================================================= */
.auth-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

/* Обновленные стили для модального окна */
.modal-content {
    max-width: 380px;
    width: 90%;
    padding: 25px;
}

/* Центрирование вкладок */
.auth-tabs-container {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.auth-tabs {
    display: inline-flex;
    background: #f5f5f5;
    border-radius: 30px;
    padding: 5px;
}

.auth-tab {
    padding: 8px 20px;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: 20px;
    font-weight: 600;
    transition: all 0.3s;
}

.auth-tab.active {
    background: #4361EE;
    color: white;
}

/* Стили для полей ввода */
.auth-form .form-group {
    margin-bottom: 15px;
}

.auth-form input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
}

/* Особые стили для пароля и капчи */
.auth-form input[type="password"] {
    padding: 12px 15px;
    font-size: 16px;
}

.captcha-container {
    display: flex;
    gap: 10px;
    align-items: center;
}

.captcha {
    background: #f0f0f0;
    padding: 8px 15px;
    border-radius: 5px;
    font-weight: bold;
    letter-spacing: 2px;
    user-select: none;
}

/* Кнопка отправки */
.auth-form .btn-primary {
    width: 100%;
    padding: 12px;
    margin-top: 10px;
}

/* Анимация переключения форм */
.auth-form {
    display: none;
    animation: fadeIn 0.3s ease;
}

.auth-form.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-tabs {
    display: flex;
    margin-bottom: var(--space-md);
    border-bottom: 1px solid #eee;
}

.auth-tab {
    padding: var(--space-sm) var(--space-md);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-weight: 600;
    color: var(--gray);
}

.auth-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.auth-form {
    margin-top: var(--space-md);
}

.auth-status {
    margin-top: var(--space-md);
    padding: var(--space-sm);
    border-radius: var(--radius-sm);
    text-align: center;
}

.auth-status.success {
    background: rgba(56, 176, 0, 0.1);
    color: var(--success);
}

.auth-status.error {
    background: rgba(247, 37, 133, 0.1);
    color: var(--secondary);
}

/* ================================================= */
/* Стили для модального окна обратной связи */
/* ================================================= */
.feedback-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.feedback-form {
    margin-top: var(--space-md);
}

.feedback-status {
    margin-top: var(--space-md);
    padding: var(--space-sm);
    border-radius: var(--radius-sm);
    text-align: center;
}

.feedback-status.success {
    background: rgba(56, 176, 0, 0.1);
    color: var(--success);
}

.feedback-status.error {
    background: rgba(247, 37, 133, 0.1);
    color: var(--secondary);
}

/* ================================================= */
/* Стили для иконок в меню */
/* ================================================= */
.main-menu li {
    position: relative;
    display: flex;
    align-items: center;
}

.main-menu li i {
    margin-right: 8px;
    font-size: 1.1rem;
    color: var(--primary);
    transition: transform 0.3s;
}

.main-menu li:hover i {
    transform: scale(1.2);
}

.main-menu li:nth-child(5) i {
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

/* Стили для кнопки выхода */
#logoutBtn {
    display: none;
    margin-left: -10px;
    transition: all 0.3s;
}

#logoutBtn:hover {
    color: var(--secondary);
    transform: rotate(180deg);
}

/* Показываем кнопку выхода при авторизации */
.logged-in #userProfileBtn {
    display: none;
}

.logged-in #logoutBtn {
    display: block;
}
/* Стили для уведомлений */
.toast-notification {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--primary);
    color: white;
    padding: 12px 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s;
}

.toast-notification.show {
    opacity: 1;
}
/* ================================================= */
/* Стили для модального окна для авторов */
/* ================================================= */
.author-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.author-form textarea {
    min-height: 100px;
}

.author-status {
    margin-top: var(--space-md);
    padding: var(--space-sm);
    border-radius: var(--radius-sm);
    text-align: center;
}

.author-status.success {
    background: rgba(56, 176, 0, 0.1);
    color: var(--success);
}

.author-status.error {
    background: rgba(247, 37, 133, 0.1);
    color: var(--secondary);
}

/* Широкое модальное окно для формы автора */
.author-modal .modal-content {
    max-width: 600px;
    width: 90%;
    padding: 30px;
    text-align: center;
}

.author-form {
    max-width: 500px;
    margin: 0 auto;
}

.author-form .form-group {
    margin-bottom: 20px;
    text-align: left;
}

.author-form input,
.author-form textarea,
.author-form select {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    padding: 12px 15px;
    font-size: 1rem;
    display: block;
}

.author-form input[type="tel"] {
    max-width: 250px;
}

.author-form textarea {
    min-height: 120px;
    max-width: 100%;
}

.author-form .btn-primary {
    width: auto;
    padding: 12px 40px;
    font-size: 1rem;
    margin: 20px auto 0;
    display: block;
}

.author-form .form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    justify-content: center;
}

.author-form .form-row .form-group {
    flex: 0 1 auto;
}

/* ================================================= */
/* Базовые стили для всех модальных окон */
/* ================================================= */
.modal-content {
    width: 100%;
    max-width: 450px;
    padding: 25px;
    margin: 20px auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.auth-form, 
.feedback-form,
.author-form {
    width: 100%;
    margin-top: 20px;
}

.modal-content input:not([type="tel"]),
.modal-content textarea,
.modal-content select {
    width: 100%;
    padding: 10px 12px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.modal-content input[type="tel"] {
    width: 220px;
    display: block;
    margin: 0 auto 15px;
    padding: 10px 12px;
}

.modal-content .btn-primary {
    width: 180px;
    padding: 10px;
    margin: 15px auto 0;
    display: block;
}

.modal-content h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: #333;
}

/* Обновленные стили для модального окна авторизации */
.auth-modal .modal-content {
    max-width: 380px;
    width: 90%;
    padding: 25px;
    animation: modalFadeIn 0.3s ease;
}

/* Центрирование вкладок */
.auth-tabs-container {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.auth-tabs {
    display: inline-flex;
    background: #f5f5f5;
    border-radius: 30px;
    padding: 5px;
}

.auth-tab {
    padding: 8px 20px;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: 20px;
    font-weight: 600;
    transition: all 0.3s;
}

.auth-tab.active {
    background: var(--primary);
    color: white;
}

/* Стили для полей ввода */
.auth-form .form-group {
    margin-bottom: 15px;
}

.auth-form input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
}

/* Особые стили для пароля и капчи */
.auth-form input[type="password"] {
    padding: 12px 15px;
    font-size: 16px;
}

.captcha-container {
    display: flex;
    gap: 10px;
    align-items: center;
}

.captcha {
    background: #f0f0f0;
    padding: 8px 15px;
    border-radius: 5px;
    font-weight: bold;
    letter-spacing: 2px;
    user-select: none;
}

/* Кнопка отправки */
.auth-form .btn-primary {
    width: 100%;
    padding: 12px;
    margin-top: 10px;
}

/* Анимация переключения форм */
.auth-form {
    display: none;
    animation: fadeIn 0.3s ease;
}

.auth-form.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ================================================= */
/* Стили для страницы скачивания */
/* ================================================= */
.download-page {
    padding: 80px 0;
}

.search-filter {
    display: flex;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.search-box {
    flex: 1;
    position: relative;
}

.search-box input {
    padding-left: 40px;
    width: 100%;
}

.search-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
}

.filter-section {
    background: white;
    padding: var(--space-md);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--space-lg);
}

.filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
}

.filter-option {
    padding: 8px 16px;
    background: var(--light);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.3s;
}

.filter-option.active {
    background: var(--primary);
    color: white;
}

.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--space-lg);
}

.work-card {
    background: white;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
}

.work-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.work-preview {
    height: 200px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.work-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.work-card:hover .work-preview img {
    transform: scale(1.05);
}

.work-info {
    padding: var(--space-md);
}

.work-title {
    font-size: 1.1rem;
    margin-bottom: var(--space-sm);
}

.work-meta {
    display: flex;
    justify-content: space-between;
    color: var(--gray);
    font-size: 0.9rem;
    margin-bottom: var(--space-md);
}

.download-btn {
    display: block;
    text-align: center;
    background: var(--primary);
    color: white;
    padding: 10px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: background 0.3s;
}

.download-btn:hover {
    background: var(--primary-dark);
}

/* ================================================= */
/* Стили для ссылки логотипа */
/* ================================================= */
.logo-link {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    text-decoration: none;
    color: inherit;
}

.logo-link:hover .logo-icon {
    transform: rotate(-15deg);
    transition: transform 0.3s ease;
}

.logo {
    display: flex;
    align-items: center;
}

.logo-icon {
    color: var(--primary);
    font-size: 1.8rem;
    transition: transform 0.3s ease;
}

.logo-text {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ================================================= */
/* Адаптивные стили */
/* ================================================= */
@media (max-width: 992px) {
    .main-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 80%;
        height: calc(100vh - 80px);
        background: white;
        flex-direction: column;
        transition: left 0.3s;
        padding: var(--space-xl);
        box-shadow: var(--shadow-lg);
    }
    
    .main-menu.active {
        left: 0;
    }
    
    .main-menu ul {
        flex-direction: column;
        gap: var(--space-md);
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-image {
        display: none;
    }
    
    .order-game-container {
        grid-template-columns: 1fr;
    }
    
    .review-card {
        min-width: 50%;
    }
    
    .process-steps {
        flex-wrap: wrap;
        justify-content: center;
        gap: var(--space-xl);
    }
    
    .process-step {
        width: 40%;
        margin-bottom: var(--space-xl);
    }
    
    .process-line {
        display: none;
    }
}

@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .hero-section {
        padding: 100px 0 60px;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .options-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    
    .promo-banner {
        flex-direction: column;
        text-align: center;
    }
    
    .promo-image {
        margin-top: var(--space-md);
    }
    
    .review-card {
        min-width: 100%;
    }
}

@media (max-width: 576px) {
    .logo-text {
        display: none;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .process-step {
        width: 100%;
    }
    
    .ai-chat {
        width: 300px;
    }
    
    .modal-content {
        padding: 20px 15px;
        max-width: 90%;
    }
    
    .modal-content input[type="tel"] {
        width: 100%;
    }
    
    .author-form .form-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .author-form input,
    .author-form textarea,
    .author-form select {
        max-width: 100%;
    }
    
    .author-form input[type="tel"] {
        max-width: 100%;
    }
}

/* ================================================= */
/* Антиспам */
/* ================================================= */

.hidden-field {
    position: absolute;
    left: -9999px;
    opacity: 0;
    height: 0;
    width: 0;
  }