/* Styles/notes.css */

:root {
    --bg-dark: #0f0f11;
    --bg-surface: #1a1a1d;
    --bg-glass: rgba(26, 26, 29, 0.7);
    --text-main: #ffffff;
    --text-muted: #8b8b8b;
    --accent-blue: #3794ff;
    --accent-blue-glow: rgba(55, 148, 255, 0.3);
    --accent-green: #2ea043;
    --accent-red: #d73a49;
    --border: #2d2d2d;
}

body {
    margin: 0;
    background-color: var(--bg-dark);
    /* Subtle radial glow in the background */
    background-image: radial-gradient(circle at 50% 0%, #1e1e24 0%, var(--bg-dark) 70%);
    color: var(--text-main);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.hidden { display: none !important; }

/* TOP NAV */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
}

.brand-link { color: var(--text-muted); text-decoration: none; font-weight: bold; letter-spacing: 1px; transition: 0.2s;}
.brand-link:hover { color: var(--text-main); }

.nav-controls { display: flex; gap: 15px; }

.search-bar {
    background: var(--bg-dark);
    border: 1px solid var(--border);
    color: white;
    padding: 10px 15px;
    border-radius: 8px;
    width: 250px;
    outline: none;
    transition: 0.2s;
}
.search-bar:focus { border-color: var(--accent-blue); }

.btn-primary, .btn-success, .btn-danger, .btn-icon {
    border: none;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    color: white;
    transition: 0.2s;
}

.btn-primary { background: var(--bg-dark); border: 1px solid var(--border); }
.btn-primary:hover { background: var(--accent-blue); border-color: var(--accent-blue); }
.btn-success { background: var(--accent-green); }
.btn-success:hover { filter: brightness(1.2); }
.btn-danger { background: transparent; border: 1px solid var(--border); color: var(--text-muted); }
.btn-danger:hover { background: var(--accent-red); border-color: var(--accent-red); color: white; }
.btn-icon { background: transparent; color: var(--text-muted); }
.btn-icon:hover { color: white; }

/* MAIN GRIDS */
.grid-container {
    flex-grow: 1;
    padding: 40px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.notebook-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

#notes-grid, #view-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

/* WIDGET CARDS */
.widget-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 140px;
}

.widget-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-blue);
    box-shadow: 0 10px 30px var(--accent-blue-glow);
}

.widget-title { font-size: 1.2rem; font-weight: bold; margin-bottom: 10px; }
.widget-subtitle { color: var(--text-muted); font-size: 0.9rem; flex-grow: 1; }
.widget-footer { color: var(--accent-blue); font-size: 0.8rem; font-weight: bold; display: flex; justify-content: space-between;}
.delete-nb-btn { background: none; border: none; color: var(--text-muted); cursor: pointer; transition: 0.2s;}
.delete-nb-btn:hover { color: var(--accent-red); }

/* GLASSMODAL (The Editor) */
.glass-modal {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(15px); /* The frosted glass effect */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    width: 80%;
    max-width: 900px;
    height: 80vh;
    border-radius: 16px;
    padding: 40px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px rgba(0,0,0,0.5);
}

.editor-toolbar { display: flex; justify-content: space-between; margin-bottom: 30px; }
.editor-actions { display: flex; gap: 10px; }

.editor-title {
    background: transparent; border: none; color: white;
    font-size: 2.5rem; font-weight: bold; margin-bottom: 20px; outline: none;
}
.editor-body {
    background: transparent; border: none; color: #d4d4d4;
    font-size: 1.1rem; line-height: 1.7; resize: none; flex-grow: 1; outline: none;
}