/* ============================================================
   style.css — оформление гостевой книги
   ============================================================ */

* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea, #764ba2);
    min-height: 100vh;
    margin: 0;
    padding: 30px 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

h1 {
    color: #fff;
    text-align: center;
    margin-bottom: 25px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.container {
    width: 100%;
    max-width: 700px;
}

.form-card {
    background: #fff;
    border-radius: 12px;
    padding: 25px 30px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    margin-bottom: 25px;
}

.form-card h2 {
    margin-top: 0;
    color: #333;
    font-size: 20px;
}

label {
    display: block;
    margin-bottom: 6px;
    color: #555;
    font-weight: 600;
    font-size: 14px;
}

input[type="text"],
textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    margin-bottom: 16px;
}

input[type="text"]:focus,
textarea:focus {
    border-color: #667eea;
    outline: none;
}

textarea {
    resize: vertical;
    min-height: 90px;
}

.btn {
    padding: 11px 22px;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.btn-primary {
    background: #667eea;
    color: #fff;
}

.btn-primary:hover {
    background: #5568d3;
}

.btn-danger {
    background: #e74c3c;
    color: #fff;
}

.btn-danger:hover {
    background: #c0392b;
}

.btn-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 14px;
}

.alert-error {
    background: #fdecea;
    color: #b71c1c;
    border-left: 4px solid #e74c3c;
}

.alert-success {
    background: #e8f5e9;
    color: #1b5e20;
    border-left: 4px solid #4caf50;
}

.alert ul {
    margin: 0;
    padding-left: 20px;
}

.messages-card {
    background: #fff;
    border-radius: 12px;
    padding: 25px 30px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.messages-card h2 {
    margin-top: 0;
    color: #333;
    font-size: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.badge {
    background: #667eea;
    color: #fff;
    font-size: 13px;
    padding: 3px 10px;
    border-radius: 12px;
}

.message {
    padding: 12px 0;
    border-bottom: 1px solid #eee;
    font-size: 15px;
    color: #333;
    line-height: 1.5;
    word-wrap: break-word;
}

.message:last-child {
    border-bottom: none;
}

.message-name {
    font-weight: 700;
    color: #667eea;
}

.message-date {
    color: #999;
    font-size: 12px;
}

.empty {
    color: #888;
    font-style: italic;
    text-align: center;
    padding: 20px 0;
}