/* 基础重置 */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica Neue, Arial, sans-serif;
}

body {
  background: #0f172a;
  color: #f1f5f9;
  line-height: 1.6;
}

/* 容器 */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* 按钮样式 */
.btn {
  display: inline-block;
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  text-align: center;
}

.btn-login {
  background: transparent;
  color: #60a5fa;
  border: 1px solid #60a5fa;
}

.btn-login:hover {
  background: rgba(96, 165, 250, 0.1);
  transform: translateY(-1px);
}

.btn-register {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.btn-register:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-submit {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  width: 100%;
  padding: 12px;
  font-size: 16px;
  margin-top: 20px;
}

.btn-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* 输入框样式 */
input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(30, 41, 59, 0.6);
  color: #f1f5f9;
  font-size: 14px;
  transition: all 0.3s ease;
}

input:focus {
  outline: none;
  border-color: #60a5fa;
  background: rgba(30, 41, 59, 0.8);
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.2);
}

input::placeholder {
  color: #64748b;
}

/* 表单组 */
.form-group {
  margin-bottom: 16px;
}

/* 提示信息 */
.alert {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 14px;
}

.alert-error {
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.alert-success {
  background: rgba(16, 185, 129, 0.1);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

/* 动画效果 */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* 响应式设计 */
@media (max-width: 1265px) {
  .right-sidebar {
    display: none;
  }
  
  .main-feed {
    margin-right: 0;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 15px;
  }
  
  .btn {
    padding: 8px 16px;
    font-size: 13px;
  }
  
  input {
    padding: 10px 14px;
    font-size: 13px;
  }
  
  .left-sidebar {
    width: 88px;
    align-items: center;
  }
  
  .sidebar-logo span,
  .nav-item span,
  .sidebar-user-info,
  .sidebar-user-menu {
    display: none;
  }
  
  .sidebar-post-btn {
    width: 50px;
    height: 50px;
    padding: 0;
    border-radius: 50%;
    font-size: 24px;
  }
  
  .sidebar-post-btn::before {
    content: '+';
  }
  
  .main-feed {
    margin-left: 88px;
  }
  
  .compose-content textarea {
    font-size: 16px;
  }
  
  .post-card {
    padding: 16px;
  }
  
  .feed-tabs {
    gap: 16px;
  }
  
  .feed-tab {
    font-size: 14px;
  }
  
  .auth-content {
    flex-direction: column;
  }
  
  .auth-left {
    width: 100%;
    height: 300px;
  }
  
  .auth-right {
    width: 100%;
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 10px;
  }
  
  .header .container {
    flex-direction: column;
    gap: 10px;
    padding: 10px;
  }
  
  .nav ul {
    gap: 10px;
    flex-wrap: wrap;
  }
  
  .nav a {
    font-size: 12px;
  }
  
  .login-form {
    padding: 20px;
  }
  
  .form-header h2 {
    font-size: 18px;
  }
  
  .post-content-text {
    font-size: 14px;
  }
  
  .news-title {
    font-size: 18px;
  }
  
  .novel-title {
    font-size: 16px;
  }
}

/* 动画效果增强 */
@keyframes slideIn {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* 平滑滚动 */
html {
  scroll-behavior: smooth;
}

/* 加载动画 */
.loading {
  display: inline-block;
  width: 32px;
  height: 32px;
  border: 3px solid rgba(255,255,255,0.1);
  border-radius: 50%;
  border-top-color: #60a5fa;
  animation: spin 1s ease-in-out infinite;
  box-shadow: 0 0 15px rgba(96, 165, 250, 0.4);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* 悬停效果增强 */
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.post-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.news-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.novel-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* 过渡效果 */
* {
  transition: all 0.3s ease;
}

/* 滚动条样式 */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(30, 41, 59, 0.6);
}

::-webkit-scrollbar-thumb {
  background: rgba(96, 165, 250, 0.5);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(96, 165, 250, 0.8);
}