:root {
    --primary: #4361ee;
    --primary-light: #4895ef;
    --secondary: #3f37c9;
    --accent: #f72585;
    --dark: #1e1e2c;
    --light: #f8f9fa;
    --gray: #adb5bd;
    --success: #4cc9f0;
    --warning: #f8961e;
    --danger: #e63946;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: var(--dark);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    margin-bottom: 30px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo i {
    font-size: 2rem;
    color: var(--primary);
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--dark);
}

.user-actions {
    display: flex;
    gap: 15px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--secondary);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: white;
    color: var(--primary);
    border: 1px solid var(--primary);
}

.btn-secondary:hover {
    background-color: var(--light);
}

.btn-danger {
    background-color: var(--danger);
    color: white;
}

.btn-danger:hover {
    background-color: #c1121f;
}

.app-container {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 30px;
    height: calc(100vh - 150px);
}

.sidebar {
    background-color: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: var(--shadow);
    overflow-y: auto;
}

.search-container {
    margin-bottom: 20px;
}

.search-box {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--gray);
    border-radius: 8px;
    font-size: 1rem;
}

.search-box:focus {
    outline: none;
    border-color: var(--primary);
}

.filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 25px;
}

.filter-btn {
    padding: 8px 15px;
    background-color: var(--light);
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition);
}

.filter-btn.active {
    background-color: var(--primary);
    color: white;
}

.filter-btn:hover:not(.active) {
    background-color: #e9ecef;
}

.journal-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.journal-item {
    padding: 15px;
    border-radius: 10px;
    background-color: var(--light);
    cursor: pointer;
    transition: var(--transition);
}

.journal-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.journal-item.active {
    background-color: #e0e7ff;
    border-left: 4px solid var(--primary);
}

.journal-date {
    font-size: 0.9rem;
    color: var(--gray);
    margin-bottom: 5px;
}

.journal-preview {
    font-size: 1rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.journal-tags {
    display: flex;
    gap: 5px;
    margin-top: 8px;
}

.tag {
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 10px;
    background-color: #e9ecef;
}

.tag.personal {
    background-color: #e0f4ff;
    color: #0066cc;
}

.tag.work {
    background-color: #e6f7e9;
    color: #00a86b;
}

.tag.travel {
    background-color: #fff2e6;
    color: #ff8c00;
}

.tag.ideas {
    background-color: #f0e6ff;
    color: #8a2be2;
}

.main-content {
    background-color: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.journal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
}

.journal-title {
    font-size: 1.8rem;
    font-weight: 700;
    border: none;
    width: 100%;
    padding: 5px 0;
    margin-bottom: 5px;
}

.journal-title:focus {
    outline: none;
    border-bottom: 2px solid var(--primary);
}

.journal-meta {
    display: flex;
    gap: 15px;
    color: var(--gray);
    font-size: 0.9rem;
}

.journal-content {
    flex-grow: 1;
    font-size: 1.1rem;
    line-height: 1.6;
    border: none;
    resize: none;
    padding: 10px 0;
    min-height: 300px;
}

.journal-content:focus {
    outline: none;
}

.mood-selector {
    display: flex;
    gap: 10px;
    margin: 20px 0;
}

.mood-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1.2rem;
}

.mood-btn:hover {
    transform: scale(1.1);
}

.mood-btn.active {
    border-color: var(--primary);
}

.journal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.tag-selector {
    display: flex;
    gap: 10px;
}

.tag-option {
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition);
}

.tag-option.active {
    color: white;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    color: var(--gray);
}

.empty-state > i {
    font-size: 4rem;
    margin-bottom: 20px;
    color: #e9ecef;
}

.empty-state h2 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 20px;
}

.stat-card {
    background-color: var(--light);
    padding: 15px;
    border-radius: 10px;
    text-align: center;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--gray);
}

@media (max-width: 900px) {
    .app-container {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        display: none;
    }
}