/* 主样式文件 - 玻璃质感版本 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #2c3e50 !important;
    background: linear-gradient(135deg, #e3f2fd 0%, #f5f5f5 100%) !important;
}

/* 容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 导航栏 */
.navbar {
    padding: 15px 0;
}

.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand {
    font-size: 24px;
    font-weight: bold;
    color: #2c3e50 !important;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.navbar-menu {
    display: flex;
    gap: 30px;
    align-items: center;
}

.navbar-menu a {
    color: #2c3e50 !important;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.navbar-menu a:hover {
    color: #3498db !important;
    transform: translateY(-2px);
}

.navbar-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    cursor: pointer;
}

/* 按钮 */
.btn {
    display: inline-block;
    padding: 10px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%) !important;
    color: white !important;
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(52, 152, 219, 0.4) !important;
    background: linear-gradient(135deg, #5dade2 0%, #3498db 100%) !important;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.8) !important;
    color: #2c3e50 !important;
    border: 1px solid rgba(200, 200, 200, 0.4);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.95) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.btn-block {
    width: 100%;
    display: block;
}

.btn-sm {
    padding: 6px 16px;
    font-size: 13px;
}

/* 表单 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #2c3e50 !important;
    font-weight: 500;
    font-size: 14px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid rgba(200, 200, 200, 0.5) !important;
    border-radius: 8px;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.7) !important;
    color: #2c3e50 !important;
    transition: all 0.3s ease;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(44, 62, 80, 0.5) !important;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: rgba(52, 152, 219, 0.6) !important;
    background: rgba(255, 255, 255, 0.9) !important;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1) !important;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-hint {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: rgba(44, 62, 80, 0.6) !important;
}

.form-checkbox {
    display: flex;
    align-items: center;
}

.form-checkbox input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
}

/* 认证页面 */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.auth-container {
    width: 100%;
    max-width: 450px;
}

.auth-card {
    width: 100%;
}

.auth-title {
    font-size: 32px;
    font-weight: bold;
    color: #2c3e50 !important;
    text-align: center;
    margin-bottom: 10px;
}

.auth-subtitle {
    font-size: 16px;
    color: rgba(44, 62, 80, 0.7) !important;
    text-align: center;
    margin-bottom: 30px;
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
    color: rgba(44, 62, 80, 0.7) !important;
    font-size: 14px;
}

.auth-footer a {
    color: #3498db !important;
    font-weight: 500;
    text-decoration: none;
    border-bottom: 1px solid #3498db;
    transition: all 0.3s ease;
}

.auth-footer a:hover {
    color: #2980b9 !important;
    border-bottom-color: #2980b9;
}

/* 帖子卡片 */
.post-card {
    margin-bottom: 20px;
    cursor: pointer;
}

.post-card-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.post-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 12px;
}

.post-user-info h4 {
    color: #2c3e50 !important;
    font-size: 16px;
    margin-bottom: 2px;
}

.post-user-info p {
    color: rgba(44, 62, 80, 0.6) !important;
    font-size: 13px;
}

.post-title {
    font-size: 20px;
    font-weight: bold;
    color: #2c3e50 !important;
    margin-bottom: 10px;
}

.post-content {
    color: rgba(44, 62, 80, 0.85) !important;
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 15px;
}

.post-images {
    display: grid;
    gap: 10px;
    margin-bottom: 15px;
}

.post-images.single {
    grid-template-columns: 1fr;
}

.post-images.double {
    grid-template-columns: repeat(2, 1fr);
}

.post-images.multiple {
    grid-template-columns: repeat(3, 1fr);
}

.post-image {
    width: 100%;
    border-radius: 12px;
    object-fit: cover;
    max-height: 300px;
}

.post-footer {
    display: flex;
    gap: 20px;
    color: rgba(44, 62, 80, 0.6) !important;
    font-size: 14px;
}

.post-footer-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* 评论区 */
.comment-section {
    margin-top: 30px;
}

.comment-item {
    background: rgba(255, 255, 255, 0.5) !important;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid rgba(200, 200, 200, 0.3);
}

.comment-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.comment-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    margin-right: 10px;
}

.comment-user {
    color: #2c3e50 !important;
    font-weight: 500;
    font-size: 14px;
}

.comment-time {
    color: rgba(44, 62, 80, 0.5) !important;
    font-size: 12px;
    margin-left: auto;
}

.comment-content {
    color: rgba(44, 62, 80, 0.85) !important;
    font-size: 14px;
    line-height: 1.6;
}

/* 个人中心 */
.profile-header {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-bottom: 30px;
}

.profile-avatar-container {
    position: relative;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-upload-btn {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.8);
    border: 2px solid #3498db;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.avatar-upload-btn:hover {
    background: rgba(255, 255, 255, 0.95);
    transform: scale(1.1);
}

.profile-info h2 {
    color: #2c3e50 !important;
    font-size: 28px;
    margin-bottom: 8px;
}

.profile-bio {
    color: rgba(44, 62, 80, 0.7) !important;
    font-size: 14px;
    margin-bottom: 15px;
}

.profile-stats {
    display: flex;
    gap: 30px;
}

.stat-item {
    text-align: center;
}

.stat-value {
    color: #3498db !important;
    font-size: 24px;
    font-weight: bold;
    display: block;
}

.stat-label {
    color: rgba(44, 62, 80, 0.6) !important;
    font-size: 13px;
}

/* 消息提示 */
.message-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 24px;
    border-radius: 12px;
    color: white;
    font-size: 14px;
    z-index: 9999;
    animation: slideIn 0.3s ease;
}

.message-toast.success {
    background: rgba(76, 175, 80, 0.9) !important;
}

.message-toast.error {
    background: rgba(244, 67, 54, 0.9) !important;
}

.message-toast.info {
    background: rgba(33, 150, 243, 0.9) !important;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(52, 152, 219, 0.3);
    border-radius: 50%;
    border-top-color: #3498db;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

/* 图片预览模态框 */
.image-preview-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    animation: fadeIn 0.3s ease;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: white;
    font-size: 50px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 100000;
}

.modal-close:hover {
    color: #f44336;
    transform: scale(1.2);
}

.modal-image {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    cursor: default;
    animation: zoomIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* 响应式 */
@media (max-width: 768px) {
    .navbar-menu {
        gap: 15px;
    }
    
    .post-images.multiple {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .profile-header {
        flex-direction: column;
        text-align: center;
    }
    
    .profile-stats {
        justify-content: center;
    }
    
    .modal-close {
        top: 10px;
        right: 20px;
        font-size: 40px;
    }
    
    .modal-image {
        max-width: 95%;
        max-height: 80vh;
    }
}
