/**
 * @file styles.css
 * @description Estilos de la aplicación Extractor de Tablas HTML.
 * Incluye: barra de pestañas, contenedores, tablas, botones, modales.
 * @version 2.0.0
 */

/* ==========================================================================
   RESET Y ESTILOS BASE
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f7fa;
    color: #333;
    padding: 20px;
}

/* ==========================================================================
   BARRA DE PESTAÑAS
   ========================================================================== */
.tab-bar {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
    background: white;
    border-radius: 8px 8px 0 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

.tab-btn {
    padding: 12px 24px;
    border: none;
    background: white;
    color: #555;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 3px solid transparent;
}

.tab-btn:hover {
    background: #f5f7fa;
    color: #3498db;
}

.tab-btn.active {
    background: #3498db;
    color: white;
    border-bottom: 3px solid #2980b9;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ==========================================================================
   CONTENEDOR PRINCIPAL
   ========================================================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
}

h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
    font-size: 2rem;
}

/* ==========================================================================
   SECCIÓN DE ENTRADA (INPUT)
   ========================================================================== */
.input-section {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
    position: relative;
}

.input-section label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #555;
}

.textarea-wrapper {
    position: relative;
}

#htmlInput {
    width: 100%;
    min-height: 200px;
    padding: 15px;
    padding-right: 50px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 14px;
    resize: vertical;
    transition: border-color 0.3s;
}

#htmlInput:focus {
    outline: none;
    border-color: #3498db;
}

.clear-btn {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    border: none;
    background: #e74c3c;
    color: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 10;
}

.clear-btn:hover {
    background: #c0392b;
}

/* ==========================================================================
   SECCIÓN DE SALIDA (OUTPUT)
   ========================================================================== */
.output-section {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.output-section h2 {
    margin-bottom: 15px;
    color: #2c3e50;
}

.page-title {
    background: #3498db;
    color: white;
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 1.2rem;
    font-weight: 600;
}

.table-wrapper {
    overflow-x: auto;
    margin-bottom: 20px;
}

/* ==========================================================================
   TABLAS
   ========================================================================== */
table {
    width: auto;
    border-collapse: collapse;
    background: white;
}

thead th {
    background: #2c3e50;
    color: white;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    position: sticky;
    top: 0;
}

tbody td {
    padding: 10px 15px;
    border-bottom: 1px solid #e0e0e0;
}

tbody tr:hover {
    background: #f8f9fa;
}

tbody tr:nth-child(even) {
    background: #fafbfc;
}

tbody tr:nth-child(even):hover {
    background: #f0f4f8;
}

.no-data {
    text-align: center;
    padding: 40px;
    color: #7f8c8d;
    font-style: italic;
}

.stats {
    margin-top: 15px;
    padding: 10px 15px;
    background: #ecf0f1;
    border-radius: 6px;
    font-size: 0.9rem;
    color: #555;
}

.hidden {
    display: none;
}

/* ==========================================================================
   ESTILOS PARA TABLA DE SPREAD
   ========================================================================== */
.spread-cell {
    font-weight: 700;
    font-family: 'Courier New', monospace;
    text-align: center;
    color: #2c3e50;
}

/* ==========================================================================
   ESTILOS PARA TABLA DE TOTALS OVER/UNDER
   ========================================================================== */
.total-cell {
    font-weight: 700;
    font-family: 'Courier New', monospace;
    text-align: center;
    color: #2c3e50;
    background: rgba(52, 152, 219, 0.05);
}

/* ==========================================================================
   ESTILOS PARA TABLA HORIZONTAL MARKET PICK
   ========================================================================== */
.team-cell {
    font-weight: 600;
    text-align: left;
    color: #2c3e50;
    background: rgba(46, 204, 113, 0.05);
    padding-left: 8px;
}

/* ==========================================================================
   BOTONES DE FORMATO
   ========================================================================== */
.format-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.format-btn {
    padding: 8px 20px;
    border: 2px solid #3498db;
    background: white;
    color: #3498db;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.format-btn:hover {
    background: #3498db;
    color: white;
}

.format-btn.active {
    background: #3498db;
    color: white;
}

.vig-btn {
    padding: 8px 20px;
    border: 2px solid #e67e22;
    background: white;
    color: #e67e22;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s;
    margin-left: auto;
}

.vig-btn:hover {
    background: #e67e22;
    color: white;
}

.vig-btn.active {
    background: #e67e22;
    color: white;
}

.round-btn {
    padding: 8px 20px;
    border: 2px solid #8e44ad;
    background: white;
    color: #8e44ad;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.round-btn:hover {
    background: #8e44ad;
    color: white;
}

.round-btn.active {
    background: #8e44ad;
    color: white;
}

.vig-btn.active {
    background: #f59e0b !important;
    border-color: #ffd166 !important;
    color: #fff !important;
    box-shadow: 0 0 0 2px rgba(255, 209, 102, .28), 0 0 12px rgba(245, 158, 11, .3);
}

.round-btn.active {
    background: #9b59b6 !important;
    border-color: #e0aaff !important;
    color: #fff !important;
    box-shadow: 0 0 0 2px rgba(224, 170, 255, .28), 0 0 12px rgba(155, 89, 182, .3);
}

/* ==========================================================================
   CLASES DE CUOTAS (para uso futuro)
   ========================================================================== */
.odds-decimal {
    color: #27ae60;
}

.odds-american {
    color: #e74c3c;
}

.odds-fractional {
    color: #9b59b6;
}

/* ==========================================================================
   CHECKBOXES DE COLUMNAS
   ========================================================================== */
.column-checkboxes {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 15px;
    padding: 10px 15px;
    background: #f8f9fa;
    border-radius: 6px;
    align-items: center;
}

.column-checkboxes label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #555;
    user-select: none;
}

.column-checkboxes input[type="radio"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #3498db;
}

.column-checkboxes .checkbox-label {
    font-weight: 600;
    color: #333;
    margin-right: 5px;
}

/* ==========================================================================
   BOTONES DE COPIAR
   ========================================================================== */
.copy-btn {
    display: inline-block;
    margin-left: 5px;
    padding: 1px 5px;
    border: none;
    background: #95a5a6;
    color: white;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.2s;
    vertical-align: middle;
}

.copy-btn:hover {
    background: #7f8c8d;
}

.copy-btn.copied {
    background: #27ae60;
}

.preview-copy-btn {
    display: inline-block;
    margin-left: 5px;
    padding: 2px 6px;
    border: none;
    background: #95a5a6;
    color: white;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.2s;
    vertical-align: middle;
}

.preview-copy-btn:hover {
    background: #2ecc71;
}

.preview-copy-btn.copied {
    background: #27ae60;
}

#previewContent tbody tr {
    transition: background-color 0.15s ease;
}

#previewContent tbody tr:hover,
#previewContent tbody tr:nth-child(even):hover {
    background: #e8f4fd;
}

/* ==========================================================================
   BOTONES DE ORDENAMIENTO
   ========================================================================== */
.sort-btn {
    display: inline-block;
    margin-left: 5px;
    padding: 2px 6px;
    border: none;
    background: #bdc3c7;
    color: white;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.7rem;
    transition: all 0.2s;
    vertical-align: middle;
}

.sort-btn:hover {
    background: #3498db;
}

.sort-btn.sort-asc {
    background: #2ecc71;
}

.sort-btn.sort-desc {
    background: #e74c3c;
}

/* ==========================================================================
   FILA DE ENCABEZADO DE TABLA Y EXPORTACIÓN
   ========================================================================== */
.table-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 10px;
}

.export-csv-btn {
    padding: 8px 20px;
    border: 2px solid #27ae60;
    background: white;
    color: #27ae60;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s;
    white-space: nowrap;
}

.export-csv-btn:hover {
    background: #27ae60;
    color: white;
}

/* ==========================================================================
   CAMPO DE ENTRADA DEL PROP
   ========================================================================== */
.prop-input-field {
    display: none;
    gap: 10px;
    align-items: center;
    margin-bottom: 15px;
    padding: 0;
    background: transparent;
    border-radius: 0;
}

.prop-input-field.visible {
    display: flex;
}

.prop-input-field label {
    font-weight: 600;
    color: #555;
    white-space: nowrap;
}

.prop-input-field input {
    width: 200px;
    padding: 6px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.9rem;
}

/* ==========================================================================
   ESTADOS DE DROP ZONE (MMA)
   ========================================================================== */
#mmaDropZone:hover, #mmaDropZone.dragover {
    border-color: #3498db;
    background: #e8f4f8;
}

/* ===========================================================================
   TEMA OSCURO
   =========================================================================== */
.theme-toggle {
    margin-left: auto;
    padding: 10px 14px;
    border: 0;
    border-left: 1px solid #e0e6ed;
    background: transparent;
    color: #2c3e50;
    font-weight: 600;
    cursor: pointer;
}

.theme-toggle:hover {
    background: #eef3f7;
    color: #2388c9;
}

body.dark-theme {
    background: #101820;
    color: #edf4f8;
}

body.dark-theme .tab-bar,
body.dark-theme .tab-btn,
body.dark-theme .input-section,
body.dark-theme .output-section,
body.dark-theme table {
    background: #182532;
}

body.dark-theme .tab-btn {
    color: #b8c8d6;
}

body.dark-theme .tab-btn:hover,
body.dark-theme .theme-toggle:hover {
    background: #223447;
    color: #36a5e8;
}

body.dark-theme .tab-btn.active {
    background: #2388c9;
    color: #fff;
}

body.dark-theme .theme-toggle {
    border-left-color: #33485c;
    color: #edf4f8;
}

body.dark-theme .format-btn {
    background: #182532;
    border-color: #4d718c;
    color: #b9e8ff;
}

body.dark-theme .format-btn:hover {
    background: #223e52;
    border-color: #7bdcff;
    color: #fff;
}

body.dark-theme .format-btn.active {
    background: #1677ad;
    border-color: #7fe7ff;
    color: #fff;
    box-shadow: 0 0 0 2px rgba(127, 231, 255, .28), 0 0 12px rgba(54, 165, 232, .35);
}

body.dark-theme h1,
body.dark-theme h2,
body.dark-theme .output-section h2,
body.dark-theme .input-section label,
body.dark-theme .prop-input-field label,
body.dark-theme .spread-cell,
body.dark-theme .total-cell,
body.dark-theme .team-cell {
    color: #edf4f8;
}

body.dark-theme input,
body.dark-theme textarea,
body.dark-theme select {
    background: #101820;
    color: #edf4f8;
    border-color: #4a6378;
}

body.dark-theme input::placeholder,
body.dark-theme textarea::placeholder {
    color: #9fb2c3;
}

body.dark-theme #htmlInput {
    color: #5fa9b5;
    caret-color: #9bcbd1;
    text-shadow: 0 0 3px rgba(95, 169, 181, .12);
}

body.dark-theme #htmlInput::selection {
    background: #315d68;
    color: #d7e9ec;
}

body.dark-theme tbody td {
    border-bottom-color: #33485c;
    color: #edf4f8;
}

body.dark-theme tbody tr:nth-child(even) {
    background: #1d2d3b;
}

body.dark-theme tbody tr:hover,
body.dark-theme tbody tr:nth-child(even):hover {
    background: #294052;
}

body.dark-theme .stats {
    background: #223447;
    color: #b8c8d6;
}

body.dark-theme .no-data {
    color: #9fb2c3;
}

body.dark-theme [style*="background: white"],
body.dark-theme [style*="background:white"] {
    background: #182532 !important;
    color: #edf4f8;
}

/* ===========================================================================
   SISTEMA COMÚN DE BOTONES
   =========================================================================== */
.tab-content button:not(.clear-btn):not([class*="move"]):not([class*="delete"]):not([id*="Minus"]):not([id*="minus"]),
.theme-toggle {
    min-height: 36px !important;
    padding: 8px 14px !important;
    border-radius: 6px !important;
    font-family: inherit;
    font-size: .88rem !important;
    font-weight: 600 !important;
    line-height: 1.2;
    transition: transform .15s ease, filter .15s ease, box-shadow .15s ease;
}

.tab-content button:not(.clear-btn):not([class*="move"]):not([class*="delete"]):not([id*="Minus"]):not([id*="minus"]):hover,
.theme-toggle:hover {
    filter: brightness(1.06);
    box-shadow: 0 3px 8px rgba(31, 50, 67, .16);
    transform: translateY(-1px);
}

.tab-content button:not(.clear-btn):not([class*="move"]):not([class*="delete"]):not([id*="Minus"]):not([id*="minus"]):focus-visible,
.theme-toggle:focus-visible {
    outline: 3px solid rgba(54, 165, 232, .35);
    outline-offset: 2px;
}

.tab-content h2 > button,
.tab-content .input-section > div > button {
    background: #2388c9;
    border: 1px solid #1d75ad;
    color: #fff;
}

.tab-content h2 > button + span {
    font-weight: 700;
}

.nfl-move-btn,
.ncaaf-move {
    min-height: 0 !important;
    padding: 1px 3px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: #2c3e50;
    font-size: .9rem !important;
    cursor: pointer;
    box-shadow: none !important;
}

.nfl-delete-btn,
.ncaaf-delete {
    min-height: 0 !important;
    padding: 1px 3px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: #e74c3c !important;
    font-size: 1.1rem !important;
    cursor: pointer;
    box-shadow: none !important;
}

.nfl-move-btn:hover,
.ncaaf-move:hover,
.nfl-delete-btn:hover,
.ncaaf-delete:hover {
    filter: none;
    transform: none;
    box-shadow: none !important;
}

body.dark-theme .tab-content button:not(.clear-btn):not([class*="move"]):not([class*="delete"]):not([id*="Minus"]):not([id*="minus"]):not([style*="background"]),
body.dark-theme .tab-content h2 > button:not([style*="background"]) {
    background: #2b465b;
    border-color: #4d718c;
    color: #edf4f8;
}

body.dark-theme .rt-controls,
body.dark-theme .column-checkboxes {
    background: #223447 !important;
    color: #edf4f8 !important;
    border-color: #33485c;
}

body.dark-theme .nfl-move-btn,
body.dark-theme .ncaaf-move {
    color: #b9f3ff !important;
}

body.dark-theme .nfl-delete-btn,
body.dark-theme .ncaaf-delete {
    color: #ff9a92 !important;
}

/* NCAAF Props comparte el lenguaje visual de NFL Props. */
#ncaafPropsTab .input-section > div > div {
    flex: 1 1 auto;
    min-width: 120px;
}

#ncaafPropsTab .input-section label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

#ncaafPropsTab .input-section input,
#ncaafPropsTab .input-section select {
    width: 100%;
    min-height: 36px;
    padding: 8px 10px;
    border: 1px solid #cbd5df;
    border-radius: 6px;
    font: inherit;
}

#ncaafPropsTab #ncaafFechaMes,
#ncaafPropsTab #ncaafFechaDia {
    width: auto;
}

#ncaafPropsTab #ncaafFechaMes {
    flex: 1;
}

#ncaafPropsTab #ncaafFechaDia {
    width: 64px;
}

#ncaafPropsTab #ncaafAddBtn {
    padding: 8px 20px;
    min-height: 36px;
    background: #27ae60;
    color: #fff;
    border: 1px solid #218c4d;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
}

#ncaafPropsTab #ncaafSortBtn,
#ncaafPropsTab #ncaafHtmlExtractBtn {
    padding: 6px 12px;
    min-height: 36px;
    background: #3498db;
    color: #fff;
    border: 1px solid #287bb4;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
}

#ncaafPropsTab #ncaafMinus5Btn {
    min-height: 0;
    padding: 2px 8px;
    background: #95a5a6;
    color: #fff;
    border: 0;
    border-radius: 3px;
    cursor: pointer;
    font-size: .75rem;
}

#ncaafPropsTab .ncaaf-first,
#ncaafPropsTab .ncaaf-double,
#ncaafPropsTab .ncaaf-winning,
#ncaafPropsTab #ncaafExportFirstZip,
#ncaafPropsTab #ncaafExportDoubleZip,
#ncaafPropsTab #ncaafExportWinningZip {
    color: #fff;
    border: 1px solid transparent;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

#ncaafPropsTab .ncaaf-first,
#ncaafPropsTab #ncaafExportFirstZip {
    background: #e67e22;
}

#ncaafPropsTab .ncaaf-first {
    width: 140px;
}

#ncaafPropsTab .ncaaf-double {
    width: 110px;
}

#ncaafPropsTab .ncaaf-winning {
    width: 150px;
}

#ncaafPropsTab .ncaaf-double,
#ncaafPropsTab #ncaafExportDoubleZip {
    background: #8e44ad;
}

#ncaafPropsTab .ncaaf-winning,
#ncaafPropsTab #ncaafExportWinningZip {
    background: #c0392b;
}

#ncaafPropsTab #ncaafClearBtn {
    background: #e74c3c;
    color: #fff;
    border: 1px solid #c0392b;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
}

#ncaafPropsTab #ncaafExportCsv {
    background: #27ae60;
    color: #fff;
    border: 1px solid #218c4d;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
}

#ncaafPropsTab #ncaafImportCsv {
    background: #3498db;
    color: #fff;
    border: 1px solid #287bb4;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
}

/* Formulario compartido: MMA y NFL adoptan la misma composición que NCAAF. */
#mmaTab .input-section > div,
#nflPropsTab .input-section > div,
#ncaafPropsTab .input-section > div {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: flex-end;
}

#mmaTab .input-section > div > div,
#nflPropsTab .input-section > div > div,
#ncaafPropsTab .input-section > div > div {
    min-width: 0;
}

#mmaTab .input-section input,
#mmaTab .input-section select,
#nflPropsTab .input-section input,
#nflPropsTab .input-section select,
#ncaafPropsTab .input-section input,
#ncaafPropsTab .input-section select {
    min-height: 40px;
    border: 1px solid #7891a5 !important;
    border-radius: 6px !important;
    font-family: inherit;
    font-size: .9rem;
}

#mmaTab .input-section button,
#nflPropsTab .input-section button,
#ncaafPropsTab .input-section button {
    min-height: 40px;
    border-radius: 6px;
}

#mmaTab .output-section,
#nflPropsTab .output-section,
#ncaafPropsTab .output-section {
    border: 1px solid rgba(120, 145, 165, .18);
}

body.dark-theme #mmaTab .input-section input,
body.dark-theme #mmaTab .input-section select,
body.dark-theme #nflPropsTab .input-section input,
body.dark-theme #nflPropsTab .input-section select,
body.dark-theme #ncaafPropsTab .input-section input,
body.dark-theme #ncaafPropsTab .input-section select {
    background: #101820;
    color: #edf4f8;
    border-color: #4d718c;
}

#nflPropsTab .nfl-export-row-btn,
#nflPropsTab .nfl-double-result-btn,
#nflPropsTab .nfl-total-points-btn,
#nflPropsTab .nfl-winning-margin-btn {
    min-height: 36px !important;
    padding: 8px 14px !important;
    border: 1px solid transparent !important;
    border-radius: 6px !important;
    color: #fff !important;
    font-size: .88rem !important;
    font-weight: 600 !important;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
}

#nflPropsTab .nfl-export-row-btn {
    width: 140px;
    background: #e67e22 !important;
}

#nflPropsTab .nfl-double-result-btn {
    width: 110px;
    background: #8e44ad !important;
}

#nflPropsTab .nfl-total-points-btn {
    width: 150px;
    background: #16a085 !important;
}

#nflPropsTab .nfl-winning-margin-btn {
    width: 110px;
    background: #c0392b !important;
}

body.dark-theme #nflPropsTab .nfl-export-row-btn {
    background: #c66a1b !important;
}

body.dark-theme #nflPropsTab .nfl-double-result-btn {
    background: #74388f !important;
}

body.dark-theme #nflPropsTab .nfl-total-points-btn {
    background: #117a68 !important;
}

body.dark-theme #nflPropsTab .nfl-winning-margin-btn {
    background: #a53228 !important;
}

body.dark-theme #ncaafPropsTab .input-section input,
body.dark-theme #ncaafPropsTab .input-section select {
    background: #101820;
    color: #edf4f8;
    border-color: #4d718c;
}

@media (max-width: 1050px) {
    #mmaTab .input-section > div > div,
    #nflPropsTab .input-section > div > div {
        flex: 1 1 170px !important;
        min-width: 0 !important;
    }

    #mmaTab .input-section input,
    #mmaTab .input-section select,
    #nflPropsTab .input-section input,
    #nflPropsTab .input-section select {
        max-width: 100% !important;
    }

    #mmaTab .input-section > div > button,
    #nflPropsTab .input-section > div > button {
        flex: 0 1 auto !important;
        min-width: 120px;
    }
}

/* ===========================================================================
   AJUSTES RESPONSIVOS PARA MMA Y PROPS
   =========================================================================== */
@media (max-width: 760px) {
    body {
        padding: 10px;
    }

    .tab-bar {
        overflow-x: auto;
        white-space: nowrap;
    }

    .tab-btn {
        flex: 0 0 auto;
        padding: 10px 14px;
    }

    #mmaTab .input-section > div,
    #nflPropsTab .input-section > div,
    #ncaafPropsTab .input-section > div {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        align-items: stretch !important;
        gap: 10px !important;
    }

    #mmaTab .input-section > div > div,
    #nflPropsTab .input-section > div > div,
    #ncaafPropsTab .input-section > div > div {
        flex: none !important;
        width: 100% !important;
        min-width: 0 !important;
    }

    #mmaTab .input-section > div > div:first-child > div,
    #nflPropsTab .input-section > div > div:first-child > div,
    #ncaafPropsTab .input-section > div > div:first-child > div {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) 64px;
        width: 100% !important;
    }

    #mmaTab .input-section input,
    #mmaTab .input-section select,
    #nflPropsTab .input-section input,
    #nflPropsTab .input-section select,
    #ncaafPropsTab .input-section input,
    #ncaafPropsTab .input-section select {
        max-width: 100% !important;
    }

    #mmaTab .input-section button,
    #nflPropsTab .input-section button,
    #ncaafPropsTab .input-section button {
        width: 100%;
        align-self: stretch;
    }

    #mmaTab .output-section h2,
    #nflPropsTab .output-section h2,
    #ncaafPropsTab .output-section h2 {
        flex-wrap: wrap;
    }

    #mmaTab .output-section,
    #nflPropsTab .output-section,
    #ncaafPropsTab .output-section {
        overflow: hidden;
    }

    #mmaTab .table-wrapper,
    #nflPropsTab .table-wrapper,
    #ncaafPropsTab .table-wrapper {
        overflow-x: auto;
        max-width: 100%;
    }
}

body.dark-theme .rt-controls span,
body.dark-theme .rt-controls label,
body.dark-theme .column-checkboxes label {
    color: #d8e8f2 !important;
}

body.dark-theme .rt-controls input,
body.dark-theme .column-checkboxes input {
    background: #101820 !important;
    color: #7feeff !important;
    border-color: #4d718c !important;
}

body.dark-theme .format-buttons .vig-btn.active {
    background: #d97706 !important;
    border-color: #ffd166 !important;
    color: #fff !important;
    box-shadow: 0 0 0 2px rgba(255, 209, 102, .28), 0 0 12px rgba(245, 158, 11, .3) !important;
}

body.dark-theme .format-buttons .round-btn.active {
    background: #7e3f98 !important;
    border-color: #e0aaff !important;
    color: #fff !important;
    box-shadow: 0 0 0 2px rgba(224, 170, 255, .28), 0 0 12px rgba(155, 89, 182, .3) !important;
}

body.dark-theme #previewModal h3 {
    color: #b9f3ff !important;
    font-weight: 700;
    letter-spacing: .01em;
}

body.dark-theme #previewModal p {
    color: #b5c8d5 !important;
}

body.dark-theme #previewContent thead tr {
    background: #36536b !important;
    color: #f4fbff !important;
}

body.dark-theme #previewContent th {
    border-bottom: 2px solid #5d87a5;
    letter-spacing: .01em;
}

body.dark-theme #previewContent tbody tr {
    background: #182b3a !important;
    border-bottom-color: #3a5366 !important;
    transition: background-color 0.15s ease;
}

body.dark-theme #previewContent tbody tr:nth-child(even) {
    background: #213b4e !important;
}

body.dark-theme #previewContent tbody tr:hover,
body.dark-theme #previewContent tbody tr:nth-child(even):hover {
    background: #2e4d66 !important;
}

body.dark-theme #previewContent tbody td[style*="color: #e74c3c"] {
    color: #ff9a92 !important;
}

body.dark-theme .mma-move-btn {
    color: #b9f3ff !important;
}

body.dark-theme .mma-move-btn:hover {
    color: #ffffff !important;
    text-shadow: 0 0 6px rgba(127, 238, 255, .7);
}
