/* Sleep Calculator Styles */

.sleep-calculator-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Hero Section */
.calc-hero {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    margin-bottom: 30px;
}

.calc-hero h2 {
    font-size: 2.5em;
    margin: 0 0 15px 0;
    font-weight: 700;
}

.calc-subtitle {
    font-size: 1.2em;
    margin: 0;
    opacity: 0.95;
    max-width: 800px;
    margin: 0 auto;
}

/* Calculator Section */
.calc-section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    padding: 30px;
    margin-bottom: 30px;
}

/* Tabs */
.calc-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid #e0e0e0;
}

.calc-tabs .tab-btn {
    flex: 1;
    padding: 15px 20px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 1em;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
}

.calc-tabs .tab-btn.active {
    color: #667eea;
    border-bottom-color: #667eea;
}

.calc-tabs .tab-btn:hover {
    color: #667eea;
}

/* Calculator Modes */
.calc-mode {
    display: none;
}

.calc-mode.active {
    display: block;
}

/* Input Area */
.calc-input-area {
    max-width: 500px;
    margin: 0 auto;
}

.calc-input-area h3 {
    text-align: center;
    color: #333;
    margin-bottom: 20px;
}

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

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

.input-group input[type="time"] {
    width: 100%;
    padding: 15px;
    font-size: 1.2em;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: border-color 0.3s ease;
}

.input-group input[type="time"]:focus {
    outline: none;
    border-color: #667eea;
}

.calc-btn {
    width: 100%;
    padding: 15px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.calc-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* Results Section */
.calc-results {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #e0e0e0;
}

.calc-results h3 {
    text-align: center;
    color: #333;
    margin-bottom: 10px;
}

.results-subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    font-size: 0.95em;
}

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

.sleep-time-card {
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
}

.sleep-time-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.sleep-time-card.recommended {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
}

.sleep-time-card .badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255,255,255,0.3);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75em;
    font-weight: 600;
}

.time-display {
    font-size: 2.5em;
    font-weight: 700;
    margin-bottom: 10px;
}

.cycles-info {
    font-size: 1.1em;
    font-weight: 600;
    margin-bottom: 5px;
    opacity: 0.9;
}

.hours-info {
    font-size: 0.95em;
    margin-bottom: 10px;
    opacity: 0.8;
}

.description {
    font-size: 0.9em;
    font-style: italic;
    opacity: 0.85;
}

.sleep-time-card.recommended .time-display,
.sleep-time-card.recommended .cycles-info,
.sleep-time-card.recommended .hours-info,
.sleep-time-card.recommended .description {
    color: white;
}

.result-note {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 15px;
    margin-top: 20px;
    font-size: 0.95em;
    color: #856404;
}

/* Expert Insights */
.expert-insights {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    padding: 40px;
    margin-bottom: 30px;
}

.expert-insights h3 {
    color: #333;
    font-size: 2em;
    margin-bottom: 20px;
}

.insight-content p {
    font-size: 1.05em;
    line-height: 1.8;
    color: #444;
    margin-bottom: 20px;
}

/* Educational Section */
.calc-education {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    padding: 40px;
    margin-bottom: 30px;
}

.education-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid #e0e0e0;
}

.education-tabs .tab-btn {
    padding: 12px 20px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 0.95em;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
}

.education-tabs .tab-btn.active {
    color: #667eea;
    border-bottom-color: #667eea;
}

.education-tabs .tab-btn:hover {
    color: #667eea;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.tab-content h4 {
    color: #333;
    font-size: 1.8em;
    margin-bottom: 20px;
}

.tab-content p {
    font-size: 1.05em;
    line-height: 1.8;
    color: #444;
    margin-bottom: 15px;
}

.tab-content ul {
    margin: 15px 0;
    padding-left: 25px;
}

.tab-content li {
    margin-bottom: 10px;
    line-height: 1.6;
}

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin: 30px 0;
}

.info-card {
    background: #f8f9fa;
    border-left: 4px solid #667eea;
    border-radius: 8px;
    padding: 25px;
}

.info-card h5 {
    color: #667eea;
    font-size: 1.3em;
    margin-bottom: 15px;
}

.info-card p {
    font-size: 1em;
    line-height: 1.7;
    color: #555;
}

.info-card ul {
    margin: 10px 0;
    padding-left: 20px;
}

.info-card li {
    margin-bottom: 8px;
    line-height: 1.5;
}

/* Tips Grid */
.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin: 30px 0;
}

.tip-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
}

.tip-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border-color: #667eea;
}

.tip-card h5 {
    color: #667eea;
    font-size: 1.3em;
    margin-bottom: 15px;
}

.tip-card p {
    font-size: 1em;
    line-height: 1.7;
    color: #555;
    margin-bottom: 12px;
}

.tip-card ul {
    margin: 10px 0;
    padding-left: 20px;
}

.tip-card li {
    margin-bottom: 8px;
}

.source-note,
.bottom-line {
    background: #e8f4f8;
    border-left: 4px solid #17a2b8;
    padding: 15px;
    margin: 20px 0;
    border-radius: 4px;
}

/* Disclaimer */
.calc-disclaimer {
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
}

.calc-disclaimer h3 {
    color: #856404;
    margin-bottom: 15px;
}

.calc-disclaimer p {
    color: #856404;
    line-height: 1.7;
    margin-bottom: 15px;
}

.calc-disclaimer ul {
    color: #856404;
    margin: 15px 0;
    padding-left: 25px;
}

.calc-disclaimer li {
    margin-bottom: 8px;
}

/* Sources */
.calc-sources {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    padding: 40px;
}

.calc-sources h3 {
    color: #333;
    margin-bottom: 20px;
}

.calc-sources p {
    color: #444;
    line-height: 1.7;
    margin-bottom: 15px;
}

.calc-sources ol {
    margin: 20px 0;
    padding-left: 25px;
}

.calc-sources li {
    margin-bottom: 15px;
    line-height: 1.6;
}

.calc-sources ul {
    margin: 10px 0;
    padding-left: 25px;
}

.calc-sources a {
    color: #667eea;
    text-decoration: none;
}

.calc-sources a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .calc-hero h2 {
        font-size: 2em;
    }

    .calc-subtitle {
        font-size: 1em;
    }

    .calc-section,
    .expert-insights,
    .calc-education,
    .calc-sources {
        padding: 20px;
    }

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

    .sleep-times-grid {
        grid-template-columns: 1fr;
    }

    .education-tabs {
        flex-direction: column;
    }

    .education-tabs .tab-btn {
        border-bottom: 1px solid #e0e0e0;
        border-left: 3px solid transparent;
    }

    .education-tabs .tab-btn.active {
        border-left-color: #667eea;
        border-bottom-color: #e0e0e0;
    }
}
