/* X240BTC: A Mathematically Superior Bitcoin Derivative - Styling */

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

body {
    font-family: 'Times', 'Times New Roman', serif;
    font-size: 12px;
    line-height: 1.4;
    color: #000;
    background-color: #fff;
    max-width: 8.5in;
    margin: 0 auto;
    padding: 1in;
}

.container {
    max-width: 100%;
}

/* Header Styling */
.paper-header {
    text-align: center;
    margin-bottom: 2em;
    border-bottom: 2px solid #f7931a;
    padding-bottom: 1.5em;
}

.paper-header h1 {
    font-size: 28px;
    font-weight: bold;
    letter-spacing: 6px;
    margin-bottom: 0.5em;
    text-transform: uppercase;
    color: #f7931a;
}

.paper-header h2 {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 0.5em;
    color: #333;
}

.paper-header h3 {
    font-size: 14px;
    font-style: italic;
    font-weight: normal;
    margin-bottom: 1em;
    color: #666;
}

.version-info {
    font-size: 12px;
    color: #f7931a;
    font-weight: bold;
}

.social-header {
    font-size: 10px;
    margin-top: 0.5em;
    color: #666;
    font-weight: normal;
}

.social-header a {
    color: #f7931a;
    text-decoration: none;
}

.social-header a:hover {
    text-decoration: underline;
}

/* Main Content */
.paper-content {
    column-count: 2;
    column-gap: 0.5in;
    column-rule: 1px solid #eee;
    text-align: justify;
}

/* Sections */
section {
    break-inside: avoid;
    margin-bottom: 1em;
}

/* Full-width sections */
#technical,
#conclusion {
    column-span: all;
    margin: 2em 0;
    padding: 1.5em 0;
    border-top: 1px solid #eee;
}

/* Typography */
h3 {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 0.5em;
    break-after: avoid;
    color: #f7931a;
    text-transform: uppercase;
    border-bottom: 1px solid #f7931a;
    padding-bottom: 0.2em;
}

h4 {
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 0.4em;
    break-after: avoid;
    color: #333;
}

h5 {
    font-size: 11px;
    font-weight: bold;
    margin-bottom: 0.3em;
    break-after: avoid;
    color: #666;
}

p {
    margin-bottom: 0.5em;
    text-indent: 0.15in;
}

p:first-child,
.abstract p {
    text-indent: 0;
}

/* Links */
a {
    color: #f7931a;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #ff8c00;
    text-decoration: underline;
}

/* Abstract */
.abstract {
    column-span: all;
    margin-bottom: 1.5em;
    padding: 1em;
    background: linear-gradient(135deg, #fff8f0 0%, #fff 100%);
    border-left: 4px solid #f7931a;
    border-radius: 5px;
}

/* Interactive Tables */
.interactive-table {
    margin: 0.8em 0;
    break-inside: avoid;
}

.interactive-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 10px;
    margin: 0.5em 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-radius: 5px;
    overflow: hidden;
}

.interactive-table th {
    background: linear-gradient(135deg, #f7931a 0%, #ff8c00 100%);
    color: #fff;
    font-weight: bold;
    padding: 0.5em;
    text-align: center;
    border: none;
}

.interactive-table td {
    border: 1px solid #eee;
    padding: 0.4em;
    text-align: center;
    background: #fff;
    transition: all 0.3s ease;
}

.table-row {
    cursor: pointer;
    transition: all 0.3s ease;
}

.table-row:hover {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b3 100%) !important;
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(247, 147, 26, 0.3);
}

.table-row:hover td {
    font-weight: bold;
    color: #ff8c00;
}

.highlight-row {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
}

.future-row {
    background: linear-gradient(135deg, #f7931a 0%, #ff8c00 100%) !important;
    color: #fff !important;
}

.future-row td {
    color: #fff !important;
    font-weight: bold;
}

/* Source References */
.source,
.source-ref {
    font-size: 9px;
    font-style: italic;
    color: #666;
    margin-top: 0.3em;
    text-indent: 0;
}

/* Feature Lists */
.feature-list {
    margin: 0.5em 0;
}

.feature-item.interactive-feature {
    display: flex;
    align-items: center;
    margin-bottom: 0.3em;
    padding: 0.2em;
    border-radius: 3px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.feature-item.interactive-feature:hover {
    background: linear-gradient(90deg, #f0f8ff 0%, #e6f3ff 100%);
    transform: translateX(10px);
    border-left: 3px solid #f7931a;
    box-shadow: 2px 2px 8px rgba(0,0,0,0.1);
}

.checkmark {
    color: #2E8B57;
    font-weight: bold;
    margin-right: 0.5em;
    font-size: 12px;
    transition: all 0.3s ease;
}

.feature-item.interactive-feature:hover .checkmark {
    color: #f7931a;
    transform: scale(1.3);
}

/* Token Distribution */
.token-distribution {
    margin: 1em 0;
    break-inside: avoid;
}

.distribution-visual {
    display: flex;
    justify-content: space-between;
    margin: 0.5em 0;
    gap: 0.5em;
}

.distribution-item.interactive-box {
    flex: 1;
    text-align: center;
    padding: 1em 0.5em;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

.distribution-item.tradeable {
    background: linear-gradient(135deg, #90EE90 0%, #98FB98 100%);
}

.distribution-item.locked {
    background: linear-gradient(135deg, #FFB347 0%, #FFA500 100%);
}

.distribution-item.fee {
    background: linear-gradient(135deg, #DDA0DD 0%, #DA70D6 100%);
}

.distribution-item.interactive-box:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    border-color: #f7931a;
}

.percentage {
    font-size: 18px;
    font-weight: bold;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.label {
    font-size: 10px;
    color: #333;
    font-weight: bold;
    margin-top: 0.3em;
}

/* Code Blocks and Formulas */
.formula-box {
    margin: 0.8em 0;
    break-inside: avoid;
}

.code-block {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    border-left: 4px solid #f7931a;
    padding: 0.8em;
    font-family: 'Courier New', monospace;
    font-size: 10px;
    margin: 0.5em 0;
    border-radius: 5px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.code-block:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(247, 147, 26, 0.2);
}

code {
    font-family: 'Courier New', monospace;
    font-size: 10px;
    line-height: 1.4;
}

/* Seven Laws Section */
.law.interactive-law {
    margin: 1.5em 0;
    padding: 1em;
    border: 1px solid #eee;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    break-inside: avoid;
}

.law.interactive-law:hover {
    border-color: #f7931a;
    box-shadow: 0 8px 25px rgba(247, 147, 26, 0.15);
    transform: translateY(-3px);
    background: linear-gradient(135deg, #fff8f0 0%, #fff 100%);
}

.law h4 {
    color: #f7931a;
    border-bottom: 1px solid #f7931a;
    padding-bottom: 0.3em;
    margin-bottom: 0.8em;
}

/* Calculation Steps */
.calculation-step {
    margin: 1em 0;
    break-inside: avoid;
}

.calculation-step h5 {
    color: #f7931a;
    margin-bottom: 0.5em;
}

/* Lists */
ul, ol {
    margin: 0.5em 0;
    padding-left: 1.5em;
}

li {
    margin-bottom: 0.3em;
    font-size: 11px;
}

/* Technical Architecture */
.technical-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2em;
    margin: 1em 0;
}

.tech-column {
    display: flex;
    flex-direction: column;
}

.blockchain-section,
.token-pairing,
.vesting-formula-section {
    margin: 0;
    padding: 0.8em;
    background: #f8f9fa;
    border-radius: 5px;
    border-left: 3px solid #f7931a;
    flex: 1;
}

/* Launch Info */
.launch-info {
    column-span: all;
    margin-top: 2em;
    padding: 1.5em;
    background: linear-gradient(135deg, #f7931a 0%, #ff8c00 100%);
    color: #fff;
    border-radius: 10px;
    text-align: center;
}

.launch-info h4 {
    color: #fff;
    margin-bottom: 1em;
    font-size: 16px;
}

.launch-info ul {
    list-style: none;
    padding: 0;
}

.launch-info li {
    margin-bottom: 0.5em;
    font-size: 12px;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    body {
        padding: 0.4in;
        font-size: 12px;
    }
    
    .paper-content {
        column-count: 1;
        column-gap: 0;
        column-rule: none;
    }
    
    .paper-header h1 {
        font-size: 20px;
        letter-spacing: 3px;
    }
    
    .paper-header h2 {
        font-size: 14px;
    }
    
    .paper-header h3 {
        font-size: 12px;
    }
    
    h3 {
        font-size: 13px;
    }
    
    h4 {
        font-size: 11px;
    }
    
    h5 {
        font-size: 10px;
    }
    
    p, li {
        font-size: 11px;
        line-height: 1.3;
    }
    
    .distribution-visual {
        flex-direction: column;
        gap: 1em;
    }
    
    .interactive-table table {
        font-size: 9px;
    }
    
    .code-block {
        font-size: 9px;
        padding: 0.6em;
    }
    
    .table-row:hover {
        transform: scale(1.01);
    }
    
    .distribution-item.interactive-box:hover {
        transform: translateY(-5px) scale(1.02);
    }
    
    .technical-grid {
        grid-template-columns: 1fr;
        gap: 1em;
    }
}

@media screen and (max-width: 480px) {
    body {
        padding: 0.25in;
        font-size: 11px;
    }
    
    .paper-header h1 {
        font-size: 18px;
        letter-spacing: 2px;
    }
    
    .paper-header h2 {
        font-size: 13px;
    }
    
    .paper-header h3 {
        font-size: 11px;
    }
    
    h3 {
        font-size: 12px;
    }
    
    h4 {
        font-size: 10px;
    }
    
    h5 {
        font-size: 9px;
    }
    
    p, li {
        font-size: 10px;
        line-height: 1.3;
    }
    
    .interactive-table table {
        font-size: 8px;
    }
    
    .code-block {
        font-size: 8px;
        padding: 0.5em;
    }
    
    .law.interactive-law {
        padding: 0.8em;
    }
}

/* Print Styles */
@media print {
    body {
        font-size: 11px;
        padding: 0.75in;
    }
    
    .paper-content {
        column-count: 2;
    }
    
    .interactive-table table,
    .law.interactive-law,
    .distribution-item.interactive-box,
    .feature-item.interactive-feature {
        break-inside: avoid;
    }
    
    /* Disable hover effects and transitions in print */
    .table-row:hover,
    .feature-item.interactive-feature:hover,
    .distribution-item.interactive-box:hover,
    .law.interactive-law:hover,
    .code-block:hover {
        transform: none;
        box-shadow: none;
        background: inherit;
    }
    
    a {
        color: #000;
        text-decoration: underline;
    }
}

/* Animation for loading */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.law.interactive-law,
.interactive-table,
.distribution-item.interactive-box {
    animation: fadeInUp 0.6s ease-out;
}

/* Scroll progress indicator */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, #f7931a, #ff8c00);
    z-index: 1000;
    transition: width 0.1s ease;
}

/* Highlight animation */
@keyframes highlight {
    0% { background-color: transparent; }
    50% { background-color: rgba(247, 147, 26, 0.2); }
    100% { background-color: transparent; }
}

.highlight-animation {
    animation: highlight 1s ease-in-out;
}

/* Social Links Section */
.social-links {
    margin: 2em 0;
    padding: 1em;
    background: #f8f9fa;
    border-radius: 8px;
    break-inside: avoid;
}

.social-links h4 {
    color: #f7931a;
    border-bottom: 1px solid #f7931a;
    padding-bottom: 0.3em;
    margin-bottom: 0.8em;
}

.links-container {
    display: flex;
    flex-direction: column;
    gap: 0.5em;
}

.social-link,
.contract-address {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
}

.link-label {
    font-weight: bold;
    color: #333;
}

.social-link a {
    color: #f7931a;
    text-decoration: none;
}

.social-link a:hover {
    text-decoration: underline;
}

.ca-text {
    color: #f7931a;
    font-weight: bold;
}

.copy-icon {
    cursor: pointer;
    margin-left: 0.3em;
}

.copy-icon:hover {
    transform: scale(1.2);
}

/* Footer Styling */
.whitepaper-footer {
    margin-top: 3em;
    padding-top: 2em;
    border-top: 2px solid #f7931a;
    break-inside: avoid;
    column-span: all;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2em;
    margin-bottom: 1em;
}

.footer-section h5 {
    color: #f7931a;
    font-size: 12px;
    margin-bottom: 0.5em;
    border-bottom: 1px solid #f7931a;
    padding-bottom: 0.2em;
}

.footer-section p {
    font-size: 10px;
    margin-bottom: 0.3em;
    line-height: 1.3;
}

.footer-section a {
    color: #f7931a;
    text-decoration: none;
}

.footer-section a:hover {
    text-decoration: underline;
}

.footer-bottom {
    text-align: center;
    padding-top: 1em;
    border-top: 1px solid #eee;
}

.footer-bottom p {
    font-size: 10px;
    color: #666;
}

/* Mobile adjustments for new elements */
@media screen and (max-width: 768px) {
    .social-header {
        font-size: 8px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1em;
    }
    
    .links-container {
        gap: 0.3em;
    }
    
    .social-link,
    .contract-address {
        font-size: 10px;
    }
}