:root {
    --bg-0: #0b0f1a;
    --bg-1: #0f1524;
    --card: rgba(18, 22, 35, 0.60);
    --stroke: rgba(255, 255, 255, 0.08);
    --text: #e9ecf3;
    --muted: #a6b0c2;

    --acc-1: #FF6B35;
    --acc-2: #E55A2B;
    --acc-3: #FFB366;
    --ring: rgba(255, 107, 53, 0.55);

    --danger: #ff5577;
    --success: #4ade80;
}

body:not(.dark-mode) {
    --bg-0: #f6f7fb;
    --bg-1: #eef1fb;
    --card: rgba(255, 255, 255, 0.75);
    --stroke: rgba(10, 16, 30, 0.06);
    --text: #0d0f16;
    --muted: #485068;
    --ring: rgba(255, 107, 53, 0.35);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    color: var(--text);
    font-family: "Euclid Circular B", Inter, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    letter-spacing: .15px;
}

.page-wrap {
    min-height: 100vh;
    width: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(1100px 540px at 18% -8%, rgba(255, 107, 53, 0.22), transparent 60%),
        radial-gradient(900px 520px at 82% 0%, rgba(255, 179, 102, 0.16), transparent 60%),
        linear-gradient(180deg, var(--bg-1), var(--bg-0) 30%, var(--bg-0) 100%);
    overflow-x: hidden;
    padding: 0 1rem 1rem 1rem;
}

.page-wrap::before {
    content: "";
    position: fixed;
    inset: -20% -20%;
    background:
        conic-gradient(from 0deg at 50% 50%,
            rgba(255, 107, 53, 0.10),
            rgba(255, 179, 102, 0.06),
            rgba(255, 140, 66, 0.10),
            rgba(255, 107, 53, 0.10));
    filter: blur(40px) saturate(130%);
    opacity: .85;
    animation: spin 60s linear infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.brand-wrap {
    text-align: center;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.site-links {
    position: absolute;
    top: 0;
    left: 0;
    margin: 6px 0 0 0;
    padding: 0;
    font-size: 12px;
    letter-spacing: .02em;
    color: var(--muted);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    pointer-events: auto;
    line-height: 1;
}

.site-links .sep {
    opacity: .7;
    color: var(--muted);
}

.site-links a {
    color: var(--muted);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.site-links a:hover,
.site-links a:focus-visible {
    color: var(--text);
    text-decoration: none;
}

.title {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 7px 0 0.15rem 0;
    background: linear-gradient(135deg, var(--acc-1), var(--acc-3));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    color: var(--muted);
    font-size: 1rem;
    margin: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    position: relative;
    z-index: 1;
}

@media (max-width: 968px) {
    .container {
        grid-template-columns: 1fr;
    }
}

.calculator-card,
.info-card {
    background: var(--card);
    border: 1px solid var(--stroke);
    border-radius: 16px;
    padding: 2rem;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.form-group-half {
    flex: 1;
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .form-group-row {
        flex-direction: column;
    }
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--acc-1);
}

.form-label {
    color: var(--acc-1);
}

.form-group select,
.form-group input[type="number"] {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--stroke);
    border-radius: 8px;
    color: var(--text);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.2s ease;
}

.form-group select:focus,
.form-group input[type="number"]:focus {
    outline: none;
    border-color: var(--acc-1);
    box-shadow: 0 0 0 3px var(--ring);
}

.form-group select:hover,
.form-group input[type="number"]:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

/* Bootstrap form control styling for dark theme */
.form-control {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--stroke);
    color: var(--text);
}

.form-control:focus {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--acc-1);
    box-shadow: 0 0 0 3px var(--ring);
    color: var(--text);
}

/* Remove spinner arrows from number input */
.form-control[type="number"]::-webkit-inner-spin-button,
.form-control[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.form-control[type="number"] {
    -moz-appearance: textfield;
}

.form-label {
    color: var(--text);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.form-check-input {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: var(--stroke);
}

.form-check-input:checked {
    background-color: var(--acc-1);
    border-color: var(--acc-1);
}

.form-check-input:focus {
    border-color: var(--acc-1);
    box-shadow: 0 0 0 3px var(--ring);
}

.form-check-label {
    color: var(--text);
    cursor: pointer;
    margin-left: 0.5rem;
}

.list-group {
    border-radius: 8px;
    overflow: hidden;
}

.list-group-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--stroke);
    color: var(--text);
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.list-group-item:first-child {
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.list-group-item:last-child {
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

.list-group-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

.list-group-item.active {
    background: rgba(255, 107, 53, 0.2);
    border-color: var(--acc-1);
    color: var(--text);
    font-weight: 600;
}

.list-group-item.active:hover {
    background: rgba(255, 107, 53, 0.25);
}

/* Boost list group styling */
#boostsContainer {
    border-radius: 8px;
    overflow: hidden;
}

#boostsContainer .list-group-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--stroke);
    padding: 0.75rem 1rem;
}

#boostsContainer .list-group-item:first-child {
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

#boostsContainer .list-group-item:last-child {
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

#boostsContainer .list-group-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

#boostsContainer .form-check {
    margin: 0;
    display: flex;
    align-items: center;
}

#boostsContainer .form-check-input {
    margin-top: 0;
    margin-right: 0.5rem;
}

#boostsContainer .form-check-label {
    flex: 1;
    margin-left: 0;
    cursor: pointer;
}

.hint {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--muted);
}

.submit-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #FF6B35, #FF8C42);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 0.5rem;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 107, 53, 0.4);
}

.submit-btn:active {
    transform: translateY(0);
}

.results-container {
    margin-top: 2rem;
}

.results-container.hidden {
    display: none;
}

.results-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--stroke);
    border-radius: 12px;
    padding: 1.5rem;
}

.results-card > .result-item.highlight:first-child {
    margin-top: -1.5rem;
    padding-top: 1.5rem;
}

.results-card h2 {
    margin: 0 0 1.5rem 0;
    font-size: 1.5rem;
    color: var(--text);
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--stroke);
}

.result-item:last-child {
    border-bottom: none;
}

.result-item.highlight {
    margin-top: 0;
    padding-top: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--acc-1);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.result-label {
    color: var(--muted);
}

.result-value {
    color: var(--text);
    font-weight: 600;
}

.result-item.highlight .result-value {
    color: var(--acc-3);
    font-size: 1.3rem;
}

.info-card h3 {
    margin: 0 0 1.5rem 0;
    font-size: 1.5rem;
    color: var(--text);
}

.info-section {
    margin-bottom: 2rem;
}

.info-section:last-child {
    margin-bottom: 0;
}

.info-section h4 {
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
    color: var(--acc-1);
}

.info-section ul {
    margin: 0;
    padding-left: 1.5rem;
    color: var(--muted);
}

.info-section li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
    transition: all 0.3s ease;
}

.info-section li.level-highlight {
    background: rgba(255, 107, 53, 0.15);
    border-left: 3px solid var(--acc-1);
    padding-left: 0.75rem;
    margin-left: -0.75rem;
}

.info-section ul ul {
    margin-top: 0.25rem;
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
}

.info-section ul ul li {
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
    color: var(--muted);
}

.info-section strong {
    color: var(--text);
}

.notes-list {
    list-style: none;
    padding-left: 0;
}

.notes-list li {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
    position: relative;
    line-height: 1.6;
}

.notes-list li strong {
    position: absolute;
    left: 0;
    color: var(--acc-1);
    font-weight: 600;
}

.no-boosts {
    color: var(--muted);
    font-style: italic;
    padding: 0.75rem;
    text-align: center;
}

.boost-desc {
    color: var(--muted);
    font-size: 0.875rem;
    font-weight: normal;
}

#boostsContainer .list-group-item.immediate-reward {
    background: rgba(255, 107, 53, 0.1);
    border-color: rgba(255, 107, 53, 0.3);
}

#boostsContainer .list-group-item.immediate-reward:hover {
    background: rgba(255, 107, 53, 0.15);
}

.upgrade-note {
    margin: 0 0 1rem 0;
    padding: 0.75rem;
    background: rgba(255, 107, 53, 0.15);
    border-left: 3px solid var(--acc-1);
    border-radius: 4px;
    color: var(--muted);
}

.upgrade-note small {
    color: var(--muted);
    font-style: italic;
}

.no-boosts {
    padding: 1rem;
    text-align: center;
    color: var(--muted);
    margin: 0;
}

.fees-calculation {
    color: var(--muted);
    font-size: 0.875rem;
    margin-top: 0.25rem;
    font-style: italic;
}

.highlighted-action-point {
    background: rgba(255, 107, 53, 0.15);
    border-left: 3px solid var(--acc-1);
    padding: 0.5rem 0.75rem;
    margin: 0.25rem 0;
    border-radius: 4px;
    transition: all 0.2s ease;
}

