/* 深紫色主题样式 */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}

body {
font-family: "Microsoft YaHei", Arial, sans-serif;
background-color: #1a1a2e;
color: #e6e6ff;
line-height: 1.6;
}

.container {
max-width:100%;
margin: 0 auto;
padding: 10px;
}

/* 头部样式 */
.header {
background: linear-gradient(135deg, #4a0069, #2d0046);
padding: 15px 0;
border-bottom: 3px solid #8a2be2;
margin-bottom: 20px;
border-radius: 10px;
box-shadow: 0 4px 15px rgba(138, 43, 226, 0.3);
}

.header-content {
max-width: 800px;
margin: 0 auto;
padding: 0 20px;
display: flex;
justify-content: space-between;
align-items: center;
}

.logo {
font-size: 28px;
font-weight: bold;
color: #e6ccff;
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.nav-links {
display: flex;
gap: 20px;
}

.nav-links a {
color: #d9b3ff;
text-decoration: none;
padding: 8px 16px;
border-radius: 5px;
transition: all 0.3s ease;
}

.nav-links a:hover {
background-color: #8a2be2;
color: white;
}

/* 帖子卡片 */
.topic-card {
background: linear-gradient(145deg, #2d1b3d, #1f1f3d);
border: 1px solid #4a0069;
border-radius: 12px;
padding: 20px;
margin-bottom: 20px;
box-shadow: 0 5px 20px rgba(74, 0, 105, 0.3);
transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.topic-card:hover {
transform: translateY(-5px);
box-shadow: 0 8px 25px rgba(138, 43, 226, 0.4);
}

/* 用户信息栏 */
.user-info {
display: flex;
align-items: center;
margin-bottom: 15px;
padding-bottom: 15px;
border-bottom: 1px solid #4a0069;
}

.avatar {
width: 50px;
height: 50px;
border-radius: 50%;
background: linear-gradient(135deg, #8a2be2, #4b0082);
display: flex;
align-items: center;
justify-content: center;
font-size: 20px;
font-weight: bold;
color: white;
margin-right: 15px;
}

.user-details {
flex-grow: 1;
}

.username {
font-size: 18px;
font-weight: bold;
color: #e6ccff;
margin-bottom: 5px;
}

.follow-btn {
background: linear-gradient(135deg, #8a2be2, #4b0082);
color: white;
border: none;
padding: 6px 15px;
border-radius: 20px;
cursor: pointer;
font-size: 14px;
transition: all 0.3s ease;
}

.follow-btn:hover {
background: linear-gradient(135deg, #9b42f5, #5c00a3);
transform: scale(1.05);
}

.follow-btn.following {
background: linear-gradient(135deg, #4CAF50, #2E7D32);
}

.followers-count {
font-size: 12px;
color: #b3b3ff;
margin-top: 3px;
}

/* 帖子内容 */
.topic-tags {
margin-bottom: 10px;
}

.tag {
display: inline-block;
background: rgba(138, 43, 226, 0.2);
color: #FF9900;
padding: 0 10px 0 10px;
border-radius: 15px;
font-size: 15px;
border: 2px solid #8a2be2;
}

.topic-title {
font-size: 15px;
font-weight: bold;
color: #FF9900;
}

.topic-content {
color: rgb(136, 136, 136);
background: rgba(31, 31, 61, 0.5);
padding: 5px;
border-radius: 8px;
border-left: 22px solid #8a2be2;
overflow: hidden; /* 隐藏溢出内容 */
text-overflow: ellipsis; /* 显示省略号 */
}

/* 帖子元信息 */
.topic-meta {
display: flex;
justify-content: space-between;
align-items: center;
padding-top: 15px;
border-top: 1px solid #4a0069;
font-size: 14px;
color: #b3b3ff;
}

.meta-left {
display: flex;
gap: 20px;
}

.meta-item {
font-size: 12px;
display: flex;
align-items: center;
gap: 5px;
}

.meta-right {
display: flex;
gap: 15px;
}

/* 按钮样式 */
.btn {
background: linear-gradient(135deg, #6a0dad, #4b0082);
color: white;
border: none;
padding: 10px 20px;
border-radius: 25px;
cursor: pointer;
font-size: 14px;
text-decoration: none;
display: inline-block;
transition: all 0.3s ease;
}

.btn:hover {
background: linear-gradient(135deg, #7b1dd4, #5c00a3);
transform: translateY(-2px);
box-shadow: 0 4px 15px rgba(138, 43, 226, 0.4);
}

.btn-small {
padding: 6px 12px;
font-size: 12px;
}

.btn-danger {
background: linear-gradient(135deg, #dc3545, #c82333);
}

.btn-success {
background: linear-gradient(135deg, #28a745, #218838);
}

.btn-warning {
background: linear-gradient(135deg, #ffc107, #e0a800);
}

/* 表单样式 */
.form-group {
margin-bottom: 20px;
}

.form-control {
width: 100%;
padding: 12px;
background: rgba(45, 27, 61, 0.7);
border: 2px solid #4a0069;
border-radius: 8px;
color: #e6e6ff;
font-size: 16px;
transition: border-color 0.3s ease;
}

.form-control:focus {
outline: none;
border-color: #8a2be2;
box-shadow: 0 0 10px rgba(138, 43, 226, 0.5);
}

textarea.form-control {
min-height: 200px;
resize: vertical;
}

label {
display: block;
margin-bottom: 8px;
color: #d9b3ff;
font-weight: bold;
}

/* 登录注册页面 */
.auth-container {
max-width: 400px;
margin: 50px auto;
padding: 30px;
background: linear-gradient(145deg, #2d1b3d, #1f1f3d);
border-radius: 15px;
box-shadow: 0 10px 30px rgba(74, 0, 105, 0.4);
}

.auth-title {
text-align: center;
color: #e6ccff;
margin-bottom: 30px;
font-size: 28px;
}

/* 管理面板 */
.admin-panel {
background: linear-gradient(145deg, #1f1f3d, #2d1b3d);
border-radius: 15px;
padding: 30px;
margin-top: 20px;
}

.admin-nav {
display: flex;
gap: 10px;
margin-bottom: 30px;
flex-wrap: wrap;
}

.admin-nav a {
background: rgba(138, 43, 226, 0.3);
color: #d9b3ff;
padding: 10px 20px;
border-radius: 8px;
text-decoration: none;
transition: all 0.3s ease;
}

.admin-nav a:hover,
.admin-nav a.active {
background: #8a2be2;
color: white;
}

/* 表格样式 */
.table {
width: 100%;
border-collapse: collapse;
margin-top: 20px;
}

.table th,
.table td {
padding: 12px;
text-align: left;
border-bottom: 1px solid #4a0069;
}

.table th {
background: rgba(138, 43, 226, 0.2);
color: #e6ccff;
font-weight: bold;
}

.table tr:hover {
background: rgba(138, 43, 226, 0.1);
}

/* 个人中心 */
.profile-header {
text-align: center;
margin-bottom: 30px;
padding: 20px;
background: linear-gradient(145deg, #2d1b3d, #1f1f3d);
border-radius: 15px;
}

.profile-avatar {
width: 100px;
height: 100px;
border-radius: 50%;
background: linear-gradient(135deg, #8a2be2, #4b0082);
display: flex;
align-items: center;
justify-content: center;
font-size: 40px;
font-weight: bold;
color: white;
margin: 0 auto 15px;
}

.profile-stats {
display: flex;
justify-content: center;
gap: 30px;
margin-top: 15px;
}

.stat-item {
text-align: center;
}

.stat-number {
font-size: 24px;
font-weight: bold;
color: #e6ccff;
}

.stat-label {
font-size: 12px;
color: #b3b3ff;
}

/* 响应式设计 */
@media (max-width: 768px) {
.container {
padding: 10px;
}

.header-content {
flex-direction: column;
gap: 15px;
}

.nav-links {
width: 100%;
justify-content: center;
flex-wrap: wrap;
}

.topic-meta {
flex-direction: column;
gap: 10px;
}

.meta-left,
.meta-right {
width: 100%;
justify-content: space-between;
}

.profile-stats {
flex-direction: column;
gap: 15px;
}
}

/* 消息提示 */
.alert {
padding: 15px;
border-radius: 8px;
margin-bottom: 20px;
}

.alert-success {
background: rgba(40, 167, 69, 0.2);
border: 1px solid #28a745;
color: #b3ffb8;
}

.alert-error {
background: rgba(220, 53, 69, 0.2);
border: 1px solid #dc3545;
color: #ffb3b8;
}

.alert-info {
background: rgba(138, 43, 226, 0.2);
border: 1px solid #8a2be2;
color: #d9b3ff;
}

/* 内容样式 */
.content-bold {
font-weight: bold;
}

.content-red {
color: #ff6b6b;
}

.content-blue {
color: #6b8cff;
}

.content-green {
color: #6bff8c;
}

.content-purple {
color: #d9b3ff;
}

/* 复制成功样式 */
.btn-copy {
position: relative;
transition: all 0.3s ease;
}

.btn-copy.copied {
background: linear-gradient(to right, #4CAF50, #45a049) !important;
animation: copyPulse 0.5s ease;
}

@keyframes copyPulse {
0% {
transform: scale(1);
}
50% {
transform: scale(1.05);
}
100% {
transform: scale(1);
}
}

/* 点赞成功样式 */
.btn-like.liked {
background: linear-gradient(to right, #4CAF50, #45a049) !important;
animation: likePulse 0.5s ease;
}

@keyframes likePulse {
0% {
transform: scale(1);
}
50% {
transform: scale(1.1);
}
100% {
transform: scale(1);
}
}

/* 关注成功样式 */
.follow-btn.following {
animation: followPulse 0.5s ease;
}

@keyframes followPulse {
0% {
transform: scale(1);
}
50% {
transform: scale(1.05);
}
100% {
transform: scale(1);
}
}

/* 新功能样式 */
.btn-favorite {
background: linear-gradient(135deg, #ffc107, #e0a800);
color: #333;
}

.btn-favorite:hover:not(:disabled) {
background: linear-gradient(135deg, #ffca28, #ffb300);
transform: translateY(-2px);
}

.btn-favorite.favorited {
background: linear-gradient(135deg, #ff9800, #f57c00);
color: white;
}

.btn-favorite.favorited:hover:not(:disabled) {
background: linear-gradient(135deg, #ffa726, #fb8c00);
}

.stickied-topic {
border: 2px solid #ffc107;
position: relative;
}

.stickied-topic:before {
content: '📌 置顶';
position: absolute;
top: 10px;
right: 10px;
background: #ffc107;
color: #333;
padding: 2px 8px;
border-radius: 4px;
font-size: 12px;
font-weight: bold;
}

.locked-topic {
border: 2px solid #dc3545;
}

.locked-topic:before {
content: '🔒 锁定';
position: absolute;
top: 10px;
right: 10px;
background: #dc3545;
color: white;
padding: 2px 8px;
border-radius: 4px;
font-size: 12px;
font-weight: bold;
}

/* 统计数字样式 */
.stats-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
gap: 15px;
margin: 20px 0;
}

.stat-card {
background: linear-gradient(145deg, #2d1b3d, #1f1f3d);
border: 1px solid #4a0069;
border-radius: 10px;
padding: 15px;
text-align: center;
}

.stat-number {
font-size: 24px;
font-weight: bold;
color: #e6ccff;
margin-bottom: 5px;
}

.stat-label {
font-size: 12px;
color: #b3b3ff;
}

/* 管理操作按钮 */
.admin-controls {
display: flex;
gap: 10px;
margin-bottom: 20px;
flex-wrap: wrap;
}

.admin-controls .btn {
padding: 8px 15px;
font-size: 13px;
}

/* 表格操作列 */
.table-actions {
display: flex;
gap: 5px;
flex-wrap: wrap;
}

.table-actions .btn {
padding: 4px 8px;
font-size: 12px;
margin: 2px;
}