* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--tg-theme-bg-color, #ffffff);
    color: var(--tg-theme-text-color, #000000);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    overflow-x: hidden;
}

#app {
    width: 100%;
    padding-bottom: 70px;
}

main {
    padding: 15px;
}

button {
    background-color: var(--tg-theme-button-color, #2481cc);
    color: var(--tg-theme-button-text-color, #ffffff);
    border: none;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 16px;
    cursor: pointer;
    width: 100%;
    margin-bottom: 10px;
    font-weight: 500;
}

button:active {
    opacity: 0.8;
}

.section {
    text-align: left;
    margin-top: 20px;
}

.loader {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--tg-theme-button-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 2s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Стили для HTML-разметки в нишах и курсах */
.niche-card, .youtube-niche-card, .lesson-content-html {
    line-height: 1.6;
    text-align: left;
}

.niche-header h1, .lesson-content-html h1 {
    font-size: 22px;
    margin: 0 0 15px 0;
    color: var(--tg-theme-text-color);
    font-weight: 800;
}

.niche-lead {
    font-size: 15px;
    color: var(--tg-theme-hint-color);
    margin-bottom: 15px;
}

.niche-section {
    margin-top: 25px;
}

.niche-section h2, .lesson-content-html h2 {
    font-size: 18px;
    margin: 20px 0 12px 0;
    color: var(--tg-theme-button-color);
    font-weight: 700;
}

.niche-section ul, .lesson-content-html ul:not(.course-list) {
    padding-left: 20px;
    margin-bottom: 15px;
}

.niche-section li, .lesson-content-html li:not(.course-list li) {
    margin-bottom: 8px;
    color: var(--tg-theme-text-color);
}

.niche-quote {
    background: var(--tg-theme-secondary-bg-color);
    border-left: 4px solid var(--tg-theme-button-color);
    padding: 18px;
    margin: 20px 0;
    border-radius: 4px 16px 16px 4px;
}

.niche-quote h3 {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: var(--tg-theme-button-color);
}

hr {
    border: 0;
    height: 1px;
    background: rgba(0,0,0,0.08);
    margin: 25px 0;
}

/* --- ПРОФЕССИОНАЛЬНЫЙ СПИСОК (course-list) --- */
.course-list {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.course-list li {
    background: var(--tg-theme-bg-color);
    margin-bottom: 10px;
    padding: 14px 16px 14px 50px;
    border-radius: 16px;
    position: relative;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.4;
    color: var(--tg-theme-text-color);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    border: 1px solid rgba(0,0,0,0.05);
    transition: transform 0.2s ease;
}

.course-list li:active {
    transform: scale(0.98);
}

.course-list li::before {
    content: '\e86c'; /* Иконка check_circle в кодировке Material Icons */
    font-family: 'Material Icons';
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #4caf50;
    font-size: 22px;
}

/* Дополнительные украшения для списков */
.course-list li strong {
    color: var(--tg-theme-button-color);
}
