<style>
  :root {
    --neon-green: #7cfc00;
    --bright-green: #59ff3a;
    --light-green: #77ff78;
    --blue-accent: #77e1ff;
    --purple-accent: #c073ff;
    --yellow-accent: #ffed00;
    --dark-bg: #050510;
    --card-bg: rgba(15, 25, 40, 0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Comfortaa', sans-serif;
}

body {
    background-color: var(--dark-bg);
    color: white;
    overflow-x: hidden;
}

/* Звездный фон */
#stars-container {
    position: fixed;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.star {
    position: absolute;
    background: white;
    border-radius: 50%;
}

/* Футуристическая сетка */
.grid-lines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.2;
    pointer-events: none;
}

/* Шапка */
.header {
    position: relative;
    z-index: 10;
    padding: 20px;
    background: rgba(5, 10, 20, 0.6);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(119, 225, 255, 0.3);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 26px;
    font-weight: 700;
    background: linear-gradient(to right, var(--neon-green), var(--blue-accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-decoration: none;
}

.platform-info {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    max-width: 500px;
    text-align: center;
}

.main-site-btn {
    background: linear-gradient(45deg, var(--bright-green), var(--blue-accent));
    border: none;
    color: white;
    padding: 10px 25px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.main-site-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 30px rgba(89, 255, 58, 0.5);
}

/* Hero секция */
.hero {
    position: relative;
    z-index: 1;
    padding: 60px 20px;
    text-align: center;
    max-width: 1200px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 20px;
    background: linear-gradient(to right, var(--blue-accent), var(--bright-green));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-subtitle {
    font-size: 24px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 40px;
}

.benefits {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 40px;
}

.benefit {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--light-green);
}

.benefit i {
    font-size: 24px;
    color: var(--bright-green);
}

/* Генератор */
.generator {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.generator-card {
    background: rgba(15, 25, 40, 0.4);
    border-radius: 20px;
    padding: 40px;
    border: 1px solid rgba(119, 225, 255, 0.2);
}

.settings {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.setting-group {
    text-align: left;
}

.setting-group label {
    display: block;
    margin-bottom: 10px;
    color: var(--light-green);
    font-weight: 600;
}

.setting-group select,
.setting-group input {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid rgba(119, 225, 255, 0.3);
    background: rgba(5, 10, 20, 0.7);
    color: white;
    font-family: 'Comfortaa', sans-serif;
}

.generate-btn {
    background: linear-gradient(45deg, var(--bright-green), var(--blue-accent));
    border: none;
    color: white;
    padding: 15px 50px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 700;
    font-size: 18px;
    transition: all 0.3s ease;
    margin-bottom: 40px;
}

.generate-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 30px rgba(89, 255, 58, 0.5);
}

.preview-section {
    margin-top: 40px;
    display: none;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.preview-title {
    font-size: 24px;
    color: var(--bright-green);
}

.download-btn {
    background: linear-gradient(45deg, var(--purple-accent), var(--blue-accent));
    border: none;
    color: white;
    padding: 12px 30px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.download-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 30px rgba(192, 115, 255, 0.5);
}

.extra-preview {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    overflow-x: auto;
}

.extra-container {
    margin: 0 auto;
    width: 800px;
    min-width: 800px;
    max-width: 800px;
}

/* Стили для заданий */
.extra-worksheet {
    width: 800px !important;
    min-width: 800px !important;
    max-width: 800px !important;
    background-color: white;
    padding: 25px;
    position: relative;
    color: #333;
    box-sizing: border-box;
    transform: none !important;
}

.worksheet-title {
    text-align: center;
    font-size: 24px;
    color: #333;
    margin-bottom: 12px;
    font-weight: bold;
    letter-spacing: 0.5px;
    word-spacing: 2px;
}

.worksheet-subtitle {
    text-align: center;
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
    letter-spacing: 0.3px;
}

.worksheet-instruction {
    font-size: 18px;
    color: #333;
    margin-bottom: 35px;
    font-weight: bold;
    text-align: center;
    max-width: 90%;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.4;
    letter-spacing: 0.3px;
    word-spacing: 1px;
}

.card-container {
    display: flex;
    flex-direction: column;
    gap: 40px;
    margin-bottom: 30px;
    padding-left: 20px;
}

.task-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    position: relative;
}

.task-number {
    position: absolute;
    left: -20px;
    font-size: 20px;
    font-weight: bold;
}

.task-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 2px solid #ddd;
    border-radius: 15px;
    padding: 10px;
    width: 90px;
    height: 90px;
    transition: all 0.3s ease;
}

.task-item i {
    font-size: 44px;
    margin-bottom: 8px;
}

.task-item-name {
    font-size: 12px;
    text-align: center;
    display: none;
}

.show-names .task-item-name {
    display: block;
}

.answers-section {
    margin-top: 30px;
    padding-top: 15px;
    border-top: 2px dashed #999;
}

.answers-title {
    text-align: center;
    font-size: 18px;
    color: #333;
    margin-bottom: 15px;
    font-weight: bold;
}

.answers-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

.answer-badge {
    background-color: #f5f5f5;
    border-radius: 30px;
    padding: 8px 15px;
    font-size: 14px;
    font-weight: bold;
    color: #333;
}

.worksheet-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    font-size: 12px;
    color: #999;
}

/* Спиннер загрузки */
.spinner {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.spinner-content {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 5px solid rgba(255, 255, 255, 0.2);
    border-top-color: var(--bright-green);
    animation: spin 1s infinite linear;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* CTA секция */
.cta-section {
    display: none;
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 60px auto;
    padding: 0 20px;
}

.cta-card {
    background: linear-gradient(135deg, rgba(15, 25, 40, 0.8), rgba(20, 40, 80, 0.8));
    border-radius: 20px;
    padding: 40px;
    border: 1px solid rgba(119, 225, 255, 0.3);
    text-align: center;
}

.cta-card h2 {
    font-size: 32px;
    margin-bottom: 20px;
    color: var(--bright-green);
}

.cta-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.cta-feature {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.9);
}

.cta-feature i {
    color: var(--bright-green);
    font-size: 20px;
}

.cta-btn {
    background: linear-gradient(45deg, var(--bright-green), var(--blue-accent));
    border: none;
    color: white;
    padding: 15px 40px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 700;
    font-size: 18px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    animation: glowPulse 2s infinite alternate;
}

@keyframes glowPulse {
    0% {
        box-shadow: 0 0 10px rgba(89, 255, 58, 0.5), 0 0 20px rgba(89, 255, 58, 0.2);
    }
    100% {
        box-shadow: 0 0 20px rgba(89, 255, 58, 0.8), 0 0 40px rgba(89, 255, 58, 0.4);
    }
}

/* Статистика */
.stats-section {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 60px auto;
    padding: 0 20px;
    text-align: center;
}

.stats-container {
    display: flex;
    justify-content: center;
    gap: 40px;
}

.stat-item {
    background: rgba(15, 25, 40, 0.4);
    border-radius: 15px;
    padding: 20px 40px;
    border: 1px solid rgba(119, 225, 255, 0.2);
}

.stat-number {
    font-size: 36px;
    font-weight: 700;
    color: var(--bright-green);
    margin-bottom: 10px;
}

.stat-label {
    color: rgba(255, 255, 255, 0.8);
}

/* Футер */
.footer {
    position: relative;
    z-index: 1;
    padding: 40px 20px;
    background: rgba(5, 10, 20, 0.9);
    border-top: 1px solid rgba(119, 225, 255, 0.2);
    margin-top: 80px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.footer-section h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: var(--light-green);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--bright-green);
}

.footer-copy {
    margin-top: 40px;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Специальные стили для печати */
@media print {
    .extra-worksheet {
        width: 210mm !important; /* A4 ширина */
        min-width: 210mm !important;
        max-width: 210mm !important;
        height: auto !important;
        margin: 0 !important;
        padding: 10mm !important;
        box-shadow: none !important;
        transform: none !important;
    }
    
    .worksheet-title {
        font-size: 24px;
        margin-bottom: 15px;
        letter-spacing: 1px;
        word-spacing: 3px;
    }
    
    .worksheet-subtitle {
        font-size: 14px;
        margin-bottom: 15px;
        letter-spacing: 0.5px;
    }
    
    .worksheet-instruction {
        font-size: 16px;
        margin-bottom: 30px;
        line-height: 1.5;
        letter-spacing: 0.5px;
        word-spacing: 2px;
        max-width: 95%;
    }
    
    .task-number {
        left: -15px;
    }
    
    .card-container {
        page-break-inside: avoid; /* Избегаем разрыва задания при печати */
    }
}

/* Адаптивность */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 20px;
    }
    
    .platform-info {
        order: 3;
    }
    
    .hero h1 {
        font-size: 32px;
    }
    
    .hero-subtitle {
        font-size: 18px;
    }
    
    .benefits {
        flex-direction: column;
        gap: 20px;
    }
    
    .stats-container {
        flex-direction: column;
    }
    
    .extra-preview {
        overflow-x: auto; /* Добавляем горизонтальную прокрутку для мобильных устройств */
    }
    
    /* НЕ сжимаем содержимое на мобильных - сохраняем фиксированную ширину */
    .task-row {
        flex-wrap: nowrap;
        justify-content: space-between;
    }
    
    .task-item {
        width: 90px; /* Сохраняем стандартный размер */
        height: 90px;
        flex-shrink: 0; /* Запрещаем сжиматься */
    }
    
    .task-item i {
        font-size: 44px; /* Сохраняем стандартный размер иконок */
    }
}
</style>