/* modern-style.css */

/* General Body Styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0;
}

/* Center legacy page blocks inside the container */
.page {
    margin: 0 auto;
}

/* Center the first-level tables inside legacy pages */
.page > table {
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Legacy small card images inside page content (converted from 40x56 GIFs) */
.page img[style*="margin: 0px 2px;"],
.page img[style*="margin: 4px 2px;"] {
    width: 58px;
    height: auto;
}

/* Legacy page content area link styling */
.page a,
.page a:visited,
.page a:hover {
    color: #ae1a1a;
    text-decoration: none;
}

/* Legacy table styling for standard/enhanced layouts */
.standard,
.enhanced {
    border-collapse: collapse;
    caption-side: bottom;
    margin: 1em 0;
    padding: 0;
    width: 100%;
}

.standard td,
.enhanced td {
    border-bottom: 1px dotted #bbb;
    padding: 0.5em;
}

.standard th,
.enhanced th {
    border-bottom: 1px dotted #bbb;
    font-weight: bold;
    padding: 0.5em;
    text-align: left;
}

.scompact,
.ecompact {
    border-collapse: collapse;
    caption-side: bottom;
    margin: 0.04em 0;
    padding: 0;
    width: 100%;
}

.scompact td,
.ecompact td {
    border-bottom: 1px dotted #bbb;
    padding: 0.04em;
}

.scompact th,
.ecompact th {
    border-bottom: 1px dotted #bbb;
    font-weight: bold;
    padding: 0.1em;
    text-align: left;
}

caption {
    color: #999;
    font-size: 0.9em;
    font-weight: normal;
    margin: 0;
    padding: 0.5em 0;
    text-align: left;
}

/* Header */
.site-header {
    background-color: #fff;
    padding: 2px 8px;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 0;

    /* Layout: logo on the left, nav centered across full header width */
    position: relative;
    display: flex;
    align-items: center;
}

.site-header > a {
    flex: 0 0 auto;           /* logo keeps intrinsic width */
}

.site-header img {
    max-width: 100%;
    height: auto;
    width: auto;         /* override fixed HTML width to allow proportional scaling */
    max-height: 40px;    /* shrink while preserving aspect ratio */
    display: block;
}

.main-nav {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);  /* center nav in header */
}

.main-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.main-nav a {
    text-decoration: none;
    color: #007bff;
    font-weight: bold;
}

.main-nav a:hover {
    text-decoration: underline;
}

/* Main Content */
main {
    background-color: #ffffff;
    padding: 6px 14px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}

main h1 {
    text-align: center;
    font-size: 1.5em;
    color: #2c3e50;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 2px;
    margin-bottom: 2px;
    margin-top: 0;
}

/* Matchup Section */
.matchup {
    text-align: center;
    margin-bottom: 2px;
}

.matchup h2 {
    font-size: 1.25em;
    margin-top: 6px;
    margin-bottom: -6px;
}

.matchup-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    justify-items: center;
    align-items: center;
    gap: 3px 4px;
    font-weight: bold;
}

.hand {
    text-align: center;
}

.hand .cards img {
    width: 80px; /* Slightly larger within current layout */
    margin: 0 2px;
}

.versus {
    font-size: 1.5em;
    color: #333;
    font-weight: 700;
}

.stat-win, .stat-tie, .stat-equity {
    text-align: center;
}

.stat-tie {
    color: #333;
    font-weight: 700;
}

/* Breakdown Section */
.breakdown {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 40px;
    justify-items: center;
    align-items: flex-start;
}

.breakdown-table {
    width: auto;
    max-width: 300px; /* Adjust as needed */
    font-size: 0.9em;
    text-align: left;
}

.breakdown-table h3 {
    color: #2c3e50;
    margin-top: 0;
    margin-bottom: 1px;
}

.breakdown-table table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 auto;
}

.breakdown-table th, .breakdown-table td {
    padding: 6px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.breakdown-table td:last-child {
    text-align: right;
}

/* Ensure the "Winning Breakdown for ..." header cell is left-aligned */
.breakdown-table tr:first-child td {
    text-align: left;
}

.breakdown-table .total td {
    font-weight: bold;
    border-top: 2px solid #333;
}

.more-info {
    margin-top: 2px;
}

/* Footer */
.site-footer {
    text-align: center;
    margin-top: 4px;
    padding: 8px;
    font-size: 0.9em;
    color: #6c757d;
}
