:root {
    --primary: #667eea;
    --primary-dark: #5a67d8;
    --secondary: #764ba2;
    --success: #48bb78;
    --danger: #f56565;
    --warning: #ed8936;
    --info: #4299e1;
    --bg-grad-start: #667eea;
    --bg-grad-end: #764ba2;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, var(--bg-grad-start) 0%, var(--bg-grad-end) 100%);
    min-height: 100vh;
    padding: 20px;
    color: #2d3748;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 40px;
}

h1 { color: #1a202c; margin-bottom: 10px; font-size: 2.5em; }

.url-info {
    background: #edf2f7;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.url-info .id-display { font-family: monospace; background: #fff; padding: 4px 8px; border-radius: 4px; border: 1px solid #cbd5e0; }

.plant-form {
    background: #f7fafc;
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 30px;
    border: 1px solid #edf2f7;
}

.form-group { margin-bottom: 20px; }
label { display: block; margin-bottom: 8px; color: #4a5568; font-weight: 600; }

input, select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s;
}

input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1); }

.btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.1s, background 0.3s;
}

.btn:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-add { background: var(--success); width: 100%; }
.btn-add:hover { background: #38a169; }

.btn-water { background: var(--info); }
.btn-water:hover { background: #3182ce; }

.btn-delete { background: var(--danger); }
.btn-delete:hover { background: #e53e3e; }

.plant-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
}

.plant-card:hover { transform: translateY(-2px); box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05); }

.plant-card.needs-water {
    border-color: var(--danger);
    background: #fff5f5;
    box-shadow: 0 0 0 1px var(--danger);
}

.plant-header { display: flex; justify-content: space-between; align-items: start; margin-bottom: 15px; }
.plant-header h3 { font-size: 1.25em; color: #2d3748; }

.plant-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
    font-size: 0.95em;
}

.stat-label { color: #718096; font-size: 0.85em; text-transform: uppercase; letter-spacing: 0.05em; }
.stat-value { color: #2d3748; font-weight: 600; }

.action-buttons { display: flex; gap: 10px; flex-wrap: wrap; margin-top: auto; }

.alert {
    background: #fed7d7;
    color: #c53030;
    padding: 8px 12px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9em;
    margin-top: 10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.message {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: none;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.message.success { background: #c6f6d5; color: #22543d; display: block; }
.message.error { background: #fed7d7; color: #c53030; display: block; }

.timezone-info { margin-top: 25px; text-align: center; color: #718096; font-size: 0.85em; }

.link-button {
    background: none;
    border: none;
    padding: 0;
    width: auto;
    color: var(--primary-dark);
    font: inherit;
    text-decoration: underline;
    cursor: pointer;
}

@media (max-width: 640px) {
    .container { padding: 20px; }
    .url-info { flex-direction: column; align-items: stretch; }
}
