:root {
    --primary-color: #4CAF50;
    --secondary-color: #2196F3;
    --dark-color: #333;
    --light-color: #f4f4f4;
    --white: #ffffff;
    --gray: #777;
    --danger: #f44336;
    --sidebar-width: 260px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: var(--white);
    overflow-x: hidden;
    height: 100vh;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Common Buttons */
.btn-primary {
    background: var(--primary-color);
    color: var(--white) !important;
    padding: 10px 25px;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.btn-primary:hover { background: #43A047; }

.btn-danger {
    background: var(--danger);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
}

/* Landing Page Styles */
header {
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav { display: flex; justify-content: space-between; align-items: center; padding: 20px 0; }
.logo { display: flex; align-items: center; font-size: 1.5rem; font-weight: 700; color: var(--primary-color); }
.logo i { margin-right: 10px; }
.nav-links { display: flex; list-style: none; align-items: center;}
.nav-links li { margin-left: 30px; }
.nav-links a { text-decoration: none; color: var(--dark-color); font-weight: 600; }

.hero { padding: 80px 0; background: linear-gradient(135deg, #f0f9f1 0%, #e3f2fd 100%); }
.hero-content { display: flex; align-items: center; justify-content: space-between; }
.hero-text { flex: 1; padding-right: 50px; }
.hero-text h1 { font-size: 3.2rem; margin-bottom: 20px; line-height: 1.2; }
.highlight { color: var(--primary-color); }
.cta-buttons { display: flex; gap: 20px; margin-top: 30px; flex-wrap: wrap; }

.btn-store, .btn-web {
    display: inline-flex;
    align-items: center;
    background: #000;
    color: #fff;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    border: none;
    cursor: pointer;
}
.btn-web { background: var(--secondary-color); }
.btn-store i, .btn-web i { font-size: 1.5rem; margin-right: 12px; }
.btn-store span, .btn-web span { font-size: 0.7rem; text-align: left; line-height: 1.2;}
.btn-store strong, .btn-web strong { display: block; font-size: 1rem; }

.app-mockup { width: 280px; height: 560px; background: #333; border-radius: 40px; padding: 12px; box-shadow: 0 30px 60px rgba(0,0,0,0.2); }
.screen { width: 100%; height: 100%; background: #fff; border-radius: 25px; overflow: hidden; display: flex; flex-direction: column; }
.app-header { background: var(--primary-color); color: #fff; padding: 15px; text-align: center; font-weight: bold; }
.app-body { padding: 15px; }
.note-card { background: #f9f9f9; padding: 12px; margin-bottom: 12px; border-radius: 8px; border-left: 4px solid var(--primary-color); }

/* App UI Container */
#app-container {
    display: flex;
    height: 100vh;
    background: #f0f2f5;
}

.sidebar {
    width: var(--sidebar-width);
    background: #fff;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #ddd;
    padding: 20px 0;
}

.sidebar-header {
    padding: 0 20px 30px;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
}
.sidebar-header i { margin-right: 10px; }

.sidebar-nav { flex: 1; }
.nav-item {
    width: 100%;
    padding: 12px 25px;
    border: none;
    background: none;
    text-align: left;
    font-size: 1rem;
    color: #555;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: var(--transition);
}
.nav-item i { margin-right: 15px; width: 20px; }
.nav-item.active { background: #e8f5e9; color: var(--primary-color); border-right: 4px solid var(--primary-color); }
.nav-item:hover { background: #f5f5f5; }

.sidebar-footer { padding: 20px; border-top: 1px solid #eee; }
.user-info { display: flex; align-items: center; margin-bottom: 15px; }
.user-info img { width: 40px; height: 40px; border-radius: 50%; margin-right: 12px; }
.user-info span { font-weight: 600; font-size: 0.9rem; }
.btn-logout { width: 100%; background: none; border: 1px solid #ddd; padding: 8px; border-radius: 6px; cursor: pointer; color: var(--danger); }

/* Main App Content Area */
.app-main { flex: 1; padding: 30px; overflow-y: auto; }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; }

/* Notes Wrapper */
.notes-wrapper { display: grid; grid-template-columns: 300px 1fr; gap: 20px; height: calc(100vh - 120px); }
.notes-list { background: #fff; border-radius: 12px; overflow-y: auto; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
.note-item { padding: 15px 20px; border-bottom: 1px solid #eee; cursor: pointer; transition: var(--transition); }
.note-item:hover { background: #fafafa; }
.note-item.active { background: #e3f2fd; border-left: 4px solid var(--secondary-color); }
.note-item h4 { margin-bottom: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.note-item p { font-size: 0.8rem; color: #888; }

.note-editor {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    visibility: hidden;
    transition: background-color 0.3s ease;
}

.editor-toolbar {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
    align-items: center;
}
.editor-toolbar button {
    background: none;
    border: none;
    font-size: 1.1rem;
    color: #666;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
}
.editor-toolbar button:hover { background: #f0f0f0; color: var(--primary-color); }
.editor-toolbar input[type="color"] { border: none; width: 30px; height: 30px; cursor: pointer; background: none; }

#note-title { border: none; font-size: 1.8rem; font-weight: 700; margin-bottom: 20px; outline: none; background: transparent; }
#note-content {
    border: none;
    flex: 1;
    font-size: 1.1rem;
    outline: none;
    font-family: inherit;
    overflow-y: auto;
    background: transparent;
}
#note-content[contenteditable]:empty:before {
    content: attr(placeholder);
    color: #aaa;
}

.editor-footer { border-top: 1px solid #eee; padding-top: 20px; display: flex; justify-content: space-between; align-items: center; }
#save-status { color: #888; font-size: 0.9rem; }

/* Tasks UI */
.tasks-container { max-width: 600px; background: #fff; border-radius: 12px; padding: 25px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
.task-input-group { display: flex; gap: 10px; margin-bottom: 25px; }
.task-input-group input { flex: 1; padding: 12px; border: 1px solid #ddd; border-radius: 8px; outline: none; }
.task-item { display: flex; align-items: center; padding: 12px; border-bottom: 1px solid #eee; gap: 15px; }
.task-item span { flex: 1; font-size: 1rem; }
.task-item.completed span { text-decoration: line-through; color: #aaa; }
.btn-delete-task { background: none; border: none; color: #ccc; cursor: pointer; font-size: 1.2rem; }
.btn-delete-task:hover { color: var(--danger); }

/* Login Overlay Styles */
.overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex; align-items: center; justify-content: center;
    z-index: 2000;
}
.login-card { background: #fff; padding: 40px; border-radius: 20px; text-align: center; max-width: 400px; width: 90%; box-shadow: 0 20px 40px rgba(0,0,0,0.2); }
.login-card h2 { margin-bottom: 10px; }
.login-card p { margin-bottom: 25px; color: #666; }

.form-input {
    width: 100%;
    padding: 12px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    outline: none;
    font-size: 1rem;
}
.form-input:focus { border-color: var(--primary-color); }

.toggle-text { font-size: 0.9rem; margin-top: 15px; }
.toggle-text span { color: var(--secondary-color); font-weight: 600; cursor: pointer; text-decoration: underline; }

.divider {
    margin: 25px 0;
    position: relative;
    border-bottom: 1px solid #eee;
}
.divider span {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    padding: 0 15px;
    color: #aaa;
    font-size: 0.8rem;
}

.btn-google {
    width: 100%; display: flex; align-items: center; justify-content: center; gap: 12px;
    padding: 12px; border: 1px solid #ddd; border-radius: 8px; background: #fff;
    font-weight: 600; cursor: pointer; transition: var(--transition);
}
.btn-google:hover { background: #f5f5f5; }
.btn-google img { width: 20px; }
.btn-text { background: none; border: none; margin-top: 15px; color: #888; cursor: pointer; }

/* Footer */
footer { background: #222; color: #fff; padding: 60px 0 20px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 50px; margin-bottom: 40px; }
.footer-bottom { border-top: 1px solid #444; padding-top: 20px; text-align: center; color: #777; font-size: 0.9rem; }

/* Responsive */
@media (max-width: 768px) {
    .hero-content { flex-direction: column; text-align: center; }
    .hero-text { padding-right: 0; margin-bottom: 50px; }
    .hero-text h1 { font-size: 2.5rem; }
    .nav-links { display: none; }
    .notes-wrapper { grid-template-columns: 1fr; }
    .notes-list { display: none; }
    .sidebar { width: 70px; }
    .sidebar-header span, .nav-item span, .user-info span, .btn-logout span { display: none; }
    .sidebar-header i { margin-right: 0; }
    .nav-item i { margin-right: 0; font-size: 1.5rem; }
}
