/* style.css */
@font-face {
    font-family: 'SevenSegment';
    src: url('7SEGMENTALDIGITALDISPLAY.ttf') format('truetype');
}
body {
    background-color: #1e1e1e;
    color: #dcdcdc;
    font-family: Arial, sans-serif;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    overscroll-behavior: none;
}
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1001;
}
.header-bar {
    background-color: #f2a900;
    padding: 0 10px;
    width: 100%;
    box-sizing: border-box;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.header-text {
    color: black;
    font-size: 1.1rem;
    font-weight: bold;
    margin-left: 20px;
}
.header-nav {
    display: flex;
    gap: 15px;
}
.nav-item {
    color: black;
    text-decoration: none;
    font-size: 1rem;
    padding: 5px 10px;
    transition: background-color 0.3s;
    cursor: pointer; /* Pointing hand on hover */
}
.nav-item:hover {
    background-color: #d18f00;
    border-radius: 5px;
}
.burger-menu {
    display: none;
    font-size: 1.5rem;
    color: black;
    cursor: pointer;
    padding: 5px 10px;
}
.tables-container {
    display: flex;
    flex-direction: column;
    justify-content: center; /* Vertically center table and last-updated */
    align-items: center;
    width: 100%;
    flex: 1;
    padding: 50px 0 60px 0; /* Space for header/footer */
    z-index: 0; /* Lower than header/footer */
}
.table-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* Align table and last-updated to left */
    max-width: 800px; /* Match table max-width */
}
table {
    border-collapse: collapse;
    width: 100%;
    max-width: 800px;
}
th, td {
    border: 1px solid #dcdcdc;
    padding: 10px;
    text-align: center;
}
th {
    background-color: #333;
    font-weight: bold;
}
td {
    background-color: #2a2a2a;
    min-height: 20.5px; /* 40.5px total height - 10px padding-top - 10px padding-bottom */
    line-height: 20.5px; /* Match content height for consistency */
}
.main-table thead tr:first-child th {
    border-top: 3px solid #dcdcdc; /* Thick top border above header */
}
.main-table tbody tr:last-child td {
    border-bottom: 3px solid #dcdcdc; /* Thick bottom border below last row */
}
.main-table td:nth-child(1),
.main-table th:nth-child(1) {
    border-left: 3px solid #dcdcdc; /* Thick border on left of column 1 */
}
/* Thick border for index.html (column 2: Price (USD)) */
body:has(#main-table-body td[id$="-price"]) .main-table td:nth-child(2),
body:has(#main-table-body td[id$="-price"]) .main-table th:nth-child(2) {
    border-right: 3px solid #dcdcdc;
}
/* Thick border for index.html (column 5: Ratio) */
body:has(#main-table-body td[id^="ratio-"]) .main-table td:nth-child(5),
body:has(#main-table-body td[id^="ratio-"]) .main-table th:nth-child(5) {
    border-right: 3px solid #dcdcdc;
}
/* Thick border for summary.html (column 9: Range) */
body:has(#main-table-body td[id$="-volatility"]) .main-table td:nth-child(9),
body:has(#main-table-body td[id$="-volatility"]) .main-table th:nth-child(9) {
    border-right: 3px solid #dcdcdc;
}
#last-updated {
    font-size: 0.8rem;
    font-style: italic;
    color: #dcdcdc;
    margin: 10px 0 0 0; /* Remove horizontal centering, keep top margin */
    padding: 0; /* Remove all padding */
    max-width: 800px; /* Match table max-width */
    text-align: left; /* Align text to left */
    box-sizing: border-box;
}
#error {
    color: #ff5555;
    font-size: 14px;
    text-align: center;
}
select {
    background-color: #2a2a2a;
    color: #dcdcdc;
    border: none;
    margin: 0;
    padding: 0;
    width: 100%;
    height: 20.5px; /* 40.5px total height - 10px padding-top - 10px padding-bottom */
    font-size: inherit;
    font-family: inherit;
    text-align: center;
    cursor: pointer;
    line-height: 20.5px; /* Match content height for consistency */
    appearance: auto;
    -webkit-appearance: menulist;
    -moz-appearance: menulist;
    box-sizing: content-box; /* Ensure padding is outside height calculation */
}
select:focus {
    outline: none;
    border: 1px solid #dcdcdc;
    height: 18.5px; /* Adjust for 1px border-top + 1px border-bottom */
}
#overlay {
    position: fixed;
    top: 50px; /* Below header */
    left: 0;
    width: 100%;
    height: calc(100vh - 100px); /* Use vh to cover full viewport height minus header/footer */
    background-color: #000;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}
#overlay-content {
    color: #dcdcdc;
    white-space: nowrap;
}
#overlay-label {
    position: absolute;
    bottom: 20px;
    font-size: 5vw;
    color: #dcdcdc;
}
.ratio-value {
    font-weight: bold;
    color: #ffffff;
    white-space: nowrap;
    text-align: center;
    background: transparent;
    text-shadow: 0 0 10px #ffffff, 0 0 20px #00aaff, 0 0 30px #00aaff;
    animation: glowPulse 2s ease-in-out infinite;
}
@keyframes glowPulse {
    0%, 100% {
        text-shadow: 0 0 10px #ffffff, 0 0 20px #00aaff, 0 0 30px #00aaff;
    }
    50% {
        text-shadow: 0 0 15px #ffffff, 0 0 30px #00aaff, 0 0 45px #00aaff;
    }
}
@media (max-width: 768px) {
    table {
        max-width: 100%;
    }
    .header-nav {
        display: none; /* Hide nav items by default on mobile */
        flex-direction: column;
        position: absolute;
        top: 50px;
        right: 10px;
        background-color: #f2a900;
        padding: 10px;
        border-radius: 5px;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    }
    .header-nav.active {
        display: flex; /* Show nav items when active */
    }
    .nav-item {
        font-size: 0.9rem;
        padding: 8px 10px;
    }
    .burger-menu {
        display: block; /* Show burger icon on mobile */
    }
}
footer {
    position: fixed;
    bottom: 0;
    width: 100%;
    z-index: 1001;
    text-align: center;
    background-color: #1e1e1e;
    color: #dcdcdc;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    box-sizing: border-box;
}
.copyright {
    font-size: 1rem;
}
.asset-cell {
    cursor: pointer;
    position: relative;
}
.main-table thead th {
    cursor: pointer;
}