* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #e8f4f8 0%, #b8d8e8 100%);
    min-height: 100vh;
    padding: 40px 20px;
}

.container {
    max-width: 720px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    border-radius: 28px;
    padding: 40px 36px;
    box-shadow: 0 20px 60px rgba(0, 20, 30, 0.15);
}

h1 {
    font-size: 28px;
    color: #1a3a4a;
    text-align: center;
    margin-bottom: 4px;
}

.subtitle {
    text-align: center;
    color: #5a7a8a;
    font-size: 14px;
    margin-bottom: 30px;
}

/* 表单 */
.form-box {
    background: #f0f7fb;
    border-radius: 16px;
    padding: 24px 24px 20px;
    margin-bottom: 32px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1a3a4a;
    margin-bottom: 4px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #c8dce6;
    border-radius: 10px;
    font-size: 15px;
    background: #ffffff;
    transition: 0.25s;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #4a9bb5;
    box-shadow: 0 0 0 3px rgba(74, 155, 181, 0.2);
}

.btn {
    width: 100%;
    padding: 12px;
    background: #2a6a7a;
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.25s;
    letter-spacing: 2px;
}

.btn:hover {
    background: #1a4a5a;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26, 74, 90, 0.25);
}

/* 留言列表 */
.messages h2 {
    font-size: 20px;
    color: #1a3a4a;
    border-bottom: 2px solid #d8e8f0;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.empty {
    text-align: center;
    color: #8aaaba;
    padding: 30px 0;
    font-size: 15px;
}

.msg-item {
    background: #f8fcff;
    border-radius: 14px;
    padding: 16px 20px;
    margin-bottom: 14px;
    border-left: 4px solid #4a9bb5;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: 0.2s;
}

.msg-item:hover {
    background: #ffffff;
    box-shadow: 0 4px 16px rgba(0, 20, 30, 0.08);
}

.msg-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.msg-name {
    font-weight: 700;
    color: #1a4a5a;
    font-size: 16px;
}

.msg-time {
    font-size: 12px;
    color: #8aaaba;
}

.msg-content {
    font-size: 15px;
    color: #1a2a3a;
    line-height: 1.6;
    word-break: break-word;
}


/* ===== 导航栏 ===== */
.nav {
    display: flex;
    gap: 20px;
    padding: 12px 0;
    margin-bottom: 20px;
    border-bottom: 2px solid #d8e8f0;
}
.nav a {
    text-decoration: none;
    color: #5a7a8a;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 20px;
    transition: 0.25s;
}
.nav a:hover {
    background: #e8f4f8;
}
.nav a.active {
    background: #2a6a7a;
    color: #fff;
}

/* ===== 聊天界面 ===== */
.chat-box {
    height: 400px;
    overflow-y: auto;
    background: #f8fcff;
    border-radius: 16px;
    padding: 16px;
    margin: 16px 0 12px;
    border: 1px solid #d8e8f0;
}
.chat-box .msg-item {
    margin-bottom: 12px;
    max-width: 80%;
    padding: 0;
    border-left: none;
    box-shadow: none;
}
.chat-box .msg-item.user {
    margin-left: auto;
    text-align: right;
}
.chat-box .msg-item.user .msg-content {
    background: #2a6a7a;
    color: #fff;
    padding: 10px 16px;
    border-radius: 16px 16px 4px 16px;
    display: inline-block;
}
.chat-box .msg-item.bot .msg-content {
    background: #e8f0f5;
    padding: 10px 16px;
    border-radius: 16px 16px 16px 4px;
    display: inline-block;
}
.chat-box .msg-item.bot {
    margin-right: auto;
    text-align: left;
}

.chat-input-area {
    display: flex;
    gap: 10px;
    margin-top: 6px;
}
.chat-input-area input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #c8dce6;
    border-radius: 12px;
    font-size: 15px;
    outline: none;
}
.chat-input-area input:focus {
    border-color: #4a9bb5;
    box-shadow: 0 0 0 3px rgba(74, 155, 181, 0.2);
}
.chat-input-area button {
    padding: 12px 28px;
    background: #2a6a7a;
    color: #fff;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.25s;
}
.chat-input-area button:hover {
    background: #1a4a5a;
    transform: translateY(-2px);
}

/* 响应式 */
@media (max-width: 500px) {
    .container {
        padding: 24px 16px;
        border-radius: 18px;
    }
    h1 {
        font-size: 22px;
    }
}