:root {
    --bg: #0a0a0a;
    --card-bg: #141414;
    --accent: #c5a059;
    --text-main: #e0e0e0;
    --text-dim: #888;
    --glass: rgba(255, 255, 255, 0.03);
}

body {
    background-color: var(--bg);
    color: var(--text-main);
    font-family: 'Inter', -apple-system, sans-serif;
    margin: 0;
    line-height: 1.6;
}

h1, h2, .logo {
    font-family: 'Playfair Display', serif;
    letter-spacing: 1px;
}

.container { max-width: 1000px; margin: 0 auto; padding: 2rem; }

/* Luxury Glassmorphism */
.card {
    background: var(--card-bg);
    border: 1px solid rgba(197, 160, 89, 0.1);
    border-radius: 12px;
    padding: 2rem;
    transition: transform 0.3s ease, border 0.3s ease;
}

.card:hover {
    border-color: var(--accent);
    transform: translateY(-5px);
}

/* Inputs & Buttons */
input, textarea {
    background: #1a1a1a;
    border: 1px solid #333;
    color: white;
    padding: 12px;
    border-radius: 6px;
    width: 100%;
    margin-bottom: 1rem;
}

input:focus { border-color: var(--accent); outline: none; }

.btn {
    background: var(--accent);
    color: black;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 2px;
    transition: opacity 0.3s;
}

.btn:hover { opacity: 0.8; }

.btn-secondary { background: transparent; color: var(--accent); border: 1px solid var(--accent); }

/* Note Grid */
.note-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.nav { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4rem; }

/* Global Light Mode Overrides */
:root.light-mode {
    --bg: #f9f9f7;
    --card-bg: #ffffff;
    --text-main: #1a1a1a;
    --text-dim: #666666;
    --accent: #b38b47;
}

:root.light-mode input, 
:root.light-mode textarea {
    background: #f0f0f0;
    border: 1px solid #e0e0e0;
    color: #1a1a1a;
}

:root.light-mode .card {
    border-color: #eaeaea;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
}

.theme-switch:hover {
    background: var(--accent);
    color: var(--bg);
}



/* =========================================
   MOBILE OPTIMIZATION (Screens under 600px)
   ========================================= */
@media (max-width: 600px) {
    /* 1. Reclaim screen space by reducing container padding */
    .container {
        padding: 1rem;
    }

    /* 2. Adjust typography so giant headers don't wrap weirdly */
    h1 { font-size: 2.2rem !important; }
    h2 { font-size: 1.5rem; }
    
    /* 3. Stack the navigation elegantly */
    .nav {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        margin-bottom: 2rem;
    }
    
    /* 4. Make navigation buttons wrap neatly */
    .nav div {
        display: flex;
        flex-wrap: wrap;
        width: 100%;
        justify-content: space-between;
    }

    /* 5. Force the grid to exactly 1 column to prevent overflow */
    .note-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    /* 6. Make buttons slightly more compact */
    .btn, .theme-switch {
        padding: 8px 16px;
        font-size: 0.7rem;
    }
    
    /* 7. Stack the footer elements */
    footer {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
        margin-top: 4rem !important;
    }
}