/* ===== 全局样式 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
}

/* ===== 玻璃态效果卡片 ===== */
.glass-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 30px;
    margin-bottom: 25px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ===== 导航栏 ===== */
.nav-bar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    padding: 15px 25px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.nav-title {
    font-size: 28px;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

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

.nav-link {
    padding: 10px 20px;
    border-radius: 40px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    background: #f0f2f5;
    color: #4a5568;
    border: 1px solid transparent;
}

.nav-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.nav-link.primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.nav-link.admin {
    background: #2d3748;
    color: white;
}

/* ===== 帖子卡片 ===== */
.posts-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.post-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 25px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.post-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 600;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.post-meta {
    flex: 1;
}

.author {
    font-weight: 700;
    font-size: 16px;
    color: #2d3748;
    margin-bottom: 5px;
}

.author a {
    color: #2d3748;
    text-decoration: none;
}

.author a:hover {
    color: #667eea;
}

.time {
    font-size: 13px;
    color: #718096;
    display: flex;
    align-items: center;
    gap: 5px;
}

.time::before {
    content: '🕒';
    font-size: 12px;
}

.post-content {
    font-size: 16px;
    line-height: 1.7;
    color: #4a5568;
    margin-bottom: 20px;
    white-space: pre-wrap;
}

/* ===== 媒体网格 ===== */
.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    margin: 20px 0;
}

.media-item {
    border-radius: 15px;
    overflow: hidden;
    aspect-ratio: 1/1;
    cursor: pointer;
    position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.media-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.media-item:hover img {
    transform: scale(1.1);
}

.media-item.video-item {
    aspect-ratio: 16/9;
    grid-column: span 2;
}

.media-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ===== 帖子链接 ===== */
.post-link {
    background: #f7fafc;
    padding: 15px 20px;
    border-radius: 20px;
    margin: 15px 0;
    border-left: 5px solid #667eea;
    word-break: break-all;
}

.post-link a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.post-link a:hover {
    text-decoration: underline;
}

/* ===== 按钮样式 ===== */
.btn-view {
    display: inline-block;
    padding: 8px 20px;
    background: #f7fafc;
    border-radius: 30px;
    color: #4a5568;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-view:hover {
    background: #667eea;
    color: white;
    transform: translateX(5px);
}

/* ===== 表单样式 ===== */
.form-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 30px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2d3748;
    font-size: 15px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 20px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: white;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

/* ===== 按钮 ===== */
.btn-primary {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.6);
}

/* ===== 登录/注册卡片 ===== */
.auth-card {
    max-width: 450px;
    margin: 50px auto;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 40px;
    padding: 40px;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.3);
}

.auth-title {
    text-align: center;
    margin-bottom: 30px;
    font-size: 32px;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ===== 验证码组 ===== */
.code-group {
    display: flex;
    gap: 10px;
}

.send-code-btn {
    padding: 0 20px;
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 30px;
    color: #4a5568;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.send-code-btn:hover:not(:disabled) {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.send-code-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===== 消息提示 ===== */
.message {
    padding: 15px 20px;
    border-radius: 20px;
    margin-bottom: 25px;
    text-align: center;
    font-weight: 500;
    animation: slideDown 0.3s ease;
}

.message.success {
    background: #c6f6d5;
    color: #22543d;
    border: 1px solid #9ae6b4;
}

.message.error {
    background: #fed7d7;
    color: #742a2a;
    border: 1px solid #fc8181;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== 个人主页 ===== */
.profile-header {
    text-align: center;
    margin-bottom: 30px;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin: 0 auto 20px;
    overflow: hidden;
    border: 4px solid white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-name {
    font-size: 28px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 10px;
}

.profile-qq {
    display: inline-block;
    padding: 8px 25px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 40px;
    color: #4a5568;
    font-size: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* ===== 标签页 ===== */
.tabs {
    display: flex;
    gap: 10px;
    background: rgba(255, 255, 255, 0.9);
    padding: 10px;
    border-radius: 50px;
    margin-bottom: 25px;
}

.tab-btn {
    flex: 1;
    padding: 12px;
    border: none;
    background: transparent;
    border-radius: 40px;
    font-size: 15px;
    font-weight: 600;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* ===== 分享栏 ===== */
.share-bar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    padding: 15px 25px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.share-bar input {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 40px;
    font-size: 14px;
    background: white;
}

.btn-copy {
    padding: 12px 30px;
    background: #2d3748;
    color: white;
    border: none;
    border-radius: 40px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-copy:hover {
    background: #1a202c;
    transform: translateY(-2px);
}

/* ===== 后台表格 ===== */
.table-container {
    overflow-x: auto;
    background: white;
    border-radius: 20px;
    padding: 20px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th {
    background: #f7fafc;
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #2d3748;
}

.admin-table td {
    padding: 15px;
    border-bottom: 1px solid #e2e8f0;
}

.admin-table tr:hover {
    background: #f7fafc;
}

.btn-edit {
    padding: 6px 15px;
    background: #e2e8f0;
    border: none;
    border-radius: 20px;
    color: #2d3748;
    cursor: pointer;
    margin-right: 5px;
}

.btn-delete {
    padding: 6px 15px;
    background: #fed7d7;
    border: none;
    border-radius: 20px;
    color: #742a2a;
    cursor: pointer;
}

/* ===== 底部备案号 ===== */
.footer {
    text-align: center;
    padding: 20px;
    margin-top: 40px;
    color: rgba(255, 255, 255, 0.8);
}

.footer a {
    color: white;
    text-decoration: none;
    font-size: 14px;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.footer a:hover {
    opacity: 1;
    text-decoration: underline;
}

/* ===== 响应式设计 ===== */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .glass-card {
        padding: 20px;
    }
    
    .nav-bar {
        flex-direction: column;
        text-align: center;
    }
    
    .nav-links {
        justify-content: center;
    }
    
    .media-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .share-bar {
        flex-direction: column;
    }
    
    .share-bar input {
        width: 100%;
    }
    
    .btn-copy {
        width: 100%;
    }
}