* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f5f5f5;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

h1 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
}

/* Карточка формы */
.form-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.form-card h2 {
    margin-bottom: 20px;
    color: #555;
}

input, textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
}

textarea {
    resize: vertical;
}

.btn-primary {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: #45a049;
}

.btn-secondary {
    background: #999;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    margin-left: 10px;
}

.btn-secondary:hover {
    background: #777;
}

/* Список заметок */
.notes-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.note-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

.note-card:hover {
    transform: translateY(-2px);
}

.note-card h3 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.2em;
}

.note-card p {
    color: #666;
    line-height: 1.5;
    margin-bottom: 15px;
    white-space: pre-wrap;
}

.note-date {
    font-size: 12px;
    color: #999;
    margin-bottom: 15px;
}

.card-buttons {
    display: flex;
    gap: 10px;
}

.btn-edit {
    background: #2196F3;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
}

.btn-delete {
    background: #f44336;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
}

.loading {
    text-align: center;
    color: #999;
    padding: 40px;
}