/* CSS Variables (from index.css) */
:root {
    /* Colors */
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --secondary-color: #64748b;
    --accent-color: #f59e0b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;

    /* Text Colors */
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-light: #94a3b8;
    --text-white: #ffffff;

    /* Background Colors */
    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    --bg-header: #1e293b;
    --bg-footer: #1e293b;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    --gradient-dark: linear-gradient(135deg, var(--bg-header), #334155);

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 0.75rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;

    /* Transitions */
    --transition: all 0.3s ease;
}

/* Reset and Base Styles (from index.css) */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-body);
}

/* Page Layout (from index.css) */
.page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header (from index.css) */
.header {
    background: var(--gradient-dark);
    color: var(--text-white);
    padding: var(--space-xl) 0;
    text-align: center;
}

.header__title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: var(--space-xs);
}

/* Navigation (from index.css) */
.nav {
    background: var(--primary-color);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-md);
}

.nav__list {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: var(--space-lg);
    padding: var(--space-md) 0;
}

.nav__item {
    margin: 0;
}

.nav__link {
    display: block;
    padding: var(--space-sm) var(--space-md);
    color: var(--text-white);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: var(--transition);
    font-weight: 500;
}

.nav__link:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.nav__item--active .nav__link {
    background: rgba(255, 255, 255, 0.2);
    font-weight: 600;
}

/* Main Content (from index.css) */
.main {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-2xl) var(--space-md);
    width: 100%;
}

/* Page Title (from styles.css, adapted) */
.diary__title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: var(--space-2xl);
}

/* Section Styles (from styles.css, adapted) */
.progress-section,
.courses-section {
    background: var(--bg-card);
    padding: var(--space-lg);
    margin-bottom: var(--space-2xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.progress-section__title,
.courses-section__title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-lg);
}

/* Progress Timeline (from styles.css, adapted) */
.progress-timeline {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.progress-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    /* Используем фон, чуть темнее фона страницы */
    background: #eef2f9;
    transition: var(--transition);
}

.progress-item:hover {
    transform: translateX(5px);
}

.progress-item__date {
    font-weight: 600;
    color: var(--primary-color); /* Адаптировано */
    min-width: 80px;
}

.progress-item__task {
    flex: 1;
    color: var(--text-primary);
}

.progress-item__status {
    font-weight: 600;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
}

.progress-item--completed .progress-item__task {
    color: var(--text-secondary); /* Затемняем выполненные */
}

.progress-item--completed .progress-item__status {
    color: var(--success-color); /* Используем цвет из index.css */
    font-size: 1rem;
    padding: 0; /* Убираем фон для символа ✓ */
}

.progress-item--in-progress .progress-item__status {
    background: var(--warning-color); /* Используем цвет из index.css */
    color: var(--text-white);
}

/* Courses List (from styles.css, adapted) */
.courses-list {
    display: grid;
    gap: var(--space-md);
}

.course-card {
    background: var(--bg-body); /* Фон как у страницы */
    padding: var(--space-md);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--primary-color); /* Адаптировано */
}

.course-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-sm);
}

.course-card__title {
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

.course-card__progress {
    color: var(--primary-color); /* Адаптировано */
    font-weight: 600;
}

/* Progress Bar (from styles.css, adapted to index.css) */
.progress-bar {
    width: 100%;
    height: 8px;
    background: #e2e8f0; /* Фон из index.css */
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.progress-bar__fill {
    height: 100%;
    background: var(--primary-color); /* Цвет из index.css */
    border-radius: var(--radius-sm);
    transition: width 0.5s ease-in-out;
}

/* Button (Adapted from index.css .button) */
.btn {
    display: inline-block;
    padding: var(--space-sm) var(--space-lg);
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    font-size: 1rem;
}

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

.btn--primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* Diary Actions (from styles.css, adapted) */
.diary-actions {
    text-align: center;
    margin-top: var(--space-2xl);
}

#addEntryBtn {
    padding: 12px 24px; /* Увеличиваем паддинг */
    font-size: 1.1rem;
    font-weight: 600;
    box-shadow: var(--shadow-md);
}

#addEntryBtn:hover {
    box-shadow: var(--shadow-lg);
}


/* Footer (from index.css, simplified for diary.html) */
.footer {
    background: var(--gradient-dark);
    color: var(--text-white);
    padding: var(--space-xl) 0;
    margin-top: auto;
    text-align: center;
}

.footer__text {
    margin: 0;
    opacity: 0.9;
}

/* Responsive Design (from index.css + styles.css) */
@media (max-width: 768px) {
    .main {
        padding: var(--space-xl) var(--space-sm);
    }

    .header__title {
        font-size: 2rem;
    }

    .nav__list {
        flex-direction: column;
        gap: var(--space-xs);
        align-items: center;
    }

    /* Стили из styles.css */
    .progress-item {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-sm);
    }

    .progress-item__date {
        min-width: auto;
    }

    .course-card__header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-sm);
    }

    .btn--primary {
        width: 100%;
    }
}

@media (max-width: 480px) {
    :root {
        --space-xl: 1.5rem;
        --space-2xl: 2rem;
    }

    .diary__title {
        font-size: 1.5rem;
    }
}