/* Sleep Tracker Styles */

/* Hero Section */
.sleep-hero {
    background: linear-gradient(135deg, #4c51bf 0%, #667eea 25%, #764ba2 50%, #9f7aea 75%, #4c51bf 100%);
    color: white;
    padding: 120px 0 80px;
    position: relative;
    overflow: hidden;
}

.sleep-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="sleep-pattern" width="30" height="20" patternUnits="userSpaceOnUse"><circle cx="15" cy="10" r="2" fill="rgba(255,255,255,0.1)"/><path d="M 5 10 Q 10 5 15 10 Q 20 15 25 10" stroke="rgba(255,255,255,0.08)" stroke-width="1.5" fill="none"/><circle cx="8" cy="6" r="1" fill="rgba(255,255,255,0.06)"/><circle cx="22" cy="14" r="1" fill="rgba(255,255,255,0.06)"/><path d="M 2 8 Q 5 6 8 8" stroke="rgba(255,255,255,0.05)" stroke-width="1" fill="none"/><path d="M 22 12 Q 25 10 28 12" stroke="rgba(255,255,255,0.05)" stroke-width="1" fill="none"/></pattern></defs><rect width="100" height="100" fill="url(%23sleep-pattern)"/></svg>');
    opacity: 0.7;
}

.sleep-hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

.breadcrumb {
    margin-bottom: 20px;
    font-size: 14px;
    opacity: 0.9;
}

.breadcrumb a {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.breadcrumb a:hover {
    opacity: 0.7;
}

.breadcrumb i {
    margin: 0 10px;
    font-size: 12px;
}

.sleep-hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.sleep-highlight {
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sleep-hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 40px;
    opacity: 0.9;
    max-width: 800px;
    line-height: 1.6;
}

.sleep-hero-stats {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
}

.sleep-stat-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
}

.sleep-stat-item i {
    font-size: 1.2rem;
    color: #ffd700;
}

/* Sleep Tracker Section */
.sleep-tracker {
    padding: 80px 0;
    background: #f8fafc;
}

/* Tabs */
.tracker-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
    background: white;
    border-radius: 15px;
    padding: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    max-width: 1000px;
    margin: 0 auto 40px;
    overflow-x: auto;
}

.tab-btn {
    background: transparent;
    border: none;
    padding: 15px 20px;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    flex: 1;
    justify-content: center;
}

.tab-btn.active {
    background: linear-gradient(135deg, #4c51bf, #667eea);
    color: white;
    box-shadow: 0 4px 15px rgba(76, 81, 191, 0.3);
}

.tab-btn:hover:not(.active) {
    background: #f7fafc;
    color: #4c51bf;
}

.tab-btn i {
    font-size: 0.9rem;
}

/* Tab Content */
.tab-content {
    display: none;
    max-width: 1200px;
    margin: 0 auto;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Sleep Log Tab */
.log-header {
    text-align: center;
    margin-bottom: 40px;
}

.log-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.log-header h2 i {
    color: #4c51bf;
}

.log-header p {
    font-size: 1.1rem;
    color: #718096;
    max-width: 600px;
    margin: 0 auto;
}

.sleep-dashboard {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.sleep-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.sleep-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.sleep-card.main-card {
    border-left: 5px solid #4c51bf;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.card-header h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2d3748;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-header h3 i {
    color: #4c51bf;
}

.date-display {
    font-size: 0.9rem;
    color: #718096;
    font-weight: 500;
}

.sleep-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.sleep-metric {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: #f7fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.metric-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #4c51bf, #667eea);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
}

.metric-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 3px;
}

.metric-label {
    font-size: 0.85rem;
    color: #718096;
    font-weight: 500;
}

/* Sleep Form */
.sleep-form {
    display: grid;
    gap: 20px;
}

.input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.input-group {
    position: relative;
}

.input-group label {
    display: block;
    font-weight: 500;
    color: #4a5568;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.input-group input,
.input-group select,
.input-group textarea {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
    font-family: inherit;
}

.input-group input:focus,
.input-group select:focus,
.input-group textarea:focus {
    outline: none;
    border-color: #4c51bf;
    box-shadow: 0 0 0 3px rgba(76, 81, 191, 0.1);
}

.input-group textarea {
    resize: vertical;
    min-height: 80px;
}

.quality-slider {
    appearance: none;
    height: 8px;
    border-radius: 4px;
    background: #e2e8f0;
    outline: none;
    margin-bottom: 10px;
}

.quality-slider::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4c51bf, #667eea);
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 2px 6px rgba(76, 81, 191, 0.3);
}

.quality-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4c51bf, #667eea);
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 2px 6px rgba(76, 81, 191, 0.3);
}

.slider-value {
    text-align: center;
    font-weight: 600;
    color: #4c51bf;
    font-size: 1.1rem;
}

.checkbox-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 10px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.checkbox-item:hover {
    background: #f7fafc;
}

.checkbox-item input[type="checkbox"] {
    width: auto;
    margin: 0;
    accent-color: #4c51bf;
}

.checkbox-item span {
    font-size: 0.9rem;
    color: #4a5568;
}

.button-group {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.log-sleep-btn {
    background: linear-gradient(135deg, #4c51bf, #667eea);
    color: white;
    border: none;
    padding: 15px 25px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    flex: 1;
    justify-content: center;
}

.log-sleep-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(76, 81, 191, 0.3);
}

.clear-form-btn {
    background: #f7fafc;
    color: #4a5568;
    border: 2px solid #e2e8f0;
    padding: 15px 25px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    flex: 1;
    justify-content: center;
}

.clear-form-btn:hover {
    background: #e2e8f0;
    transform: translateY(-2px);
}

/* Recent Sleep History */
.recent-sleep {
    margin-top: 40px;
}

.clear-history-btn {
    background: #fed7d7;
    color: #c53030;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.clear-history-btn:hover {
    background: #feb2b2;
    transform: translateY(-1px);
}

.sleep-history {
    max-height: 400px;
    overflow-y: auto;
}

.empty-history {
    text-align: center;
    padding: 40px 20px;
    color: #718096;
}

.empty-history i {
    font-size: 2.5rem;
    color: #cbd5e0;
    margin-bottom: 15px;
}

.sleep-history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #f7fafc;
    transition: all 0.3s ease;
}

.sleep-history-item:hover {
    background: #f7fafc;
    transform: translateX(5px);
}

.sleep-history-item:last-child {
    border-bottom: none;
}

.history-date {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 5px;
}

.history-details {
    display: flex;
    gap: 20px;
    font-size: 0.9rem;
    color: #718096;
}

.history-quality {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 600;
}

.quality-excellent { color: #38a169; }
.quality-good { color: #3182ce; }
.quality-fair { color: #d69e2e; }
.quality-poor { color: #e53e3e; }

/* Analysis Tab */
.analysis-header {
    text-align: center;
    margin-bottom: 40px;
}

.analysis-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.analysis-header h2 i {
    color: #4c51bf;
}

.analysis-header p {
    font-size: 1.1rem;
    color: #718096;
    max-width: 600px;
    margin: 0 auto;
}

.analysis-filters {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
}

.analysis-filters select {
    padding: 12px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    background: white;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
}

.analysis-filters select:focus {
    outline: none;
    border-color: #4c51bf;
    box-shadow: 0 0 0 3px rgba(76, 81, 191, 0.1);
}

.analysis-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.analysis-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.analysis-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-color: #4c51bf;
}

.analysis-stats {
    display: grid;
    gap: 15px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: #f7fafc;
    border-radius: 8px;
}

.stat-label {
    font-weight: 500;
    color: #4a5568;
}

.stat-value {
    font-weight: 600;
    color: #2d3748;
}

.disruptors-list {
    display: grid;
    gap: 10px;
}

.disruptor-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: #fed7d7;
    border-radius: 8px;
    color: #c53030;
    font-size: 0.9rem;
}

.empty-disruptors {
    text-align: center;
    padding: 20px;
    color: #718096;
    font-style: italic;
}

/* Patterns Tab */
.patterns-header {
    text-align: center;
    margin-bottom: 40px;
}

.patterns-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.patterns-header h2 i {
    color: #4c51bf;
}

.patterns-header p {
    font-size: 1.1rem;
    color: #718096;
    max-width: 600px;
    margin: 0 auto;
}

.patterns-content {
    display: grid;
    gap: 40px;
}

.schedule-chart {
    height: 300px;
    background: #f7fafc;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed #e2e8f0;
}

.empty-chart {
    text-align: center;
    color: #718096;
}

.empty-chart i {
    font-size: 3rem;
    color: #cbd5e0;
    margin-bottom: 15px;
}

.insights-list {
    display: grid;
    gap: 12px;
}

.insight-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 15px;
    background: #f7fafc;
    border-radius: 8px;
    border-left: 4px solid #4c51bf;
}

.insight-item i {
    color: #4c51bf;
    margin-top: 2px;
}

.chronotype-content {
    text-align: center;
}

.chronotype-types {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 30px 0;
}

.chronotype-type {
    padding: 20px;
    background: #f7fafc;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
}

.chronotype-type:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.type-icon {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    margin: 0 auto 15px;
}

.type-icon.morning {
    background: linear-gradient(135deg, #ed8936, #f6ad55);
}

.type-icon.evening {
    background: linear-gradient(135deg, #4c51bf, #667eea);
}

.type-icon.intermediate {
    background: linear-gradient(135deg, #38a169, #48bb78);
}

.chronotype-type h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 10px;
}

.chronotype-type p {
    font-size: 0.9rem;
    color: #718096;
    line-height: 1.4;
}

.current-chronotype {
    padding: 20px;
    background: white;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
    font-size: 1.1rem;
}

/* Goals Tab */
.goals-header {
    text-align: center;
    margin-bottom: 40px;
}

.goals-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.goals-header h2 i {
    color: #4c51bf;
}

.goals-header p {
    font-size: 1.1rem;
    color: #718096;
    max-width: 600px;
    margin: 0 auto;
}

.goals-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.goal-setting,
.goal-progress {
    background: white;
    border-radius: 15px;
    padding: 30px;
    border: 1px solid #e2e8f0;
}

.goals-form {
    display: grid;
    gap: 20px;
}

.save-goals-btn {
    background: linear-gradient(135deg, #4c51bf, #667eea);
    color: white;
    border: none;
    padding: 15px 25px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    flex: 1;
    justify-content: center;
}

.save-goals-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(76, 81, 191, 0.3);
}

.reset-goals-btn {
    background: #f7fafc;
    color: #4a5568;
    border: 2px solid #e2e8f0;
    padding: 15px 25px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    flex: 1;
    justify-content: center;
}

.reset-goals-btn:hover {
    background: #e2e8f0;
    transform: translateY(-2px);
}

.progress-metrics {
    display: grid;
    gap: 20px;
}

.progress-item {
    padding: 20px;
    background: #f7fafc;
    border-radius: 12px;
}

.progress-label {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 10px;
}

.progress-bar {
    background: #e2e8f0;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #4c51bf, #667eea);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.9rem;
    color: #718096;
}

/* Education Tab */
.insights-header {
    text-align: center;
    margin-bottom: 40px;
}

.insights-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.insights-header h2 i {
    color: #4c51bf;
}

.insights-header p {
    font-size: 1.1rem;
    color: #718096;
    max-width: 600px;
    margin: 0 auto;
}

.education-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.education-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.education-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-color: #4c51bf;
}

.education-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #4c51bf, #667eea);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    margin-bottom: 20px;
}

.education-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 20px;
}

.stage-item,
.age-group,
.disorder-item {
    padding: 10px 0;
    border-bottom: 1px solid #f7fafc;
    color: #4a5568;
    line-height: 1.5;
}

.stage-item:last-child,
.age-group:last-child,
.disorder-item:last-child {
    border-bottom: none;
}

.tip-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    color: #4a5568;
}

.tip-item i {
    color: #38a169;
    font-size: 0.9rem;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 60px 0;
    flex-wrap: wrap;
}

.action-btn {
    background: white;
    color: #4a5568;
    border: 2px solid #e2e8f0;
    padding: 15px 25px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.action-btn:hover {
    border-color: #4c51bf;
    color: #4c51bf;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(76, 81, 191, 0.15);
}

/* Related Tools */
.related-tools {
    padding: 80px 0;
    background: white;
}

.related-tools .section-header {
    text-align: center;
    margin-bottom: 60px;
}

.related-tools .section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 15px;
}

.related-tools .section-header p {
    font-size: 1.1rem;
    color: #718096;
    max-width: 600px;
    margin: 0 auto;
}

.related-tools .tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.related-tools .tool-card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.related-tools .tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    border-color: #4c51bf;
}

.related-tools .tool-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #4c51bf, #667eea);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2rem;
    color: white;
}

.related-tools .tool-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 10px;
}

.related-tools .tool-card p {
    color: #718096;
    margin-bottom: 20px;
    line-height: 1.6;
}

.related-tools .tool-link {
    color: #4c51bf;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.related-tools .tool-link:hover {
    gap: 12px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sleep-hero {
        padding: 100px 0 60px;
    }
    
    .sleep-hero-title {
        font-size: 2.5rem;
    }
    
    .sleep-hero-stats {
        justify-content: center;
        gap: 20px;
    }
    
    .tracker-tabs {
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .tab-btn {
        flex: none;
        min-width: 140px;
        font-size: 0.85rem;
    }
    
    .sleep-dashboard {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .sleep-summary {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .input-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .checkbox-group {
        grid-template-columns: 1fr;
    }
    
    .analysis-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .goals-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .education-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .chronotype-types {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .action-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .action-btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .sleep-hero-title {
        font-size: 2rem;
    }
    
    .sleep-hero-stats {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .tracker-tabs {
        padding: 5px;
        gap: 3px;
    }
    
    .tab-btn {
        padding: 12px 8px;
        font-size: 0.75rem;
        min-width: 110px;
    }
    
    .sleep-card {
        padding: 20px 15px;
    }
    
    .sleep-metric {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .metric-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #4c51bf;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Success/Error Messages */
.message {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
}

.message.success {
    background: #f0fff4;
    color: #38a169;
    border: 1px solid #9ae6b4;
}

.message.error {
    background: #fed7d7;
    color: #e53e3e;
    border: 1px solid #feb2b2;
}

.input-group input.error,
.input-group select.error {
    border-color: #e53e3e;
    box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.1);
}
