body, div, input, li, p, span, td, textarea {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
}

.calculator-container {
    background: linear-gradient(to right, #f8f9fa, #e0eafc);
    width: 100%;
    max-width: 650px;
    margin: 20px auto;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border: 1px solid #333;
}

.calculator-title {
    text-align: center;
    color: #053b7d;
    margin-bottom: 5px;
    font-size: 28px;
}

.calculator-subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 20px;
    font-size: 14px;
}

.calc-mode-toggle {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.mode-btn {
    flex: 1;
    padding: 12px;
    border: 2px solid #053b7d;
    background: white;
    color: #053b7d;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.mode-btn:hover {
    background: #e8f0fe;
}

.mode-btn.active {
    background: #053b7d;
    color: white;
}

.input-group {
    margin-bottom: 15px;
}

.input-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
    box-sizing: border-box;
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: #053b7d;
    box-shadow: 0 0 5px rgba(5, 59, 125, 0.3);
}

.inline-inputs {
    display: flex;
    gap: 10px;
}

.inline-inputs input {
    flex: 2;
}

.inline-inputs select {
    flex: 1;
}

.time-inputs,
.pace-inputs {
    display: flex;
    align-items: center;
    gap: 5px;
}

.time-inputs input,
.pace-inputs input {
    width: 60px;
    text-align: center;
}

.time-inputs span,
.pace-inputs span {
    font-size: 20px;
    font-weight: bold;
    color: #333;
}

.pace-inputs select {
    width: auto;
    margin-left: 10px;
}

.button-group {
    display: flex;
    gap: 10px;
    margin: 20px 0;
}

.btn-primary,
.btn-secondary {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-primary {
    background-color: #053b7d;
    color: white;
}

.btn-primary:hover {
    background-color: #042a5c;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #545b62;
}

.error-message {
    background-color: #f8d7da;
    color: #721c24;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 15px;
    text-align: center;
}

.results-primary {
    margin: 20px 0;
}

.result-card {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    border: 1px solid #ddd;
}

.result-card.main {
    background: linear-gradient(135deg, #053b7d, #0a5abd);
    color: white;
    margin-bottom: 15px;
    padding: 25px;
}

.result-cards-row {
    display: flex;
    gap: 10px;
}

.result-cards-row .result-card {
    flex: 1;
}

.result-label {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 5px;
}

.result-value {
    font-size: 32px;
    font-weight: 700;
}

.result-card.main .result-value {
    font-size: 48px;
}

.result-secondary {
    font-size: 14px;
    opacity: 0.8;
}

.splits-section,
.predictions-section,
.training-section {
    margin-top: 25px;
    padding: 20px;
    background: #fff;
    border-radius: 10px;
    border: 1px solid #ddd;
}

.splits-section h3,
.predictions-section h3,
.training-section h3 {
    color: #053b7d;
    margin: 0 0 15px 0;
    text-align: center;
}

.split-toggle {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.split-btn {
    flex: 1;
    padding: 8px;
    border: 1px solid #053b7d;
    background: white;
    color: #053b7d;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
}

.split-btn.active {
    background: #053b7d;
    color: white;
}

.splits-table {
    max-height: 300px;
    overflow-y: auto;
}

.split-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 15px;
    border-bottom: 1px solid #eee;
}

.split-row:nth-child(even) {
    background: #f8f9fa;
}

.split-row.header {
    font-weight: 600;
    background: #e8f0fe;
    position: sticky;
    top: 0;
}

.predictions-note {
    text-align: center;
    color: #666;
    font-size: 13px;
    margin-bottom: 15px;
}

.predictions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.prediction-card {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

.prediction-distance {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 5px;
}

.prediction-time {
    font-size: 24px;
    font-weight: 700;
}

.training-zones {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.zone-card {
    padding: 15px;
    border-radius: 8px;
    color: white;
}

.zone-card.easy {
    background: linear-gradient(135deg, #17a2b8, #20c997);
}

.zone-card.aerobic {
    background: linear-gradient(135deg, #28a745, #5cb85c);
}

.zone-card.tempo {
    background: linear-gradient(135deg, #ffc107, #fd7e14);
}

.zone-card.interval {
    background: linear-gradient(135deg, #dc3545, #c82333);
}

.zone-name {
    font-weight: 700;
    margin-bottom: 5px;
}

.zone-pace {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 5px;
}

.zone-desc {
    font-size: 12px;
    opacity: 0.9;
}

.disclaimer {
    background: #fff3cd;
    padding: 15px;
    border-radius: 5px;
    margin-top: 20px;
    font-size: 13px;
    color: #856404;
    border: 1px solid #ffc107;
}

.disclaimer-text {
    text-align: center;
    color: #666;
    font-size: 14px;
}

.share-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.smaller-button {
    padding: 8px 15px;
    background: #053b7d;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
}

.smaller-button:hover {
    background: #042a5c;
}

@media (max-width: 500px) {
    .calculator-container {
        padding: 15px;
    }

    .result-cards-row {
        flex-direction: column;
    }

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

    .time-inputs input,
    .pace-inputs input {
        width: 50px;
    }

    .calc-mode-toggle {
        flex-direction: column;
    }

    .split-toggle {
        flex-direction: column;
    }
}
