/* Combined CSS Styles for Fitness Calculators */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-image: url('track.webp');
    background-repeat: no-repeat;
    background-size: cover;
    /*background-position: center;*/
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* Container Styles */
.calculator-container,
.predictor-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    max-width: 700px;
    width: 100%;
    transition: transform 0.3s ease;
    margin-bottom: 20px;
}

.calculator-container:hover,
.predictor-container:hover {
    transform: translateY(-5px);
}

/* Specific container width overrides */
.calculator-container[data-type="bmi"],
.calculator-container[data-type="pace"] {
    max-width: 600px;
}

.calculator-container[data-type="predictor"],
.calculator-container[data-type="vo2max"] {
    max-width: 650px;
}

/* Header Styles */
h1 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
    font-size: 2.2rem;
    font-weight: 300;
}

/* Unit/Method Selectors */
.unit-selector,
.method-selector {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
    padding: 20px;
    background: #E9EFEF;
    border-radius: 15px;
}

.radio-group {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.radio-group:hover {
    transform: scale(1.05);
}

.radio-group input[type="radio"] {
    width: 20px;
    height: 20px;
    accent-color: #CE6632;
}

.radio-group label {
    font-size: 1.1rem;
    font-weight: 500;
    color: #555;
    cursor: pointer;
}

/* Input Sections */
.input-section {
    margin-bottom: 30px;
}

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

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
    font-size: 1rem;
}

.input-group-row {
    display: flex;
    gap: 20px;
}

.input-group-row .input-group {
    flex: 1;
}

/* Input Field Styles */
.input-field,
.single-input,
.distance-input,
.distance-select,
.custom-distance {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
}

.distance-select {
    cursor: pointer;
}

.input-field:focus,
.single-input:focus,
.distance-input:focus,
.distance-select:focus,
.custom-distance:focus {
    outline: none;
    border-color: #CE6632;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.custom-distance {
    margin-top: 10px;
    display: none;
}

/* Height Input Group (BMI specific) */
.height-inputs {
    display: flex;
    gap: 15px;
}

.height-input {
    flex: 1;
}

.height-input input {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1.1rem;
    text-align: center;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
}

.height-input input:focus {
    outline: none;
    border-color: #CE6632;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.height-input label {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
    display: block;
    margin-bottom: 8px;
}

/* Time Input Styles */
.time-inputs {
    display: flex;
    gap: 15px;
}

.time-input {
    flex: 1;
    text-align: center;
}

.time-input input {
    width: 100%;
    padding: 15px 8px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1.1rem;
    text-align: center;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
}

.time-input input:focus {
    outline: none;
    border-color: #CE6632;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.time-input label {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Intensity Selector (Recovery specific) */
.intensity-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.intensity-option {
    position: relative;
}

.intensity-option input[type="radio"] {
    display: none;
}

.intensity-label {
    display: block;
    padding: 12px 8px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    font-weight: 500;
}

.intensity-option input[type="radio"]:checked + .intensity-label {
    border-color: #CE6632;
    background: rgba(102, 126, 234, 0.1);
    color: #CE6632;
}

.intensity-label:hover {
    border-color: #CE6632;
    transform: translateY(-2px);
}

/* Results Section Base */
.results-section,
.result-section {
    background: linear-gradient(135deg, #CE6632, #732E0C);
    color: white;
    padding: 25px;
    border-radius: 15px;
    margin-top: 30px;
    transform: scale(0.95);
    transition: all 0.3s ease;
    opacity: 0;
}

.results-section.show,
.result-section.show {
    transform: scale(1);
    opacity: 1;
}

/* Pace Calculator Result Section */
.result-section {
    text-align: center;
}

.result-title {
    font-size: 1.2rem;
    margin-bottom: 15px;
    opacity: 0.9;
}

.pace-display {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.pace-unit {
    font-size: 1.1rem;
    opacity: 0.9;
}

.speed-display {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
}

.speed-value {
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 5px;
}

/* BMI Display */
.bmi-display {
    text-align: center;
    margin-bottom: 25px;
}

.bmi-value {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.bmi-category {
    font-size: 1.4rem;
    font-weight: 500;
    margin-bottom: 10px;
    opacity: 0.9;
}

.bmi-description {
    font-size: 1rem;
    opacity: 0.8;
    line-height: 1.4;
}

/* BMI Ranges */
.bmi-ranges {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 25px;
}

.range-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.range-card:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.25);
}

.range-card.active {
    background: rgba(255, 255, 255, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.6);
    transform: scale(1.05);
}

.range-title {
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 1rem;
}

.range-values {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Weight Goals */
.weight-goals {
    margin-top: 25px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
}

.weight-goals h3 {
    text-align: center;
    margin-bottom: 15px;
    font-size: 1.2rem;
    opacity: 0.9;
}

.goal-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.goal-row:last-child {
    border-bottom: none;
}

.goal-category {
    font-weight: 500;
}

.goal-weight {
    font-weight: bold;
}

/* Heart Rate Zone Display */
.max-hr-display {
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.max-hr-value {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.max-hr-label {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Zone Cards */
.zones-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.zone-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.zone-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--zone-color);
}

.zone-card:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.25);
}

.zone-number {
    font-size: 1.4rem;
    font-weight: bold;
    margin-bottom: 8px;
    color: var(--zone-color);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.zone-name {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 10px;
    opacity: 0.9;
}

.zone-range {
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 8px;
}

.zone-percentage {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 10px;
}

.zone-description {
    font-size: 0.85rem;
    opacity: 0.8;
    line-height: 1.3;
}

/* Zone colors */
.zone-1 { --zone-color: #90EE90; }
.zone-2 { --zone-color: #87CEEB; }
.zone-3 { --zone-color: #FFD700; }
.zone-4 { --zone-color: #FFA500; }
.zone-5 { --zone-color: #FF6B6B; }

/* Race Predictions */
.results-title {
    text-align: center;
    font-size: 1.4rem;
    margin-bottom: 25px;
    opacity: 0.9;
}

.race-predictions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.race-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.race-card:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.25);
}

.race-distance {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 10px;
    opacity: 0.9;
}

.race-time {
    font-size: 1.8rem;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.race-pace {
    font-size: 0.9rem;
    margin-top: 8px;
    opacity: 0.8;
}

/* Recovery Display */
.recovery-display {
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.recovery-value {
    font-size: 2.8rem;
    font-weight: bold;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.recovery-label {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 10px;
}

.recovery-description {
    font-size: 1rem;
    opacity: 0.8;
    line-height: 1.4;
}

.recovery-breakdown {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.breakdown-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.breakdown-card:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.25);
}

.breakdown-title {
    font-size: 1rem;
    font-weight: bold;
    margin-bottom: 10px;
    opacity: 0.9;
}

.breakdown-value {
    font-size: 1.6rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.breakdown-detail {
    font-size: 0.85rem;
    opacity: 0.8;
    line-height: 1.3;
}

/* VO2 Max Display */
.vo2max-display {
    text-align: center;
    margin-bottom: 25px;
}

.vo2max-value {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.vo2max-unit {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 15px;
}

.fitness-level {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.fitness-description {
    font-size: 1rem;
    opacity: 0.8;
    line-height: 1.4;
}

.additional-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 25px;
}

.metric-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.metric-card:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.25);
}

.metric-title {
    font-size: 1rem;
    font-weight: bold;
    margin-bottom: 8px;
    opacity: 0.9;
}

.metric-value {
    font-size: 1.5rem;
    font-weight: bold;
}

.metric-unit {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-top: 5px;
}

/* Training Info */
.training-info,
.recovery-tips {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    margin-top: 25px;
}

.training-info h3,
.recovery-tips h3 {
    text-align: center;
    margin-bottom: 15px;
    font-size: 1.2rem;
    opacity: 0.9;
}

.info-grid,
.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
}

.tips-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.info-item,
.tip-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid var(--zone-color);
}

.tip-card {
    border-left: 4px solid rgba(255, 255, 255, 0.3);
}

.info-title,
.tip-title {
    font-weight: bold;
    margin-bottom: 8px;
    color: var(--zone-color);
}

.tip-title {
    font-size: 0.95rem;
    color: inherit;
}

.info-text,
.tip-text {
    font-size: 0.9rem;
    opacity: 0.9;
    line-height: 1.4;
}

.tip-text {
    font-size: 0.85rem;
}

/* Fitness Ranges */
.fitness-ranges {
    margin-top: 25px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
}

.fitness-ranges h3 {
    text-align: center;
    margin-bottom: 15px;
    font-size: 1.2rem;
    opacity: 0.9;
}

.range-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

.range-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-size: 0.9rem;
}

.range-item.active {
    background: rgba(255, 255, 255, 0.3);
    font-weight: bold;
}

/* Notes */
.note {
    text-align: center;
    margin-top: 25px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    font-size: 0.9rem;
    opacity: 0.9;
    line-height: 1.4;
}

/* Back to Calculators Button */
.back-to-calculators {
    text-align: center;
    margin-top: 20px;
}

.back-link {
    display: inline-block;
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    font-size: 1rem;
    padding: 12px 24px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 25px;
    transition: all 0.3s ease;
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(10px);
}

.back-link:hover {
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.6);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .calculator-container,
    .predictor-container {
        padding: 25px;
        margin: 10px 0;
    }

    h1 {
        font-size: 1.8rem;
    }

    .unit-selector,
    .method-selector {
        flex-direction: column;
        gap: 15px;
    }

    .input-group-row {
        flex-direction: column;
        gap: 10px;
    }

    .time-inputs {
        flex-direction: column;
        gap: 10px;
    }

    .height-inputs {
        flex-direction: column;
        gap: 10px;
    }

    .intensity-selector {
        grid-template-columns: repeat(2, 1fr);
    }

    .zones-grid,
    .bmi-ranges,
    .race-predictions,
    .recovery-breakdown,
    .additional-metrics {
        grid-template-columns: 1fr;
    }

    .info-grid,
    .tips-grid {
        grid-template-columns: 1fr;
    }

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

    .max-hr-value,
    .bmi-value,
    .vo2max-value {
        font-size: 2rem;
    }

    .pace-display {
        font-size: 2rem;
    }

    .recovery-value {
        font-size: 2.2rem;
    }

    .race-time {
        font-size: 1.5rem;
    }

    .goal-row {
        flex-direction: column;
        gap: 5px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .calculator-container,
    .predictor-container {
        padding: 20px;
        margin: 5px 0;
    }

    h1 {
        font-size: 1.6rem;
    }

    .bmi-value,
    .vo2max-value {
        font-size: 2.5rem;
    }

    .pace-display {
        font-size: 2rem;
    }

    .recovery-value {
        font-size: 2rem;
    }
}