* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background: #181818;
    min-height: 100vh;
    padding: 20px;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px 30px;
    text-align: center;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.header p {
    opacity: 0.9;
    font-size: 1.2rem;
}

.tabs {
    display: flex;
    background: #f8f9fa;
    border-bottom: 2px solid #e9ecef;
}

.tab {
    flex: 1;
    padding: 20px;
    border: none;
    background: none;
    font-size: 1.1rem;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.tab:hover {
    background: #e9ecef;
    color: #333;
}

.tab.active {
    background: white;
    color: #667eea;
    border-bottom-color: #667eea;
}

.content {
    padding: 30px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.quiz-settings {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
}

.quiz-settings h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

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

.section-header h2 {
    color: #333;
    font-size: 1.5rem;
}

.stats {
    display: flex;
    gap: 20px;
}

.stat {
    background: #e3f2fd;
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: 600;
    color: #1976d2;
    font-size: 0.9rem;
}

.actions {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-danger {
    background: #dc3545;
    color: white;
    padding: 8px 12px;
    font-size: 0.9rem;
}

.question-card {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 25px;
    transition: all 0.3s ease;
}

.question-card:hover {
    border-color: #667eea;
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.1);
}

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

.question-number {
    font-size: 1.3rem;
    font-weight: 700;
    color: #667eea;
}

.question-text {
    width: 100%;
    min-height: 80px;
    resize: vertical;
}

.answers-section {
    margin-top: 20px;
}

.answers-section h4 {
    margin-bottom: 15px;
    color: #333;
    font-size: 1.1rem;
}

.answer-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    padding: 10px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.correct-indicator {
    width: 40px;
    height: 40px;
    border: 2px solid #28a745;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
    color: #28a745;
    flex-shrink: 0;
}

.correct-indicator.active {
    background: #28a745;
    color: white;
}

.correct-indicator:hover {
    background: #e8f5e8;
}

.correct-indicator.active:hover {
    background: #218838;
}

.answer-input {
    flex: 1;
    border: 1px solid #ddd;
    padding: 10px;
    border-radius: 6px;
}

.add-answer-btn {
    margin-top: 10px;
    background: #17a2b8;
    color: white;
    padding: 8px 16px;
    font-size: 0.9rem;
}

.preview-container {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 30px;
    margin-top: 20px;
}

.preview-quiz {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.preview-title {
    text-align: center;
    color: #667eea;
    font-size: 2rem;
    margin-bottom: 30px;
    font-weight: 700;
}

.preview-question {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

.preview-question h4 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.preview-answer {
    padding: 12px 15px;
    margin: 8px 0;
    border-radius: 8px;
    border: 1px solid #ddd;
    background: white;
}

.preview-answer.correct {
    border-color: #28a745;
    background: #d4edda;
    font-weight: 600;
}

.export-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.code-container {
    background: #2d3748;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

.code-container pre {
    color: #e2e8f0;
    font-family: "Courier New", monospace;
    font-size: 0.9rem;
    line-height: 1.4;
    max-height: 500px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.success-message {
    background: #d4edda;
    color: #155724;
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #c3e6cb;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #f5c6cb;
}

@media (max-width: 768px) {
    .container {
        margin: 10px;
        border-radius: 15px;
    }

    .header {
        padding: 30px 20px;
    }

    .header h1 {
        font-size: 2rem;
    }

    .content {
        padding: 20px;
    }

    .tabs {
        flex-direction: column;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .stats {
        flex-direction: column;
        gap: 10px;
    }

    .actions {
        flex-direction: column;
    }

    .export-actions {
        flex-direction: column;
    }

    .answer-item {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .correct-indicator {
        align-self: flex-start;
    }
}

/* Новые стили для контейнера с описанием утилиты */
.utility-info {
    padding: 50px 40px;
    background: linear-gradient(to bottom, #ffffff, #f8f9fa);
    border-top: 1px solid #e9ecef;
}

.utility-header {
    text-align: center;
    margin-bottom: 50px;
}

.utility-header h2 {
    color: #333;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.utility-header p {
    font-size: 1.2rem;
    color: #666;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

.utility-content {
    max-width: 1000px;
    margin: 0 auto;
}

.utility-content h3 {
    color: #667eea;
    font-size: 1.8rem;
    margin: 40px 0 25px;
    font-weight: 600;
    position: relative;
    padding-left: 20px;
}

.utility-content h3::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
}

/* Intro Section */
.intro-section p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #555;
    margin-bottom: 20px;
}

/* Features Section */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.feature-item {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.feature-item h4 {
    color: #333;
    font-size: 1.3rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.feature-item p {
    color: #666;
    line-height: 1.6;
}

/* Use Cases Section */
.use-cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.use-case-item {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 12px;
    border-left: 4px solid #667eea;
    transition: all 0.3s ease;
}

.use-case-item:hover {
    background: #f0f2ff;
}

.use-case-item h4 {
    color: #667eea;
    font-size: 1.3rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.use-case-item p {
    color: #555;
    line-height: 1.6;
}

/* Benefits Section */
.benefits-list {
    list-style: none;
    padding: 0;
    margin: 30px 0;
}

.benefits-list li {
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: flex-start;
    line-height: 1.6;
    color: #555;
}

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

.benefits-list li strong {
    color: #333;
    font-weight: 600;
    min-width: 180px;
}

/* Stats Section */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.stat-item {
    text-align: center;
    padding: 30px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 10px;
}

.stat-label {
    color: #666;
    font-size: 1.1rem;
    font-weight: 500;
}
