/* LaTeX Tutorial Specific Styles */

/* Tutorial Landing Page */
.tutorial-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4rem 2rem;
    text-align: center;
    margin: -2rem -2rem 3rem -2rem;
    border-radius: 0 0 30px 30px;
}

.tutorial-hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.tutorial-hero .subtitle {
    font-size: 1.4rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.tutorial-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin: 2.5rem 0;
    flex-wrap: wrap;
}

.stat-box {
    text-align: center;
    padding: 1rem 2rem;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.stat-box:hover {
    background: rgba(255, 255, 255, 0.6);
    transform: translateY(-3px);
}

.stat-number {
    display: block;
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1rem;
    opacity: 0.9;
    font-weight: 500;
}

/* Quick Navigation Grid */
.quick-nav-section {
    margin: 3rem 0;
}

.quick-nav-section h2 {
    color: #2c3e50;
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 2.5rem;
    font-weight: 700;
}

.quick-nav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.quick-nav-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 2.5rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    text-decoration: none;
    display: block;
}

.quick-nav-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 45px rgba(102, 126, 234, 0.3);
}

.quick-nav-icon {
    font-size: 3.5rem;
    margin-bottom: 1.2rem;
    display: block;
}

.quick-nav-card h3 {
    color: #2c3e50;
    margin-bottom: 0.8rem;
    font-size: 1.4rem;
    font-weight: 600;
}

.quick-nav-card p {
    color: #666;
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 0;
}

/* Featured Tutorials Section */
.featured-tutorials {
    margin: 4rem 0;
}

.featured-tutorials h2 {
    color: #2c3e50;
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 2.5rem;
    font-weight: 700;
}

.tutorial-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.tutorial-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.tutorial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.15);
}

.tutorial-card-header {
    padding: 2rem;
    padding-bottom: 1.5rem;
}

.tutorial-badges {
    display: flex;
    gap: 0.8rem;
    margin-bottom: 1.2rem;
    flex-wrap: wrap;
}

.badge {
    padding: 0.4rem 0.9rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-beginner {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
}

.badge-intermediate {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.badge-advanced {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    color: white;
}

.badge-time {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

.tutorial-card h3 {
    color: #2c3e50;
    font-size: 1.4rem;
    margin-bottom: 0.8rem;
    font-weight: 600;
    line-height: 1.3;
}

.tutorial-card h3 a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.tutorial-card h3 a:hover {
    color: #667eea;
}

.tutorial-card p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.tutorial-link {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.8rem 2rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    margin: 0 2rem 2rem 2rem;
    text-align: center;
}

.tutorial-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

/* Tutorial Categories Section */
.tutorial-categories {
    margin: 4rem 0;
    background: rgba(255, 255, 255, 0.7);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.tutorial-categories h2 {
    color: #2c3e50;
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 2.5rem;
    font-weight: 700;
}

.category-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.category-item h3 {
    color: #2c3e50;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid #667eea;
}

.category-item ul {
    list-style: none;
    padding: 0;
}

.category-item li {
    margin-bottom: 0.8rem;
}

.category-item a {
    color: #555;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    display: block;
    padding: 0.5rem 0;
}

.category-item a:hover {
    color: #667eea;
    padding-left: 1rem;
}

/* Tutorial Page Specific Styles */
main {
    background: transparent;
}

main section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    line-height: 1.8;
}

main section h2 {
    color: #2c3e50;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    margin-top: 2rem;
    font-weight: 700;
}

main section h2:first-child {
    margin-top: 0;
}

main section h3 {
    color: #2c3e50;
    font-size: 1.5rem;
    margin: 2rem 0 1rem 0;
    font-weight: 600;
}

main section p {
    color: #555;
    line-height: 1.8;
    margin-bottom: 1rem;
}

.tutorial-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 3rem 2rem;
    margin: 0 0 2rem 0;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.breadcrumb {
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    color: #666;
}

.breadcrumb a {
    color: #667eea;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: #764ba2;
}

.breadcrumb span {
    color: #2c3e50;
    font-weight: 500;
}

.tutorial-badges {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    flex-wrap: wrap;
}

.tutorial-header h1 {
    font-size: 3rem;
    margin-bottom: 1.2rem;
    line-height: 1.2;
    font-weight: 700;
    color: #2c3e50;
}

.tutorial-meta {
    display: flex;
    gap: 2rem;
    align-items: center;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    color: #666;
    flex-wrap: wrap;
}

.tutorial-intro-box {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-left: 4px solid #667eea;
    padding: 1.8rem;
    margin: 2rem 0;
    border-radius: 0 12px 12px 0;
}

.tutorial-intro-box p {
    font-size: 1.2rem;
    line-height: 1.7;
    color: #555;
    margin: 0;
}

/* Table of Contents */
.table-of-contents {
    background: rgba(102, 126, 234, 0.05);
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: 15px;
    padding: 2rem;
    margin: 2.5rem 0;
}

.table-of-contents h3 {
    color: #2c3e50;
    margin-bottom: 1.2rem;
    font-size: 1.4rem;
    font-weight: 600;
}

.table-of-contents ul {
    list-style: none;
    padding-left: 0;
}

.table-of-contents li {
    margin-bottom: 0.7rem;
}

.table-of-contents a {
    color: #667eea;
    text-decoration: none;
    padding: 0.4rem 0;
    display: block;
    transition: all 0.3s ease;
    font-weight: 500;
}

.table-of-contents a:hover {
    color: #764ba2;
    padding-left: 1.2rem;
}

/* Code Examples */
.code-example {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 2rem;
    border-radius: 12px;
    margin: 2rem 0;
    position: relative;
    overflow-x: auto;
}

.code-example::before {
    content: 'LaTeX Code';
    position: absolute;
    top: 0.5rem;
    right: 1rem;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.code-example code {
    font-family: 'Courier New', 'Consolas', monospace;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #ecf0f1;
}

.copy-code-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.copy-code-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Output Example */
.output-example {
    background: white;
    border: 2px solid #e0e0e0;
    padding: 2rem;
    border-radius: 12px;
    margin: 1.5rem 0 2rem 0;
}

.output-example::before {
    content: 'Output';
    display: block;
    font-size: 0.85rem;
    color: #999;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

/* Side by Side Examples */
.side-by-side-examples {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin: 2rem 0;
}

/* Pro Tips and Warning Boxes */
.pro-tip,
.warning-box,
.info-box {
    padding: 1.8rem;
    border-radius: 12px;
    margin: 2rem 0;
    border-left: 4px solid;
}

.pro-tip {
    background: linear-gradient(135deg, rgba(17, 153, 142, 0.1) 0%, rgba(56, 239, 125, 0.1) 100%);
    border-color: #11998e;
}

.pro-tip::before {
    content: '💡 Pro Tip';
    display: block;
    font-weight: 700;
    color: #11998e;
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
}

.warning-box {
    background: linear-gradient(135deg, rgba(245, 87, 108, 0.1) 0%, rgba(240, 147, 251, 0.1) 100%);
    border-color: #f5576c;
}

.warning-box::before {
    content: '⚠️ Warning';
    display: block;
    font-weight: 700;
    color: #f5576c;
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
}

.info-box {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-color: #667eea;
}

.info-box::before {
    content: 'ℹ️ Info';
    display: block;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
}

/* Symbol Table */
.symbol-table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.symbol-table th,
.symbol-table td {
    padding: 1.2rem;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

.symbol-table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
}

.symbol-table tr:hover {
    background: rgba(102, 126, 234, 0.05);
}

.symbol-table code {
    background: rgba(102, 126, 234, 0.1);
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    color: #667eea;
}

/* Quick Reference Sidebar */
.quick-reference {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 2rem;
    position: sticky;
    top: 100px;
}

.quick-reference h3 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    font-weight: 600;
    border-bottom: 2px solid #667eea;
    padding-bottom: 0.7rem;
}

.quick-reference ul {
    list-style: none;
    padding: 0;
}

.quick-reference li {
    margin-bottom: 1rem;
    padding: 0.8rem;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.quick-reference li:hover {
    background: rgba(102, 126, 234, 0.1);
    transform: translateX(5px);
}

.quick-reference code {
    background: rgba(102, 126, 234, 0.15);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    color: #667eea;
    font-weight: 600;
}

/* Next/Previous Navigation */
.tutorial-navigation {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    margin: 3rem 0;
}

.nav-button {
    flex: 1;
    background: rgba(255, 255, 255, 0.9);
    padding: 1.5rem 2rem;
    border-radius: 15px;
    text-decoration: none;
    color: #2c3e50;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.nav-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.2);
}

.nav-button.prev::before {
    content: '← ';
    color: #667eea;
    font-weight: 700;
}

.nav-button.next {
    text-align: right;
}

.nav-button.next::after {
    content: ' →';
    color: #667eea;
    font-weight: 700;
}

.nav-button .nav-label {
    font-size: 0.85rem;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    display: block;
    margin-bottom: 0.5rem;
}

.nav-button .nav-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
}

/* FAQ Section (Tutorial Pages) */
.faq-section {
    margin: 3rem 0;
}

.faq-section h2 {
    color: #2c3e50;
    font-size: 2rem;
    margin-bottom: 2rem;
    font-weight: 700;
}

.faq-item {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid #667eea;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.faq-item:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateX(8px);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.15);
}

.faq-item h4 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.3rem;
    font-weight: 600;
}

.faq-item p {
    color: #555;
    line-height: 1.7;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .tutorial-hero h1 {
        font-size: 2.8rem;
    }
    
    .side-by-side-examples {
        grid-template-columns: 1fr;
    }
    
    .quick-reference {
        position: static;
    }
}

@media (max-width: 768px) {
    .tutorial-hero {
        padding: 3rem 1.5rem;
    }
    
    .tutorial-hero h1 {
        font-size: 2.2rem;
    }
    
    .tutorial-hero .subtitle {
        font-size: 1.1rem;
    }
    
    .tutorial-stats {
        gap: 1.5rem;
    }
    
    .stat-number {
        font-size: 2.2rem;
    }
    
    .quick-nav-grid,
    .tutorial-cards-grid,
    .category-list {
        grid-template-columns: 1fr;
    }
    
    .tutorial-header {
        padding: 2rem 1.5rem;
    }
    
    .tutorial-header h1 {
        font-size: 2.2rem;
    }
    
    .tutorial-content {
        padding: 2rem;
    }
    
    .tutorial-meta {
        flex-direction: column;
        gap: 0.8rem;
        align-items: flex-start;
    }
    
    .tutorial-navigation {
        flex-direction: column;
    }
    
    .nav-button.next {
        text-align: left;
    }
    
    .code-example {
        padding: 1.5rem;
        font-size: 0.85rem;
    }
    
    .tutorial-categories {
        padding: 2rem;
    }
}

@media (max-width: 480px) {
    .tutorial-hero h1 {
        font-size: 1.8rem;
    }
    
    .tutorial-hero .subtitle {
        font-size: 1rem;
    }
    
    .tutorial-content {
        padding: 1.5rem;
    }
    
    .tutorial-header {
        padding: 1.5rem 1rem;
    }
    
    .tutorial-header h1 {
        font-size: 1.8rem;
    }
    
    .quick-nav-card,
    .tutorial-card {
        padding: 1.5rem;
    }
    
    .code-example {
        padding: 1rem;
    }
    
    .symbol-table th,
    .symbol-table td {
        padding: 0.8rem;
        font-size: 0.9rem;
    }
    
    .pro-tip,
    .warning-box,
    .info-box {
        padding: 1.2rem;
    }
}

/* Print Styles */
@media print {
    .tutorial-hero,
    .tutorial-navigation,
    .quick-reference,
    .quick-nav-section {
        display: none !important;
    }
    
    .tutorial-content {
        background: none !important;
        box-shadow: none !important;
        border: none !important;
        padding: 0 !important;
    }
    
    .code-example {
        background: #f5f5f5 !important;
        color: #000 !important;
        border: 1px solid #ddd !important;
    }
}

/* Additional Styles for First LaTeX Document Tutorial */

/* Difficulty Badge */
.difficulty-badge {
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
}

.difficulty-badge.beginner {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
}

.difficulty-badge.intermediate {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.difficulty-badge.advanced {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    color: white;
}

/* Read Time & Last Updated */
.read-time,
.last-updated {
    font-size: 0.9rem;
    color: #666;
}

.read-time i {
    margin-right: 0.3rem;
    color: #667eea;
}

/* Lead Paragraph */
.lead {
    font-size: 1.25rem;
    line-height: 1.7;
    color: #555;
    margin: 1.5rem 0;
    font-weight: 400;
}

/* TOC Box */
.toc-box {
    background: rgba(102, 126, 234, 0.05);
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: 15px;
    padding: 2rem;
    margin: 2.5rem 0;
}

.toc-box h2 {
    color: #2c3e50;
    margin-bottom: 1.2rem;
    font-size: 1.4rem;
    font-weight: 600;
}

.toc-box ul {
    list-style: none;
    padding-left: 0;
}

.toc-box ul ul {
    padding-left: 1.5rem;
    margin-top: 0.5rem;
}

.toc-box li {
    margin-bottom: 0.7rem;
}

.toc-box a {
    color: #667eea;
    text-decoration: none;
    padding: 0.4rem 0;
    display: inline-block;
    transition: all 0.3s ease;
    font-weight: 500;
}

.toc-box a:hover {
    color: #764ba2;
    padding-left: 0.5rem;
}

/* Info Box with Icon */
.info-box,
.warning-box {
    display: flex;
    gap: 1.2rem;
    padding: 1.8rem;
    border-radius: 12px;
    margin: 2rem 0;
    border-left: 4px solid;
    align-items: flex-start;
}

.info-box {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-color: #667eea;
}

.info-icon,
.warning-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
}

.info-icon {
    color: #667eea;
}

.warning-icon {
    color: #f5576c;
}

.info-content,
.warning-content {
    flex: 1;
}

.info-content strong,
.warning-content strong {
    color: #2c3e50;
    display: block;
    margin-bottom: 0.5rem;
    font-size: 1.05rem;
}

.warning-box {
    background: linear-gradient(135deg, rgba(245, 87, 108, 0.1) 0%, rgba(240, 147, 251, 0.1) 100%);
    border-color: #f5576c;
}

/* Feature Grid */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin: 2.5rem 0;
}

.feature-item {
    background: rgba(255, 255, 255, 0.7);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.2);
}

.feature-item h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    font-weight: 600;
}

.feature-item h3 i {
    color: #667eea;
    margin-right: 0.5rem;
}

.feature-item p {
    color: #555;
    line-height: 1.6;
    margin: 0;
}

/* Step Box */
.step-box {
    display: flex;
    gap: 1.5rem;
    background: rgba(255, 255, 255, 0.7);
    padding: 1.8rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.step-box:hover {
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.15);
    transform: translateX(5px);
}

.step-number {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    flex-shrink: 0;
}

.step-content {
    flex: 1;
}

.step-content h4 {
    color: #2c3e50;
    margin-bottom: 0.8rem;
    font-size: 1.2rem;
    font-weight: 600;
}

.step-content p {
    color: #555;
    line-height: 1.6;
    margin: 0;
}

/* Code Block */
.code-block {
    background: #2c3e50;
    border-radius: 12px;
    margin: 2rem 0;
    overflow: hidden;
}

.code-header {
    background: rgba(0, 0, 0, 0.2);
    padding: 0.8rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.code-header span {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    font-size: 0.9rem;
}

.copy-btn {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.4rem 0.9rem;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.code-block pre {
    margin: 0;
    padding: 1.5rem;
    overflow-x: auto;
}

.code-block code {
    font-family: 'Courier New', 'Consolas', monospace;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #ecf0f1;
}

/* Editor Comparison */
.editor-comparison {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin: 2.5rem 0;
}

.editor-card {
    background: rgba(255, 255, 255, 0.9);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.editor-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.2);
}

.editor-card h4 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.3rem;
    font-weight: 600;
}

.editor-card h4 i {
    color: #667eea;
    margin-right: 0.5rem;
}

.editor-pros {
    background: rgba(17, 153, 142, 0.1);
    color: #11998e;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.editor-card p {
    color: #555;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.btn-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    margin-top: 0.5rem;
}

.btn-link:hover {
    color: #764ba2;
    padding-left: 0.5rem;
}

.muted-text {
    color: #999;
    font-size: 0.9rem;
    font-style: italic;
}

/* Structure Diagram */
.structure-diagram {
    margin: 2rem 0;
}

.structure-part {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    margin-bottom: 1.5rem;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.structure-label {
    padding: 1rem 1.5rem;
    font-weight: 700;
    color: white;
    font-size: 1.1rem;
}

.preamble-label {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.document-label {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.structure-content {
    padding: 1.5rem;
}

.structure-content p {
    margin: 0.5rem 0;
    color: #555;
    line-height: 1.6;
}

.structure-content code {
    background: rgba(102, 126, 234, 0.1);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    color: #667eea;
}

/* Data Table */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.data-table th,
.data-table td {
    padding: 1rem 1.5rem;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

.data-table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.85rem;
}

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

.data-table tr:hover {
    background: rgba(102, 126, 234, 0.05);
}

.data-table code {
    background: rgba(102, 126, 234, 0.1);
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    color: #667eea;
    font-weight: 600;
}

/* Explanation Box */
.explanation-box {
    background: rgba(102, 126, 234, 0.05);
    border-left: 4px solid #667eea;
    padding: 1.5rem;
    border-radius: 0 12px 12px 0;
    margin: 1.5rem 0;
}

.explanation-box h4 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.explanation-box ul {
    margin: 0;
    padding-left: 1.5rem;
}

.explanation-box li {
    color: #555;
    line-height: 1.7;
    margin-bottom: 0.5rem;
}

.explanation-box code {
    background: rgba(102, 126, 234, 0.15);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    color: #667eea;
    font-weight: 600;
}

/* Output Preview */
.output-preview {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 2rem;
    margin: 1.5rem 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.preview-label {
    font-size: 0.85rem;
    color: #999;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
}

.preview-content {
    font-family: 'Computer Modern', 'Latin Modern', serif;
}

.preview-title {
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
    text-align: center;
    margin-bottom: 0.5rem;
}

.preview-author {
    text-align: center;
    font-size: 1.2rem;
    color: #555;
    margin-bottom: 0.3rem;
}

.preview-date {
    text-align: center;
    font-size: 1rem;
    color: #666;
    margin-bottom: 2rem;
}

.preview-section {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 2rem 0 1rem 0;
}

.preview-content p {
    color: #333;
    line-height: 1.8;
    text-align: justify;
    margin-bottom: 1rem;
}

/* Compilation Guide */
.compilation-guide {
    margin: 2rem 0;
}

.compile-method {
    background: rgba(255, 255, 255, 0.9);
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.compile-method h4 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.3rem;
    font-weight: 600;
}

.compile-method h4 i {
    color: #667eea;
    margin-right: 0.5rem;
}

.compile-method ol {
    padding-left: 1.5rem;
    margin: 1rem 0;
}

.compile-method li {
    color: #555;
    line-height: 1.7;
    margin-bottom: 0.8rem;
}

.compile-note {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    padding: 0.8rem 1.2rem;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-top: 1rem;
    font-weight: 500;
}

/* Mistake List */
.mistake-list {
    margin: 2rem 0;
}

.mistake-item {
    background: rgba(255, 255, 255, 0.9);
    padding: 1.8rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border-left: 4px solid #f5576c;
}

.mistake-title {
    color: #f5576c;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mistake-title i {
    font-size: 1.3rem;
}

.mistake-wrong {
    background: rgba(245, 87, 108, 0.1);
    padding: 0.8rem 1.2rem;
    border-radius: 8px;
    margin: 0.8rem 0;
}

.mistake-wrong strong {
    color: #f5576c;
    margin-right: 0.5rem;
}

.mistake-right {
    background: rgba(17, 153, 142, 0.1);
    padding: 0.8rem 1.2rem;
    border-radius: 8px;
    margin: 0.8rem 0;
}

.mistake-right strong {
    color: #11998e;
    margin-right: 0.5rem;
}

.mistake-item p {
    color: #555;
    line-height: 1.6;
    margin: 0.8rem 0 0 0;
}

.mistake-item code {
    background: rgba(102, 126, 234, 0.1);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    color: #667eea;
}

/* Learning Path */
.learning-path {
    background: rgba(255, 255, 255, 0.9);
    padding: 2rem;
    border-radius: 15px;
    margin: 2rem 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.learning-path h3 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.learning-path ol {
    padding-left: 1.5rem;
}

.learning-path li {
    color: #555;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.learning-path strong {
    color: #2c3e50;
    font-weight: 600;
}

/* CTA Box */
.cta-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 3rem;
    border-radius: 20px;
    margin: 3rem 0;
    text-align: center;
}

.cta-box h3 {
    color: white;
    margin-bottom: 1rem;
    font-size: 1.8rem;
    font-weight: 700;
}

.cta-box p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    opacity: 0.95;
}

.cta-box ul {
    text-align: left;
    max-width: 600px;
    margin: 0 auto;
    padding-left: 1.5rem;
}

.cta-box li {
    line-height: 1.8;
    margin-bottom: 0.8rem;
}

.cta-box a {
    color: white;
    text-decoration: underline;
    transition: opacity 0.3s ease;
}

.cta-box a:hover {
    opacity: 0.8;
}

/* FAQ Section Styles */
.faq-section .faq-item {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid #667eea;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.faq-question {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    font-weight: 600;
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
}

.faq-question i {
    color: #667eea;
    margin-top: 0.2rem;
    flex-shrink: 0;
}

.faq-answer p {
    color: #555;
    line-height: 1.7;
    margin: 0;
}

/* Related Tutorials Grid */
.related-tutorials {
    margin: 4rem 0;
}

.related-tutorials h2 {
    color: #2c3e50;
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2.5rem;
    font-weight: 700;
}

.tutorial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.tutorial-grid .tutorial-card {
    text-decoration: none;
    display: block;
}

.tutorial-grid .tutorial-card-header {
    padding: 1.5rem 1.5rem 0 1.5rem;
}

.tutorial-grid .tutorial-card h3 {
    padding: 0 1.5rem;
    margin-bottom: 0.5rem;
}

.tutorial-grid .tutorial-card p {
    padding: 0 1.5rem;
    margin-bottom: 1.5rem;
}

.read-more {
    color: #667eea;
    font-weight: 600;
    padding: 0 1.5rem 1.5rem 1.5rem;
    display: block;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4rem 2rem;
    border-radius: 20px;
    text-align: center;
    margin: 4rem 0;
}

.cta-section h2 {
    color: white;
    margin-bottom: 1rem;
    font-size: 2.2rem;
    font-weight: 700;
}

.cta-section p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.cta-button {
    display: inline-block;
    background: white;
    color: #667eea;
    padding: 1rem 2.5rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* Responsive Updates */
@media (max-width: 768px) {
    main section {
        padding: 2rem;
    }
    
    .tutorial-header {
        padding: 2rem 1.5rem;
    }
    
    .tutorial-header h1 {
        font-size: 2rem;
    }
    
    .feature-grid,
    .editor-comparison,
    .compilation-guide {
        grid-template-columns: 1fr;
    }
    
    .step-box {
        flex-direction: column;
        text-align: center;
    }
    
    .step-number {
        margin: 0 auto 1rem auto;
    }
    
    .data-table {
        font-size: 0.85rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 0.8rem;
    }
    
    .cta-box,
    .cta-section {
        padding: 2rem 1.5rem;
    }
    
    .preview-title {
        font-size: 1.5rem;
    }
    
    .code-block pre {
        padding: 1rem;
        font-size: 0.85rem;
    }
}


/* Footer Styles - Standardized across all pages */
footer {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 2rem 0;
    margin-top: 3rem;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.footer-links a {
    color: #666;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #667eea;
}

.footer-content p {
    color: #999;
    font-size: 0.9rem;
    margin: 0;
}

@media (max-width: 768px) {
    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }
}


/* Override container grid for tutorial pages (no sidebar) */
.container {
    display: block !important;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Center main content */
main {
    width: 100%;
    max-width: 100%;
    margin: 0;
}
