body {
    font-family: Arial, sans-serif;
    padding: 20px;
    background-color: #f8f9fa;
}

h1 {
    text-align: center;
    margin-bottom: 30px;
}

.article-box {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    background: white;
    margin-bottom: 20px;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 0 10px #ddd;
    gap: 20px;
    min-height: 180px;
}

.left {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 220px;
}

.left img {
    width: 100%;
    max-width: 220px;
    height: auto;
    object-fit: cover;
    border-radius: 6px;
}

.right {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.top-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 14px;
    color: #444;
    margin-bottom: 8px;
}

.title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 8px;
}

.summary {
    margin: 0 0 10px 0;
    padding-left: 18px;
    color: #333;
}

.footer {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    margin-top: auto;
}

.read-original {
    text-decoration: none;
    color: #007BFF;
    font-weight: bold;
}

.pagination {
    text-align: center;
    margin-top: 30px;
}

.pagination a {
    margin: 0 10px;
    text-decoration: none;
    color: #007BFF;
    font-weight: bold;
}

.tag {
    background-color: #f0f0f0;
    border-radius: 12px;
    padding: 4px 10px;
    margin-right: 8px;
    font-size: 13px;
    display: inline-block;
    color: #333;
    border: 1px solid #ccc;
}

.publisher-stats-box {
    background-color: #f8f9ff;
    border: 1px solid #d0d7e2;
    border-radius: 8px;
    padding: 10px 15px;
    margin-top: 10px;
    width: 100%;
    box-sizing: border-box;
}

.stats-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 8px;
    color: #333;
    text-align: center;
}

.stats-meta {
    font-size: 13px;
    color: #333;
    margin-top: 4px;
    line-height: 1.4;
    text-align: center;
}

.stats-grid {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    font-size: 14px;
    margin-top: 8px;
}

.stat .label {
    color: #555;
    font-weight: 500;
    text-align: center;
}

.stat .value {
    font-weight: bold;
    margin-top: 2px;
    text-align: center;
}

.analysis-link {
    margin-top: 10px;
    font-size: 13px;
    text-align: center;
    color: #007BFF;
    cursor: pointer;
    text-decoration: underline;
}

.modal {
    display: none;
    position: fixed;
    z-index: 999;
    padding: 0;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background-color: rgba(0,0,0,0.4);
}

.modal-content {
    background-color: #fff;
    margin: auto;
    padding: 20px 30px;
    border: 1px solid #888;
    width: 90vw;
    max-height: 90vh;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-sizing: border-box;
}

.modal-summary {
    text-align: left;
    margin-bottom: 10px;
    font-size: 14px;
    background: #f4f8ff;
    padding: 10px;
    border-radius: 6px;
}

.modal-summary-block {
    line-height: 1.5;
}

.modal-table-container {
    overflow-y: auto;
    flex-grow: 1;
    min-height: 0;
}

.modal-table-container table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.modal-table-container th,
.modal-table-container td {
    border: 1px solid #ccc;
    padding: 8px;
    text-align: left;
}

.modal-pagination {
    text-align: center;
    margin-top: 10px;
    font-size: 14px;
    flex-shrink: 0;
}

.close {
    color: #aaa;
    float: right;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #000;
}

.popup-table {
    width: 100%;
    border-collapse: collapse;
}

.popup-table th,
.popup-table td {
    border: 1px solid #ccc;
    padding: 8px;
    text-align: left;
}

.popup-table th {
    background-color: #f5f5f5;
    font-weight: bold;
}

.nested-modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.nested-modal-content {
    background-color: #fff;
    margin: 10% auto;
    padding: 20px;
    width: 60%;
    max-height: 70vh;
    overflow-y: auto;
    border-radius: 10px;
    white-space: pre-wrap;
}

.nested-close {
    float: right;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
}

.download-btn {
    margin-top: 12px;
    background-color: #007BFF;
    color: white;
    border: none;
    padding: 8px 14px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 13px;
}

.download-btn:hover {
    background-color: #0056b3;
}

.win-cell {
    color: green;
    font-weight: bold;
}

.loss-cell {
    color: red;
    font-weight: bold;
}

/* Prevent dropdown options from appearing vertically */
.choices__list--dropdown .choices__item {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Ensure select boxes have a reasonable width */
.choices__inner {
    min-width: 200px;
    max-width: 300px;
}