:root {
    --primary: #4caf50;
    --primary-hover: #66bb6a;
    --primary-light: rgba(76, 175, 80, 0.1);
    --accent: #fbc02d;
    --text: #e0e0e0;
    --text-muted: #a0a0a0;
    --bg: #121212;
    --card-bg: #1e1e1e;
    --border: #333;
    --radius: 12px;
    --shadow: 0 4px 12px rgba(0,0,0,0.5);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--primary-hover);
}

header {
    background: rgba(30, 30, 30, 0.8);
    backdrop-filter: blur(10px);
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

nav {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#nav-links {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

#nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 0.5rem;
    border-radius: var(--radius);
    transition: color 0.2s, background 0.2s;
    display: flex;
    align-items: center;
}

#nav-links a:hover {
    color: var(--text);
    background: var(--border);
}

#nav-links a i {
    width: 20px;
    height: 20px;
}

.logo {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

main {
    max-width: 800px;
    margin: 1.5rem auto;
    padding: 0 1.25rem;
}

h1 { font-size: 1.5rem; margin-bottom: 1rem; }
h2 { font-size: 1.25rem; margin-bottom: 0.75rem; }
h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }

.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 0.75rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

button, .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: var(--primary);
    color: #121212;
    border: none;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.1s, opacity 0.2s;
    font-size: 0.9375rem;
}

button:active {
    transform: scale(0.98);
}

button.secondary {
    background: var(--border);
    color: var(--text);
}

button.danger {
    background: #cf6679;
    color: #121212;
}

button.text-btn {
    background: transparent;
    color: var(--primary);
    padding: 0.5rem;
}

input, select, textarea {
    width: 100%;
    padding: 0.75rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    margin-bottom: 1rem;
    font-size: 0.9375rem;
    font-family: inherit;
}

input:focus {
    outline: none;
    border-color: var(--primary);
}

.plant-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 0.75rem;
}

.plant-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
}

.plant-info h3 {
    margin-bottom: 0.125rem;
    font-size: 1rem;
}

.plant-info p {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.badge {
    padding: 0.2rem 0.4rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.badge.danger {
    background: rgba(207, 102, 121, 0.15);
    color: #cf6679;
}

.badge.success {
    background: rgba(76, 175, 80, 0.15);
    color: #81c784;
}

.history-item {
    padding: 0.6rem 0.875rem;
    margin-bottom: 0.5rem;
    border-radius: var(--radius);
    background: var(--card-bg);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}

.history-date {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-left: auto;
}

.history-content {
    display: flex;
    flex-direction: column;
}

.history-main-line {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    width: 100%;
}

.history-main-line i {
    width: 14px;
    height: 14px;
}

.history-user-sub {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.125rem;
}

.history-notes {
    font-size: 0.8125rem;
    margin-top: 0.25rem;
    padding-left: 1.25rem;
    opacity: 0.9;
    border-left: 1px solid var(--border);
    margin-left: 0.375rem;
}

.notepad-container {
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    margin-bottom: 1rem;
}

.notepad-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
}

.notepad-title {
    margin-bottom: 0;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.notepad-title i {
    width: 14px;
    height: 14px;
}

.notepad-header .text-btn i {
    width: 14px;
    height: 14px;
    opacity: 0.7;
}

.notepad-preview {
    /* Base styles kept in markdown.css */
}

#notepad-textarea {
    font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.4;
    tab-size: 4;
}

.history-item.event-water { border-left: 4px solid #64b5f6; }
.history-item.event-feed { border-left: 4px solid #81c784; }
.history-item.event-prune { border-left: 4px solid #ffb74d; }
.history-item.event-harvest { border-left: 4px solid #ba68c8; }
.history-item.event-note { border-left: 4px solid var(--border); }

.event-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.5rem;
    opacity: 0.8;
}

.event-icon.water { color: #64b5f6; }
.event-icon.feed { color: #81c784; }
.event-icon.prune { color: #ffb74d; }
.event-icon.harvest { color: #ba68c8; }
.event-icon.note { color: var(--text-muted); }

#toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    background: var(--card-bg);
    color: var(--text);
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius);
    border-left: 4px solid var(--primary);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    font-size: 0.875rem;
    min-width: 200px;
    animation: slideIn 0.3s ease-out;
}

.toast.error { border-left-color: #cf6679; }

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.hidden { display: none !important; }

@media (max-width: 600px) {
    main {
        margin: 1rem auto;
    }
}

i {
    width: 18px;
    height: 18px;
}
