/* Base Styles */
:root {
    --primary-color: #4CAF50;
    --primary-dark: #388E3C;
    --primary-light: #A5D6A7;
    --secondary-color: #2196F3;
    --text-color: #333333;
    --light-text: #ffffff;
    --dark-gray: #555555;
    --light-gray: #f4f7f6;
    --border-color: #e0e0e0;
    --error-color: #f44336;
    --success-color: #4caf50;
    --warning-color: #ff9800;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Roboto, Arial, sans-serif;
    background-color: var(--light-gray);
    color: var(--text-color);
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    margin-bottom: 1rem;
    font-weight: 600;
    line-height: 1.3;
}

h1 {
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: 1.8rem;
    margin-bottom: 1.2rem;
}

h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

/* Layout */
.page-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

/* Navigation */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--primary-color);
    padding: 1rem 5%;
    color: white;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
}

nav ul {
    display: flex;
    list-style: none;
    margin: 0 1rem;
}

nav li {
    margin: 0 1rem;
}

nav a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
    transition: var(--transition);
}

nav a:hover, nav a.active {
    color: white;
}

nav a.active::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: white;
    border-radius: 3px;
}

.auth-buttons {
    display: flex;
    align-items: center;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.5rem 1.2rem;
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
    background-color: #f4f7f6;
    color: var(--text-color);
}

.btn:hover {
    opacity: 0.9;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

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

.btn-login, .btn-register {
    margin-left: 0.5rem;
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
}

.btn-login {
    background-color: transparent;
    border: 1px solid white;
    color: white;
}

.btn-register {
    background-color: white;
    color: var(--primary-color);
}

.btn-large {
    padding: 0.8rem 2rem;
    font-size: 1.1rem;
}

.btn-logout {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 0.8rem;
    padding: 0.3rem 0.8rem;
}
.mood-selector .mood-option {
    cursor: pointer;
    padding: 10px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.mood-selector .mood-option.active {
    background-color: #e0e0e0; /* Or any color to indicate active */
}

/* Hero Section */
.hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 3rem 5%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    margin-bottom: 3rem;
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.hero p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 500px;
}

.dashboard-preview {
    background-color: white;
    border-radius: 10px;
    padding: 1.5rem;
    width: 100%;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.chart-container {
    margin-bottom: 1.5rem;
}

.chart-placeholder {
    height: 150px;
    background: linear-gradient(90deg, var(--primary-light) 0%, var(--secondary-color) 100%);
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.chart-placeholder::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.2) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    animation: shimmer 2s infinite;
}

.chart-label {
    text-align: center;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--dark-gray);
}
.hero-image {
    max-width: 1200px; /* Optional: limit the maximum width */
    margin: 0 auto; /* Optional: center the image horizontally */
    padding: 20px; /* Optional: add padding around the image */
}

/* .stats-container {
    display: flex;
    justify-content: space-between;
} */
/* 
.stat-item {
    text-align: center;
    flex: 1;
}

.stat-value {
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--primary-color);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--dark-gray);
} */

/* Features Section */
.features {
    padding: 3rem 5%;
    text-align: center;
}

.features h2 {
    margin-bottom: 3rem;
}

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

.feature-card {
    background-color: white;
    border-radius: 10px;
    padding: 2rem;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

/* Tracker Styles */
.tracker {
    background-color: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    max-width: 800px;
    margin: 0 auto;
}

.date-display {
    text-align: center;
    color: var(--dark-gray);
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

input, textarea, select {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    transition: var(--transition);
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px var(--primary-light);
}

.range-with-value {
    display: flex;
    align-items: center;
    gap: 1rem;
}

input[type="range"] {
    flex: 1;
}

.mood-selector {
    display: flex;
    justify-content: space-between;
    margin: 0.5rem 0 1rem;
}

.mood-option {
    font-size: 1.8rem;
    cursor: pointer;
    opacity: 0.5;
    transition: var(--transition);
    padding: 0.5rem;
}

.mood-option:hover, .mood-option.selected {
    opacity: 1;
    transform: scale(1.2);
}

.time-range {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.time-input {
    flex: 1;
}

.time-input label {
    font-size: 0.8rem;
    opacity: 0.8;
}

.time-separator {
    padding: 0 0.5rem;
}

#sleep-duration {
    text-align: center;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--dark-gray);
}

/* Results Section */
.result-container {
    margin-top: 2rem;
    padding: 2rem;
    background-color: #f9f9f9;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.health-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.score-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: conic-gradient(var(--primary-color) 0%, var(--primary-color) 70%, #f1f1f1 70%, #f1f1f1 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--primary-color);
    font-size: 1.8rem;
    font-weight: bold;
    position: relative;
}

.score-circle::before {
    content: '';
    width: 70%;
    height: 70%;
    background-color: white;
    border-radius: 50%;
    position: absolute;
}

#score-value {
    position: relative;
    z-index: 1;
}

.result-details {
    margin-bottom: 1.5rem;
}

.result-actions {
    text-align: center;
}

/* Authentication Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    transition: var(--transition);
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    max-width: 500px;
    position: relative;
}

.close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--dark-gray);
}

.form-footer {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.9rem;
}

.form-footer span {
    color: var(--primary-color);
    cursor: pointer;
    font-weight: 500;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
}

#username {
    color: white;
    font-weight: 500;
}

.hidden {
    display: none;
}

.auth-message {
    text-align: center;
    padding: 3rem;
    background-color: white;
    border-radius: 10px;
    box-shadow: var(--shadow);
    max-width: 700px;
    margin: 2rem auto;
}

.auth-buttons-center {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

/* Progress Dashboard Styles */
.progress-dashboard {
    background-color: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: var(--shadow);
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.period-selector {
    display: flex;
    gap: 0.5rem;
    background-color: #f1f1f1;
    padding: 0.3rem;
    border-radius: 6px;
}

.period-btn {
    background: none;
    border: none;
    padding: 0.5rem 1rem;
    cursor: pointer;
    border-radius: 4px;
    font-weight: 500;
    transition: var(--transition);
}

.period-btn.active {
    background-color: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

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

.stat-card {
    background-color: #f9f9f9;
    border-radius: 10px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.stat-header h3 {
    margin: 0;
    font-size: 1rem;
}

.trend {
    font-size: 0.8rem;
    font-weight: 500;
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
}

.trend.up {
    background-color: rgba(76, 175, 80, 0.1);
    color: var(--success-color);
}

.trend.down {
    background-color: rgba(244, 67, 54, 0.1);
    color: var(--error-color);
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.stat-footer {
    font-size: 0.8rem;
    color: var(--dark-gray);
}

.fun-facts-container {
    margin: 2rem 0;
}

.fun-facts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.fun-fact-card {
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    display: flex;
    align-items: flex-start;
    transition: transform 0.2s ease;
}

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

.fun-fact-icon {
    font-size: 2.5rem;
    margin-right: 1rem;
}

.fun-fact-content h3 {
    margin: 0 0 0.5rem 0;
    color: #2c3e50;
}

.fun-fact-content p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #555;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .fun-facts-grid {
        grid-template-columns: 1fr;
    }
}
/* Enhanced Entry Card Styling with Vertical Separators */

.entries-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.entry-card {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    padding: 1.5rem; /* Reduced padding for better fit */
    transition: all 0.3s ease;
    border: none;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative; /* Added for vertical line positioning */
}

/* Vertical line separator */
.entry-card::after {
    content: '';
    position: absolute;
    top: 1rem;
    right: -0.75rem; /* Adjust position as needed */
    height: calc(100% - 2rem); /* Adjust height as needed */
    width: 1px;
    background-color: var(--border-color);
}

/* Remove separator on the last card */
.entry-card:last-child::after {
    display: none;
}

.entry-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.entry-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 0 1rem 0;
    background: none;
    color: var(--text-color);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1rem;
}

.entry-date {
    font-weight: 600;
    font-size: 1rem;
    color: #2c3e50;
}

.entry-score {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: 0.5rem;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
}

.entry-card-body {
    padding: 0;
    flex-grow: 1;
}

.entry-metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}

.entry-metric {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: var(--light-gray);
    padding: 0.6rem 0.4rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.entry-metric:hover {
    background-color: #e8f5e9;
    transform: scale(1.05);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
}

.metric-icon {
    font-size: 1.2rem;
    margin-bottom: 0.3rem;
}

.metric-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-dark);
}

.entry-notes {
    color: #555;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-top: 1rem;
    padding: 0.8rem;
    background-color: rgba(244, 247, 246, 0.5);
    border-radius: 6px;
    border-left: 3px solid var(--primary-light);
}

.entry-card-footer {
    padding: 1rem 0 0 0;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: transparent;
    margin-top: 1rem;
}

.entry-mood {
    font-size: 1.5rem;
}

.btn-small {
    font-size: 0.8rem;
    padding: 0.3rem 0.8rem;
    background-color: var(--light-gray);
    color: var(--dark-gray);
    transition: all 0.2s ease;
}

.btn-small:hover {
    background-color: var(--primary-light);
    color: var(--primary-dark);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .entries-grid {
        grid-template-columns: 1fr;
    }

    .entry-metrics {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Remove vertical lines on mobile */
    .entry-card::after {
        display: none;
    }
}
.details-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.details-modal .modal-content {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    width: 80%;
    max-width: 600px;
    position: relative;
}
.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgb(0, 0, 0);
    background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
}

.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close-button:hover,
.close-button:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}
.details-modal .close-details {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 20px;
    cursor: pointer;
}

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

.insight-card {
    display: flex;
    gap: 1rem;
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.insight-icon {
    font-size: 2rem;
}

.insight-content h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.insight-content p {
    margin: 0;
    font-size: 0.9rem;
}

/* Content Sections */
.content {
    background-color: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.lead {
    font-size: 1.1rem;
    color: var(--dark-gray);
    margin-bottom: 2rem;
}

.tips-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.tip-card {
    background-color: #f9f9f9;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.tip-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-align: center;
}

.tip-card ul {
    padding-left: 1.5rem;
}

.tip-card li {
    margin-bottom: 0.8rem;
}

.resources {
    background-color: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.resource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 1.5rem;
}

.resource-card {
    background-color: #f9f9f9;
    border-radius: 10px;
    padding: 1.5rem;
}

.resource-card ul {
    padding-left: 1.5rem;
}

.resource-card li {
    margin-bottom: 0.5rem;
}

/* Footer */
footer {
    background-color: #333;
    color: white;
    padding: 2rem 5%;
    margin-top: 3rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-logo {
    font-size: 1.3rem;
    font-weight: bold;
}

/* Animations */
@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Responsive Styles */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
        padding: 1rem;
    }
    
    nav ul {
        margin: 1rem 0;
    }
    
    .hero {
        flex-direction: column;
        padding: 2rem 1rem;
    }
    
    .hero-image {
        margin-top: 2rem;
    }
    
    .tracker {
        width: 90%;
        padding: 1.5rem;
    }
    
    .modal-content {
        width: 90%;
        margin: 20% auto;
    }
    
    .dashboard-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .charts-container {
        grid-template-columns: 1fr;
    }
    
    .time-range {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .time-separator {
        display: none;
    }
}