/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f7fa;
}

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

/* 头部样式 */
.main-header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo h1 a {
    text-decoration: none;
    color: #4361ee;
    font-size: 1.8rem;
}

.main-nav ul {
    display: flex;
    list-style: none;
}

.main-nav ul li {
    margin: 0 15px;
}

.main-nav ul li a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s;
    display: flex;
    align-items: center;
}

.main-nav ul li a i {
    margin-right: 5px;
}

.main-nav ul li a:hover {
    color: #4361ee;
}

.user-actions {
    display: flex;
    align-items: center;
}

.user-profile {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #333;
    margin-right: 15px;
}

.user-profile img {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 10px;
}

.btn {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
    margin:0 10px;
}

.btn-primary {
    background: #4361ee;
    color: white;
}

.btn-primary:hover {
    background: #3a56d4;
}

.btn-outline {
    background: transparent;
    border: 1px solid #4361ee;
    color: #4361ee;
}

.btn-outline:hover {
    background: #4361ee;
    color: white;
}

/* 主要内容区域 */
.main-content {
    display: flex;
    margin: 30px 0;
    gap: 30px;
}

/* 左侧内容 */
.content-left {
    flex: 2;
}

/* 右侧边栏 */
.sidebar {
    flex: 1;
}

/* 卡片样式 */
.card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 20px;
    overflow: hidden;
}

.card-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.card-body {
    padding: 20px;
}

.card-title {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: #333;
}

/* 发布框 */
.post-form {
    display: flex;
    flex-direction: column;
}

.post-form textarea {
    width: 100%;
    min-height: 100px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
    margin-bottom: 15px;
    font-family: inherit;
}

.post-form .form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.media-options {
    display: flex;
    gap: 10px;
}

.media-options button {
    background: #f0f2f5;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s;
}

.media-options button:hover {
    background: #e4e6eb;
}

.post-submit {
    background: #4361ee;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
}

.post-submit:hover {
    background: #3a56d4;
}

/* 帖子列表 */
.post-item {
    padding: 20px;
    border-bottom: 1px solid #eee;
}

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

.post-author img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 10px;
}

.post-author-info h4 {
    margin: 0;
}

.post-author-info p {
    margin: 0;
    font-size: 0.85rem;
    color: #777;
}

.post-content {
    margin-bottom: 15px;
}

.post-content p {
    margin-bottom: 15px;
}

.post-media {
    margin: 15px 0;
}

.post-media img {
    max-width: 100%;
    border-radius: 8px;
}

.post-actions {
    display: flex;
    gap: 20px;
    border-top: 1px solid #eee;
    padding-top: 15px;
}

.action-button {
    display: flex;
    align-items: center;
    background: none;
    border: none;
    color: #777;
    cursor: pointer;
    font-size: 0.9rem;
}

.action-button:hover {
    color: #4361ee;
}

.action-button i {
    margin-right: 5px;
}

/* 侧边栏组件 */
.widget {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 20px;
    overflow: hidden;
}

.widget-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    font-weight: 600;
}

.widget-content {
    padding: 20px;
}

.checkin-button {
    width: 100%;
    padding: 12px;
    background: #4cc9f0;
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s;
}

.checkin-button:hover {
    background: #3bb4d8;
}

.checkin-button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.emoji-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.emoji-item {
    font-size: 1.5rem;
    cursor: pointer;
    transition: transform 0.2s;
}

.emoji-item:hover {
    transform: scale(1.2);
}

/* 登录/注册表单 */
.auth-form {
    max-width: 500px;
    margin: 50px auto;
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
}

.form-group input:focus {
    outline: none;
    border-color: #4361ee;
}

/* 页脚 */
.main-footer {
    background: #2c3e50;
    color: white;
    padding: 30px 0;
    margin-top: 50px;
}

.footer-content {
    text-align: center;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .main-nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .main-content {
        flex-direction: column;
    }
    
    .user-actions {
        width: 100%;
        justify-content: center;
    }
    
    .post-form .form-actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .post-actions {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .main-nav ul li {
        margin: 0 5px;
    }
    
    .media-options button {
        width: 35px;
        height: 35px;
    }
}