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

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.65;
    color: #101828;
    background:
      radial-gradient(1200px 600px at -10% -10%, #f0f4ff 0%, rgba(240,244,255,0) 70%),
      radial-gradient(1200px 600px at 110% 10%, #fff0f7 0%, rgba(255,240,247,0) 70%),
      linear-gradient(180deg, #f9fafb 0%, #f5f7fb 100%);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

/* Header Styles */
header {
    text-align: center;
    margin-bottom: 40px;
    color: #0b1220;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    letter-spacing: -0.02em;
    text-shadow: none;
}

header p {
    font-size: 1rem;
    color: #475467;
}

/* Calculator Container */
.calculator-container {
    background: rgba(255,255,255,0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 20px;
    box-shadow:
      0 1px 2px rgba(16, 24, 40, 0.06),
      0 10px 30px rgba(16, 24, 40, 0.08);
    overflow: hidden;
    border: 1px solid rgba(16,24,40,0.06);
}

/* Form Styles */
.macro-form {
    padding: 32px;
}

.form-section {
    margin-bottom: 40px;
}

.form-section h2 {
    color: #101828;
    font-size: 1.25rem;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eef2f6;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    color: #344054;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.form-group input,
.form-group select {
    padding: 12px 14px;
    border: 1px solid #d0d5dd;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: #ffffff;
    color: #101828;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #7f56d9;
    box-shadow: 0 0 0 4px rgba(127, 86, 217, 0.15);
}

.form-group input:invalid {
    border-color: #f97066;
    box-shadow: 0 0 0 4px rgba(249, 112, 102, 0.12);
}

/* Button Styles */
.calculate-btn {
    background: linear-gradient(135deg, #7f56d9 0%, #56b2d9 100%);
    color: white;
    border: none;
    padding: 14px 20px;
    font-size: 1.05rem;
    font-weight: 650;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
    width: 100%;
    margin-top: 20px;
    box-shadow: 0 8px 20px rgba(127, 86, 217, 0.25);
}

.calculate-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.02);
    box-shadow: 0 12px 28px rgba(86, 178, 217, 0.28);
}

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

/* Checkbox Styles */
.checkbox-group {
    margin-top: 10px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.95rem;
    color: #344054;
    font-weight: 500;
    gap: 10px;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #d0d5dd;
    border-radius: 4px;
    background: #ffffff;
    position: relative;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.checkbox-label:hover .checkmark {
    border-color: #7f56d9;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: linear-gradient(135deg, #7f56d9 0%, #56b2d9 100%);
    border-color: #7f56d9;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}



/* Coaching CTA Section */
.coaching-cta {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    margin-top: 30px;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.coaching-cta h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.coaching-cta p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 25px;
    opacity: 0.95;
}

.book-call-btn {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.book-call-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.6);
    background: linear-gradient(135deg, #ee5a24, #ff6b6b);
}

/* Results Section */
.results-section {
    background: #f8fafc;
    padding: 32px;
    border-top: 1px solid #eef2f6;
}

.results-section h2 {
    color: #2d3748;
    font-size: 2rem;
    margin-bottom: 30px;
    text-align: center;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.result-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease;
}

.result-card:hover {
    transform: translateY(-5px);
}

.result-card h3 {
    font-size: 0.95rem;
    margin-bottom: 10px;
    color: #475467;
    text-transform: none;
    letter-spacing: 0.2px;
}

.result-value {
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 6px;
    letter-spacing: -0.02em;
}

.result-percentage {
    font-size: 1.1rem;
    color: #718096;
    margin-bottom: 5px;
}

.result-calories {
    font-size: 0.9rem;
    color: #a0aec0;
}

/* Color coding for macros */
.result-card.calories .result-value {
    color: #7f56d9;
}

.result-card.protein .result-value {
    color: #12b76a;
}

.result-card.carbs .result-value {
    color: #f59e0b;
}

.result-card.fats .result-value {
    color: #56b2d9;
}

/* Additional Info */
.additional-info {
    background: white;
    padding: 20px;
    border-radius: 14px;
    margin-bottom: 30px;
    box-shadow: 0 6px 18px rgba(16,24,40,0.06);
    border: 1px solid #eef2f6;
}

.additional-info h3 {
    color: #2d3748;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.info-item {
    padding: 15px;
    background: #f7fafc;
    border-radius: 10px;
    border-left: 4px solid #667eea;
}

.info-item strong {
    display: block;
    color: #4a5568;
    margin-bottom: 5px;
}

.info-item span {
    font-size: 1.2rem;
    font-weight: 600;
    color: #667eea;
}

/* Recommendations */
.recommendations {
    background: white;
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.recommendations h3 {
    color: #2d3748;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

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

.recommendations li {
    padding: 10px 0;
    border-bottom: 1px solid #e2e8f0;
    position: relative;
    padding-left: 25px;
}

.recommendations li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #48bb78;
    font-weight: bold;
}

.recommendations li:last-child {
    border-bottom: none;
}

/* Footer */
footer {
    text-align: center;
    margin-top: 40px;
    color: white;
    opacity: 0.8;
    font-size: 0.9rem;
}

/* Height Input Styling */
.height-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
}

.height-inputs input {
    flex: 1;
    min-width: 60px;
}

.height-inputs span {
    font-size: 0.9rem;
    color: #718096;
    font-weight: 500;
}


/* Responsive Design */
@media (max-width: 768px) {
    .timeline-stats {
        grid-template-columns: 1fr;
    }
    
    .height-inputs {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .height-inputs span {
        text-align: center;
        margin: -5px 0;
    }
}
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .macro-form,
    .results-section {
        padding: 20px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .result-value {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.8rem;
    }
    
    .macro-form,
    .results-section {
        padding: 15px;
    }
    
    .result-value {
        font-size: 1.8rem;
    }
    
    /* Mobile CTA button fixes */
    .book-call-btn {
        padding: 12px 20px;
        font-size: 1rem;
        width: 100%;
        max-width: none;
        margin: 0 auto;
        display: block;
        text-align: center;
        box-sizing: border-box;
    }
    
    .coaching-cta {
        padding: 20px 15px;
        text-align: center;
    }
    
    .coaching-cta h3 {
        font-size: 1.3rem;
        margin-bottom: 15px;
    }
    
    .coaching-cta p {
        font-size: 0.95rem;
        line-height: 1.5;
        margin-bottom: 20px;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

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

/* Success/Error Messages */
.message {
    padding: 15px;
    border-radius: 10px;
    margin: 20px 0;
    font-weight: 500;
}

.message.success {
    background: #c6f6d5;
    color: #22543d;
    border: 1px solid #9ae6b4;
}

.message.error {
    background: #fed7d7;
    color: #742a2a;
    border: 1px solid #feb2b2;
}

/* Smooth transitions */
.results-section {
    animation: slideIn 0.45s ease-out;
    will-change: transform, opacity;
}

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

/* Recommendations Section */
.recommendations {
    background: white;
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.recommendations h3 {
    color: #2d3748;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.recommendation-item {
    padding: 15px;
    margin-bottom: 15px;
    background: #f7fafc;
    border-radius: 10px;
    border-left: 4px solid #7f56d9;
    line-height: 1.6;
}

.recommendation-item:last-child {
    margin-bottom: 0;
}

.recommendation-item strong {
    color: #2d3748;
}

/* Footer Styles */
footer {
    text-align: center;
    margin-top: 40px;
    padding: 30px 20px;
    background: rgba(255,255,255,0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 20px;
    box-shadow:
      0 1px 2px rgba(16, 24, 40, 0.06),
      0 10px 30px rgba(16, 24, 40, 0.08);
    border: 1px solid rgba(16,24,40,0.06);
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
}

.footer-content p {
    color: #475467;
    margin-bottom: 15px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.footer-content p a {
    color: #7f56d9;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.footer-content p a:hover {
    color: #56b2d9;
    text-decoration: underline;
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.footer-links a {
    color: #7f56d9;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: #56b2d9;
    text-decoration: underline;
}

.footer-links .separator {
    color: #d0d5dd;
    font-weight: 300;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 0;
    border-radius: 20px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(16, 24, 40, 0.15);
    border: 1px solid rgba(16,24,40,0.06);
}

.modal-header {
    padding: 30px 30px 20px;
    border-bottom: 1px solid #eef2f6;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 20px 20px 0 0;
}

.modal-header h2 {
    color: #101828;
    font-size: 1.5rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-body {
    padding: 30px;
    line-height: 1.7;
}

.modal-body h3 {
    color: #2d3748;
    font-size: 1.1rem;
    margin: 25px 0 15px 0;
    font-weight: 600;
}

.modal-body h3:first-child {
    margin-top: 0;
}

.modal-body p {
    color: #475467;
    margin-bottom: 15px;
}

.modal-body ul {
    margin: 15px 0;
    padding-left: 20px;
}

.modal-body li {
    color: #475467;
    margin-bottom: 8px;
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    color: #718096;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s ease;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.8);
}

.close:hover,
.close:focus {
    color: #2d3748;
    background: rgba(255,255,255,1);
}

@media (max-width: 768px) {
    .modal-content {
        margin: 10% auto;
        width: 95%;
        max-height: 85vh;
    }
    
    .modal-header,
    .modal-body {
        padding: 20px;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 10px;
    }
    
    .footer-links .separator {
        display: none;
    }
}