:root {
    --primary-color: #6B46C1;
    --secondary-color: #EC4899;
    --accent-color: #F59E0B;
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
    --info: #3B82F6;
}

/* Dark Theme (Default) */
:root {
    --dark-bg: #0F172A;
    --light-bg: #1E293B;
    --card-bg: #334155;
    --text-primary: #F1F5F9;
    --text-secondary: #CBD5E1;
    --border-color: rgba(255, 255, 255, 0.1);
    --shadow-color: rgba(0, 0, 0, 0.4);
    --hover-bg: rgba(255, 255, 255, 0.1);
}

/* Light Theme */
[data-theme="light"] {
    --primary-color: #2563EB;
    --secondary-color: #3B82F6;
    --accent-color: #1D4ED8;
    --dark-bg: #FFFFFF;
    --light-bg: #F8FAFC;
    --card-bg: #FFFFFF;
    --text-primary: #1E293B;
    --text-secondary: #64748B;
    --border-color: rgba(0, 0, 0, 0.1);
    --shadow-color: rgba(0, 0, 0, 0.1);
    --hover-bg: rgba(0, 0, 0, 0.05);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, var(--dark-bg) 0%, var(--light-bg) 100%);
    color: var(--text-primary);
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

/* Login Page Styles */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 2rem;
}

.login-card {
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 1.5rem;
    padding: 3rem;
    box-shadow: 0 25px 50px var(--shadow-color);
    border: 1px solid var(--border-color);
    text-align: center;
    max-width: 400px;
    width: 100%;
}

.login-header {
    margin-bottom: 2rem;
}

.login-logo {
    width: 80px;
    height: 80px;
    margin-bottom: 1rem;
    object-fit: contain;
    transition: filter 0.3s ease;
}

/* Login logo invert for light theme */
[data-theme="light"] .login-logo {
    filter: invert(1) brightness(0) saturate(100%);
}

.login-header h1 {
    color: var(--text-primary);
    font-size: 2.5rem;
    margin: 0 0 0.5rem 0;
    font-weight: 700;
}

.login-tagline {
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: 0;
}

.login-form {
    text-align: left;
}

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

.login-form label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 500;
}

.login-form input {
    width: 100%;
    padding: 0.875rem;
    background: var(--hover-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.login-form input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(107, 70, 193, 0.2);
}

/* Light theme login form styling */
[data-theme="light"] .login-form input {
    background: #FFFFFF;
    border: 1px solid #D1D5DB;
}

[data-theme="light"] .login-form input:focus {
    background: #FFFFFF;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.login-btn {
    width: 100%;
    margin-top: 1rem;
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.login-info {
    margin-top: 2rem;
    padding: 1rem;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 0.5rem;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.login-info p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--success);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
}

.action-buttons {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1000;
    display: flex;
    gap: 0.5rem;
}

.action-buttons .btn-icon {
    background: transparent;
    border: none;
    box-shadow: none;
    font-size: 1.2rem;
    padding: 0.5rem;
}

.action-buttons .logout-btn {
    color: #EF4444;
}

.action-buttons .logout-btn:hover {
    color: #DC2626;
    background: transparent;
}

/* Floating Action Button */
.fab {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(107, 70, 193, 0.4);
    transition: all 0.3s ease;
    z-index: 1000;
}

.fab i {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(107, 70, 193, 0.6);
}

.app-container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* Sidebar Styles */
.sidebar {
    width: 280px;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 2rem 1.5rem;
    overflow-y: auto;
}

.logo {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.logo-image {
    width: 60px;
    height: 60px;
    margin-bottom: 0.5rem;
    object-fit: contain;
    transition: filter 0.3s ease;
}

/* Logo invert for light theme */
[data-theme="light"] .logo-image {
    filter: invert(1) brightness(0) saturate(100%);
}

.logo h1 {
    color: var(--text-primary);
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.tagline {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-style: italic;
}

.nav-menu {
    list-style: none;
    margin-bottom: 2rem;
}

.nav-item {
    padding: 0.875rem 1rem;
    margin-bottom: 0.5rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-item:hover {
    background: rgba(107, 70, 193, 0.2);
    transform: translateX(5px);
}

.nav-item.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    box-shadow: 0 4px 12px rgba(107, 70, 193, 0.4);
    color: white;
}

.nav-item.active i {
    color: white;
}

.nav-item i {
    font-size: 1.125rem;
    width: 24px;
    text-align: center;
}

.daily-quote {
    margin-top: auto;
    padding: 1.5rem;
}

.daily-quote h3 {
    font-size: 0.875rem;
    color: var(--accent-color);
    margin-bottom: 0.75rem;
}

.quote-text {
    font-style: italic;
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.quote-author {
    text-align: right;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.mobile-quote {
    display: none;
}

/* Main Content Styles */
.main-content {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
}

.page {
    display: none;
}

.page.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.page-header {
    margin-bottom: 2rem;
}

.page-header h2 {
    margin-bottom: 1rem;
}

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

.task-type-tabs {
    display: flex;
    gap: 0.3rem;
}

.tab-btn {
    padding: 0.5rem 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border-radius: 0.3rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.8rem;
    white-space: nowrap;
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

.tab-btn.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 12px rgba(107, 70, 193, 0.3);
}

.task-summary {
    margin-bottom: 1.5rem;
}

.summary-card {
    background: var(--card-bg);
    border-radius: 1rem;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}

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

.summary-header h3 {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin: 0;
}

.percentage-text {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--hover-bg);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 4px;
    transition: width 0.5s ease;
}

.summary-stats {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.completed-count {
    color: var(--success);
    font-weight: 600;
}

.task-actions {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1rem;
}

.page-header h2 {
    font-size: 2rem;
    color: var(--text-primary);
    margin: 0;
}

/* Button Styles */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(107, 70, 193, 0.4);
}

/* Task Filters */
.task-filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.5rem 1rem;
    background: var(--hover-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background: var(--hover-bg);
}

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

/* Tasks List */
.tasks-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.task-row {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: 0.5rem;
    padding: 0;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-height: 45px;
}

.task-row-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 0.5rem;
}

.task-row-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    position: relative;
    transition: transform 0.3s ease;
    z-index: 2;
}

.task-row-delete {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 80px;
    background: var(--hover-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 1.2rem;
    z-index: 1;
    cursor: pointer;
    transition: all 0.2s ease;
}

.task-row-delete:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.task-row-delete:active {
    background: rgba(255, 255, 255, 0.15);
}

.task-row.swiped .task-row-content {
    transform: translateX(-80px);
}

.task-row.goal-activity {
    border-left: 3px solid var(--primary-color);
}

.task-row.adhoc-task {
    border-left: 3px solid var(--accent-color);
}

.task-row:hover {
    background: var(--hover-bg);
    transform: translateX(3px);
    box-shadow: 0 2px 8px var(--shadow-color);
}

.task-checkbox {
    flex-shrink: 0;
}

.task-content {
    flex: 1;
    min-width: 0;
}

.task-title {
    font-size: 0.9rem;
    font-weight: 500;
    margin: 0;
    line-height: 1.3;
}

.task-icon {
    flex-shrink: 0;
    font-size: 1.2rem;
    color: var(--text-secondary);
    opacity: 0.7;
}

.task-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.task-priority {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.priority-do-first {
    background: rgba(239, 68, 68, 0.2);
    color: #EF4444;
}

.priority-schedule {
    background: rgba(59, 130, 246, 0.2);
    color: #3B82F6;
}

.priority-delegate {
    background: rgba(245, 158, 11, 0.2);
    color: #F59E0B;
}

.priority-eliminate {
    background: rgba(107, 114, 128, 0.2);
    color: #6B7280;
}

.priority-important {
    background: rgba(107, 70, 193, 0.2);
    color: var(--primary-color);
    font-weight: 600;
}


.task-description {
    color: var(--text-secondary);
    margin: 0.25rem 0;
    line-height: 1.4;
    font-size: 0.9rem;
}

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

.task-type-icon {
    font-size: 1rem;
    opacity: 0.7;
}

.linked-goal {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8rem;
    color: var(--primary-color);
    background: rgba(107, 70, 193, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    margin-bottom: 0.5rem;
}

.recurring-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: var(--success);
    background: rgba(16, 185, 129, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
}

.activity-info {
    background: rgba(107, 70, 193, 0.1);
    border: 1px solid rgba(107, 70, 193, 0.2);
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.info-text {
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.activity-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.category-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: var(--secondary-color);
    background: rgba(236, 72, 153, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
}

.duration-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: var(--info);
    background: rgba(59, 130, 246, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
}

.task-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.task-date {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.task-actions {
    display: flex;
    gap: 0.3rem;
    flex-shrink: 0;
}

.task-action {
    padding: 0.4rem;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    border-radius: 0.25rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.8rem;
}

.task-action:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.task-action.completed {
    background: var(--success);
    color: white;
    opacity: 0.8;
}

.task-action.completed:hover {
    background: var(--success);
    opacity: 1;
}

/* Vision Categories */
.vision-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.category-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: 0.75rem;
    padding: 1.25rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.category-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px var(--shadow-color);
}

.category-card i {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
}

.category-card.spiritual i { color: #C084FC; }
.category-card.personal i { color: #34D399; }
.category-card.professional i { color: #FB923C; }
.category-card.social i { color: #F472B6; }
.category-card.health i { color: #EF4444; }
.category-card.knowledge i { color: #3B82F6; }

.goals-list {
    margin-top: 1rem;
}

.goal-item {
    padding: 0.75rem;
    background: var(--hover-bg);
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.goal-item:hover {
    background: var(--hover-bg);
}

.goal-item h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    line-height: 1.3;
}

.goal-item p {
    margin: 0 0 0.5rem 0;
    font-size: 0.875rem;
    line-height: 1.4;
    color: var(--text-secondary);
}

.goal-item small {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Books Grid */
.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.book-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    text-align: center;
}

.book-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px var(--shadow-color);
}

.book-cover {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.book-cover i {
    font-size: 3rem;
    color: white;
}

.book-title {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.book-author {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.book-progress {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: width 0.3s ease;
}

.book-actions {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.goal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.goal-actions .task-action {
    padding: 0.4rem;
    font-size: 0.8rem;
}

.idea-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 1rem;
}

/* Ideas Container */
.ideas-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.idea-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.idea-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px var(--shadow-color);
}

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

.idea-category {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.category-innovation { background: rgba(168, 85, 247, 0.2); color: #A855F7; }
.category-reflection { background: rgba(59, 130, 246, 0.2); color: #3B82F6; }
.category-inspiration { background: rgba(251, 146, 60, 0.2); color: #FB923C; }
.category-project { background: rgba(34, 197, 94, 0.2); color: #22C55E; }
.category-wisdom { background: rgba(99, 102, 241, 0.2); color: #6366F1; }

.idea-favorite {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.25rem;
    transition: color 0.3s ease;
}

.idea-favorite.active {
    color: var(--accent-color);
}

.idea-title {
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
}

.idea-content {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.idea-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    padding: 0.25rem 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0.25rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* AI Coach Styles */
.ai-coach-container {
    max-width: 1200px;
    margin: 0 auto;
}

.coach-intro {
    text-align: center;
    padding: 2rem;
    background: rgba(107, 70, 193, 0.1);
    border-radius: 1rem;
    margin-bottom: 2rem;
}

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

.insight-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}

.insight-card h4 {
    margin-bottom: 1rem;
    color: var(--accent-color);
}

.chart-placeholder {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.recommendations li {
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
    padding-left: 2rem;
    position: relative;
}

.recommendations li::before {
    content: "✓";
    position: absolute;
    left: 0.75rem;
    color: var(--success);
}

/* Category styles for AI Coach */
.category-list {
    margin-top: 1rem;
}

.category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0.375rem;
    margin-bottom: 0.375rem;
    border-left: 3px solid var(--accent-color);
}

.category-name {
    font-weight: 500;
    color: var(--text-primary);
}

.category-count {
    font-size: 0.875rem;
    color: var(--text-secondary);
    background: rgba(107, 70, 193, 0.2);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
}

.productivity-content {
    margin-top: 1rem;
}

.productivity-content p {
    margin: 0.5rem 0;
    padding: 0.25rem 0;
}

.productivity-content strong {
    color: var(--accent-color);
    font-size: 1.125rem;
}

/* Settings Styles */
.settings-container {
    max-width: 800px;
    margin: 0 auto;
}

.settings-section {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
}

.settings-section h3 {
    margin-bottom: 1.5rem;
    color: var(--accent-color);
}

/* Data Action Buttons */
.data-action-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.data-action-buttons .btn {
    flex: 1;
    min-width: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 8px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

#progressText {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-align: center;
    margin: 0;
}

/* Theme Toggle Button Styles */
.theme-toggle {
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    transform: scale(1.1);
}

.theme-toggle i {
    transition: all 0.3s ease;
}

.theme-toggle-mobile {
    cursor: pointer;
}

.theme-toggle-mobile i {
    transition: all 0.3s ease;
}

/* Hide mobile header actions on desktop */
.mobile-header-actions {
    display: none;
}

/* Desktop Action Buttons */
@media (min-width: 769px) {
    .action-buttons {
        position: fixed;
        top: 1rem;
        right: 1rem;
        z-index: 1000;
        display: flex;
        gap: 0.5rem;
    }
    
    /* Hide settings from desktop navigation since we have action buttons */
    .nav-item[data-page="settings"] {
        display: none;
    }
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group input[type="datetime-local"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    background: var(--hover-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    color: var(--text-primary);
    font-size: 1rem;
}

/* Light theme specific form styling */
[data-theme="light"] .form-group input[type="text"],
[data-theme="light"] .form-group input[type="email"],
[data-theme="light"] .form-group input[type="password"],
[data-theme="light"] .form-group input[type="number"],
[data-theme="light"] .form-group input[type="date"],
[data-theme="light"] .form-group input[type="datetime-local"],
[data-theme="light"] .form-group textarea,
[data-theme="light"] .form-group select {
    background: #FFFFFF;
    border: 1px solid #D1D5DB;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--hover-bg);
}

/* Light theme focus styling */
[data-theme="light"] .form-group input:focus,
[data-theme="light"] .form-group textarea:focus,
[data-theme="light"] .form-group select:focus {
    background: #FFFFFF;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group small {
    display: block;
    margin-top: 0.25rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

.checkbox,
.toggle {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.checkbox input,
.toggle input {
    margin-right: 0.5rem;
}

.toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    margin-right: 0.75rem;
    transition: 0.3s;
}

.toggle-slider::before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: 0.3s;
}

.toggle input:checked + .toggle-slider {
    background-color: var(--primary-color);
}

.toggle input:checked + .toggle-slider::before {
    transform: translateX(26px);
}

/* Fieldset and Legend for Accessibility */
fieldset {
    border: none;
    padding: 0;
    margin: 0;
}

legend {
    padding: 0;
    color: var(--text-primary);
    font-size: 14px;
}

.reminder-times {
    display: flex;
    gap: 1rem;
}

/* Handwriting Canvas Styles */
.handwrite-toolbar {
    display: flex;
    align-items: center;
    padding: 0.5rem;
    background: var(--card-bg);
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    gap: 0.25rem;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}

.handwrite-toolbar::-webkit-scrollbar {
    height: 6px;
}

.handwrite-toolbar::-webkit-scrollbar-track {
    background: transparent;
}

.handwrite-toolbar::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.handwrite-toolbar::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

.toolbar-separator {
    width: 1px;
    height: 20px;
    background: var(--border-color);
    margin: 0 0.25rem;
}

.tool-btn {
    padding: 0.375rem 0.5rem;
    background: var(--hover-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.25rem;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-primary);
    flex-shrink: 0;
    font-size: 0.875rem;
}

.tool-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-1px);
}

.tool-btn.active {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 2px 8px rgba(107, 70, 193, 0.3);
}

.tool-btn.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.tool-btn.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(107, 70, 193, 0.4);
}

.input-mode-toggle {
    display: inline-flex;
    gap: 0;
    border: 1px solid var(--border-color);
    border-radius: 0.3rem;
    overflow: hidden;
}

.mode-btn {
    padding: 0.375rem 0.5rem;
    background: var(--hover-bg);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.mode-btn:not(:last-child) {
    border-right: 1px solid var(--border-color);
}

.mode-btn:hover {
    background: rgba(107, 70, 193, 0.1);
    color: var(--primary-color);
}

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

#pen-color {
    width: 30px;
    height: 30px;
    border: 2px solid var(--border-color);
    border-radius: 0.25rem;
    cursor: pointer;
    flex-shrink: 0;
}

#pen-size {
    padding: 0.375rem 0.5rem;
    background: var(--hover-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.25rem;
    color: var(--text-primary);
    flex-shrink: 0;
    font-size: 0.8rem;
}


.canvas-container {
    position: relative;
    background: transparent;
    border-radius: 0.5rem;
    padding: 0;
    margin-bottom: 2rem;
    overflow: hidden;
}

#handwrite-canvas {
    display: block;
    width: 100%;
    cursor: crosshair;
    touch-action: none;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    border-radius: 0.5rem;
    background-color: var(--light-bg);
    will-change: transform;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.handwrite-lines {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    pointer-events: none;
}

.processed-notes {
    background: var(--card-bg);
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.processed-notes h3 {
    margin-top: 0;
    color: var(--text-primary);
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.note-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--hover-bg);
    border-radius: 0.3rem;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.note-item:hover {
    transform: translateX(5px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.note-content {
    flex: 1;
    overflow: hidden;
}

.note-content canvas {
    display: block;
    max-width: 100%;
    height: 50px;
    border-radius: 0.2rem;
    background: var(--light-bg);
    border: 1px solid var(--border-color);
}

.note-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
    transform: translateY(-2px);
}

/* iPad/Touch optimizations */
@media (hover: none) and (pointer: coarse) {
    .tool-btn {
        padding: 0.5rem 0.75rem;
        font-size: 1rem;
    }
    
    .mode-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
    
    #pen-color {
        width: 36px;
        height: 36px;
    }
    
    .canvas-container {
        padding: 5px;
    }
    
    #handwrite-canvas {
        min-height: 700px;
    }
    
    .input-mode-toggle {
        margin-left: 0.5rem;
    }
    
    .handwrite-toolbar {
        padding: 0.375rem;
    }
}

/* Page Management Styles */
.page-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background: var(--card-bg);
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.8rem;
}

.page-info span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

#current-page-name {
    font-weight: 600;
    color: var(--text-primary);
}

#page-status {
    color: var(--text-secondary);
    font-size: 0.75rem;
}

.page-list-container {
    max-height: 60vh;
    overflow-y: auto;
}

.page-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.page-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--hover-bg);
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.page-item:hover {
    background: var(--card-bg);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.page-item .page-info h4 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1rem;
}

.page-item .page-info p {
    margin: 0.25rem 0 0 0;
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.page-actions {
    display: flex;
    gap: 0.5rem;
}

.no-pages {
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
    padding: 2rem;
}

.page-list-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}

.reminder-times label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.reminder-times input[type="checkbox"] {
    margin-right: 0.5rem;
    cursor: pointer;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--light-bg);
    border-radius: 1rem;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-content h2 {
    margin-bottom: 1.5rem;
    color: var(--accent-color);
}

.close {
    float: right;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.close:hover {
    color: var(--text-primary);
}

.reminder-content {
    text-align: center;
}

.reminder-quotes {
    margin: 2rem 0;
}

.quote-section {
    margin-bottom: 1.5rem;
    padding: 1rem;
}

.quote-section h3 {
    color: var(--accent-color);
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.reminder-message {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* Book Detail Modal Styles */
.book-detail-content {
    max-width: 700px;
    max-height: 85vh;
}

.book-detail-header {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    align-items: center;
}

@media (max-width: 768px) {
    /* Settings Mobile Styles */
    .settings-container {
        margin: 0;
        padding: 0 1rem;
        max-width: 100%;
    }
    
    .settings-section {
        padding: 1.5rem;
        margin-bottom: 1rem;
        border-radius: 0.75rem;
    }
    
    .settings-section h3 {
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }
    
    .data-action-buttons {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
        margin-top: 1rem;
    }
    
    .data-action-buttons .btn {
        width: 100%;
        justify-content: center;
        padding: 0.875rem;
        font-size: 0.95rem;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }
    
    /* Fixed action buttons at top-right */
    .action-buttons {
        display: none; /* Hide on mobile - use navigation instead */
    }
    
    .data-stats {
        font-size: 0.9rem;
        line-height: 1.6;
    }
    
    .sync-instructions ol {
        padding-left: 1.25rem;
        margin: 1rem 0;
    }
    
    .sync-instructions li {
        margin-bottom: 0.75rem;
        line-height: 1.6;
        font-size: 0.95rem;
    }
    
    .pro-tip {
        padding: 1rem;
        font-size: 0.9rem;
        margin-top: 1rem;
        border-radius: 0.5rem;
        background: rgba(59, 130, 246, 0.1);
        border: 1px solid rgba(59, 130, 246, 0.2);
    }
    
    .reminder-times {
        display: flex;
        flex-wrap: wrap;
        gap: 0.75rem;
        margin-top: 1rem;
    }
    
    .reminder-times label {
        flex: 1;
        min-width: 70px;
        text-align: center;
        padding: 0.75rem 0.5rem;
        border-radius: 0.5rem;
        background: rgba(59, 130, 246, 0.1);
        border: 1px solid rgba(59, 130, 246, 0.2);
        font-size: 0.9rem;
    }
    
    .app-info {
        font-size: 0.9rem;
        line-height: 1.6;
        margin-top: 1rem;
    }
    
    .form-group {
        margin-bottom: 1.5rem;
    }
    
    .toggle {
        font-size: 0.95rem;
    }

    .book-detail-content {
        max-width: 95vw;
        max-height: 90vh;
        margin: 0;
    }
    
    .book-detail-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .book-detail-cover {
        width: 100px !important;
        height: 130px !important;
    }
    
    .book-detail-cover i {
        font-size: 2.5rem !important;
    }
}

.book-detail-cover {
    width: 120px;
    height: 160px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.book-detail-cover i {
    font-size: 3rem;
    color: white;
}

.book-detail-info {
    flex: 1;
}

.book-detail-info h2 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.book-detail-author {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-style: italic;
}

.book-detail-progress {
    margin-bottom: 1rem;
}

.book-detail-progress .progress-bar {
    margin-bottom: 0.5rem;
}

.book-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.star-filled {
    color: var(--accent-color);
}

.star-empty {
    color: rgba(245, 158, 11, 0.3);
}

.book-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.book-section h3 {
    margin-bottom: 1rem;
    color: var(--accent-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.reflection-text {
    color: var(--text-secondary);
    line-height: 1.6;
    font-style: italic;
}

.takeaways-list {
    margin: 0;
    padding-left: 1.5rem;
}

.takeaways-list li {
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.notes-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.note-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0.5rem;
    padding: 1.25rem;
    border-left: 3px solid var(--primary-color);
}

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

.note-header h4 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1rem;
}

.page-number {
    font-size: 0.8rem;
    color: var(--accent-color);
    background: rgba(245, 158, 11, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
}

.note-quote {
    margin: 0.75rem 0;
    padding: 1rem;
    background: rgba(107, 70, 193, 0.1);
    border-left: 3px solid var(--primary-color);
    border-radius: 0.25rem;
    font-style: italic;
    color: var(--text-primary);
}

.note-reflection {
    margin: 0.75rem 0;
    color: var(--text-secondary);
    line-height: 1.5;
}

.note-date {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.book-detail-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
}

/* Responsive Design */
@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        padding: 1rem;
    }
    
    .logo {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
        text-align: left;
        padding-bottom: 1rem;
        margin-bottom: 1rem;
    }
    
    .logo-image {
        width: 40px;
        height: 40px;
        margin-bottom: 0;
        flex-shrink: 0;
    }
    
    .logo-content {
        flex: 1;
    }
    
    .logo h1 {
        font-size: 1.5rem;
        margin-bottom: 0;
    }
    
    .tagline {
        display: none;
    }
    
    .mobile-header-actions {
        display: flex;
        gap: 0.5rem;
        align-items: center;
    }
    
    .mobile-action-btn {
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid var(--border-color);
        border-radius: 0.5rem;
        color: var(--text-secondary);
        cursor: pointer;
        font-size: 1rem;
        padding: 0.5rem;
        transition: all 0.3s ease;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
    }
    
    .mobile-action-btn:hover {
        background: var(--hover-bg);
        color: var(--text-primary);
        transform: scale(1.05);
    }
    
    .logout-btn-mobile {
        color: var(--danger);
    }
    
    .logout-btn-mobile:hover {
        color: #DC2626;
    }
    
    /* Show mobile header actions on mobile */
    .mobile-header-actions {
        display: flex;
    }
    
    .nav-menu {
        display: flex;
        overflow-x: auto;
        gap: 0.5rem;
        margin-bottom: 1rem;
    }
    
    .nav-item {
        white-space: nowrap;
        font-size: 0.9rem;
        padding: 0.75rem;
        flex-direction: column;
        text-align: center;
        gap: 0.25rem;
        flex: 1;
    }
    
    .nav-item i {
        font-size: 1.2rem;
    }
    
    .nav-item span {
        display: block;
        font-size: 0.7rem;
        opacity: 0.8;
    }
    
    .daily-quote {
        display: none;
    }
    
    .mobile-quote {
        display: block;
        margin: 1rem 0;
        padding: 1rem;
    }
    
    .main-content {
        padding: 1rem;
    }
    
    .vision-categories,
    .tasks-list,
    .books-grid,
    .ideas-container {
        grid-template-columns: 1fr;
    }
    
    .category-card {
        padding: 1rem;
        border-radius: 0.5rem;
    }
    
    .category-card i {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }
    
    .goal-item {
        padding: 0.5rem;
        margin-bottom: 0.4rem;
    }
    
    .goal-item h4 {
        font-size: 0.9rem;
        margin-bottom: 0.25rem;
    }
    
    .goal-item p {
        font-size: 0.8rem;
        margin-bottom: 0.25rem;
    }
    
    .goal-actions .task-action {
        padding: 0.3rem;
        font-size: 0.75rem;
    }
    
    .task-main {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .login-card {
        padding: 2rem;
        margin: 1rem;
    }
    
    .login-header h1 {
        font-size: 2rem;
    }
}

/* Book Edit Modal Styles */
.book-edit-content {
    max-width: 700px;
}

.book-edit-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.book-cover-section {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.current-cover {
    flex-shrink: 0;
}

.current-cover img {
    border-radius: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.cover-upload {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.notes-editor-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.editor-toolbar {
    display: flex;
    gap: 0.25rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0.5rem;
    padding: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.format-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text-primary);
    padding: 0.5rem;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 36px;
}

.format-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

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

.notes-editor {
    min-height: 300px;
    max-height: 400px;
    overflow-y: auto;
    background: var(--hover-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1rem;
    color: var(--text-primary);
    font-family: inherit;
    line-height: 1.6;
}

.notes-editor:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

/* Light theme notes editor styling */
[data-theme="light"] .notes-editor {
    background: #FFFFFF;
    border: 1px solid #D1D5DB;
}

[data-theme="light"] .notes-editor:focus {
    background: #FFFFFF;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.notes-editor ul {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.notes-editor ol {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.notes-editor li {
    margin: 0.25rem 0;
}

.notes-editor h1, .notes-editor h2, .notes-editor h3 {
    margin: 1rem 0 0.5rem 0;
    color: var(--accent-color);
}

.notes-editor p {
    margin: 0.5rem 0;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1rem;
}

.upload-progress {
    display: none;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.upload-progress .spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* In-place editing styles for book detail modal */
.notes-editable {
    min-height: 150px;
    padding: 1rem;
    background: var(--hover-bg);
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.clickable-notes {
    cursor: pointer;
}

.clickable-notes:hover {
    background: var(--hover-bg);
    border-color: var(--border-color);
}

.notes-editable.editing {
    background: var(--hover-bg);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
    outline: none;
    cursor: text;
}

/* Light theme notes editable styling */
[data-theme="light"] .notes-editable {
    background: #FFFFFF;
    border: 1px solid #D1D5DB;
}

[data-theme="light"] .clickable-notes:hover {
    background: #F9FAFB;
    border-color: #9CA3AF;
}

[data-theme="light"] .notes-editable.editing {
    background: #FFFFFF;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.notes-editable:focus {
    outline: none;
}

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

.notes-header h3 {
    margin: 0;
}

.btn.btn-small {
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
}

.book-detail-cover {
    position: relative;
    transition: all 0.3s ease;
}

.book-detail-cover:hover .cover-upload-overlay {
    opacity: 1;
}

.cover-upload-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    transition: opacity 0.3s ease;
    opacity: 0;
}

.book-detail-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0.5rem;
}

#detail-editor-toolbar {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0.5rem;
    padding: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 0.5rem;
}

/* Settings Page Styles */
.sync-instructions {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0.5rem;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.sync-instructions ol {
    margin: 0 0 1rem 0;
    padding-left: 1.5rem;
}

.sync-instructions li {
    margin: 0.5rem 0;
    color: var(--text-primary);
}

.pro-tip {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 0.5rem;
    padding: 1rem;
    margin-top: 1rem;
    color: var(--primary-color);
}

.app-info {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0.5rem;
    padding: 1rem;
    margin-top: 1rem;
}

.app-info p {
    margin: 0.25rem 0;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

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

.data-stats .stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0.5rem;
    padding: 1rem;
    text-align: center;
}

.data-stats .stat-item i {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.data-stats .stat-item span {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.btn-danger {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
}

.btn-danger:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}