* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Raleway', sans-serif;
    background-color: #f3f4f6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    width: 100%;
    padding: 1rem;
    border-bottom: 1px solid #374151;
    background-color: #0B3151;
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.flask-icon {
    width: 2rem;
    height: 2rem;
    color: #54b6e7;
}

header span {
    font-size: 1.25rem;
    font-weight: bold;
    color: white;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.btn-primary {
    background-color: #54b6e7;
    color: white;
    font-weight: bold;
    padding: 0.75rem 2rem;
    border-radius: 0.375rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
    background-color: #41a5d6;
    transform: scale(1.05);
}

.slider {
    width: 100%;
    height: 0.5rem;
    border-radius: 0.25rem;
    background: #e5e7eb;
    outline: none;
    -webkit-appearance: none;
    margin-top: 0.5rem;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    background: #54b6e7;
    cursor: pointer;
    position: relative;
    z-index: 2;
}

.slider::-moz-range-thumb {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    background: #54b6e7;
    cursor: pointer;
    border: none;
    position: relative;
    z-index: 2;
}

.contact-form {
    width: 100%;
    padding: 2rem;
    background: white;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

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

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.25rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 1rem;
    transition: all 0.2s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #54b6e7;
    ring: 2px;
    ring-color: #54b6e7;
}

.btn-full {
    width: 100%;
    margin-top: 1rem;
    justify-content: center;
}

.flash-messages {
    list-style: none;
    width: 100%;
    max-width: 48rem;
    margin: 0 auto 1.5rem;
    padding: 0;
}

.flash-messages li {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #991b1b;
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.predictor-form-container,
.predictor-results-container {
    width: 100%;
    max-width: 64rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.predictor-form-container h2,
.predictor-results-container h2 {
    font-size: 1.75rem;
    font-weight: bold;
    color: #0B3151;
    text-align: center;
    margin-bottom: 0.5rem;
}

.predictor-intro {
    text-align: center;
    color: #374151;
    max-width: 40rem;
    margin-bottom: 1rem;
}

.methodology-notice {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e3a5f;
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    max-width: 48rem;
    margin-bottom: 1.5rem;
    width: 100%;
}

.predictor-form {
    max-width: 40rem;
}

.form-section-title {
    font-weight: 700;
    color: #0B3151;
    margin: 1.25rem 0 0.5rem;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.field-note {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

#pre-register-count {
    font-size: 0.9rem;
    color: #6b7280;
    margin-bottom: 0.75rem;
    text-align: center;
}

.predictor-table-controls {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    width: 100%;
    margin-bottom: 1rem;
}

.predictor-table-controls.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.predictor-table-controls input,
.predictor-table-controls select {
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.9rem;
}

.table-scroll {
    width: 100%;
    overflow-x: auto;
    margin-bottom: 1.5rem;
    background: white;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
}

.predictor-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.predictor-table th,
.predictor-table td {
    padding: 0.6rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid #f3f4f6;
    white-space: nowrap;
}

.predictor-table th {
    background: #f9fafb;
    color: #374151;
    font-weight: 600;
    position: sticky;
    top: 0;
}

.predictor-table th.sortable {
    cursor: pointer;
}

.predictor-table.locked th.sortable {
    cursor: default;
}

.predictor-table tbody tr:hover {
    background: #f9fafb;
}

.chance-pill {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.chance-target { background: #d1fae5; color: #065f46; }
.chance-reach { background: #fed7aa; color: #9a3412; }
.chance-undershoot { background: #fef9c3; color: #854d0e; }
.chance-far-undershoot { background: #ede9fe; color: #5b21b6; }
.chance-far-reach { background: #fee2e2; color: #991b1b; }
.chance-unavailable { background: #e5e7eb; color: #374151; }

.predictor-unlock-wrapper {
    width: 100%;
    max-width: 28rem;
    margin: 2rem auto 0;
    text-align: center;
}

.predictor-unlock-wrapper h3 {
    color: #0B3151;
    margin-bottom: 0.5rem;
}

.unlock-sub {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 1.25rem;
    line-height: 1.5;
}

.locked-row td {
    background: #f9fafb;
    color: #6b7280;
    font-style: italic;
    font-size: 0.875rem;
    text-align: center;
    padding: 0.75rem;
    border-top: 2px dashed #e5e7eb;
}

/* Confirmation page */
.confirmation-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 36rem;
    padding: 2rem 1rem;
    animation: fadeIn 0.4s ease-in;
}

.confirmation-icon {
    width: 5rem;
    height: 5rem;
    background: #eff6ff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.confirmation-icon svg {
    width: 2.5rem;
    height: 2.5rem;
    color: #54b6e7;
}

.confirmation-page h2 {
    font-size: 1.875rem;
    font-weight: bold;
    color: #0B3151;
    margin-bottom: 1rem;
}

.confirmation-message {
    font-size: 1.125rem;
    color: #374151;
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.confirmation-sub {
    font-size: 0.9rem;
    color: #6b7280;
    margin-bottom: 2rem;
    line-height: 1.6;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    header {
        padding: 0.75rem 1rem;
    }

    header span {
        font-size: 1rem;
    }

    .flask-icon {
        width: 1.5rem;
        height: 1.5rem;
    }

    main {
        padding: 1rem 0.5rem;
    }

    .btn-primary {
        padding: 0.625rem 1.5rem;
        font-size: 0.95rem;
    }

    .predictor-form-container h2,
    .predictor-results-container h2 {
        font-size: 1.4rem;
        line-height: 1.3;
    }

    .predictor-intro {
        font-size: 0.9rem;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .contact-form {
        padding: 1.5rem 1rem;
    }

    .form-group label {
        font-size: 0.85rem;
    }

    .form-group input,
    .form-group select {
        font-size: 0.95rem;
        padding: 0.625rem 0.5rem;
    }

    .predictor-table-controls {
        flex-direction: column;
    }

    .predictor-table-controls input,
    .predictor-table-controls select {
        width: 100%;
    }
}

@media (max-width: 480px) {
    header span {
        font-size: 0.9rem;
    }

    .predictor-form-container h2,
    .predictor-results-container h2 {
        font-size: 1.2rem;
    }
}
