/* LearnFlow AI PDF Export Styles */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.7;
    color: #1a1a1a;
    max-width: 850px;
    margin: 0 auto;
    padding: 40px 30px;
    background: white;
}

/* Headers */
h1, h2, h3, h4, h5, h6 {
    color: #0f172a;
    margin-top: 2em;
    margin-bottom: 0.75em;
    font-weight: 600;
    line-height: 1.3;
}

h1 {
    font-size: 2.5em;
    font-weight: 700;
    border-bottom: 3px solid #3b82f6;
    padding-bottom: 0.5em;
    margin-top: 0;
}

h2 {
    font-size: 1.875em;
    margin-top: 2.5em;
    padding-top: 0.5em;
    border-top: 1px solid #e5e7eb;
}

h3 {
    font-size: 1.375em;
    color: #374151;
}

h4 {
    font-size: 1.125em;
    color: #4b5563;
}

/* Paragraphs and text */
p {
    margin: 1em 0;
    text-align: justify;
}

strong {
    font-weight: 600;
    color: #0f172a;
}

em {
    font-style: italic;
    color: #374151;
}

/* Links */
a {
    color: #3b82f6;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}

a:hover {
    border-bottom-color: #3b82f6;
}

/* Code */
code {
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 0.9em;
    background: #f8fafc;
    color: #0f172a;
    padding: 3px 6px;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
}

pre {
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 0.875em;
    background: #f8fafc;
    padding: 16px 20px;
    border-radius: 8px;
    overflow-x: auto;
    border: 1px solid #e2e8f0;
    line-height: 1.5;
}

pre code {
    background: transparent;
    padding: 0;
    border: none;
    font-size: inherit;
}

/* Blockquotes */
blockquote {
    border-left: 4px solid #3b82f6;
    padding-left: 20px;
    margin: 1.5em 0;
    color: #475569;
    font-style: italic;
    background: #f8fafc;
    padding: 15px 20px;
    border-radius: 0 8px 8px 0;
}

blockquote p:first-child {
    margin-top: 0;
}

blockquote p:last-child {
    margin-bottom: 0;
}

/* Lists */
ul, ol {
    margin: 1em 0;
    padding-left: 35px;
}

li {
    margin: 0.6em 0;
}

ul li {
    list-style-type: disc;
}

ul ul li {
    list-style-type: circle;
}

ol li {
    list-style-type: decimal;
}

/* Tables */
table {
    border-collapse: collapse;
    width: 100%;
    margin: 1.5em 0;
    font-size: 0.95em;
}

table th,
table td {
    border: 1px solid #e2e8f0;
    padding: 12px 15px;
    text-align: left;
}

table th {
    background: #f8fafc;
    font-weight: 600;
    color: #0f172a;
    border-bottom: 2px solid #cbd5e1;
}

table tr:nth-child(even) {
    background: #f8fafc;
}

table tr:hover {
    background: #f1f5f9;
}

/* Horizontal Rule */
hr {
    border: none;
    height: 1px;
    background: linear-gradient(to right, transparent, #cbd5e1, transparent);
    margin: 3em 0;
}

/* Special sections */
.note, .warning, .tip {
    padding: 15px 20px;
    border-radius: 8px;
    margin: 1.5em 0;
}

.note {
    background: #eff6ff;
    border-left: 4px solid #3b82f6;
}

.warning {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
}

.tip {
    background: #f0fdf4;
    border-left: 4px solid #10b981;
}

/* Print styles */
@media print {
    body {
        font-size: 11pt;
        padding: 0;
        max-width: 100%;
    }
    
    h1 {
        font-size: 20pt;
        page-break-after: avoid;
    }
    
    h2 {
        font-size: 16pt;
        page-break-after: avoid;
    }
    
    h3 {
        font-size: 14pt;
        page-break-after: avoid;
    }
    
    pre {
        page-break-inside: avoid;
    }
    
    blockquote {
        page-break-inside: avoid;
    }
    
    table {
        page-break-inside: avoid;
    }
    
    .page-break {
        page-break-after: always;
    }
    
    /* Hide interactive elements */
    a {
        color: #1a1a1a;
        text-decoration: none;
    }
}

/* Page breaks for sections */
.new-section {
    page-break-before: always;
    padding-top: 0;
}

/* Footer */
.footer {
    margin-top: 4em;
    padding-top: 2em;
    border-top: 1px solid #e2e8f0;
    color: #64748b;
    font-size: 0.875em;
    text-align: center;
}

/* Cyrillic font support */
@font-face {
    font-family: 'Noto Sans';
    src: local('Noto Sans'), local('NotoSans');
    unicode-range: U+0400-04FF; /* Cyrillic */
}

body:lang(ru) {
    font-family: 'Inter', 'Noto Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}