/* Общие стили для всех страниц LingoMojo */

:root {
    --lm-orange: #FF6B00;
    --lm-orange-hover: #E55F00;
    --lm-green: #16a34a;
    --lm-dark: #1B1F3B;
    --lm-dark-2: #2d3a5e;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--tg-theme-bg-color, #ffffff);
    color: var(--tg-theme-text-color, #000000);
    padding: 0;
    margin: 0;
    min-height: 100vh;
    line-height: 1.5;
}

.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 16px;
}

/* Кнопки */
.btn-primary {
    background: var(--lm-orange);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 14px 16px;
    font-size: 16px;
    font-weight: 600;
    width: 100%;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary:hover {
    background: var(--lm-orange-hover);
    transform: translateY(-1px);
}

.btn-primary:active {
    background: var(--lm-orange-hover);
    transform: translateY(0);
}

.btn-secondary {
    background: var(--tg-theme-secondary-bg-color, #f8f9fa);
    color: var(--tg-theme-text-color, #000000);
    border: 1px solid var(--tg-theme-section-separator-color, #e5e5e5);
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 500;
    width: 100%;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: var(--tg-theme-section-bg-color, #e8e8e8);
}

/* Заголовки */
.header {
    text-align: center;
    margin-bottom: 24px;
    padding: 16px 0;
}

.header h1 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--tg-theme-text-color, #000000);
}

.header p {
    font-size: 14px;
    opacity: 0.7;
    color: var(--tg-theme-hint-color, #999999);
}

/* Секции */
.section {
    background: var(--tg-theme-secondary-bg-color, #f8f9fa);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid var(--tg-theme-section-separator-color, #e5e5e5);
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--tg-theme-text-color, #000000);
}

/* Сообщения */
.message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
}

.message-error {
    background: #ff6b6b;
    color: white;
}

.message-success {
    background: #51cf66;
    color: white;
}

.message-info {
    background: var(--tg-theme-button-color, #3390ec);
    color: white;
}

/* Загрузка */
.loading {
    text-align: center;
    padding: 20px;
    color: var(--tg-theme-hint-color, #999999);
}

/* Адаптивность */
@media (max-width: 480px) {
    .container {
        padding: 12px;
    }
    
    .section {
        padding: 16px;
    }
    
    .header h1 {
        font-size: 20px;
    }
}

/* LingoMojo branded header (logo + name) */
.lm-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 14px;
}

.lm-logo {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

.lm-brand {
    font-size: 19px;
    font-weight: 700;
    letter-spacing: 0.3px;
    line-height: 1;
}

.lm-lingo {
    color: #ffffff;
}

.lm-mojo {
    color: var(--lm-orange);
}

/* Вариант логотипа для светлого фона */
.lm-lingo-dark {
    color: var(--lm-dark);
}

.add-margin {
    padding-left: 30px;
    margin-top: 10px;
    margin-bottom: 0;
}

/* ============================================
   ГРАММАТИЧЕСКИЕ СТРАНИЦЫ (gram_XX_YY.html)
   Добавить в конец файла css/styles.css
   ============================================ */

/* Основной контейнер */
.grammar-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--tg-theme-text-color, #000000);
}

/* Шапка (Header) */
.grammar-header {
    text-align: center;
    margin-bottom: 32px;
    padding: 24px;
    background: linear-gradient(135deg, var(--lm-dark) 0%, var(--lm-dark-2) 100%);
    border-radius: 16px;
    color: white;
}

.grammar-header h1 {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 8px;
    color: white;
}

.subtitle {
    font-size: 16px;
    opacity: 0.95;
    margin-bottom: 16px;
    color: white;
}

.module-info {
    display: flex;
    justify-content: center;
    margin-top: 16px;
}

.badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

/* Основной контент */
.content {
    background: var(--tg-theme-bg-color, #ffffff);
}

.content h2 {
    font-size: 22px;
    font-weight: 700;
    margin: 32px 0 16px 0;
    color: var(--tg-theme-text-color, #000000);
    border-bottom: 2px solid var(--tg-theme-section-separator-color, #e5e5e5);
    padding-bottom: 8px;
}

.content h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 24px 0 12px 0;
    color: var(--tg-theme-text-color, #000000);
}

.content p {
    margin: 12px 0;
    line-height: 1.6;
}

.content ul,
.content ol {
    margin: 12px 0 12px 24px;
}

.content li {
    margin: 6px 0;
}

.content hr {
    border: none;
    border-top: 1px solid var(--tg-theme-section-separator-color, #e5e5e5);
    margin: 24px 0;
}

.content strong {
    font-weight: 600;
}

/* Таблицы */
.content table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    background: var(--tg-theme-secondary-bg-color, #f8f9fa);
    border-radius: 8px;
    overflow: hidden;
}

.content table thead {
    background: var(--tg-theme-section-separator-color, #e5e5e5);
}

.content table th,
.content table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--tg-theme-section-separator-color, #e5e5e5);
}

.content table th {
    font-weight: 600;
}

.content table tr:last-child td {
    border-bottom: none;
}

/* Важные замечания */
/*
.important-note {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    border-radius: 8px;
    padding: 16px;
    margin: 20px 0;
}
*/

.important-note {
    background: var(--tg-theme-bg-color, #ffffff);  /* Белый фон */
    border: 1px solid var(--tg-theme-section-separator-color, #e5e5e5);  /* Легкая рамка */
    border-left: 4px solid #f59e0b;  /* Оранжевая "скобка" слева */
    border-radius: 8px;
    padding: 16px;
    margin: 20px 0;
    color: var(--tg-theme-text-color, #000000);  /* Темный текст */
}


.important-note strong {
    display: block;
    margin-bottom: 8px;
    color: #92400e;
}

.important-note p {
    margin: 8px 0;
}

.important-note ul {
    margin: 8px 0 8px 20px;
}

/* Блок кода */
.code-block {
    background: var(--tg-theme-secondary-bg-color, #f8f9fa);
    border: 1px solid var(--tg-theme-section-separator-color, #e5e5e5);
    border-radius: 8px;
    padding: 16px;
    margin: 16px 0;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    overflow-x: auto;
    white-space: pre;
}

/* Вспомогательные классы */
.add-margin {
    padding-left: 30px;
    margin-top: 10px;
    margin-bottom: 0;
}

/* Футер */
.grammar-footer {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--tg-theme-section-separator-color, #e5e5e5);
    text-align: center;
}

.grammar-footer .btn-primary {
    background: var(--lm-orange);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 14px 16px;
    font-size: 16px;
    font-weight: 600;
    width: 100%;
    max-width: 300px;
    cursor: pointer;
    transition: all 0.2s;
}

.grammar-footer .btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.grammar-footer .btn-primary:active {
    transform: translateY(0);
}

/* Адаптивность для грамматических страниц */
@media (max-width: 600px) {
    .grammar-container {
        padding: 16px;
    }
    
    .grammar-header {
        padding: 20px;
    }
    
    .grammar-header h1 {
        font-size: 22px;
    }
    
    .subtitle {
        font-size: 15px;
    }
    
    .content h2 {
        font-size: 20px;
    }
    
    .content h3 {
        font-size: 17px;
    }
    
    .content table {
        font-size: 13px;
    }
    
    .content table th,
    .content table td {
        padding: 8px;
    }
    
    .code-block {
        font-size: 12px;
        padding: 12px;
    }
}
