:root {
    --bg-main: #0f1014;
    --bg-card: #1b1d24;
    --accent: #0064ff;
    --accent-glow: rgb(81, 117, 255);
    --text-primary: #c9d4e3;
    --text-secondary: #8f9bb3;
    --success: #00e676;
    --warning: #ffab00;
    --danger: #ff1744;
    --radius: 12px;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 20px;
}

.container { max-width: 1200px; margin: 0 auto; }

/* Header & Typography */
header {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

@media (min-width: 768px) {
    header {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
    }
}

h1 {
    font-weight: 700;
    margin: 0 0 15px 0;
    font-size: 2rem;
    background: linear-gradient(to right, #fff, #aaa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Filter Bar */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
}

.chip {
    padding: 6px 14px;
    background: var(--bg-card);
    border: 1px solid #333;
    border-radius: 50px;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.chip:hover {
    border-color: var(--accent);
    color: #fff;
    transform: translateY(-1px);
}

.chip.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
    box-shadow: 0 0 12px var(--accent-glow);
}

/* Grid Layout */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 20px;
    border: 1px solid #2c303a;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

.card:hover { 
    transform: translateY(-3px); 
    border-color: #444;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.card h3 { 
    margin: 0 0 10px 0; 
    font-size: 1.2rem;
    color: #e2e8f0;
}

.card p { 
    color: var(--text-secondary); 
    line-height: 1.5; 
    font-size: 0.95rem; 
    flex-grow: 1; 
    white-space: pre-wrap; 
}

/* Actions */
.card-actions { 
    margin-top: 15px; 
    border-top: 1px solid #2c303a; 
    padding-top: 15px; 
    display: flex; 
    gap: 10px; 
    justify-content: flex-end; 
}

.btn-icon { 
    background: none; 
    border: none; 
    cursor: pointer; 
    color: #666; 
    font-size: 0.9rem; 
}
.btn-icon:hover { color: #fff; }

/* Bookmarklet Pill */
.bookmarklet-pill {
    background: var(--accent);
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: bold;
    display: inline-block;
    cursor: move; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    transition: filter 0.2s;
}
.bookmarklet-pill:hover { 
    filter: brightness(1.2); 
    box-shadow: 0 0 15px var(--accent-glow);
}

/* Hashtags */
.hashtag { 
    color: #c9d4e3; 
    background: rgba(81, 117, 255, 0.15); /* Matches accent glow */
    padding: 2px 6px; 
    border-radius: 4px; 
    font-weight: 600;
    cursor: pointer; 
}
.hashtag:hover { text-decoration: underline; }

/* Modal */
.modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8); backdrop-filter: blur(8px);
    display: flex; justify-content: center; align-items: center;
    z-index: 1000; opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
.modal.open { opacity: 1; pointer-events: all; }

.wizard-box {
    background: #1b1d24; width: 500px; max-width: 90%; border-radius: 20px;
    padding: 30px; border: 1px solid #333;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}

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

.form-group label { 
    display: block; 
    color: var(--text-secondary); 
    margin-bottom: 8px; 
    font-size: 0.9rem; 
}

.form-group input, .form-group textarea {
    width: 100%; padding: 12px; background: #0f1014; border: 1px solid #333;
    color: white; border-radius: 8px; font-family: inherit; font-size: 1rem;
    box-sizing: border-box;
}
.form-group input:focus, .form-group textarea:focus { 
    border-color: var(--accent); 
    outline: none; 
    box-shadow: 0 0 0 2px var(--accent-glow);
}

.btn-primary { 
    background: var(--accent); 
    color: white; 
    border: none; 
    padding: 10px 24px; 
    border-radius: 8px; 
    font-weight: 600; 
    cursor: pointer; 
}
.btn-primary:hover { 
    background: var(--bg-card); /* Specific hover from LifeMgr */
    outline: 1px solid var(--accent);
}

/* Toggle Buttons */
.view-toggle { 
    background: #1b1d24; 
    border: 1px solid #333; 
    border-radius: 8px; 
    padding: 4px; 
    display: flex; 
}
.toggle-btn { 
    background: transparent; 
    border: none; 
    color: #888; 
    padding: 8px 12px; 
    cursor: pointer; 
    font-size: 1.2rem; 
    border-radius: 6px;
}
.toggle-btn:hover { 
    background: #333;
    color: white; 
}