* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #f5f5f5;
    color: #333;
    font-size: 14px;
    line-height: 1.5;
}

.container {
    margin: 20px auto;
}

h1 {
    font-size: 22px;
    font-weight: normal;
    margin-bottom: 15px;
    color: #333;
}

/* Accordion */
.accordion {
    margin-bottom: 20px;
}

.accordion-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    border: 2px solid #c8a951;
    border-radius: 4px;
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
    color: #333;
}

.accordion-toggle .arrow {
    font-size: 10px;
    margin-left: 8px;
    transition: transform 0.3s;
}

.accordion-toggle.open .arrow {
    transform: rotate(180deg);
}

.accordion-content {
    display: none;
    border: 1px solid #ccc;
    border-top: none;
    background: #fff;
    overflow-x: auto;
}

.accordion-content.open {
    display: block;
}

/* Definitions Table */
.def-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.def-table thead {
    background: #435135;
    color: #fff;
}

.def-table th {
    padding: 8px 10px;
    text-align: left;
    font-weight: bold;
    border: 1px solid #3a7aab;
}

.def-table td {
    padding: 6px 10px;
    border: 1px solid #ddd;
    vertical-align: top;
}

.def-table tr:nth-child(even) {
    background: #f9f9f9;
}

.def-table td:first-child {
    color: #97c26a;
    white-space: nowrap;
}

/* Calculator Box */
.calc-box {
    background: #fff;
    border: 1px solid #ccc;
    border-top: 4px solid #d4a017;
    border-radius: 4px;
    overflow: hidden;
}

.calc-header {
    background: #435135;
    color: #fff;
    padding: 12px 16px;
    font-size: 17px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.settings-btn {
    background: #333;
    color: #fff;
    border: 1px solid #555;
    padding: 4px 12px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 13px;
}

.settings-btn:hover {
    background: #444;
}

.settings-panel {
    background: #eefdde;
    border-bottom: 1px solid #ccc;
    padding: 12px 16px;
}

.settings-panel h4 {
    margin-bottom: 10px;
    color: #333;
}

.calc-body {
    padding: 16px;
}

/* Form Rows */
.form-row {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.form-row label {
    width: 180px;
    text-align: right;
    padding-right: 12px;
    font-size: 14px;
    flex-shrink: 0;
}

.form-row select,
.form-row input[type="number"],
.form-row input[type="text"] {
    padding: 6px 8px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 14px;
    width: 180px;
}

.form-row select {
    appearance: auto;
}

.help-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border: 1px solid #999;
    border-radius: 50%;
    font-size: 11px;
    color: #666;
    margin-left: 8px;
    cursor: help;
    flex-shrink: 0;
    background: #f9f9f9;
}

/* Selections Table */
.sel-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    border: 1px solid #4682B4;
}

.sel-table thead {
    background: #eefdde;
}

.sel-table th {
    padding: 8px;
    text-align: center;
    font-size: 13px;
    font-weight: bold;
    border: 1px solid #b0c4de;
    color: #333;
}

.sel-table td {
    padding: 6px 8px;
    border: 1px solid #ddd;
    text-align: center;
    vertical-align: middle;
}

.sel-table td:first-child {
    width: 40px;
    font-weight: bold;
    color: #97c26a;
}

.sel-table select,
.sel-table input {
    padding: 4px 6px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 13px;
}

.sel-table .outcome-select {
    width: 120px;
}

.sel-table .odds-input {
    width: 45px;
    text-align: center;
}

.sel-table .odds-slash {
    padding: 0 2px;
    font-weight: bold;
}

.sel-table .rule4-select {
    width: 60px;
}

.sel-table .ew-places-input {
    width: 45px;
    text-align: center;
}

.sel-table .ew-fraction-select {
    width: 60px;
}

/* Summary */
.summary-title {
    font-size: 14px;
    font-weight: bold;
    margin: 15px 0 10px;
    color: #333;
}

/* Results Table */
.results-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    border: 1px solid #4682B4;
}

.results-table thead {
    background: #eefdde;
}

.results-table th {
    padding: 8px 12px;
    font-size: 13px;
    font-weight: bold;
    border: 1px solid #b0c4de;
    text-align: center;
}

.results-table td {
    padding: 8px 12px;
    text-align: center;
    border: 1px solid #ddd;
    font-size: 14px;
}

/* Section Headers */
.section-header {
    background: #435135;
    color: #fff;
    padding: 10px 16px;
    font-size: 15px;
    font-weight: bold;
    margin-top: 0;
}

.section-body {
    padding: 12px 16px;
    border-bottom: 1px solid #ddd;
}

.share-row {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.save-btn {
    background: #fff;
    color: #2e6da4;
    border: 2px solid #2e6da4;
    padding: 6px 14px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 13px;
    font-weight: bold;
}

.save-btn:hover {
    background: #2e6da4;
    color: #fff;
}

.copy-btn {
    background: #4682B4;
    color: #fff;
    border: none;
    padding: 6px 12px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 13px;
}

.reset-btn {
    background: #fff;
    color: #c0392b;
    border: 2px solid #c0392b;
    padding: 6px 14px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 13px;
    font-weight: bold;
    margin-right: 8px;
}

.reset-btn:hover {
    background: #c0392b;
    color: #fff;
}

#shareLinkInput {
    flex: 1;
    min-width: 200px;
}

/* Default Calc Banner */
.default-calc-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: linear-gradient(to right, #2c7a3e, #3a9e50);
    color: #fff;
    padding: 10px 16px;
    font-size: 14px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.default-calc-clear {
    background: rgba(255,255,255,0.2);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.4);
    padding: 3px 10px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
}

.default-calc-clear:hover {
    background: rgba(255,255,255,0.35);
}

/* Calc Nav (back link + set default button) */
.calc-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 8px;
}

.nav-link {
    color: #2e6da4;
    text-decoration: none;
    font-size: 14px;
}

.nav-link:hover {
    text-decoration: underline;
}

.set-default-btn {
    background: #fff;
    color: #2c7a3e;
    border: 1px solid #2c7a3e;
    padding: 4px 10px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
    transition: all 0.2s;
    margin-left: 6px;
    white-space: nowrap;
    flex-shrink: 0;
}

.set-default-btn:hover {
    background: #2c7a3e;
    color: #fff;
}

.set-default-btn.is-default {
    background: #2c7a3e;
    color: #fff;
    border-color: #2c7a3e;
}

/* Specific Bet Type Calculators section */
.specific-calcs {
    margin-top: 25px;
    padding-bottom: 20px;
}

.specific-calcs h2 {
    font-size: 18px;
    font-weight: normal;
    color: #333;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #ddd;
}

.calc-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 20px;
}

.calc-links li {
    padding: 3px 0;
}

.calc-links a {
    color: #2e6da4;
    text-decoration: none;
    font-size: 13px;
}

.calc-links a:hover {
    text-decoration: underline;
}

.calc-links a.current-calc {
    font-weight: bold;
    color: #1a4d7a;
}

/* Responsive */
@media (max-width: 600px) {
    .form-row {
        flex-wrap: wrap;
    }
    .form-row label {
        width: 100%;
        text-align: left;
        margin-bottom: 4px;
    }
    .form-row select,
    .form-row input {
        width: 100%;
    }
    .calc-links {
        grid-template-columns: 1fr;
    }
    .calc-nav {
        flex-direction: column;
        align-items: flex-start;
    }
}
