/* Chad Battles Whitepaper Responsive CSS - Modern, Robust, Production-Grade */

/* --- LAYOUT --- */
body, html {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
    background: #0a0a0a;
}

.whitepaper-wrapper, .whitepaper-container {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    background: #0a0a0a;
}

.whitepaper-body {
    display: flex;
    flex-direction: row;
    gap: 20px;
    padding: 20px;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    overflow: visible;
}

.whitepaper-nav {
    width: 260px;
    min-width: 180px;
    max-width: 300px;
    flex-shrink: 0;
    background: #000;
    border: 3px solid #00aaff;
    padding: 20px;
    box-shadow: 0 0 20px rgba(0, 170, 255, 0.3);
    z-index: 1000;
    align-self: flex-start;
    position: sticky;
    top: 20px;
    height: fit-content;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

.whitepaper-content {
    flex: 1 1 0%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    background: #000;
    border: 3px solid #00aaff;
    padding: 40px;
    box-shadow: 0 0 20px rgba(0, 170, 255, 0.3);
    font-family: 'Courier New', monospace;
    position: relative;
}

@media (max-width: 900px) {
    .whitepaper-body {
        flex-direction: column;
        gap: 0;
        padding: 10px;
    }
    .whitepaper-nav {
        width: 100%;
        max-width: 100%;
        position: relative;
        top: unset;
        left: unset;
        right: unset;
        margin-bottom: 20px;
    }
    .whitepaper-content {
        padding: 10px;
        min-width: 0;
        max-width: 100%;
    }
}

/* --- TABLE RESPONSIVENESS --- */
.whitepaper-content .table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 30px;
}
.whitepaper-content .table-responsive table {
    width: 100%;
    min-width: 600px;
    max-width: 100%;
    display: table;
    table-layout: auto;
}

.whitepaper-content table,
.whitepaper-content th,
.whitepaper-content td {
    min-width: unset;
    max-width: 100%;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

/* --- GENERAL CLEANUP --- */
.whitepaper-content img,
.whitepaper-content pre,
.whitepaper-content code {
    max-width: 100%;
    overflow-x: auto;
    box-sizing: border-box;
}

.whitepaper-content > * {
    max-width: 100%;
}

.whitepaper-content p,
.whitepaper-content li,
.whitepaper-content td,
.whitepaper-content th {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

/* --- RETRO COLORS AND FONTS (keep from old CSS) --- */
.whitepaper-header {
    background: #000;
    color: #00ff00;
    text-align: center;
    padding: 40px 20px;
    margin-bottom: 20px;
    border: 3px solid #00aaff;
    box-shadow: 0 0 20px rgba(0, 170, 255, 0.5);
    position: relative;
}
.whitepaper-title {
    font-family: 'Press Start 2P', cursive;
    font-size: 24px;
    color: #00ff00;
    text-shadow: 2px 2px 0 #ff0080, 4px 4px 0 #00aaff;
    margin-bottom: 20px;
    letter-spacing: 2px;
    text-transform: uppercase;
}
.whitepaper-subtitle {
    font-size: 12px;
    color: #ffffff;
    font-weight: 300;
    max-width: 800px;
    margin: 0 auto;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: 'Courier New', monospace;
}

/* --- FIX BOOTSTRAP CONTAINER FOR WHITEPAPER PAGE --- */
.whitepaper-wrapper .container,
.whitepaper-wrapper .container.main-content-area {
    max-width: 100% !important;
    width: 100% !important;
    overflow-x: visible !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* --- RETRO TABLE HEADER STYLES --- */
.whitepaper-content th {
    background: #00aaff;
    color: #fff;
    font-weight: bold;
    text-transform: uppercase;
    font-family: 'Press Start 2P', cursive, 'Courier New', monospace;
    white-space: nowrap;
    padding: 12px 16px;
    border-bottom: 2px solid #000;
    font-size: 12px;
    letter-spacing: 1px;
    text-shadow: 1px 1px 0 #000;
}

.whitepaper-content td {
    white-space: normal;
    padding: 10px 12px;
    font-size: 12px;
    color: #fff;
}

/* Make sure table scroll still works on mobile */
.whitepaper-content .table-responsive table {
    min-width: 600px;
}

@media (max-width: 900px) {
    .whitepaper-content th {
        font-size: 10px;
        padding: 8px 10px;
    }
    .whitepaper-content td {
        font-size: 10px;
        padding: 6px 8px;
    }
    .whitepaper-content .table-responsive table {
        min-width: 600px;
    }
}

/* Prevent class names from wrapping in the first column of tables */
.whitepaper-content th:first-child,
.whitepaper-content td:first-child {
    min-width: 140px;
    white-space: nowrap;
}

/* --- END --- */ 