:root {
    --primary-color: #4a6bff;
    --secondary-color: #f0f2fd;
    --text-color: #333;
    --light-text: #666;
    --border-color: #eaeaea;
    --success-color: #42b983;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f7f9fc;
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 1.5rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

h1 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}

.form-group textarea {
    resize: vertical;
    height: 100px;
}

.btn {
    width: 100%;
    padding: 0.75rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #3d5be0;
}

.back-btn {
    display: block;
    text-align: center;
    margin-top: 1rem;
    color: var(--primary-color);
    cursor: pointer;
    text-decoration: underline;
}

.back-btn:hover {
    color: #3d5be0;
}

/* 其他页面的样式 */
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
}

.nav-links a:hover {
    text-decoration: underline;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-menu .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
}

.user-menu .avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 主要内容区 */
.main-content {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
    margin-top: 2rem;
}

@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
    }
}

/* 轮播图样式 */
.carousel {
    position: relative;
    margin-bottom: 1rem;
}

.carousel-images {
    position: relative;
}

.carousel-slide {
    width: 100%;
    height: auto;
}

.carousel-controls {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
}

.carousel-progress {
    width: 100%;
    background-color: #eaeaea;
    height: 5px;
    margin-top: 0.5rem;
}

/* 侧边栏 */
.sidebar {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
    position: sticky;
    top: 90px;
    height: fit-content;
}

.sidebar-title {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-section {
    margin-bottom: 2rem;
}

.user-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.user-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-item .avatar {
    width: 32px;
    height: 32px;
}

.user-info {
    flex: 1;
}

.album-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.album-item {
    position: relative;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
}

.album-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.album-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.5rem;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    color: #fff;
    font-size: 0.8rem;
}

/* 帖子创建表单 */
.post-form {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.form-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    resize: none;
    margin-bottom: 1rem;
    font-family: inherit;
}

.form-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.upload-options {
    display: flex;
    gap: 1rem;
}

.upload-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--light-text);
    font-size: 0.9rem;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #3d5be0;
}

/* 帖子列表 */
.post-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.post-item {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
    transition: transform 0.2s;
}

.post-item:hover {
    transform: translateY(-2px);
}

.post-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.post-user-info {
    flex: 1;
}

.post-user-name {
    font-weight: 500;
}

.post-time {
    font-size: 0.8rem;
    color: var(--light-text);
}

.post-content {
    margin-bottom: 1.5rem;
}

.image-grid {
    margin-top: 1rem;
    display: grid;
    gap: 0.5rem;
}

.images-1 {
    grid-template-columns: 1fr;
}

.images-2, .images-4 {
    grid-template-columns: repeat(2, 1fr);
}

.images-3, .images-5, .images-6, .images-7, .images-8, .images-9 {
    grid-template-columns: repeat(3, 1fr);
}

.image-item {
    position: relative;
    padding-bottom: 100%;
    border-radius: 8px;
    overflow: hidden;
}

.image-item img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.file-attachments {
    margin-top: 1rem;
    padding: 1rem;
    background-color: var(--secondary-color);
    border-radius: 8px;
}

.file-attachments h4 {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.file-attachments ul {
    list-style: none;
}

.file-attachments li {
    margin-bottom: 0.5rem;
}

.post-actions {
    display: flex;
    gap: 1rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: none;
    background: none;
    border-radius: 5px;
    cursor: pointer;
    color: var(--light-text);
    transition: background-color 0.2s;
}

.action-btn:hover {
    background-color: var(--secondary-color);
}

.like-btn.liked {
    color: #ff4757;
}

.comments-section {
    margin-top: 1rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}

.comments-list {
    margin-bottom: 1rem;
    max-height: 300px;
    overflow-y: auto;
}

.comment-item {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.comment-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.comment-content {
    flex: 1;
    background-color: var(--secondary-color);
    padding: 0.5rem 1rem;
    border-radius: 18px;
}

.comment-user {
    font-weight: 500;
    margin-right: 0.5rem;
}

.comment-form {
    display: flex;
    gap: 0.5rem;
}

.comment-input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-family: inherit;
}

.comment-submit {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 20px;
    padding: 0 1.25rem;
    cursor: pointer;
}

/* 相册页面样式 */
.albums-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
}

.album-card {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: transform 0.2s;
}

.album-card:hover {
    transform: translateY(-5px);
}

.album-cover {
    height: 200px;
    position: relative;
}

.album-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.album-info {
    padding: 1rem;
}

.album-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--light-text);
    margin-top: 0.5rem;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-links {
        width: 100%;
        justify-content: space-between;
    }
    
    .main-content {
        margin-top: 1rem;
    }
    
    .albums-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }
} 