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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    width: 80%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Хедер */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 30px;
    padding: 20px 30px;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

header h1 {
    font-size: 2rem;
    color: #1a1a1a;
    font-weight: 600;
}

/* Кнопки */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-blue {
    background-color: #0066cc;
    color: white;
    box-shadow: 0 2px 5px rgba(0,102,204,0.3);
}

.btn-blue:hover {
    background-color: #0052a3;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,102,204,0.4);
}

.btn-blue:active {
    transform: translateY(0);
}

/* Список заметок - ОДИН СТОЛБЕЦ */
.notes-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.note-card {
    background: white;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border: 1px solid rgba(0,102,204,0.1);
}

.note-card:hover {
   
    box-shadow: 0 8px 25px rgba(0,102,204,0.15);
    border-color: rgba(0,102,204,0.3);
}

.note-card h2 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: #0066cc;
    font-weight: 600;
    border-left: 4px solid #0066cc;
    padding-left: 15px;
}

.excerpt {
    color: #4a4a4a;
    margin-bottom: 20px;
    line-height: 1.8;
    font-size: 1.1rem;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #eaeef2;
    padding-top: 20px;
}

.date {
    color: #7f8c8d;
    font-size: 0.95rem;
    background: #f8f9fa;
    padding: 6px 15px;
    border-radius: 30px;
    font-weight: 500;
}

/* Полная заметка */
.full-note {
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.08);
}

.note-meta {
    color: #7f8c8d;
    font-size: 0.95rem;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eaeef2;
    background: #f8f9fa;
    padding: 15px 20px;
    border-radius: 10px;
}

.note-content {
    line-height: 1.9;
    font-size: 1.15rem;
    color: #2c3e50;
}

/* Формы */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #2c3e50;
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e1e8ed;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 0 3px rgba(0,102,204,0.1);
}

/* Админ-панель */
.admin-note-card {
    background: white;
    padding: 25px;
    margin-bottom: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border: 1px solid #eaeef2;
}

.admin-note-card h3 {
    color: #0066cc;
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.admin-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.admin-actions .btn {
    padding: 10px 20px;
    font-size: 14px;
}

.edit-form {
    margin-top: 25px;
    padding: 25px;
    background-color: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e1e8ed;
}

/* Форма входа */
.login-form {
    max-width: 450px;
    margin: 40px auto;
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.1);
}

.login-form h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
}

.error {
    background-color: #fee9e7;
    color: #c0392b;
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 25px;
    border-left: 4px solid #c0392b;
    font-weight: 500;
}

/* Пустое состояние */
.empty-state {
    text-align: center;
    padding: 80px 30px;
    background: white;
    border-radius: 16px;
    color: #95a5a6;
    font-size: 1.3rem;
    border: 2px dashed #dde4e9;
}

/* Секции админки */
.add-note {
    background: white;
    padding: 30px;
    border-radius: 16px;
    margin-bottom: 40px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.05);
}

.add-note h2,
.notes-list h2 {
    color: #2c3e50;
    margin-bottom: 25px;
    font-size: 1.6rem;
    border-bottom: 2px solid #0066cc;
    padding-bottom: 10px;
    display: inline-block;
}

/* Адаптивность */
@media (max-width: 992px) {
    .container {
        width: 90%;
    }
}

@media (max-width: 768px) {
    .container {
        width: 95%;
        padding: 15px;
    }
    
    header {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }
    
    header h1 {
        font-size: 1.8rem;
    }
    
    .note-card {
        padding: 25px;
    }
    
    .note-card h2 {
        font-size: 1.5rem;
    }
    
    .excerpt {
        font-size: 1rem;
    }
    
    .card-footer {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .card-footer .btn {
        width: 100%;
        text-align: center;
    }
    
    .date {
        text-align: center;
    }
    
    .full-note {
        padding: 25px;
    }
    
    .note-content {
        font-size: 1rem;
    }
    
    .admin-actions {
        flex-direction: column;
    }
    
    .admin-actions .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .container {
        width: 100%;
        padding: 10px;
    }
    
    header {
        border-radius: 0;
    }
    
    .note-card {
        padding: 20px;
        border-radius: 12px;
    }
    
    .note-card h2 {
        font-size: 1.3rem;
        padding-left: 10px;
    }
    
    .btn {
        width: 100%;
        text-align: center;
    }
    
    .login-form {
        padding: 25px;
        margin: 20px auto;
    }
}

/* Анимации */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.note-card {
    animation: fadeIn 0.5s ease-out;
}

/* Сообщения об успехе */
.success-message {
    background-color: #d4edda;
    color: #155724;
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 25px;
    border-left: 4px solid #28a745;
    font-weight: 500;
    animation: slideIn 0.5s ease-out;
    transition: opacity 0.5s ease;
}

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

/* Превью заметки в админке */
.note-preview {
    color: #4a4a4a;
    margin: 10px 0;
    padding: 10px;
    background: #f8fafc;
    border-radius: 8px;
    font-style: italic;
}

.note-meta-small {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.edit-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

@media (max-width: 480px) {
    .edit-actions {
        flex-direction: column;
    }
}