:root {
    --bg-color: #0f172a;
    --sidebar-bg: rgba(30, 41, 59, 0.7);
    --card-bg: rgba(30, 41, 59, 0.8);
    --text-color: #f8fafc;
    --text-muted: #94a3b8;
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --border-color: rgba(255,255,255,0.1);
}

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

html {
    font-size: 12px; /* Default is usually 16px, this makes everything scale down slightly */
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    height: 100vh;
    display: flex;
    overflow: hidden;
}

.app-container { display: flex; width: 100%; height: 100%; }

.sidebar {
    width: 320px;
    background: var(--sidebar-bg);
    backdrop-filter: blur(10px);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 24px;
    overflow-y: auto;
}

.sidebar-header { margin-bottom: 24px; }
.sidebar h2 { font-weight: 600; font-size: 1.4rem; color: var(--primary-color); }

.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    padding: 30px;
    overflow-y: auto;
}

.topbar { margin-bottom: 30px; }

.board {
    display: block;
    width: 100%;
}

.task-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    width: 320px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.task-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.4);
}

.task-title { font-weight: 600; font-size: 1.1rem; margin-bottom: 8px; color: #fff; }
.task-desc { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 16px; line-height: 1.4; }

.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-right: 8px;
}

.tree-item { margin: 8px 0; padding: 4px 0;}
.tree-project { font-weight: 600; color: #fff; display:flex; justify-content:space-between; align-items: center;}
.tree-area { margin-left: 20px; color: #cbd5e1; display:flex; justify-content:space-between; align-items: center;}
.tree-section { margin-left: 40px; color: #94a3b8; display:flex; justify-content:space-between; align-items: center; cursor:pointer;}
.tree-section:hover > span { color: var(--primary-color); }

.btn {
    padding: 10px 18px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.2s;
    font-family: inherit;
}

.btn-primary { background: var(--primary-color); color: #fff; width: 100%; }
.btn-primary:hover { background: var(--primary-hover); }

.btn-fab {
    position: fixed;
    bottom: 40px;
    right: 40px;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    font-size: 28px;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-small { 
    padding: 4px 8px; 
    font-size:0.8rem; 
    border-radius: 6px;
    background:rgba(255,255,255,0.1); 
    color:white; 
    border: none;
    cursor: pointer;
}
.btn-small:hover { background:rgba(255,255,255,0.2); }

.modal {
    display: none;
    position: fixed;
    z-index: 100;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.6);
    backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #1e293b;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 30px;
    width: 450px;
    max-width: 95%;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.modal-content h2 { margin-bottom: 20px; color: #fff;}

.close { float: right; font-size: 28px; cursor: pointer; color: var(--text-muted); line-height: 1;}
.close:hover { color: #fff; }

.form-group { margin-bottom: 18px; }
.form-group label { display: block; margin-bottom: 8px; font-size: 0.9rem; color: #cbd5e1;}
.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--border-color);
    color: white;
    font-family: inherit;
    outline: none;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
    border-color: var(--primary-color);
}

select option {
    background-color: #1e293b;
    color: #f8fafc;
}

/* Table Styles */
.tasks-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}
.tasks-table th, .tasks-table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}
.tasks-table th {
    background: rgba(15, 23, 42, 0.6);
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.9rem;
}
.tasks-table tr:last-child td {
    border-bottom: none;
}
.tasks-table tbody tr {
    transition: background 0.2s;
    cursor: pointer;
}
.tasks-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.05);
}
.tasks-table td {
    font-size: 0.95rem;
}

/* Markdown Content Styles */
.markdown-content {
    line-height: 1.5;
}
.markdown-content p {
    margin-bottom: 10px;
}
.markdown-content p:last-child {
    margin-bottom: 0;
}
.markdown-content ul, .markdown-content ol {
    margin-left: 20px;
    margin-bottom: 10px;
}
.markdown-content li {
    margin-bottom: 4px;
}
.markdown-content h1, .markdown-content h2, .markdown-content h3, .markdown-content h4, .markdown-content h5, .markdown-content h6 {
    margin-top: 15px;
    margin-bottom: 10px;
    font-weight: 600;
}
.markdown-content h1 { font-size: 1.5em; }
.markdown-content h2 { font-size: 1.3em; }
.markdown-content h3 { font-size: 1.1em; }
.markdown-content code {
    background: rgba(255,255,255,0.1);
    padding: 2px 4px;
    border-radius: 4px;
    font-family: monospace;
}
.markdown-content pre {
    background: rgba(0,0,0,0.3);
    padding: 10px;
    border-radius: 6px;
    overflow-x: auto;
    margin-bottom: 10px;
}
.markdown-content pre code {
    background: none;
    padding: 0;
}
