/* Animation Keyframes - Minimal */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* General Styles */
:root {
    --primary: #4361ee;
    --secondary: #3f37c9;
    --accent: #4cc9f0;
    --text: #e9ecef;
    --light: #f8f9fa;
    --dark: #121212;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Helvetica Neue', Arial, sans-serif;
}

body {
    background-color: var(--dark);
    color: var(--text);
    min-height: 100vh;
    display: block;
    justify-content: center;
    align-items: center;
    /* Improve scrolling performance */
    overflow-y: scroll;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
}

.container {
    width: 100%;
    max-width: 1200px;
    padding: 20px;
    margin: 0 auto;
}

.calculator-container {
    display: flex;
    background-color: var(--dark);
    border-radius: 10px;
    overflow: hidden;
    height: 100%;
    animation: fadeIn 0.8s ease-out;
}

/* Page Header */
.page-header {
    margin-bottom: 40px;
    text-align: center;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    animation: slideInDown 0.8s ease-out forwards;
}

.main-title {
    font-size: 42px;
    font-weight: 800;
    color: var(--accent);
    margin-bottom: 10px;
    letter-spacing: 1px;
    animation: slideInDown 0.8s ease-out forwards;
}

.main-subtitle {
    font-size: 22px;
    color: var(--text);
    margin-bottom: 20px;
    opacity: 0;
    animation: slideInDown 0.8s ease-out forwards;
    animation-delay: 0.1s;
}

.description {
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    opacity: 0;
    max-width: 700px;
    margin: 0 auto;
    animation: slideInDown 0.8s ease-out forwards;
    animation-delay: 0.2s;
}

/* Additional Info Section */
.additional-info {
    margin-top: 60px;
    padding: 40px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.additional-info.visible {
    opacity: 1;
    transform: translateY(0);
}

.additional-info h2 {
    font-size: 28px;
    color: var(--accent);
    margin-bottom: 20px;
}

.additional-info h3 {
    font-size: 22px;
    color: var(--text);
    margin: 25px 0 15px;
}

.additional-info p {
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    margin-bottom: 20px;
}

.additional-info ul {
    padding-left: 20px;
    margin-bottom: 20px;
}

.additional-info li {
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    margin-bottom: 10px;
}

/* Responsive adjustments for the header and additional info */
@media screen and (max-width: 768px) {
    .page-header {
        margin-bottom: 30px;
        padding: 0 15px;
    }
    
    .main-title {
        font-size: 32px;
    }
    
    .main-subtitle {
        font-size: 18px;
    }
    
    .description {
        font-size: 15px;
    }
    
    .additional-info {
        margin-top: 40px;
        padding: 25px;
    }
    
    .additional-info h2 {
        font-size: 24px;
    }
    
    .additional-info h3 {
        font-size: 20px;
    }
}

/* Left Section */
.left-section {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 25px;
    animation: fadeIn 0.8s ease-out;
}

/* Responsive Settings */
@media screen and (max-width: 768px) {
    .calculator-container {
        flex-direction: column;
    }
    
    .right-section {
        display: none; /* Hide the right section on mobile */
    }
    
    .left-section {
        width: 100%;
    }
}

/* Gender Selection */
.gender-selection {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.gender-btn {
    background-color: #1a1a1a;
    color: #ffffff; /* Changed to white for better readability */
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
}

.gender-btn.active {
    background-color: rgba(76, 201, 240, 0.15); /* Semi-transparent accent color */
    color: var(--accent);
    border: 1px solid var(--accent);
}

.gender-btn:hover {
    opacity: 0.9;
}

/* Slider Container */
.slider-container {
    margin-bottom: 15px;
    position: relative;
}

.slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    color: #ffffff; /* Changed to white for better readability */
}

.slider-header span:first-child {
    display: flex;
    align-items: center;
}

/* Unit toggle */
.unit-toggle {
    display: flex;
    gap: 5px;
}

.unit-btn {
    background: none;
    border: none;
    color: #adb5bd; /* Changed for better readability */
    font-size: 12px;
    cursor: pointer;
    font-weight: 600;
}

.unit-btn.active {
    color: var(--accent);
}

.age-unit {
    color: var(--accent);
    font-size: 12px;
    font-weight: 600;
}

/* Slider Styling */
.slider-wrapper {
    position: relative;
    margin-bottom: 10px;
}

.slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 5px;
    background: linear-gradient(to right, var(--accent) 0%, var(--accent) 50%, #333 50%, #333 100%);
    border-radius: 5px;
    outline: none;
    margin: 10px 0;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 25px;
    height: 25px;
    background: var(--dark);
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid var(--accent);
}

.slider::-moz-range-thumb {
    width: 25px;
    height: 25px;
    background: var(--dark);
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid var(--accent);
}

.ticks-container {
    position: relative;
    width: 100%;
    height: 10px;
    display: flex;
    justify-content: space-between;
}

.ticks-container::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 0;
    right: 0;
    height: 5px;
    background: repeating-linear-gradient(
        to right,
        #555,
        #555 1px,
        transparent 1px,
        transparent 10%
    );
}

.slider-value {
    display: flex;
    justify-content: flex-end;
    font-size: 24px;
    font-weight: bold;
    color: #ffffff; /* Changed to white for better readability */
}

.slider-value span {
    margin-left: 5px;
    color: var(--accent); /* Changed units to accent color */
}

/* Calculate Button */
.calculate-btn {
    background-color: var(--primary);
    color: var(--light);
    border: none;
    padding: 15px 30px 15px 50px;
    border-radius: 5px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    align-self: flex-start;
    position: relative;
}
.calculate-btn:hover {
    background: var(--secondary);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(67, 97, 238, 0.35);
}

.calculate-btn::before {
    content: "\f1ec"; /* Calculator icon */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.calculate-btn:hover {
    background-color: var(--secondary);
}

/* BMI Result */
.bmi-result {
    margin-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
}

.bmi-label {
    font-size: 22px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    color: #ffffff; /* Changed to white for better readability */
}

.result-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.result-left {
    flex: 1;
}

.result-right {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.bmi-score {
    font-size: 80px;
    font-weight: bold;
    margin-bottom: 5px;
    color: var(--accent);
}

.bmi-category {
    font-size: 20px;
    color: #ffffff; /* Changed to white for better readability */
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.healthy-weight-range {
    font-size: 18px;
    color: #ffffff; /* Changed to white for better readability */
    text-align: left;
    margin-top: 15px;
    display: block;
}

/* Right Section */
.right-section {
    flex: 1;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    min-height: 600px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    text-align: center;
    border-radius: 0 10px 10px 0;
    animation: fadeIn 1s ease-out;
}

.right-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 450px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.app-title {
    font-size: 36px;
    font-weight: 800;
    color: var(--light);
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-align: center;
}

.app-subtitle {
    font-size: 18px;
    color: var(--light);
    margin-bottom: 30px;
    opacity: 0.9;
    line-height: 1.5;
    text-align: center;
}

.bmi-chart {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
    width: 100%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.bmi-chart-title {
    font-size: 20px;
    font-weight: bold;
    color: var(--light);
    margin-bottom: 15px;
    text-align: center;
}

.bmi-ranges {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.bmi-range {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 15px;
    border-radius: 8px;
    width: 100%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.bmi-range-underweight {
    background-color: rgba(255, 193, 7, 0.3);
}

.bmi-range-normal {
    background-color: rgba(40, 167, 69, 0.3);
}

.bmi-range-overweight {
    background-color: rgba(255, 128, 0, 0.3);
}

.bmi-range-obese {
    background-color: rgba(220, 53, 69, 0.3);
}

.bmi-range-label {
    font-weight: 600;
    color: var(--light);
    text-align: left;
}

.bmi-range-value {
    color: var(--light);
    text-align: right;
}

.footer-info {
    margin: 20px auto 0;
    font-size: 14px;
    color: var(--light);
    opacity: 0.7;
    text-align: center;
    max-width: 90%;
    line-height: 1.4;
    padding: 0 10px;
}

.bmi-icon {
    font-size: 64px;
    color: var(--accent);
    margin-bottom: 20px;
    text-align: center;
    width: 100%;
}

/* Responsive Settings */
@media screen and (max-width: 768px) {
    .calculator-container {
        flex-direction: column;
        border-radius: 10px;
        overflow: hidden;
    }
    
    .right-section {
        display: block; /* Show the right section on mobile */
        padding: 30px 15px;
        border-radius: 0 0 10px 10px; /* Update border radius for mobile view */
    }
    
    .left-section {
        width: 100%;
        border-radius: 10px 10px 0 0; /* Update border radius for mobile view */
    }
    
    .app-title {
        font-size: 28px;
    }
    
    .app-subtitle {
        font-size: 16px;
    }
    
    .bmi-chart {
        padding: 15px;
    }
    
    .bmi-range {
        padding: 8px 10px;
    }
    
    .bmi-range-label, .bmi-range-value {
        font-size: 14px;
    }
    
    .bmi-icon {
        font-size: 48px;
        margin-bottom: 15px;
    }
    
    .footer-info {
        max-width: 100%;
        margin-top: 15px;
    }
}

/* For elements that should appear on scroll */
.scroll-reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.scroll-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}





.additional-info a {
    color: var(--accent);
    text-decoration: none;
    transition: all 0.3s ease;
}

.additional-info a:hover {
    text-decoration: underline;
    color: #7dd3f7;
}

.additional-info h2 {
    /* margin-top: 20px; */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
}