/* Global Styles */
:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --accent-color: #f093fb;
    --text-primary: #2d3748;
    --text-secondary: #718096;
    --bg-primary: #f7fafc;
    --bg-secondary: #ffffff;
    --border-color: #e2e8f0;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
}

[data-theme="dark"] {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --accent-color: #f093fb;
    --text-primary: #f7fafc;
    --text-secondary: #cbd5e0;
    --bg-primary: #1a202c;
    --bg-secondary: #2d3748;
    --border-color: #4a5568;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: var(--transition);
}

/* Sidebar */
.sidebar {
    position: fixed;
    left: -300px;
    top: 0;
    width: 300px;
    height: 100vh;
    background: var(--bg-secondary);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.sidebar.active {
    left: 0;
}

.sidebar-header {
    padding: 25px 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-header h2 {
    font-size: 24px;
    font-weight: 700;
}

.close-sidebar {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
}

.close-sidebar:hover {
    background: rgba(255, 255, 255, 0.3);
}

.sidebar-nav {
    flex: 1;
    padding: 20px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 15px 25px;
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
    font-size: 16px;
}

.nav-item i {
    width: 24px;
    margin-right: 15px;
    font-size: 18px;
}

.nav-item:hover {
    background: var(--bg-primary);
    color: var(--primary-color);
}

.nav-item.active {
    background: linear-gradient(90deg, var(--primary-color), transparent);
    color: var(--primary-color);
    border-left: 4px solid var(--primary-color);
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.sidebar-footer p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 15px;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.social-icons a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    transition: var(--transition);
    text-decoration: none;
}

.social-icons a:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

/* Overlay */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

/* App Container */
.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.app-header {
    background: var(--bg-secondary);
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.menu-btn, .theme-toggle {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-primary);
    cursor: pointer;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.menu-btn:hover, .theme-toggle:hover {
    background: var(--bg-primary);
}

#page-title {
    font-size: 20px;
    font-weight: 700;
}

/* Main Content */
.app-content {
    flex: 1;
    padding: 20px;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

/* Pages */
.page {
    display: none;
    animation: fadeIn 0.5s ease;
}

.page.active {
    display: block;
}

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

/* Affirmation Card */
.affirmation-card {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 25px;
    padding: 40px 30px;
    text-align: center;
    color: white;
    box-shadow: var(--shadow-lg);
    margin-bottom: 30px;
    min-height: 350px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    animation: slideIn 0.6s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.affirmation-icon {
    font-size: 60px;
    margin-bottom: 30px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.affirmation-text {
    font-size: 28px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 30px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.affirmation-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.action-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid white;
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

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

.action-btn i {
    margin-right: 5px;
}

.favorite-btn.active {
    background: #ff6b6b;
    border-color: #ff6b6b;
}

.favorite-btn.active i {
    font-weight: 900;
}

/* Page Header */
.page-header {
    margin-bottom: 30px;
}

.page-header h2 {
    font-size: 28px;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.page-header p {
    color: var(--text-secondary);
    font-size: 16px;
}

.back-btn {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 14px;
    cursor: pointer;
    margin-bottom: 15px;
    transition: var(--transition);
}

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

/* Category Grid */
.quick-categories h3 {
    font-size: 20px;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.category-card {
    background: var(--bg-secondary);
    border-radius: 15px;
    padding: 25px 15px;
    text-align: center;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.category-card i {
    font-size: 36px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.category-card h4 {
    font-size: 16px;
    color: var(--text-primary);
    font-weight: 600;
}

/* Quotes List */
.quotes-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.quote-item {
    background: var(--bg-secondary);
    border-radius: 15px;
    padding: 20px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    border-left: 4px solid var(--primary-color);
}

.quote-item:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-lg);
}

.quote-text {
    font-size: 18px;
    color: var(--text-primary);
    margin-bottom: 15px;
    line-height: 1.6;
}

.quote-actions {
    display: flex;
    gap: 10px;
}

.quote-btn {
    background: var(--bg-primary);
    border: none;
    color: var(--text-primary);
    padding: 8px 15px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
}

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

.quote-btn.favorite.active {
    background: #ff6b6b;
    color: white;
}

/* Journal */
.journal-editor {
    background: var(--bg-secondary);
    border-radius: 15px;
    padding: 25px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.journal-date {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.journal-textarea {
    width: 100%;
    min-height: 200px;
    padding: 15px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 16px;
    font-family: inherit;
    background: var(--bg-primary);
    color: var(--text-primary);
    resize: vertical;
    margin-bottom: 15px;
}

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

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.journal-entries {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.journal-entry {
    background: var(--bg-secondary);
    border-radius: 15px;
    padding: 20px;
    box-shadow: var(--shadow);
}

.journal-entry-date {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.journal-entry-text {
    font-size: 16px;
    color: var(--text-primary);
    line-height: 1.6;
}

/* Reminders */
.reminder-form {
    background: var(--bg-secondary);
    border-radius: 15px;
    padding: 25px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 16px;
    background: var(--bg-primary);
    color: var(--text-primary);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
}

.reminders-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.reminder-item {
    background: var(--bg-secondary);
    border-radius: 15px;
    padding: 20px;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.reminder-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.reminder-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.reminder-time {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
}

.reminder-delete {
    background: #ff6b6b;
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
}

.reminder-delete:hover {
    transform: scale(1.1);
}

/* Settings */
.settings-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.setting-item {
    background: var(--bg-secondary);
    border-radius: 15px;
    padding: 20px;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.setting-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.setting-info i {
    font-size: 24px;
    color: var(--primary-color);
    width: 40px;
}

.setting-info h4 {
    font-size: 16px;
    color: var(--text-primary);
    margin-bottom: 3px;
}

.setting-info p {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

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

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

input:checked + .slider {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

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

/* About Page */
.about-content {
    background: var(--bg-secondary);
    border-radius: 15px;
    padding: 30px;
    box-shadow: var(--shadow);
    text-align: center;
}

.app-logo {
    font-size: 80px;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.about-content h3 {
    font-size: 24px;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.version {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 30px;
}

.about-section {
    margin-bottom: 30px;
    text-align: left;
}

.about-section h4 {
    font-size: 18px;
    color: var(--text-primary);
    margin-bottom: 15px;
}

.about-section p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.about-section ul {
    list-style: none;
}

.about-section ul li {
    padding: 8px 0;
    color: var(--text-secondary);
}

.about-section ul li i {
    color: #4caf50;
    margin-right: 10px;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.social-links a {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    font-size: 20px;
    transition: var(--transition);
    text-decoration: none;
}

.social-links a:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 50px 20px;
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 80px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 20px;
    margin-bottom: 10px;
}

/* Responsive */
@media (max-width: 768px) {
    .affirmation-text {
        font-size: 24px;
    }
    
    .category-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    
    .app-content {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .affirmation-text {
        font-size: 20px;
    }
    
    .affirmation-actions {
        flex-direction: column;
    }
    
    .action-btn {
        width: 100%;
    }
}