/* Sparkle Protocol Academic CSS v4.0 */

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

body {
    font-family: 'Computer Modern', 'Times New Roman', Georgia, serif;
    line-height: 1.8;
    color: #000;
    background: #fff;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Academic Header */
.academic-header {
    text-align: center;
    border-bottom: 3px double #000;
    padding-bottom: 30px;
    margin-bottom: 30px;
}

.academic-header h1 {
    font-size: 2.5rem;
    font-weight: normal;
    margin-bottom: 10px;
    letter-spacing: 2px;
}

.subtitle {
    font-size: 1.2rem;
    font-style: italic;
    color: #333;
    margin-bottom: 10px;
}

.version {
    font-size: 0.9rem;
    color: #666;
}

/* Navigation */
.academic-nav {
    text-align: center;
    padding: 15px 0;
    border-bottom: 1px solid #000;
    margin-bottom: 30px;
}

.academic-nav a {
    color: #000;
    text-decoration: none;
    padding: 5px 15px;
    margin: 0 10px;
    border: 1px solid transparent;
    transition: all 0.3s;
}

.academic-nav a:hover,
.academic-nav a:focus {
    border-bottom: 2px solid #000;
}

/* Content */
.academic-content {
    max-width: 900px;
    margin: 0 auto;
}

h2 {
    font-size: 1.8rem;
    font-weight: normal;
    margin: 40px 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #ccc;
}

h3 {
    font-size: 1.3rem;
    font-weight: normal;
    font-style: italic;
    margin: 25px 0 15px 0;
}

p {
    margin-bottom: 15px;
    text-align: justify;
}

ul, ol {
    margin-left: 30px;
    margin-bottom: 20px;
}

li {
    margin-bottom: 8px;
}

/* Abstract Section */
.abstract-section {
    background: #f9f9f9;
    border: 1px solid #ddd;
    padding: 30px;
    margin-bottom: 40px;
}

.abstract-section h2 {
    border: none;
    margin-top: 0;
}

/* Key Innovation Box */
.key-innovation {
    background: #fff;
    border-left: 4px solid #000;
    padding: 20px;
    margin: 20px 0;
}

.key-innovation h3 {
    margin-top: 0;
    font-style: normal;
}

/* Architecture Diagram */
.architecture-diagram {
    background: #f8f8f8;
    padding: 20px;
    margin: 20px 0;
    overflow-x: auto;
}

.ascii-diagram {
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    line-height: 1.2;
}

/* Code Blocks */
.code-block {
    background: #f5f5f5;
    border: 1px solid #ddd;
    padding: 20px;
    margin: 20px 0;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    overflow-x: auto;
    white-space: pre;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

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

th {
    background: #f0f0f0;
    font-weight: normal;
    font-style: italic;
}

.test-table .pending {
    color: #ff9800;
}

.test-table .passed {
    color: #4caf50;
}

.test-table .failed {
    color: #f44336;
}

/* Comparison Table */
.comparison-table {
    margin: 30px 0;
}

.comparison-table td:first-child {
    font-weight: bold;
}

/* Formula Box */
.formula {
    background: #fff;
    border: 2px solid #000;
    padding: 20px;
    margin: 20px 0;
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
}

/* Conclusion Boxes */
.conclusion-box {
    background: #f9f9f9;
    border: 1px solid #ccc;
    padding: 20px;
    margin: 20px 0;
}

.conclusion-box h3 {
    margin-top: 0;
    font-style: normal;
    border-bottom: 1px solid #ccc;
    padding-bottom: 10px;
}

/* Footer */
.academic-footer {
    margin-top: 60px;
    padding-top: 20px;
    border-top: 2px solid #000;
    text-align: center;
    font-size: 0.9rem;
    color: #666;
}

.academic-footer p {
    margin: 5px 0;
    text-align: center;
}

/* Sections */
section {
    margin-bottom: 40px;
}

/* Print Styles */
@media print {
    body {
        font-size: 11pt;
        line-height: 1.5;
    }

    .academic-nav {
        display: none;
    }

    .code-block {
        page-break-inside: avoid;
    }

    table {
        page-break-inside: avoid;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .academic-header h1 {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .academic-nav a {
        display: block;
        margin: 5px 0;
    }

    table {
        font-size: 0.85rem;
    }

    .code-block {
        font-size: 0.8rem;
    }
}