/* Tool Page Specific Styles */

.main-content {
    margin-top: 80px;
    padding: 2rem 0;
    min-height: calc(100vh - 80px);
}

/* Tool Header */
.tool-header {
    text-align: center;
    padding: 3rem 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: var(--border-radius);
    margin-bottom: 3rem;
}

.tool-header .tool-icon {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    box-shadow: var(--shadow-hover);
}

.tool-header .tool-icon i {
    font-size: 3rem;
    color: var(--text-white);
}

.tool-header h1 {
    font-size: 2.5rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.tool-description {
    font-size: 1.2rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

/* Tool Content Layout */
.tool-content {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 3rem;
    align-items: start;
}

.tool-main {
    background: var(--bg-white);
}

/* Tool Introduction Styles */
.tool-intro {
    background: linear-gradient(135deg, var(--bg-white) 0%, #f8f9fa 100%);
    border-radius: var(--border-radius);
    padding: 3rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.intro-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    align-items: center;
}

.intro-text h2 {
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
}

.intro-text p {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.intro-features {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.feature-item:hover {
    background: var(--bg-white);
    box-shadow: var(--shadow);
}

.feature-item i {
    color: var(--primary-color);
    font-size: 1.2rem;
    min-width: 20px;
}

.feature-item span {
    color: var(--text-dark);
    font-weight: 500;
}

.intro-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.bmi-preview {
    text-align: center;
    padding: 2rem;
    background: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.preview-chart {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

/* Sleep Preview Chart Bar Styles - Enhanced visibility */
.sleep-preview .chart-bar {
    padding: 0.75rem;
    border-radius: 8px;
    color: var(--text-white);
    font-weight: 600;
    font-size: 0.9rem;
    text-align: center;
    position: relative;
    background: linear-gradient(135deg, #4a90e2, #7b68ee);
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.sleep-preview .chart-bar:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.4);
}

.sleep-preview .chart-bar span {
    color: #ffffff !important;
    font-weight: 700 !important;
    font-size: 1rem !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3) !important;
    display: block;
    padding: 0.25rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    margin: 0.25rem 0;
}

.chart-bar {
    padding: 0.75rem;
    border-radius: 4px;
    color: var(--text-white);
    font-weight: 500;
    font-size: 0.9rem;
    text-align: center;
}

.chart-bar.underweight { background-color: #2196F3; }
.chart-bar.normal { background-color: #4CAF50; }
.chart-bar.overweight { background-color: #FF9800; }
.chart-bar.obese { background-color: #F44336; }

.bmi-preview p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin: 0;
}

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 2rem;
}

.section-header h2 {
    color: var(--text-dark);
    margin-bottom: 1rem;
    font-size: 2rem;
}

.section-header p {
    color: var(--text-light);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ===== CALCULATOR SECTION - MODERN REDESIGN ===== */
.calculator-section {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafb 100%);
    border-radius: 16px;
    padding: 10px;
    margin-bottom: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.calculator-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

/* Calculator Header */
.calculator-section > h2 {
    background: linear-gradient(135deg, #f8fafb 0%, #e9ecef 100%);
    margin: 0;
    padding: 2rem 2rem 1.5rem;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-dark);
    text-align: center;
    border-bottom: 1px solid #e9ecef;
    position: relative;
}

.calculator-section > h2::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

/* Calculator Container */
.calculator {
    padding: 2.5rem;
    max-width: none;
    margin: 0;
    background: transparent;
    border: none;
}

/* Input Rows - Grid Layout */
.input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

/* Input Groups */
.input-group {
    margin-bottom: 2rem;
    position: relative;
}

.input-group:last-child {
    margin-bottom: 0;
}

/* Labels */
.input-group label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.95rem;
    position: relative;
    padding-left: 12px;
}

.input-group label::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 16px;
    background: var(--primary-color);
    border-radius: 2px;
}

/* Base Input and Select Styling */
.input-group input,
.input-group select {
    width: 100%;
    padding: 16px 18px;
    border: 2px solid #e1e8ed;
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    background: #ffffff;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    color: var(--text-dark);
    line-height: 1.5;
}

/* Focus States */
.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(76, 175, 80, 0.12), 0 4px 16px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

/* Hover States */
.input-group input:hover:not(:focus),
.input-group select:hover:not(:focus) {
    border-color: #b8c5d1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

/* Select Dropdown Styling */
.input-group select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 18px;
    padding-right: 48px;
    cursor: pointer;
}

/* Placeholder Styling */
.input-group input::placeholder {
    color: #9ca3af;
    font-style: italic;
    opacity: 1;
}

/* ===== ENHANCED INPUT STYLING ===== */
/* Input Focus Ring Animation */
.input-group input,
.input-group select {
    position: relative;
}

.input-group input:focus,
.input-group select:focus,
.input-with-unit:focus-within {
    animation: focusRing 0.3s ease-out;
}

@keyframes focusRing {
    0% {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    }
    50% {
        box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2), 0 4px 16px rgba(0, 0, 0, 0.08);
    }
    100% {
        box-shadow: 0 0 0 4px rgba(76, 175, 80, 0.12), 0 4px 16px rgba(0, 0, 0, 0.08);
    }
}

/* Input Value State Styling */
.input-group input:not(:placeholder-shown) {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafb 100%);
}

.input-group select:not([value=""]) {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafb 100%);
}

/* Connected Input-Select Enhanced Styling */
.input-with-unit input:not(:placeholder-shown) + select {
    background: linear-gradient(135deg, #f8fafb 0%, #f0f4f7 100%);
}

/* Input Group Hover Effect */
.input-group:hover label::before {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    width: 5px;
    transition: all 0.3s ease;
}

/* ===== CHECKBOX GROUP STYLING ===== */
.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 0.5rem;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: #ffffff;
    border: 2px solid #e1e8ed;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.checkbox-item:hover {
    border-color: #b8c5d1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.checkbox-item.checked {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, #f0f8f0 0%, #e8f5e8 100%);
    box-shadow: 0 2px 12px rgba(76, 175, 80, 0.12);
}

.checkbox-item.checked::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

/* Custom Checkbox Styling */
.checkbox-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin: 0;
    appearance: none;
    border: 2px solid #d1d9e0;
    border-radius: 6px;
    background: #ffffff;
    cursor: pointer;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.checkbox-item input[type="checkbox"]:hover {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.checkbox-item input[type="checkbox"]:checked {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.15);
}

.checkbox-item input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
    line-height: 1;
}

/* Checkbox Label Text */
.checkbox-item span {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-dark);
    transition: color 0.3s ease;
    user-select: none;
}

.checkbox-item.checked span {
    color: var(--primary-color);
    font-weight: 600;
}

/* Mobile Responsive for Checkbox Group */
@media (max-width: 768px) {
    .checkbox-group {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .checkbox-item {
        padding: 0.875rem 1rem;
    }
    
    .checkbox-item span {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .checkbox-group {
        gap: 0.5rem;
    }
    
    .checkbox-item {
        padding: 0.75rem 0.875rem;
    }
    
    .checkbox-item input[type="checkbox"] {
        width: 18px;
        height: 18px;
    }
    
    .checkbox-item span {
        font-size: 0.85rem;
    }
}

/* Input with Unit Styling - Fixed Width Distribution */
.input-with-unit {
    display: flex;
    align-items: stretch;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    background: white;
    border: 2px solid #e1e8ed;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.input-with-unit:hover {
    border-color: #b8c5d1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.input-with-unit:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(76, 175, 80, 0.12), 0 4px 16px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.input-with-unit input {
    flex: 2;
    min-width: 0;
    border: none;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    padding: 16px 18px;
    font-size: 1rem;
    color: var(--text-dark);
}

.input-with-unit input:focus {
    outline: none;
    box-shadow: none;
    border: none;
    transform: none;
}

.input-with-unit input:hover {
    border: none;
    box-shadow: none;
}

.input-with-unit select {
    flex: 0 0 80px;
    min-width: 80px;
    max-width: 100px;
    border: none;
    border-left: 1px solid #e9ecef;
    border-radius: 0;
    box-shadow: none;
    background: #f8fafb;
    padding: 16px 12px 16px 12px;
    font-size: 0.9rem;
    color: var(--text-dark);
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: center right 8px;
    background-size: 14px;
    cursor: pointer;
    text-align: center;
}

.input-with-unit select:focus {
    outline: none;
    box-shadow: none;
    border-left-color: var(--primary-color);
    background-color: #f0f8f0;
    transform: none;
}

.input-with-unit select:hover {
    border: none;
    border-left: 1px solid #d1d9e0;
    box-shadow: none;
}

.input-with-unit select {
    min-width: 80px;
    flex-shrink: 0;
}

/* Height Feet/Inches Special Input */
.height-ft-in {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
    padding: 16px;
    background: #f8fafb;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

.height-ft-in input {
    width: 70px;
    padding: 10px 12px;
    margin: 0;
    text-align: center;
    background: white;
}

.height-ft-in span {
    font-weight: 500;
    color: var(--text-light);
    font-size: 0.9rem;
    white-space: nowrap;
}



/* Calculate Button */
.calculate-btn {
    width: 100%;
    max-width: 320px;
    margin: 3rem auto 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 32px;
    font-size: 1.1rem;
    font-weight: 600;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border: none;
    border-radius: 12px;
    color: white;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(76, 175, 80, 0.3);
    position: relative;
    overflow: hidden;
}

.calculate-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s;
}

.calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(76, 175, 80, 0.4);
}

.calculate-btn:hover::before {
    left: 100%;
}

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

.calculate-btn i {
    font-size: 1.1rem;
}

/* Loading State */
.calculate-btn.loading {
    pointer-events: none;
    opacity: 0.8;
}

.calculate-btn.loading i {
    animation: spin 1s linear infinite;
}

/* Full Width Input Groups */
.input-group.full-width {
    grid-column: 1 / -1;
}

/* Results Section */
.results-section,
.faq-section {
    background: var(--bg-white);
    border-radius: 16px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
}



.calculate-btn {
    width: 100%;
    max-width: 300px;
    padding: 15px;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.calculate-note {
    color: var(--text-light);
    font-size: 0.9rem;
    margin: 0;
    font-style: italic;
}

/* Results Section */
.result-card {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: var(--border-radius);
    padding: 3rem;
    margin-bottom: 2rem;
    text-align: center;
}

.bmi-result {
    margin-bottom: 3rem;
}

.bmi-value {
    font-size: 4rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.bmi-category {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.bmi-description {
    color: var(--text-light);
    font-size: 1rem;
}

/* Next Steps Section */
.next-steps {
    background: var(--bg-light);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-top: 2rem;
}

.next-steps h3 {
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    text-align: center;
}

.next-steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.next-step-card {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    text-align: center;
    text-decoration: none;
    transition: var(--transition);
    border: 1px solid var(--border-color);
    display: block;
}

.next-step-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.next-step-card i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.next-step-card h4 {
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.next-step-card p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin: 0;
}

/* Responsive Design for Tool Pages */
@media (max-width: 1024px) {
    .intro-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .intro-features {
        max-width: 400px;
        margin: 2rem auto 0;
    }
}

/* ===== MOBILE RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .tool-intro,
    .calculator-section,
    .results-section,
    .faq-section {
        margin-bottom: 1.5rem;
    }
    
    /* Calculator Section Mobile */
    .calculator-section > h2 {
        padding: 1.5rem 1.5rem 1rem;
        font-size: 1.5rem;
    }
    
    .calculator {
        padding: 2rem 1.5rem;
    }
    
    /* Input Rows - Stack on Mobile */
    .input-row {
        grid-template-columns: 1fr;
        gap: 0;
        margin-bottom: 1rem;
    }
    
    .input-group {
        margin-bottom: 1.5rem;
    }
    
    /* Input with Unit - Better Mobile Layout */
    .input-with-unit {
        flex-direction: row;
        border-radius: 12px;
    }
    
    .input-with-unit input {
        flex: 2;
        min-width: 0;
        padding: 14px 16px;
    }
    
    /* Input with Unit Small Mobile */
    .input-with-unit {
        flex-direction: row;
    }
    
    .input-with-unit input {
        flex: 2;
        min-width: 0;
        padding: 12px 14px;
        font-size: 0.95rem;
    }
    
    .input-with-unit select {
        flex: 0 0 55px;
        min-width: 55px;
        max-width: 65px;
        padding: 12px 4px;
        font-size: 0.75rem;
        background-position: center right 3px;
        background-size: 9px;
    }
    
    /* Height Feet/Inches - Better Mobile Layout */
    .height-ft-in {
        flex-wrap: wrap;
        gap: 8px;
        padding: 12px;
    }
    
    .height-ft-in input {
        width: 60px;
        padding: 8px 10px;
    }
    
    /* Calculate Button Mobile */
    .calculate-btn {
        max-width: none;
        margin: 2rem auto 0;
        padding: 14px 24px;
        font-size: 1rem;
    }
    
    .intro-content {
        gap: 1.5rem;
    }
    
    .intro-features {
        margin-top: 1.5rem;
    }
    
    .feature-item {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }
    
    .bmi-value {
        font-size: 3rem;
    }
    
    .next-steps-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .section-header h2 {
        font-size: 1.75rem;
    }
}

@media (max-width: 480px) {
    .tool-intro,
    .calculator-section,
    .results-section,
    .faq-section {
        margin: 0 -10px 1rem;
        border-radius: 12px;
    }
    
    /* Calculator Section Small Mobile */
    .calculator-section > h2 {
        padding: 1.25rem 1rem 0.75rem;
        font-size: 1.3rem;
    }
    
    .calculator {
        padding: 1.5rem 1rem;
    }
    
    /* Inputs Small Mobile */
    .input-group {
        margin-bottom: 1.25rem;
    }
    
    .input-group input,
    .input-group select {
        padding: 12px 14px;
        font-size: 0.95rem;
    }
    
    .input-group label {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }
    
    /* Height Feet/Inches Small Mobile */
    .height-ft-in {
        padding: 10px;
        gap: 6px;
    }
    
    .height-ft-in input {
        width: 50px;
        padding: 6px 8px;
        font-size: 0.9rem;
    }
    
    .height-ft-in span {
        font-size: 0.8rem;
    }
    
    /* Calculate Button Small Mobile */
    .calculate-btn {
        padding: 12px 20px;
        font-size: 0.95rem;
        margin: 1.5rem auto 0;
    }
    
    .calculate-btn i {
        font-size: 1rem;
    }
    
    .result-card {
        padding: 2rem;
    }
    
    .bmi-value {
        font-size: 2.5rem;
    }
    
    .section-header h2 {
        font-size: 1.5rem;
    }
    
    .section-header p {
        font-size: 1rem;
    }
}

/* Calculator Styles */

.input-group {
    margin-bottom: 2rem;
    position: relative;
}

.input-group label {
    display: block;
    margin-bottom: 0.8rem;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 1rem;
    position: relative;
}

.input-group label::before {
    content: '';
    position: absolute;
    left: -12px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 16px;
    background: var(--primary-color);
    border-radius: 2px;
}

.input-with-unit {
    display: flex;
    gap: 0.75rem;
    align-items: stretch;
}

.input-with-unit input {
    flex: 1;
    padding: 14px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: var(--bg-white);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.input-with-unit input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(76, 175, 80, 0.1);
    transform: translateY(-1px);
}

.input-with-unit input:hover {
    border-color: #c5d1d8;
}

.input-with-unit select {
    padding: 14px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--bg-white);
    font-size: 1rem;
    cursor: pointer;
    min-width: 120px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.input-with-unit select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(76, 175, 80, 0.1);
}

.input-with-unit select:hover {
    border-color: #c5d1d8;
}

.height-ft-in {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.75rem;
    padding: 1rem;
    background: var(--bg-white);
    border-radius: 8px;
    border: 1px solid #e8ecf0;
}

.height-ft-in input {
    width: 80px;
    padding: 10px 12px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    text-align: center;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.height-ft-in input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.height-ft-in span {
    font-weight: 500;
    color: var(--text-light);
    font-size: 0.9rem;
}

.calculate-section {
    text-align: center;
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 2px solid #f0f4f7;
}

.calculate-btn {
    width: 100%;
    max-width: 280px;
    padding: 16px 24px;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
    position: relative;
    overflow: hidden;
}

.calculate-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.calculate-btn:hover::before {
    left: 100%;
}

.calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

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

.calculate-btn i {
    margin-right: 0.5rem;
    font-size: 1rem;
}

.calculate-note {
    color: var(--text-light);
    font-size: 0.85rem;
    margin: 0;
    font-style: italic;
    line-height: 1.4;
}

/* Input Validation States */
.input-group.error .input-with-unit input,
.input-group.error .input-with-unit select {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.input-group.success .input-with-unit input,
.input-group.success .input-with-unit select {
    border-color: #27ae60;
    box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.1);
}

.input-error-message {
    color: #e74c3c;
    font-size: 0.8rem;
    margin-top: 0.5rem;
    display: none;
}

.input-group.error .input-error-message {
    display: block;
}

/* ===== INPUT VALIDATION & FEEDBACK STATES ===== */
.input-group.error input,
.input-group.error select {
    border-color: #e74c3c;
    box-shadow: 0 0 0 4px rgba(231, 76, 60, 0.1);
}

.input-group.success input,
.input-group.success select {
    border-color: #27ae60;
    box-shadow: 0 0 0 4px rgba(39, 174, 96, 0.1);
}

.input-error-message {
    color: #e74c3c;
    font-size: 0.8rem;
    margin-top: 0.5rem;
    display: none;
    padding-left: 12px;
}

.input-group.error .input-error-message {
    display: block;
}

/* ===== ENHANCED INTERACTIONS ===== */
.input-group input:disabled,
.input-group select:disabled {
    background-color: #f8f9fa;
    color: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
}

.input-group input:invalid {
    border-color: #ffc107;
    box-shadow: 0 0 0 4px rgba(255, 193, 7, 0.1);
}

/* ===== LOADING ANIMATIONS ===== */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.calculate-btn.loading {
    animation: pulse 1.5s ease-in-out infinite;
}

/* ===== ACCESSIBILITY IMPROVEMENTS ===== */
.input-group input:focus-visible,
.input-group select:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* ===== DARK MODE SUPPORT (if needed) ===== */
@media (prefers-color-scheme: dark) {
    .calculator-section {
        background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
        border-color: #404040;
    }
    
    .calculator-section > h2 {
        background: linear-gradient(135deg, #2d2d2d 0%, #404040 100%);
        color: #ffffff;
        border-bottom-color: #404040;
    }
    
    .input-group input,
    .input-group select {
        background: #2d2d2d;
        border-color: #404040;
        color: #ffffff;
    }
    
    .input-group label {
        color: #ffffff;
    }
    
    .height-ft-in {
        background: #2d2d2d;
        border-color: #404040;
    }
    
    .height-ft-in input {
        background: #1a1a1a;
        color: #ffffff;
    }
}

/* Results Styles */
.result-card {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 2rem;
}

.bmi-result {
    text-align: center;
    margin-bottom: 2rem;
}

.bmi-value {
    font-size: 4rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
}

.bmi-category {
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

.bmi-chart {
    position: relative;
}

.bmi-scale {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.scale-item {
    padding: 1rem;
    text-align: center;
    color: var(--text-white);
    font-weight: 500;
}

.scale-item.underweight { background-color: #2196F3; }
.scale-item.normal { background-color: #4CAF50; }
.scale-item.overweight { background-color: #FF9800; }
.scale-item.obese { background-color: #F44336; }

.scale-item .range {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.scale-item .label {
    display: block;
    font-size: 0.8rem;
    opacity: 0.9;
}

.bmi-indicator {
    position: absolute;
    top: -10px;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 15px solid var(--text-dark);
    transition: var(--transition);
}

/* Recommendations */
.recommendations {
    background: var(--bg-light);
    border-radius: var(--border-radius);
    padding: 1.5rem;
}

.recommendations h3 {
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.recommendation-content {
    color: var(--text-light);
    line-height: 1.6;
}

.recommendation-content ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.recommendation-content li {
    margin-bottom: 0.5rem;
}

/* FAQ Styles */
.faq-section {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    padding: 3rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.faq-section h2 {
    color: var(--text-dark);
    margin-bottom: 2rem;
    text-align: center;
    font-size: 2rem;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-item {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
}

.faq-item:hover {
    box-shadow: var(--shadow);
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: var(--bg-light);
    cursor: pointer;
    transition: var(--transition);
    border: none;
    width: 100%;
    text-align: left;
}

.faq-question:hover {
    background: #e9ecef;
}

.faq-question h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-dark);
    font-weight: 600;
}

.faq-question i {
    color: var(--primary-color);
    transition: transform 0.3s ease;
    font-size: 1.2rem;
}

.faq-item.active .faq-question {
    background: var(--primary-color);
    color: var(--text-white);
}

.faq-item.active .faq-question h3 {
    color: var(--text-white);
}

.faq-item.active .faq-question i {
    color: var(--text-white);
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 1.5rem;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    background: var(--bg-white);
}

.faq-item.active .faq-answer {
    padding: 1.5rem;
    max-height: 300px;
}

.faq-answer p {
    margin: 0;
    color: var(--text-light);
    line-height: 1.6;
}

/* Sidebar Styles */
.tool-sidebar {
    position: sticky;
    top: 100px;
}

.related-tools,
.health-tip {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.related-tools h3,
.health-tip h3 {
    color: var(--text-dark);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
}

.tool-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tool-link-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: var(--border-radius);
    text-decoration: none;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.tool-link-card:hover {
    background: var(--bg-white);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.tool-link-card i {
    font-size: 1.5rem;
    color: var(--primary-color);
    min-width: 30px;
}

.tool-link-card h4 {
    margin: 0 0 0.25rem 0;
    color: var(--text-dark);
    font-size: 1rem;
}

.tool-link-card p {
    margin: 0;
    color: var(--text-light);
    font-size: 0.9rem;
}

.health-tip .tip-content {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.health-tip .tip-content i {
    color: var(--accent-color);
    font-size: 1.5rem;
    margin-top: 0.25rem;
}

.health-tip .tip-content p {
    margin: 0;
    color: var(--text-light);
    line-height: 1.6;
}

/* Calorie Calculator Specific Styles */
.input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.calorie-results {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.result-item {
    text-align: center;
    padding: 1.5rem;
    background: var(--bg-light);
    border-radius: var(--border-radius);
    border: 2px solid transparent;
    transition: var(--transition);
}

.result-item.primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--text-white);
    transform: scale(1.05);
}

.result-item.primary .result-label,
.result-item.primary .result-unit {
    color: rgba(255, 255, 255, 0.9);
}

.result-label {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.result-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1;
    margin-bottom: 0.25rem;
}

.result-item.primary .result-value {
    color: var(--text-white);
}

.result-unit {
    font-size: 0.8rem;
    color: var(--text-light);
    font-weight: 500;
}

.macros-breakdown {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}

.macros-breakdown h3 {
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    text-align: center;
}

.macro-bars {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.macro-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.macro-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.macro-name {
    font-weight: 600;
    color: var(--text-dark);
}

.macro-percentage {
    font-weight: 500;
    color: var(--text-light);
}

.macro-bar {
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.macro-fill {
    height: 100%;
    border-radius: 4px;
    transition: var(--transition);
}

.macro-fill.protein {
    background: linear-gradient(90deg, #FF6B6B, #FF8E8E);
}

.macro-fill.carbs {
    background: linear-gradient(90deg, #4ECDC4, #6EDDD6);
}

.macro-fill.fats {
    background: linear-gradient(90deg, #FFE66D, #FFF176);
}

.macro-details {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--text-light);
}

/* ===== SLEEP TRACKER SPECIFIC STYLES ===== */
/* Sleep Entry Form - Modern Redesign */
.sleep-entry {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafb 100%);
    border-radius: 20px;
    padding: 0;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

/* .sleep-entry::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #4a90e2, #7b68ee, #9b59b6);
} */

.sleep-entry .entry-form {
    padding: 3rem;
}

/* Form Row Layout */
.sleep-entry .form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2.5rem;
}

.sleep-entry .form-row:last-of-type {
    margin-bottom: 3rem;
}

/* Sleep Entry Input Groups */
.sleep-entry .input-group {
    position: relative;
}

.sleep-entry .input-group.full-width {
    grid-column: 1 / -1;
}

.sleep-entry .input-group label {
    display: block;
    margin-bottom: 0.875rem;
    font-weight: 700;
    color: var(--text-dark);
    font-size: 1rem;
    position: relative;
    padding-left: 16px;
}

.sleep-entry .input-group label::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 18px;
    background: linear-gradient(135deg, #4a90e2, #7b68ee);
    border-radius: 3px;
}

/* Enhanced Input Styling */
.sleep-entry .input-group input[type="date"],
.sleep-entry .input-group input[type="time"],
.sleep-entry .input-group input[type="number"],
.sleep-entry .input-group textarea {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #e1e8ed;
    border-radius: 14px;
    font-size: 1rem;
    font-family: inherit;
    background: #ffffff;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    color: var(--text-dark);
    line-height: 1.5;
}

.sleep-entry .input-group input:focus,
.sleep-entry .input-group textarea:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 0 4px rgba(74, 144, 226, 0.12), 0 6px 20px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.sleep-entry .input-group input:hover:not(:focus),
.sleep-entry .input-group textarea:hover:not(:focus) {
    border-color: #b8c5d1;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
}

/* Textarea Specific Styling */
.sleep-entry .input-group textarea {
    min-height: 120px;
    resize: vertical;
    font-family: inherit;
}

.sleep-entry .input-group textarea::placeholder {
    color: #9ca3af;
    font-style: italic;
}

/* Range Slider Styling */
.sleep-entry .input-group input[type="range"] {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(to right, #ff6b6b 0%, #feca57 50%, #48dbfb 100%);
    outline: none;
    padding: 0;
    margin: 16px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: none;
}

.sleep-entry .input-group input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4a90e2, #7b68ee);
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
    transition: all 0.3s ease;
}

.sleep-entry .input-group input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 6px 16px rgba(74, 144, 226, 0.4);
}

.sleep-entry .input-group input[type="range"]::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4a90e2, #7b68ee);
    cursor: pointer;
    border: none;
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
}

/* Range Labels */
.sleep-entry .range-labels {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    font-size: 0.9rem;
    color: var(--text-light);
}

.sleep-entry .range-labels #quality-value {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--primary-color);
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.1), rgba(123, 104, 238, 0.1));
    padding: 4px 12px;
    border-radius: 12px;
    border: 1px solid rgba(74, 144, 226, 0.2);
}

/* Sleep Factors Styling */
.sleep-entry .sleep-factors {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.sleep-entry .factor-checkbox {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: #ffffff;
    border: 2px solid #e1e8ed;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.sleep-entry .factor-checkbox:hover {
    border-color: #4a90e2;
    box-shadow: 0 4px 16px rgba(74, 144, 226, 0.12);
    transform: translateY(-2px);
}

.sleep-entry .factor-checkbox.checked {
    border-color: #4a90e2;
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.08), rgba(123, 104, 238, 0.08));
    box-shadow: 0 4px 16px rgba(74, 144, 226, 0.15);
}

.sleep-entry .factor-checkbox.checked::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(135deg, #4a90e2, #7b68ee);
}

/* Custom Checkbox Styling */
.sleep-entry .factor-checkbox input[type="checkbox"] {
    width: 22px;
    height: 22px;
    margin: 0;
    appearance: none;
    border: 2px solid #d1d9e0;
    border-radius: 8px;
    background: #ffffff;
    cursor: pointer;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.sleep-entry .factor-checkbox input[type="checkbox"]:hover {
    border-color: #4a90e2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.sleep-entry .factor-checkbox input[type="checkbox"]:checked {
    background: linear-gradient(135deg, #4a90e2, #7b68ee);
    border-color: #4a90e2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.15);
}

.sleep-entry .factor-checkbox input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 14px;
    font-weight: bold;
    line-height: 1;
}

/* Checkbox Label Text */
.sleep-entry .factor-checkbox span {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-dark);
    transition: color 0.3s ease;
    user-select: none;
    line-height: 1.4;
}

.sleep-entry .factor-checkbox.checked span {
    color: #4a90e2;
    font-weight: 600;
}

/* Submit Button */
.sleep-entry .btn.btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
    padding: 18px 36px;
    font-size: 1.1rem;
    font-weight: 700;
    background: linear-gradient(135deg, #4a90e2 0%, #7b68ee 100%);
    border: none;
    border-radius: 14px;
    color: white;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 6px 20px rgba(74, 144, 226, 0.3);
    position: relative;
    overflow: hidden;
}

.sleep-entry .btn.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s;
}

.sleep-entry .btn.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(74, 144, 226, 0.4);
    background: linear-gradient(135deg, #7b68ee 0%, #4a90e2 100%);
}

.sleep-entry .btn.btn-primary:hover::before {
    left: 100%;
}

.sleep-entry .btn.btn-primary:active {
    transform: translateY(-1px);
}

.sleep-entry .btn.btn-primary i {
    font-size: 1.1rem;
}

/* Mobile Responsive for Sleep Entry */
@media (max-width: 768px) {
    .sleep-entry .entry-form {
        padding: 2rem;
    }
    
    .sleep-entry .form-row {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-bottom: 2rem;
    }
    
    .sleep-entry .input-group input,
    .sleep-entry .input-group textarea {
        padding: 14px 16px;
        font-size: 0.95rem;
    }
    
    .sleep-entry .sleep-factors {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .sleep-entry .factor-checkbox {
        padding: 0.875rem 1rem;
    }
    
    .sleep-entry .btn.btn-primary {
        max-width: none;
        padding: 16px 24px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .sleep-entry .entry-form {
        padding: 1.5rem;
    }
    
    .sleep-entry .form-row {
        gap: 1.25rem;
        margin-bottom: 1.5rem;
    }
    
    .sleep-entry .input-group input,
    .sleep-entry .input-group textarea {
        padding: 12px 14px;
        font-size: 0.9rem;
    }
    
    .sleep-entry .input-group label {
        font-size: 0.9rem;
        margin-bottom: 0.75rem;
    }
    
    .sleep-entry .factor-checkbox {
        padding: 0.75rem 0.875rem;
    }
    
    .sleep-entry .factor-checkbox span {
        font-size: 0.9rem;
    }
    
    .sleep-entry .btn.btn-primary {
        padding: 14px 20px;
        font-size: 0.95rem;
    }
    
    .sleep-entry .range-labels {
        font-size: 0.8rem;
    }
    
    .sleep-entry .range-labels #quality-value {
        font-size: 1rem;
        padding: 3px 10px;
    }
}

/* ===== SLEEP ANALYSIS SECTION REDESIGN ===== */
/* Sleep Stats Cards - Modern Grid Layout */
.sleep-stats {
    margin-bottom: 3rem;
}

.stat-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafb 100%);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #4a90e2, #7b68ee, #9b59b6);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(74, 144, 226, 0.15);
}

.stat-card:nth-child(1)::before {
    background: linear-gradient(90deg, #4a90e2, #5ba3f5);
}

.stat-card:nth-child(2)::before {
    background: linear-gradient(90deg, #7b68ee, #9575ff);
}

.stat-card:nth-child(3)::before {
    background: linear-gradient(90deg, #9b59b6, #ba68c8);
}

.stat-card:nth-child(4)::before {
    background: linear-gradient(90deg, #26c6da, #4dd0e1);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    position: relative;
    transition: all 0.3s ease;
}

.stat-card:nth-child(1) .stat-icon {
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.1), rgba(91, 163, 245, 0.1));
    border: 2px solid rgba(74, 144, 226, 0.2);
}

.stat-card:nth-child(2) .stat-icon {
    background: linear-gradient(135deg, rgba(123, 104, 238, 0.1), rgba(149, 117, 255, 0.1));
    border: 2px solid rgba(123, 104, 238, 0.2);
}

.stat-card:nth-child(3) .stat-icon {
    background: linear-gradient(135deg, rgba(155, 89, 182, 0.1), rgba(186, 104, 200, 0.1));
    border: 2px solid rgba(155, 89, 182, 0.2);
}

.stat-card:nth-child(4) .stat-icon {
    background: linear-gradient(135deg, rgba(38, 198, 218, 0.1), rgba(77, 208, 225, 0.1));
    border: 2px solid rgba(38, 198, 218, 0.2);
}

.stat-card:hover .stat-icon {
    transform: scale(1.1) rotate(5deg);
}

.stat-icon i {
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.stat-card:nth-child(1) .stat-icon i {
    color: #4a90e2;
}

.stat-card:nth-child(2) .stat-icon i {
    color: #7b68ee;
}

.stat-card:nth-child(3) .stat-icon i {
    color: #9b59b6;
}

.stat-card:nth-child(4) .stat-icon i {
    color: #26c6da;
}

.stat-info {
    text-align: left;
}

.stat-number {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1.2;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--text-dark), #6c757d);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-light);
    line-height: 1.4;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Sleep Chart Container - Enhanced Design */
.sleep-chart-container {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafb 100%);
    border-radius: 20px;
    padding: 2.5rem;
    margin-bottom: 2.5rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.sleep-chart-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #4a90e2, #7b68ee, #9b59b6, #26c6da);
}

.sleep-chart-container h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 2rem;
    text-align: center;
    position: relative;
    padding-bottom: 1rem;
}

.sleep-chart-container h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #4a90e2, #7b68ee);
    border-radius: 2px;
}

/* Enhanced Sleep Chart */
.sleep-chart {
    display: flex;
    justify-content: space-around;
    align-items: end;
    height: 280px;
    padding: 30px 20px 20px;
    background: linear-gradient(135deg, #f8fafb 0%, #e9ecef 100%);
    border-radius: 16px;
    margin: 20px 0;
    position: relative;
    overflow: hidden;
}

.sleep-chart::before {
    content: '';
    position: absolute;
    bottom: 60px;
    left: 20px;
    right: 20px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(74, 144, 226, 0.3), transparent);
}

/* Chart Grid Lines */
.sleep-chart::after {
    content: '';
    position: absolute;
    bottom: 60px;
    left: 20px;
    right: 20px;
    height: 160px;
    background-image: 
        linear-gradient(to top, rgba(74, 144, 226, 0.1) 1px, transparent 1px),
        linear-gradient(to top, rgba(74, 144, 226, 0.05) 1px, transparent 1px);
    background-size: 100% 40px, 100% 20px;
    pointer-events: none;
}

.chart-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    position: relative;
    flex: 1;
    max-width: 80px;
}

.day-label {
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.sleep-bar {
    width: 36px;
    background: linear-gradient(135deg, #4a90e2, #7b68ee);
    border-radius: 8px 8px 0 0;
    min-height: 30px;
    max-height: 200px;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.2);
    cursor: pointer;
}

.sleep-bar:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 24px rgba(74, 144, 226, 0.3);
    background: linear-gradient(135deg, #7b68ee, #4a90e2);
}

/* Bar Animation */
.sleep-bar {
    animation: barGrow 0.8s ease-out;
    animation-fill-mode: both;
}

.chart-day:nth-child(1) .sleep-bar { animation-delay: 0.1s; }
.chart-day:nth-child(2) .sleep-bar { animation-delay: 0.2s; }
.chart-day:nth-child(3) .sleep-bar { animation-delay: 0.3s; }
.chart-day:nth-child(4) .sleep-bar { animation-delay: 0.4s; }
.chart-day:nth-child(5) .sleep-bar { animation-delay: 0.5s; }
.chart-day:nth-child(6) .sleep-bar { animation-delay: 0.6s; }
.chart-day:nth-child(7) .sleep-bar { animation-delay: 0.7s; }

@keyframes barGrow {
    0% {
        height: 0;
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

.duration-label {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem;
    color: var(--text-dark);
    font-weight: 700;
    white-space: nowrap;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.95);
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid rgba(74, 144, 226, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transition: all 0.3s ease;
}

.sleep-bar:hover .duration-label {
    opacity: 1;
    transform: translateX(-50%) translateY(-4px);
}

.quality-indicator {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 12px;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    min-width: 32px;
    text-align: center;
}

.chart-day:hover .quality-indicator {
    transform: scale(1.1);
}

.quality-indicator.quality-1,
.quality-indicator.quality-2,
.quality-indicator.quality-3 {
    background: linear-gradient(135deg, #ff6b6b, #ff5252);
}

.quality-indicator.quality-4,
.quality-indicator.quality-5,
.quality-indicator.quality-6 {
    background: linear-gradient(135deg, #feca57, #ffb74d);
}

.quality-indicator.quality-7,
.quality-indicator.quality-8,
.quality-indicator.quality-9,
.quality-indicator.quality-10 {
    background: linear-gradient(135deg, #48dbfb, #26c6da);
}

/* Empty State for Sleep Chart */
.sleep-chart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 280px;
    padding: 40px;
    background: linear-gradient(135deg, #f8fafb 0%, #e9ecef 100%);
    border-radius: 16px;
    margin: 20px 0;
    border: 2px dashed rgba(74, 144, 226, 0.3);
}

.sleep-chart-empty .empty-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.1), rgba(123, 104, 238, 0.1));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    border: 2px solid rgba(74, 144, 226, 0.2);
}

.sleep-chart-empty .empty-icon i {
    font-size: 2rem;
    color: #4a90e2;
}

.sleep-chart-empty .empty-text {
    text-align: center;
    color: var(--text-light);
}

.sleep-chart-empty .empty-text h4 {
    margin: 0 0 8px 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
}

.sleep-chart-empty .empty-text p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Chart Legend */
.chart-legend {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 20px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 12px;
    border: 1px solid rgba(74, 144, 226, 0.1);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 500;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.legend-color.duration {
    background: linear-gradient(135deg, #4a90e2, #7b68ee);
}

.legend-color.quality-good {
    background: linear-gradient(135deg, #48dbfb, #26c6da);
}

.legend-color.quality-average {
    background: linear-gradient(135deg, #feca57, #ffb74d);
}

.legend-color.quality-poor {
    background: linear-gradient(135deg, #ff6b6b, #ff5252);
}

/* Mobile Responsive for Sleep Chart */
@media (max-width: 768px) {
    .sleep-chart {
        height: 220px;
        padding: 20px 15px 15px;
    }
    
    .sleep-chart::after {
        height: 120px;
        background-size: 100% 30px, 100% 15px;
    }
    
    .chart-day {
        max-width: 60px;
    }
    
    .sleep-bar {
        width: 28px;
        max-height: 140px;
    }
    
    .duration-label {
        font-size: 0.7rem;
        padding: 3px 6px;
    }
    
    .quality-indicator {
        font-size: 0.7rem;
        padding: 3px 6px;
        min-width: 28px;
    }
    
    .day-label {
        font-size: 0.75rem;
    }
    
    .chart-legend {
        gap: 16px;
        flex-wrap: wrap;
    }
    
    .legend-item {
        font-size: 0.8rem;
    }
    
    .legend-color {
        width: 14px;
        height: 14px;
    }
    
    .sleep-chart-empty {
        height: 220px;
        padding: 30px 20px;
    }
    
    .sleep-chart-empty .empty-icon {
        width: 60px;
        height: 60px;
        margin-bottom: 16px;
    }
    
    .sleep-chart-empty .empty-icon i {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .sleep-chart {
        height: 200px;
        padding: 15px 10px 10px;
    }
    
    .sleep-chart::after {
        height: 100px;
        background-size: 100% 25px, 100% 12px;
    }
    
    .chart-day {
        max-width: 45px;
        gap: 8px;
    }
    
    .sleep-bar {
        width: 24px;
        max-height: 120px;
    }
    
    .duration-label {
        font-size: 0.65rem;
        padding: 2px 4px;
        margin-bottom: 6px;
    }
    
    .quality-indicator {
        font-size: 0.65rem;
        padding: 2px 5px;
        min-width: 24px;
    }
    
    .day-label {
        font-size: 0.7rem;
    }
    
    .chart-legend {
        gap: 12px;
        padding: 12px;
    }
    
    .legend-item {
        font-size: 0.75rem;
    }
    
    .legend-color {
        width: 12px;
        height: 12px;
    }
    
    .sleep-chart-empty {
        height: 200px;
        padding: 25px 15px;
    }
    
    .sleep-chart-empty .empty-icon {
        width: 50px;
        height: 50px;
        margin-bottom: 12px;
    }
    
    .sleep-chart-empty .empty-icon i {
        font-size: 1.3rem;
    }
    
    .sleep-chart-empty .empty-text h4 {
        font-size: 1rem;
    }
    
    .sleep-chart-empty .empty-text p {
        font-size: 0.85rem;
    }
}

/* Sleep Recommendations - Enhanced Design */
.sleep-recommendations {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafb 100%);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.sleep-recommendations::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #26c6da, #4dd0e1, #80deea);
}

.sleep-recommendations h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 2rem;
    text-align: center;
    position: relative;
    padding-bottom: 1rem;
}

.sleep-recommendations h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #26c6da, #4dd0e1);
    border-radius: 2px;
}

/* Mobile Responsive for Sleep Analysis */
@media (max-width: 768px) {
    .stat-cards {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1rem;
    }
    
    .stat-card {
        padding: 1.5rem;
    }
    
    .stat-icon {
        width: 48px;
        height: 48px;
        margin-bottom: 1rem;
    }
    
    .stat-icon i {
        font-size: 1.3rem;
    }
    
    .stat-number {
        font-size: 1.8rem;
    }
    
    .stat-label {
        font-size: 0.85rem;
    }
    
    .sleep-chart-container,
    .sleep-recommendations {
        padding: 2rem;
    }
    
    .sleep-chart {
        height: 200px;
        padding: 15px;
    }
    
    .sleep-bar {
        width: 28px;
    }
    
    .duration-label {
        font-size: 0.7rem;
    }
    
    .quality-indicator {
        font-size: 0.7rem;
        padding: 3px 6px;
    }
}

@media (max-width: 480px) {
    .stat-cards {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .stat-card {
        padding: 1.25rem;
    }
    
    .stat-icon {
        width: 40px;
        height: 40px;
        margin-bottom: 0.75rem;
    }
    
    .stat-icon i {
        font-size: 1.1rem;
    }
    
    .stat-number {
        font-size: 1.6rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
    
    .sleep-chart-container,
    .sleep-recommendations {
        padding: 1.5rem;
    }
    
    .sleep-chart-container h3,
    .sleep-recommendations h3 {
        font-size: 1.3rem;
        margin-bottom: 1.5rem;
    }
    
    .sleep-chart {
        height: 180px;
        padding: 12px;
    }
    
    .sleep-bar {
        width: 24px;
    }
    
    .day-label {
        font-size: 0.75rem;
    }
    
    .duration-label {
        font-size: 0.65rem;
        padding: 1px 4px;
    }
    
    .quality-indicator {
        font-size: 0.65rem;
        padding: 2px 5px;
    }
}

/* ===== SLEEP TRACKER CUSTOM MODAL ===== */
.sleep-confirm-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sleep-confirm-modal.show {
    opacity: 1;
    visibility: visible;
}

.sleep-confirm-modal.closing {
    opacity: 0;
    visibility: hidden;
}

.sleep-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.sleep-modal-container {
    position: relative;
    z-index: 1;
    max-width: 480px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sleep-confirm-modal.show .sleep-modal-container {
    transform: scale(1) translateY(0);
}

.sleep-modal-content {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.sleep-modal-header {
    padding: 24px 24px 16px;
    border-bottom: 1px solid #e9ecef;
    background: linear-gradient(135deg, #f8fafb 0%, #e9ecef 100%);
}

.sleep-modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
    text-align: center;
}

.sleep-modal-body {
    padding: 24px;
    text-align: center;
}

.sleep-modal-body p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-light);
}

.sleep-modal-footer {
    padding: 16px 24px 24px;
    display: flex;
    gap: 12px;
    justify-content: center;
}

.sleep-modal-btn {
    padding: 12px 32px;
    border: none;
    border-radius: 25px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 100px;
    position: relative;
    overflow: hidden;
}

.sleep-modal-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s;
}

.sleep-modal-btn:hover::before {
    left: 100%;
}

.sleep-modal-btn-cancel {
    background: #f8f9fa;
    color: #6c757d;
    border: 2px solid #e9ecef;
}

.sleep-modal-btn-cancel:hover {
    background: #e9ecef;
    color: #495057;
    border-color: #dee2e6;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.sleep-modal-btn-confirm {
    background: linear-gradient(135deg, #4a90e2 0%, #7b68ee 100%);
    color: white;
    border: 2px solid transparent;
    box-shadow: 0 4px 16px rgba(74, 144, 226, 0.3);
}

.sleep-modal-btn-confirm:hover {
    background: linear-gradient(135deg, #7b68ee 0%, #4a90e2 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 144, 226, 0.4);
}

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

/* Mobile responsive for modal */
@media (max-width: 768px) {
    .sleep-modal-container {
        width: 95%;
        max-width: none;
    }
    
    .sleep-modal-header {
        padding: 20px 20px 12px;
    }
    
    .sleep-modal-header h3 {
        font-size: 1.1rem;
    }
    
    .sleep-modal-body {
        padding: 20px;
    }
    
    .sleep-modal-body p {
        font-size: 0.95rem;
    }
    
    .sleep-modal-footer {
        padding: 12px 20px 20px;
        flex-direction: column;
    }
    
    .sleep-modal-btn {
        width: 100%;
        padding: 14px 24px;
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .sleep-modal-container {
        width: 98%;
    }
    
    .sleep-modal-header {
        padding: 16px 16px 8px;
    }
    
    .sleep-modal-body {
        padding: 16px;
    }
    
    .sleep-modal-footer {
        padding: 8px 16px 16px;
        gap: 8px;
    }
    
    .sleep-modal-btn {
        padding: 12px 20px;
        font-size: 0.9rem;
    }
}

/* ===== SLEEP TRACKER TOAST NOTIFICATIONS ===== */
.sleep-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    max-width: 400px;
    min-width: 300px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    border: 1px solid #e9ecef;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sleep-toast.show {
    transform: translateX(0);
    opacity: 1;
}

.sleep-toast-content {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    position: relative;
}

.sleep-toast-success {
    border-left: 4px solid #28a745;
}

.sleep-toast-error {
    border-left: 4px solid #dc3545;
}

.sleep-toast-info {
    border-left: 4px solid #4a90e2;
}

.sleep-toast-success .sleep-toast-content i {
    color: #28a745;
    font-size: 1.2rem;
}

.sleep-toast-error .sleep-toast-content i {
    color: #dc3545;
    font-size: 1.2rem;
}

.sleep-toast-info .sleep-toast-content i {
    color: #4a90e2;
    font-size: 1.2rem;
}

.sleep-toast-content span {
    flex: 1;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-dark);
    line-height: 1.4;
}

.sleep-toast-close {
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.sleep-toast-close:hover {
    background: #f8f9fa;
    color: var(--text-dark);
}

.sleep-toast-close i {
    font-size: 0.8rem;
}

/* Sleep Preview Styles - Enhanced visibility */
.sleep-preview {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, #ffffff 0%, #f0f8ff 100%);
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    border: 2px solid #e1e8ed;
    position: relative;
    overflow: hidden;
}

.sleep-preview::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.sleep-preview p {
    color: #2c3e50 !important;
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    margin: 1.5rem 0 0 0 !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) !important;
    background: none !important;
    -webkit-background-clip: unset !important;
    -webkit-text-fill-color: unset !important;
    background-clip: unset !important;
    padding: 0.75rem 1rem;
    background-color: rgba(76, 175, 80, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

/* Sleep Chart Styles */
.sleep-chart {
    display: flex;
    justify-content: space-around;
    align-items: end;
    height: 200px;
    padding: 20px;
    background: linear-gradient(135deg, #f8fafb 0%, #e9ecef 100%);
    border-radius: 12px;
    margin: 20px 0;
}

.chart-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.day-label {
    font-size: 0.9rem !important;
    color: #2c3e50 !important;
    font-weight: 600 !important;
    background: rgba(255, 255, 255, 0.8);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.sleep-bar {
    width: 30px;
    background: linear-gradient(135deg, #4a90e2, #7b68ee);
    border-radius: 6px 6px 0 0;
    min-height: 20px;
    position: relative;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.3);
}

.sleep-bar:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.4);
}

.sleep-bar span {
    color: #ffffff !important;
    font-weight: 700 !important;
    font-size: 0.8rem !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5) !important;
}

.duration-label {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.8rem !important;
    color: #2c3e50 !important;
    font-weight: 700 !important;
    white-space: nowrap;
    margin-bottom: 6px;
    background: rgba(255, 255, 255, 0.9);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.quality-indicator {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 8px;
    color: white;
}

.quality-indicator.quality-1,
.quality-indicator.quality-2,
.quality-indicator.quality-3 {
    background: #ff6b6b;
}

.quality-indicator.quality-4,
.quality-indicator.quality-5,
.quality-indicator.quality-6 {
    background: #feca57;
}

.quality-indicator.quality-7,
.quality-indicator.quality-8,
.quality-indicator.quality-9,
.quality-indicator.quality-10 {
    background: #48dbfb;
}

/* Sleep History Styles */
.history-entry {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.history-entry:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.entry-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e9ecef;
}

.entry-date {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 1.1rem;
    flex: 1;
}

.entry-actions {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

.btn-edit,
.btn-delete {
    background: none;
    border: none;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
}

.btn-edit {
    color: #4a90e2;
}

.btn-edit:hover {
    background: rgba(74, 144, 226, 0.1);
    color: #3a7bc8;
    transform: scale(1.1);
}

.btn-delete {
    color: #dc3545;
}

.btn-delete:hover {
    background: rgba(220, 53, 69, 0.1);
    color: #c82333;
    transform: scale(1.1);
}

.entry-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.detail-item .label {
    font-weight: 500;
    color: var(--text-light);
    font-size: 0.9rem;
}

.detail-item .value {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.9rem;
}

/* Recommendation Styles */
.recommendation-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid #e9ecef;
}

.rec-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #4a90e2, #7b68ee);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.rec-content h4 {
    margin: 0 0 8px 0;
    color: var(--text-dark);
    font-size: 1.1rem;
}

.rec-content p {
    margin: 0;
    color: var(--text-light);
    line-height: 1.5;
    font-size: 0.95rem;
}

/* Mobile responsive for sleep tracker */
@media (max-width: 768px) {
    .sleep-preview {
        padding: 1.5rem;
        margin: 1rem 0;
    }
    
    .sleep-preview p {
        font-size: 1rem !important;
        margin: 1rem 0 0 0 !important;
        padding: 0.5rem 0.75rem !important;
    }
    
    .sleep-toast {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
        min-width: auto;
    }
    
    .sleep-chart {
        height: 150px;
        padding: 15px;
    }
    
    .entry-details {
        grid-template-columns: 1fr;
    }
    
    .recommendation-item {
        padding: 16px;
    }
    
    .rec-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .sleep-preview {
        padding: 1.25rem;
        margin: 0.75rem 0;
    }
    
    .sleep-preview p {
        font-size: 0.95rem !important;
        margin: 0.75rem 0 0 0 !important;
        padding: 0.5rem !important;
    }
}

/* ===== HABIT TRACKER TOAST NOTIFICATIONS ===== */
.habit-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    max-width: 400px;
    min-width: 300px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    border: 1px solid #e9ecef;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.habit-toast.show {
    transform: translateX(0);
    opacity: 1;
}

.habit-toast-content {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    position: relative;
}

.habit-toast-success {
    border-left: 4px solid #28a745;
}

.habit-toast-error {
    border-left: 4px solid #dc3545;
}

.habit-toast-info {
    border-left: 4px solid #17a2b8;
}

.habit-toast-success .habit-toast-content i {
    color: #28a745;
    font-size: 1.2rem;
}

.habit-toast-error .habit-toast-content i {
    color: #dc3545;
    font-size: 1.2rem;
}

.habit-toast-info .habit-toast-content i {
    color: #17a2b8;
    font-size: 1.2rem;
}

.habit-toast-content span {
    flex: 1;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-dark);
    line-height: 1.4;
}

.habit-toast-close {
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.habit-toast-close:hover {
    background: #f8f9fa;
    color: var(--text-dark);
}

.habit-toast-close i {
    font-size: 0.8rem;
}

/* Mobile responsive for toast */
@media (max-width: 768px) {
    .habit-toast {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
        min-width: auto;
    }
    
    .habit-toast-content {
        padding: 14px 16px;
        gap: 10px;
    }
    
    .habit-toast-content span {
        font-size: 0.9rem;
    }
}

/* ===== HABIT TRACKER SPECIFIC STYLES ===== */
/* Habit Setup Section */
.habit-setup {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

/* Popular Habits Section */
.popular-habits h3,
.custom-habit h3 {
    color: var(--text-dark);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid var(--primary-color);
    position: relative;
}

.popular-habits h3::after,
.custom-habit h3::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

/* Habit Grid Layout */
.habit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Individual Habit Option Cards */
.habit-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafb 100%);
    border: 2px solid #e1e8ed;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.habit-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.habit-option:hover {
    border-color: var(--primary-color);
    box-shadow: 0 8px 24px rgba(76, 175, 80, 0.15);
    transform: translateY(-2px);
}

.habit-option:hover::before {
    transform: scaleY(1);
}

.habit-option.selected {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, #f0f8f0 0%, #e8f5e8 100%);
    box-shadow: 0 8px 24px rgba(76, 175, 80, 0.2);
    transform: translateY(-2px);
}

.habit-option.selected::before {
    transform: scaleY(1);
}

.habit-option.selected::after {
    content: '✓';
    position: absolute;
    top: 12px;
    right: 12px;
    width: 24px;
    height: 24px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    animation: checkmark 0.3s ease-out;
}

@keyframes checkmark {
    0% {
        transform: scale(0) rotate(180deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.2) rotate(360deg);
        opacity: 1;
    }
    100% {
        transform: scale(1) rotate(360deg);
        opacity: 1;
    }
}

/* Habit Option Icons - Enhanced Styling */
.habit-option i {
    font-size: 2.2rem;
    color: var(--primary-color);
    min-width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.1), rgba(139, 195, 74, 0.1));
    border-radius: 12px;
    border: 2px solid rgba(76, 175, 80, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.habit-option:hover i {
    color: var(--secondary-color);
    background: linear-gradient(135deg, rgba(139, 195, 74, 0.15), rgba(76, 175, 80, 0.15));
    border-color: rgba(139, 195, 74, 0.4);
    transform: scale(1.05) rotate(5deg);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.2);
}

.habit-option.selected i {
    color: white;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-color: var(--primary-color);
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(76, 175, 80, 0.3);
}

.habit-option.selected::after {
    content: '✓';
    position: absolute;
    top: 12px;
    right: 12px;
    width: 24px;
    height: 24px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    animation: checkmark 0.3s ease-out;
}

/* Habit Option Text */
.habit-option span {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    line-height: 1.4;
    transition: color 0.3s ease;
}

.habit-option:hover span {
    color: var(--primary-color);
}

.habit-option.selected span {
    color: var(--primary-color);
}

/* Custom Habit Section */
.custom-habit {
    background: linear-gradient(135deg, #f8fafb 0%, #f0f4f7 100%);
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid #e9ecef;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.custom-habit .input-group {
    margin-bottom: 1.5rem;
}

.custom-habit .input-group:last-of-type {
    margin-bottom: 2rem;
}

.custom-habit label {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
    display: block;
}

.custom-habit input,
.custom-habit select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e1e8ed;
    border-radius: 12px;
    font-size: 1rem;
    background: #ffffff;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.custom-habit input:focus,
.custom-habit select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(76, 175, 80, 0.12);
}

.custom-habit input::placeholder {
    color: #9ca3af;
    font-style: italic;
}

.custom-habit select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 18px;
    padding-right: 48px;
    cursor: pointer;
}

/* Custom Habit Button */
.custom-habit .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    max-width: 280px;
    padding: 14px 24px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    text-decoration: none;
    margin: 0 auto;
}

.custom-habit .btn.btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

.custom-habit .btn.btn-secondary:hover {
    background: linear-gradient(135deg, #5a6268 0%, #495057 100%);
    box-shadow: 0 6px 16px rgba(108, 117, 125, 0.4);
    transform: translateY(-2px);
}

.custom-habit .btn i {
    font-size: 1rem;
}

/* Selected Habits Section */
.selected-habits {
    background: linear-gradient(135deg, #e8f5e8 0%, #f0f8f0 100%);
    border-radius: 16px;
    padding: 2rem;
    border: 2px solid var(--primary-color);
    box-shadow: 0 8px 24px rgba(76, 175, 80, 0.15);
    margin-top: 2rem;
}

.selected-habits h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-align: center;
}

.habits-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
    justify-content: center;
}

/* Selected Habit Items - Enhanced Black Icon Styling */
.selected-habit-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    background: white;
    border: 2px solid var(--primary-color);
    border-radius: 25px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.15);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.selected-habit-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.selected-habit-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.25);
    border-color: var(--secondary-color);
}

.selected-habit-item i {
    font-size: 1.2rem;
    color: var(--primary-color);
    min-width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.1), rgba(139, 195, 74, 0.1));
    border-radius: 8px;
    border: 1px solid rgba(76, 175, 80, 0.3);
    transition: all 0.3s ease;
}

.selected-habit-item:hover i {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    transform: scale(1.1) rotate(10deg);
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.selected-habit-item span {
    font-weight: 600;
    color: var(--text-dark);
    transition: color 0.3s ease;
}

.selected-habit-item:hover span {
    color: var(--primary-color);
}

.selected-habit-item .remove-habit {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    margin-left: 0.5rem;
}

.selected-habit-item .remove-habit:hover {
    background: #dc3545;
    color: white;
    transform: scale(1.1);
}

.selected-habit-item .remove-habit i {
    font-size: 0.8rem;
    background: none;
    border: none;
    min-width: auto;
    height: auto;
    color: inherit;
}

.selected-habit-item .remove-habit:hover i {
    background: none;
    transform: none;
    box-shadow: none;
}

/* Legacy habit-tag styling for compatibility */
.habits-list .habit-tag {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: white;
    border: 1px solid var(--primary-color);
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.1);
}

.habits-list .habit-tag i {
    font-size: 1rem;
}

.selected-habits .btn.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    box-shadow: 0 4px 16px rgba(76, 175, 80, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    max-width: 300px;
    padding: 16px 32px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0 auto;
}

.selected-habits .btn.btn-primary:hover {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
    transform: translateY(-2px);
}

/* Habit Preview in Intro Section */
.habit-preview {
    text-align: center;
    padding: 2rem;
    background: var(--bg-white);
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
}

.preview-habits {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.habit-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f8fafb;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.habit-item.completed {
    background: linear-gradient(135deg, #e8f5e8 0%, #f0f8f0 100%);
    border-color: var(--primary-color);
}

.habit-item.completed i {
    color: white;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.2);
}

.habit-item i {
    font-size: 1.4rem;
    color: var(--primary-color);
    min-width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.1), rgba(139, 195, 74, 0.1));
    border-radius: 8px;
    border: 1px solid rgba(76, 175, 80, 0.2);
    transition: all 0.3s ease;
}

.habit-item span {
    flex: 1;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-dark);
    text-align: left;
}

.habit-streak {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary-color);
    background: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    border: 1px solid var(--primary-color);
}

.habit-preview p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin: 0;
    font-style: italic;
}

/* Mobile Responsive for Habit Tracker */
@media (max-width: 768px) {
    .habit-setup {
        gap: 2rem;
    }
    
    .habit-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .habit-option {
        padding: 1.25rem;
    }
    
    .habit-option i {
        font-size: 1.75rem;
        min-width: 35px;
    }
    
    .habit-option span {
        font-size: 0.95rem;
    }
    
    .custom-habit {
        padding: 1.5rem;
    }
    
    .selected-habits {
        padding: 1.5rem;
    }
    
    .habits-list {
        justify-content: flex-start;
    }
    
    .selected-habit-item {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
        gap: 0.5rem;
    }
    
    .selected-habit-item i {
        font-size: 1.1rem;
        min-width: 24px;
        height: 24px;
    }
    
    .habit-preview {
        padding: 1.5rem;
    }
    
    .preview-habits {
        gap: 0.75rem;
    }
    
    .habit-item {
        padding: 0.875rem;
    }
}

@media (max-width: 480px) {
    .habit-setup {
        gap: 1.5rem;
    }
    
    .habit-option {
        padding: 1rem;
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }
    
    .habit-option i {
        font-size: 2rem;
        min-width: auto;
    }
    
    .habit-option span {
        font-size: 0.9rem;
        line-height: 1.3;
    }
    
    .custom-habit {
        padding: 1.25rem;
    }
    
    .custom-habit input,
    .custom-habit select {
        padding: 12px 14px;
        font-size: 0.95rem;
    }
    
    .selected-habits {
        padding: 1.25rem;
    }
    
    .selected-habit-item {
        padding: 0.625rem 0.875rem;
        font-size: 0.85rem;
        gap: 0.5rem;
    }
    
    .selected-habit-item i {
        font-size: 1rem;
        min-width: 22px;
        height: 22px;
    }
    
    .habits-list .habit-tag {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }
    
    .habit-preview {
        padding: 1.25rem;
    }
    
    .habit-item {
        padding: 0.75rem;
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .habit-item span {
        text-align: center;
        font-size: 0.85rem;
    }
    
    .habit-streak {
        font-size: 0.75rem;
        padding: 0.2rem 0.6rem;
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .tool-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .tool-sidebar {
        position: static;
    }
    
    .related-tools .tool-links {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .input-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .calorie-results {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .result-item.primary {
        transform: none;
        order: -1;
    }
    
    .result-value {
        font-size: 2rem;
    }
    
    .macro-bars {
        gap: 1.5rem;
    }
    .main-content {
        padding: 1rem 0;
    }
    
    .tool-header {
        padding: 2rem 1rem;
        margin-bottom: 2rem;
    }
    
    .tool-header h1 {
        font-size: 2rem;
    }
    
    .tool-header .tool-icon {
        width: 80px;
        height: 80px;
    }
    
    .tool-header .tool-icon i {
        font-size: 2.5rem;
    }
    
    .tool-intro,
    .calculator-section,
    .results-section,
    .faq-section,
    .related-tools,
    .health-tip {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .bmi-value {
        font-size: 3rem;
    }
    
    .bmi-scale {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .scale-item {
        padding: 0.75rem;
    }
    
    .input-with-unit {
        flex-direction: column;
    }
    
    .input-with-unit select {
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .tool-header {
        padding: 1.5rem 0.5rem;
    }
    
    .tool-header h1 {
        font-size: 1.75rem;
    }
    
    .tool-intro,
    .calculator-section,
    .results-section,
    .faq-section,
    .related-tools,
    .health-tip {
        padding: 1rem;
    }
    
    .bmi-value {
        font-size: 2.5rem;
    }
    
    .related-tools .tool-links {
        grid-template-columns: 1fr;
    }
}

/* ===== EDUCATIONAL CONTENT STYLES ===== */
.educational-content {
    background: linear-gradient(135deg, var(--bg-white) 0%, rgba(76, 175, 80, 0.02) 100%);
    border-radius: 20px;
    padding: 3rem;
    margin-bottom: 3rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.8);
    position: relative;
    overflow: hidden;
}

.educational-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 20px 20px 0 0;
}

.education-grid {
    display: grid;
    /* grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); */
    gap: 2rem;
    margin-bottom: 3rem;
}

.education-card {
    background: var(--bg-white);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.education-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(76, 175, 80, 0.05), transparent);
    transition: left 0.6s ease;
}

.education-card:hover::before {
    left: 100%;
}

.education-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.education-card .card-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 2;
}

.education-card .card-icon i {
    font-size: 1.5rem;
    color: white;
}

.education-card h3 {
    color: var(--text-dark);
    margin-bottom: 1rem;
    font-size: 1.3rem;
    font-weight: 700;
    position: relative;
    z-index: 2;
}

.education-card p {
    color: var(--text-dark);
    line-height: 1.7;
    margin: 0;
    font-size: 0.95rem;
    position: relative;
    z-index: 2;
}

.usage-tips {
    background: rgba(76, 175, 80, 0.05);
    border-radius: 16px;
    padding: 2.5rem;
    border: 1px solid rgba(76, 175, 80, 0.1);
}

.usage-tips h3 {
    color: var(--text-dark);
    margin-bottom: 2rem;
    font-size: 1.4rem;
    font-weight: 700;
    text-align: center;
}

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

.tip-item {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
}

.tip-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.tip-item i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.tip-item h4 {
    color: var(--text-dark);
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.tip-item p {
    color: var(--text-light);
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Responsive Design for Educational Content */
@media (max-width: 768px) {
    .educational-content {
        padding: 2rem;
        margin-bottom: 2rem;
        border-radius: 16px;
    }
    
    .education-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-bottom: 2rem;
    }
    
    .education-card {
        padding: 1.5rem;
        border-radius: 12px;
    }
    
    .education-card .card-icon {
        width: 50px;
        height: 50px;
        margin-bottom: 1rem;
    }
    
    .education-card .card-icon i {
        font-size: 1.3rem;
    }
    
    .education-card h3 {
        font-size: 1.2rem;
        margin-bottom: 0.75rem;
    }
    
    .education-card p {
        font-size: 0.9rem;
    }
    
    .usage-tips {
        padding: 2rem;
        border-radius: 12px;
    }
    
    .usage-tips h3 {
        font-size: 1.3rem;
        margin-bottom: 1.5rem;
    }
    
    .tips-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .tip-item {
        padding: 1.25rem;
    }
    
    .tip-item i {
        font-size: 1.8rem;
    }
    
    .tip-item h4 {
        font-size: 1rem;
    }
    
    .tip-item p {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .educational-content {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
        border-radius: 12px;
    }
    
    .education-card {
        padding: 1.25rem;
    }
    
    .education-card .card-icon {
        width: 45px;
        height: 45px;
    }
    
    .education-card .card-icon i {
        font-size: 1.2rem;
    }
    
    .education-card h3 {
        font-size: 1.1rem;
    }
    
    .education-card p {
        font-size: 0.85rem;
    }
    
    .usage-tips {
        padding: 1.5rem;
    }
    
    .usage-tips h3 {
        font-size: 1.2rem;
    }
    
    .tip-item {
        padding: 1rem;
    }
    
    .tip-item i {
        font-size: 1.6rem;
    }
    
    .tip-item h4 {
        font-size: 0.95rem;
    }
    
    .tip-item p {
        font-size: 0.8rem;
    }
}