/* 全局样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: #121212;
  color: #ffffff;
  line-height: 1.6;
  overflow-x: hidden;
  font-smoothing: antialiased;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 3D 背景 */
#background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

/* 容器 */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  gap: 20px;
}

/* 导航栏 */
.navbar {
  background-color: rgba(18, 18, 18, 0.6);
  backdrop-filter: blur(15px);
  border-bottom: 1px solid rgba(51, 51, 51, 0.5);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 15px 0;
}

.navbar .container {
  justify-content: space-between;
  align-items: center;
}

.logo h1 {
  font-size: 24px;
  font-weight: bold;
  color: #ffffff;
}

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

.nav-link {
  color: #ffffff;
  text-decoration: none;
  font-size: 16px;
  transition: color 0.3s ease;
}

.nav-link:hover {
  color: #00bcd4;
}

.nav-link.active {
  color: #00bcd4;
  border-bottom: 2px solid #00bcd4;
}

/* 按钮 */
.btn {
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-primary {
  background-color: #00bcd4;
  color: #ffffff;
}

.btn-primary:hover {
  background-color: #00acc1;
}

.btn-secondary {
  background-color: #333;
  color: #ffffff;
}

.btn-secondary:hover {
  background-color: #444;
}

/* 主内容区 */
main {
  margin-top: 20px;
  min-height: 100vh;
}

/* 左侧边栏 */
.sidebar {
  width: 250px;
  background-color: rgba(18, 18, 18, 0.6);
  backdrop-filter: blur(15px);
  border-radius: 12px;
  padding: 20px;
  position: sticky;
  top: 100px;
  height: fit-content;
  border: 1px solid rgba(51, 51, 51, 0.5);
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 30px;
}

.avatar img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
}

.user-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00bcd4 0%, #00acc1 50%, #0097a7 100%);
  position: relative;
  overflow: hidden;
}

.user-avatar::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
}

.user-avatar::after {
  content: '';
  position: absolute;
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 30px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
}

.comment-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff7043 0%, #ff5722 50%, #e64a19 100%);
  position: relative;
  overflow: hidden;
}

.comment-avatar::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 12px;
  height: 12px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
}

.comment-avatar::after {
  content: '';
  position: absolute;
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
  width: 18px;
  height: 18px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
}

.post-image {
  width: 100%;
  height: 300px;
  background: linear-gradient(45deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  margin-top: 10px;
}

.post-image::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  border: 3px solid rgba(0, 188, 212, 0.5);
  border-radius: 8px;
}

.post-image::after {
  content: '📷';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 40px;
  opacity: 0.3;
}

.user-info h3 {
  font-size: 16px;
  font-weight: 600;
}

.user-info p {
  font-size: 14px;
  color: #888;
}

.sidebar-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 8px;
  color: #ffffff;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.sidebar-link:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.sidebar-link .icon {
  font-size: 20px;
}

/* 中间内容区 */
.content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* 创建帖子 */
.create-post {
  background-color: rgba(18, 18, 18, 0.3);
  backdrop-filter: blur(15px);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  gap: 10px;
  border: 1px solid rgba(51, 51, 51, 0.3);
}

.post-input textarea {
  width: 100%;
  background-color: #333;
  border: 1px solid #444;
  border-radius: 4px;
  padding: 10px;
  color: #ffffff;
  resize: none;
  margin-bottom: 10px;
}

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

/* 帖子列表 */
.posts {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.post {
  background-color: rgba(18, 18, 18, 0.3);
  backdrop-filter: blur(15px);
  border-radius: 12px;
  padding: 20px;
  border: 1px solid rgba(51, 51, 51, 0.3);
}

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

.post-header .user-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.post-header .name h4 {
  font-size: 16px;
  font-weight: 600;
}

.post-header .name p {
  font-size: 14px;
  color: #888;
}

.more-btn {
  background: none;
  border: none;
  color: #ffffff;
  font-size: 18px;
  cursor: pointer;
}

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

.post-content p {
  margin-bottom: 10px;
  line-height: 1.5;
}

.post-content img {
  width: 100%;
  border-radius: 8px;
  margin-top: 10px;
}

.post-actions {
  display: flex;
  gap: 20px;
  margin-bottom: 15px;
}

.action-btn {
  background: none;
  border: none;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  font-size: 16px;
  transition: color 0.3s ease;
}

.action-btn:hover {
  color: #00bcd4;
}

/* 评论 */
.post-comments {
  border-top: 1px solid #333;
  padding-top: 15px;
}

.comment {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.comment .avatar img {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
}

.comment-content h5 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
}

.comment-content p {
  font-size: 14px;
  color: #e0e0e0;
}

.comment-input {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 15px;
}

.comment-input input {
  flex: 1;
  background-color: #333;
  border: 1px solid #444;
  border-radius: 20px;
  padding: 10px 15px;
  color: #ffffff;
}

/* 右侧边栏 */
.sidebar-right {
  width: 300px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.suggestions {
  background-color: rgba(18, 18, 18, 0.6);
  backdrop-filter: blur(15px);
  border-radius: 12px;
  padding: 20px;
  border: 1px solid rgba(51, 51, 51, 0.5);
}

.suggestions h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 15px;
  font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.suggestion-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
}

.suggestion-item .user-info {
  flex: 1;
  margin-left: 10px;
}

.suggestion-item .user-info h4 {
  font-size: 14px;
  font-weight: 600;
  font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.suggestion-item .user-info p {
  font-size: 12px;
  color: #888;
  font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.trends {
  background-color: rgba(18, 18, 18, 0.6);
  backdrop-filter: blur(15px);
  border-radius: 12px;
  padding: 20px;
  border: 1px solid rgba(51, 51, 51, 0.5);
}

.trends h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 15px;
  font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.trend-item {
  margin-bottom: 15px;
}

.trend-name {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
  font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.trend-count {
  font-size: 12px;
  color: #888;
  font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* 模态框 */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
}

.modal.show {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background-color: rgba(18, 18, 18, 0.3);
  backdrop-filter: blur(15px);
  border-radius: 12px;
  width: 400px;
  max-width: 90%;
  border: 1px solid rgba(51, 51, 51, 0.3);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #333;
}

.modal-header h2 {
  font-size: 20px;
  font-weight: 600;
}

.close-btn {
  background: none;
  border: none;
  color: #ffffff;
  font-size: 24px;
  cursor: pointer;
}

.modal-body {
  padding: 20px;
}

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

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

.form-group input {
  width: 100%;
  background-color: #333;
  border: 1px solid #444;
  border-radius: 4px;
  padding: 10px;
  color: #ffffff;
}

.form-group input:focus {
  outline: none;
  border-color: #00bcd4;
}

/* 响应式设计 */
@media (max-width: 1024px) {
  .sidebar-right {
    display: none;
  }
  
  .sidebar {
    width: 200px;
  }
}

@media (max-width: 768px) {
  .sidebar {
    display: none;
  }
  
  .nav-links {
    display: none;
  }
  
  .container {
    padding: 0 10px;
  }
  
  .create-post {
    padding: 15px;
  }
  
  .post {
    padding: 15px;
  }
}

@media (max-width: 480px) {
  .logo h1 {
    font-size: 20px;
  }
  
  .create-post {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .post-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  
  .action-btn {
    justify-content: center;
  }
}