:root {
    --primary: #4361ee;
    --secondary: #3f37c9;
    --accent: #4cc9f0;
    --light: rgba(230, 237, 246, 1);
    --dark: #212529;
    --success: #4ade80;
    --warning: #facc15;
    --error: #e90e0e;
    --black: #000000;
    --test: #ee00ff;
    --border-color: #e0e0e0;
    --bg-light: #f5f7fa;
    --text-dark: #333;
    --text-light: #666;
    --text-lighter: #999;
    --primary-light: #a5b4fc;
    --primary-color: #4361ee;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background:url('https://img.shetu66.com/2023/07/27/1690425633342731.png');
    background-size: cover;
    background-position: center;
    background-blend-mode: overlay;
    color: var(--black);
    line-height: 1.6;
    overflow-x: hidden;
}

/* 顶部导航 */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0px;
    left: 0px;
    width: 100%;
    padding: 20px;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

header a {
    text-decoration: none; /* 移除链接字体的默认样式 */
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo img {
    width: 45px;
}

.logo h1 {
    margin-bottom: 0;
    font-size: 36px;
    font-weight: 700;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

.contact-btn {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    font-size: 16px;
}

.contact-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(67, 97, 238, 0.4);
}

.articles-sidebar {
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    height: fit-content;
    width: 80vw;
    transition: all 0.3s ease;
    margin: 100px auto 30px;
}

.articles-sidebar:hover {
    box-shadow: 0 8px 30px rgba(67, 97, 238, 0.12);
}

.sidebar-header {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    color: white;
    padding: 16px 25px;
    font-size: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.sidebar-header i {
    font-size: 22px;
}

.articles-list {
    list-style: none;
    overflow-y: auto;
    padding: 0;
}

.articles-item {
    padding: 10px 15px;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
}

.articles-item:hover {
    background-color: var(--bg-light);
}

.articles-item a {
    text-decoration: none;
}

.articles-item .title {
    font-size: 17px;
    font-weight: 500;
    margin-bottom: 5px;
    display: -webkit-box;
    line-clamp: 1;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-dark);
}

.articles-item:hover .title {
    color: var(--primary);
}

.articles-item .meta {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-lighter);
}

.articles-item .meta span:first-child {
    display: flex;
    align-items: center;
    gap: 5px;
}

.pagination-container {
    display: flex;
    justify-content: center;
    flex-direction: column;
}

/* ========== 聊天窗口样式 ========== */
#chat-window {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 350px;
    height: 450px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.2);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(1);
    transform-origin: bottom right;
    transition: transform 0.3s ease, bottom 0.3s ease, right 0.3s ease;
}

#chat-window.minimized {
    background-color: var(--primary);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: move;
    overflow: hidden;
}

#chat-window.minimized .chat-header {
    background: var(--primary);
    cursor: move;
}

#chat-window.minimized .chat-header .minimize-btn {
    display: none;
}

#chat-window.minimized .chat-header .restore-btn {
    display: block;
    color: white;
    font-size: 20px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

#chat-window.minimized .chat-header h3 {
    display: none;
}

#chat-window.minimized .chat-body,
#chat-window.minimized .chat-footer {
    display: none;
}

.chat-header {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: move;
}

.chat-header h3 {
    margin: 0;
    font-size: 18px;
}

.chat-actions {
    display: flex;
    gap: 10px;
}

.chat-actions button {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 16px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.chat-actions button:hover {
    background: rgba(255, 255, 255, 0.2);
}

.restore-btn {
    display: none;
}

.chat-body {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background: #f9fafc;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.message {
    max-width: 80%;
    padding: 12px 15px;
    border-radius: 18px;
    position: relative;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message.received {
    background: white;
    border: 1px solid #e2e8f0;
    align-self: flex-start;
    border-top-left-radius: 5px;
}

.message.sent {
    background: var(--primary);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 5px;
}

.message-time {
    font-size: 10px;
    opacity: 0.7;
    margin-top: 5px;
    text-align: right;
}

.chat-footer {
    padding: 15px;
    border-top: 1px solid #e2e8f0;
    background: white;
}

.chat-input {
    display: flex;
    gap: 10px;
    align-items: center;
}

.chat-input input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #e2e8f0;
    border-radius: 30px;
    outline: none;
}

.chat-input button {
    background: var(--primary);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s;
}

.chat-input button:hover {
    background: var(--secondary);
}