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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 600px;
    margin: 0 auto;
}

header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
    padding: 20px;
}

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

header p {
    font-size: 1.1em;
    opacity: 0.85;
}

main {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.section {
    margin-bottom: 20px;
}

.section h2 {
    color: #0f172a;
    margin-bottom: 15px;
    font-size: 1.5em;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    margin: 5px;
    transition: all 0.3s;
    font-weight: 600;
}

.btn:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(37, 99, 235, 0.3);
}

.btn:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: #e2e8f0;
    color: #0f172a;
}

.btn-secondary:hover {
    background: #cbd5e1;
}

.lesson-card {
    background: #f8fafc;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s;
    border-left: 4px solid #2563eb;
}

.lesson-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(37, 99, 235, 0.15);
    background: #f0f9ff;
}

.lesson-card h3 {
    color: #0f172a;
    margin-bottom: 5px;
    font-weight: 600;
}

.lesson-card p {
    color: #64748b;
    font-size: 0.9em;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #0f172a;
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 2px solid #e2e8f0;
    border-radius: 5px;
    font-family: inherit;
    font-size: 1em;
    transition: border 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2563eb;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.hidden {
    display: none;
}

.loading {
    text-align: center;
    padding: 20px;
    color: #2563eb;
}

.error {
    background: #fee2e2;
    color: #991b1b;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    border-left: 4px solid #dc2626;
}

.success {
    background: #dcfce7;
    color: #166534;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    border-left: 4px solid #16a34a;
}

/* Bottom Navigation */
.bottom-nav {
    display: flex;
    justify-content: space-around;
    background: white;
    border-top: 2px solid #e2e8f0;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px 0;
    box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.1);
}

.nav-btn {
    flex: 1;
    padding: 12px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 0.9em;
    color: #94a3b8;
    transition: all 0.3s;
    font-weight: 600;
}

.nav-btn.active {
    color: #2563eb;
    border-bottom: 3px solid #2563eb;
}

.nav-btn:hover {
    color: #2563eb;
}

/* Контент с отступом снизу для меню */
main {
    margin-bottom: 100px;
}

/* Модальные окна */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: white;
    border-radius: 15px;
    padding: 20px;
    max-width: 90vw;
    max-height: 80vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease-out;
}

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

.close-btn {
    float: right;
    font-size: 1.5em;
    cursor: pointer;
    color: #999;
    border: none;
    background: none;
}

.close-btn:hover {
    color: #333;
}

/* Блоки и задания */
.block-item {
    background: #f8fafc;
    border-left: 4px solid #3b82f6;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.task-item {
    background: white;
    border: 1px solid #e2e8f0;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 10px;
    padding-left: 15px;
    border-left: 3px solid #10b981;
}

.task-item.text-task {
    border-left-color: #f59e0b;
}

.task-item.image-task {
    border-left-color: #8b5cf6;
}

.task-item.quiz-task {
    border-left-color: #ec4899;
}

.task-actions {
    display: flex;
    gap: 5px;
    margin-top: 10px;
}

.task-actions button {
    padding: 5px 10px;
    font-size: 0.8em;
}

.form-group select {
    width: 100%;
    padding: 10px;
    border: 2px solid #e2e8f0;
    border-radius: 5px;
    font-family: inherit;
    font-size: 1em;
    cursor: pointer;
    background: white;
    transition: border 0.2s;
}

.form-group select:focus {
    outline: none;
    border-color: #2563eb;
}

.quiz-option-group {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    align-items: center;
}

.quiz-option-group input[type="text"] {
    flex: 1;
}

.quiz-option-group label {
    white-space: nowrap;
    font-size: 0.9em;
}
