/* Variables */
:root {
    --primary-color: #667eea;
    --hover-bg: #f8f9fa;
    --text-color: #333;
    --border-color: #e0e0e0;
    --white: #ffffff;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white);
}

/* Header and Navigation */
header {
    background-color: var(--white);
    border-bottom: 1px solid var(--border-color);
    padding: 0;
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-color);
    text-decoration: none;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: var(--primary-color);
}

/* Hamburger Button */
.hamburger-btn {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.hamburger-btn span {
    width: 100%;
    height: 3px;
    background-color: var(--text-color);
    transition: all 0.3s ease;
    border-radius: 2px;
}

.hamburger-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.hamburger-btn.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

.hamburger-btn:hover span {
    background-color: var(--primary-color);
}

/* Hamburger Menu */
.hamburger-menu {
    position: fixed;
    top: 0;
    left: -300px;
    width: 300px;
    height: 100vh;
    background-color: var(--white);
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    transition: left 0.3s ease;
    z-index: 1000;
    overflow-y: auto;
}

.hamburger-menu.active {
    left: 0;
}

.hamburger-menu-content {
    padding: 5rem 2rem 2rem;
}

.hamburger-menu h3 {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #999;
    margin-bottom: 1rem;
    font-weight: 600;
}

.hamburger-menu ul {
    list-style: none;
}

.hamburger-menu ul li {
    border-bottom: 1px solid var(--border-color);
}

.hamburger-menu ul li:last-child {
    border-bottom: none;
}

.hamburger-menu ul a {
    display: block;
    padding: 1rem 0;
    color: var(--text-color);
    text-decoration: none;
    font-size: 1.1rem;
    transition: all 0.2s ease;
}

.hamburger-menu ul a:hover {
    color: var(--primary-color);
    padding-left: 0.5rem;
}

/* Main Content */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
    min-height: calc(100vh - 200px);
}

/* Footer */
footer {
    background-color: var(--white);
    border-top: 1px solid var(--border-color);
    padding: 2rem;
    text-align: center;
    color: #666;
    font-size: 0.9rem;
}

/* Links */
a {
    color: inherit;
    transition: color 0.2s ease;
}

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

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: var(--primary-color);
    color: var(--white);
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn:hover {
    background-color: #5568d3;
    color: var(--white);
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* Card/List Items */
.item-list {
    list-style: none;
}

.item-list li {
    padding: 1rem;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
}

.item-list li:hover {
    background-color: var(--hover-bg);
    border-left-color: var(--primary-color);
}

/* Home Page Specific */
.home-hero {
    text-align: center;
    padding: 4rem 0 2rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 3rem;
}

.home-hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.home-hero .subtitle {
    font-size: 1.5rem;
    color: #666;
    margin-bottom: 2rem;
    font-weight: 300;
}

.home-hero p {
    font-size: 1.25rem;
    color: #666;
    margin-bottom: 2rem;
}

/* Apps Section */
.apps-section {
    margin-top: 3rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.apps-section h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--text-color);
}

.app-list {
    list-style: none;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.app-list li {
    border-bottom: 1px solid var(--border-color);
}

.app-list li:last-child {
    border-bottom: none;
}

.app-list a {
    display: block;
    padding: 1.25rem 1.5rem;
    text-decoration: none;
    color: var(--text-color);
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
}

.app-list a:hover {
    background-color: var(--hover-bg);
    border-left-color: var(--primary-color);
}

.app-list strong {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
    color: var(--text-color);
}

.app-list span {
    display: block;
    font-size: 0.9rem;
    color: #666;
}

/* Login Prompt */
.login-prompt {
    text-align: center;
    padding: 3rem 0;
}

.login-prompt p {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

/* Search */
.search-form {
    max-width: 600px;
    margin: 2rem auto;
}

.search-form input[type="text"] {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
}

.search-form input[type="submit"] {
    margin-top: 1rem;
}

.search-results {
    list-style: none;
}

.search-results li {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.search-results h3 {
    margin-bottom: 0.5rem;
}

.search-results a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.search-results a:hover {
    text-decoration: underline;
}

/* Pagination */
.pagination {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.pagination a {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.pagination a:hover {
    background-color: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

/* Rich Text Content */
.rich-text h1,
.rich-text h2,
.rich-text h3 {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.rich-text p {
    margin-bottom: 1rem;
}

.rich-text ul,
.rich-text ol {
    margin-bottom: 1rem;
    padding-left: 2rem;
}

.rich-text a {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Journal Page */
.journal-page {
    max-width: 900px;
    margin: 0 auto;
}

.journal-page h1 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: var(--text-color);
}

.journal-page h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

/* New Entry Form */
.journal-new-entry {
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 2rem;
    margin-bottom: 3rem;
}

.journal-new-entry h2 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    color: var(--text-color);
}

.journal-new-entry .form-group {
    margin-bottom: 1rem;
}

.journal-new-entry label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
}

.journal-new-entry textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    resize: vertical;
    transition: border-color 0.2s ease;
}

.journal-new-entry textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.journal-new-entry textarea::placeholder {
    color: #999;
}

.journal-new-entry .btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.journal-new-entry .btn-primary:hover {
    background-color: #5568d3;
}

/* Journal Entries */
.journal-entries {
    margin-top: 3rem;
}

.journal-entries h2 {
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color);
}

.journal-entry {
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: box-shadow 0.2s ease;
}

.journal-entry:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.entry-header {
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.entry-timestamp {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

.entry-content {
    color: var(--text-color);
    line-height: 1.8;
}

.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-color);
}

.entry-content h1 {
    font-size: 2rem;
}

.entry-content h2 {
    font-size: 1.5rem;
}

.entry-content h3 {
    font-size: 1.25rem;
}

.entry-content p {
    margin-bottom: 1rem;
}

.entry-content ul,
.entry-content ol {
    margin-bottom: 1rem;
    padding-left: 2rem;
}

.entry-content li {
    margin-bottom: 0.5rem;
}

.entry-content a {
    color: var(--primary-color);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

.entry-content a:hover {
    border-bottom-color: var(--primary-color);
}

.entry-content code {
    background-color: #f4f4f4;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: "Courier New", monospace;
    font-size: 0.9em;
}

.entry-content pre {
    background-color: #f4f4f4;
    padding: 1rem;
    border-radius: 4px;
    overflow-x: auto;
    margin-bottom: 1rem;
}

.entry-content pre code {
    background-color: transparent;
    padding: 0;
}

.entry-content blockquote {
    border-left: 3px solid var(--primary-color);
    padding-left: 1rem;
    margin-left: 0;
    margin-bottom: 1rem;
    color: #666;
    font-style: italic;
}

/* Empty State */
.journal-empty {
    text-align: center;
    padding: 3rem 2rem;
    color: #666;
}

.journal-empty p {
    font-size: 1.1rem;
}

/* Todo Page Styles */
.todo-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.todo-page h1 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: var(--text-color);
}

.todo-page h2 {
    font-size: 1.8rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

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

.summary-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
}

.summary-card h3 {
    font-size: 1rem;
    font-weight: 500;
    color: #666;
    margin-bottom: 0.5rem;
}

.summary-number {
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--primary-color);
}

.projects-section,
.tasks-section {
    margin-bottom: 2rem;
}

.project-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: box-shadow 0.2s ease;
}

.project-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

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

.project-header h3 {
    font-size: 1.5rem;
    margin: 0;
    color: var(--text-color);
}

.project-description {
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.project-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #666;
}

.meta-item {
    display: inline-flex;
    align-items: center;
}

.project-tasks {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.project-tasks h4 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.task-list {
    list-style: none;
    padding: 0;
}

.task-item {
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: var(--hover-bg);
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.task-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.task-title {
    font-weight: 500;
}

.task-due {
    font-size: 0.85rem;
    color: #666;
}

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

.task-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-left-width: 4px;
    border-radius: 8px;
    padding: 1.5rem;
    transition: box-shadow 0.2s ease;
}

.task-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.task-priority-high {
    border-left-color: #ef4444;
}

.task-priority-medium {
    border-left-color: #f59e0b;
}

.task-priority-low {
    border-left-color: #10b981;
}

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

.task-header h3 {
    font-size: 1.2rem;
    margin: 0;
    flex: 1;
}

.task-badges {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.task-description {
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.task-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.85rem;
    color: #666;
}

.badge {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: capitalize;
}

.badge-small {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

/* Status badges */
.badge-active,
.badge-todo,
.badge-in_progress {
    background-color: #dbeafe;
    color: #1e40af;
}

.badge-completed {
    background-color: #d1fae5;
    color: #065f46;
}

.badge-archived {
    background-color: #f3f4f6;
    color: #6b7280;
}

/* Priority badges */
.badge-high {
    background-color: #fee2e2;
    color: #991b1b;
}

.badge-medium {
    background-color: #fef3c7;
    color: #92400e;
}

.badge-low {
    background-color: #d1fae5;
    color: #065f46;
}

.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: #666;
}

.empty-state a {
    color: var(--primary-color);
    text-decoration: underline;
}
