/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
}

header {
    background-color: #ff6b6b;
    color: white;
    padding: 1rem;
    text-align: center;
}

nav {
    margin-top: 1rem;
}

nav a {
    color: white;
    text-decoration: none;
    margin: 0 1rem;
    font-weight: bold;
}

nav a:hover {
    text-decoration: underline;
}

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.hero {
    text-align: center;
    padding: 3rem 0;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 1rem;
    margin-top: 2rem;
}

/* 新增样式 */
.container {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 2rem;
}

.form {
    margin-top: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: #555;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.form-group textarea {
    resize: vertical;
}

.form-group small {
    display: block;
    margin-top: 0.3rem;
    color: #888;
    font-size: 0.8rem;
}

.btn-primary {
    background-color: #ff6b6b;
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-primary:hover {
    background-color: #ff5252;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-left: 1rem;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

.username-container {
    display: flex;
    align-items: center;
}

.username-container input {
    flex: 1;
}

.login-link,
.register-link {
    margin-top: 1rem;
    text-align: center;
}

.login-link a,
.register-link a {
    color: #ff6b6b;
    text-decoration: none;
}

.login-link a:hover,
.register-link a:hover {
    text-decoration: underline;
}

.guestbook-form {
    margin-bottom: 3rem;
}

.guestbook-list {
    margin-top: 2rem;
}

.message-item {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

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

.message-username {
    font-weight: bold;
    color: #ff6b6b;
}

.message-time {
    font-size: 0.8rem;
    color: #888;
}

.message-content {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.message-actions {
    text-align: right;
}

.btn-like {
    background-color: transparent;
    border: 1px solid #ff6b6b;
    color: #ff6b6b;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-like:hover {
    background-color: #ff6b6b;
    color: white;
}