/* 全局样式文件 - 包含所有页面共用的基础样式 */

/* 全局CSS变量 */
:root {
  /* 基础颜色 */
  --primary-color: #6366f1;
  --primary-hover: #4f46e5;
  --secondary-color: #8b5cf6;
  --accent-color: #06b6d4;
  --success-color: #10b981;
  --success-hover: #059669;
  --warning-color: #f59e0b;
  --danger-color: #ef4444;
  --border-primary: #3d3c3c;

  /* 圆角和过渡 */
  --border-radius: 12px;
  --border-radius-sm: 8px;
  --border-radius-lg: 16px;
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 深色主题（默认） */
:root,
[data-theme="dark"] {
  --bg-primary: #000000;
  --bg-secondary: #111111;
  --bg-tertiary: #1a1a1a;
  --text-primary: #ffffff;
  --text-secondary: #d1d5db;
  --text-tertiary: #ffffff;
  --text-time: #7a37ee;
  --border-color: rgba(255, 255, 255, 0.1);
  --border-color-hover: rgba(160, 154, 244, 0.5);
  --surface-color: rgba(12, 2, 25, 0.6);
  --surface-hover: rgba(255, 255, 255, 0.1);
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
  --hero-gradient: linear-gradient(135deg, #07013d 0%, #440681 50%, #000000 100%);
  --bg-gradient: linear-gradient(135deg, #000000 50%, #111111 100%);
  --navbar-bg: rgba(0, 0, 0, 0.95);
  --navbar-bg-scrolled: rgba(0, 0, 0, 0.98);
  --modal-bg: #111111;
  --hero-bg:radial-gradient(circle at 1% 75%, rgba(191, 0, 255, 0.15) 0%, transparent 25%),
                radial-gradient(ellipse at 1% 35%, rgba(191, 0, 255, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 2% 40%, rgba(3, 15, 46, 0.3) 0%, transparent 85%),
                radial-gradient(ellipse at 90% 55%, rgba(8, 54, 170, 0.3) 0%, transparent 40%),
                linear-gradient(135deg, #000000 0%, #0a0a1a 100%);
}

/* 浅色主题 */
[data-theme="light"] {
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #f1f5f9;
  --text-primary: #111827;
  --text-secondary: #374151;
  --text-tertiary: #6b7280;
  --text-time: #7b39ed;
  --border-color: rgba(0, 0, 0, 0.1);
  --border-color-hover: rgba(0, 0, 0, 0.2);
  --surface-color: rgba(208, 213, 241, 0.5);
  --surface-hover: rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --hero-gradient: linear-gradient(0deg, #ffffff 0%, #e3e6ff 50%, #d7d8ff 100%);
  --bg-gradient: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  --navbar-bg: rgba(255, 255, 255, 0.95);
  --navbar-bg-scrolled: rgba(255, 255, 255, 0.98);
  --modal-bg: rgba(255, 255, 255, 0.5);
  --hero-bg:radial-gradient(ellipse at 10% 25%, rgba(8, 54, 170, 0.2) 0%, transparent 60%),
                radial-gradient(ellipse at 80% 55%, rgba(8, 54, 170, 0.2) 0%, transparent 60%),
                linear-gradient(135deg, #ffffff 0%, #ffffff 100%);
}

/* 全局基础样式 */
* {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
  margin: 0;
  padding: 0;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  scroll-behavior: smooth;
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

/* 通用工具类 */
.container {
  max-width: 100%;
  height:100%;
}

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

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* 顶部导航栏样式 */
.header,
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--navbar-bg) 0.1;
  backdrop-filter: blur(20px);
  z-index: 1000;
  padding: 0;
  transition: background-color 0.3s ease;
}

/* 滚动状态下的导航栏 */
.header.scrolled,
.navbar.scrolled {
  background: var(--navbar-bg-scrolled);
}

.header-container,
.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo-text{
  font-family: 'Times New Roman', Times, serif;
}

.nav-left,
.nav-center{
  display: flex;
  align-items: center;
  gap: 48px;
}
.link-container{
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
}

.logo-icon {
  font-size: 1.5rem;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-link {
  color: var(--text-tertiary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.875rem;
  transition: var(--transition);
  padding: 8px 0;
}

.nav-link:hover {
  color: var(--text-primary);
}

/* 链接文本样式 - 限制长度并显示省略号 */
.link-text {
  display: inline-block;
  max-width: 200px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: top;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* 主题切换按钮 */
.theme-toggle {
  display: flex;
  align-items: center;
}

.theme-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  cursor: pointer;
  transition: var(--transition);
  font-size: 1rem;
}

.theme-btn:hover {
  background: var(--surface-hover);
  border-color: var(--border-color-hover);
  transform: scale(1.05);
}

.theme-icon {
  transition: transform 0.3s ease;
}

.nav-btn {
  padding: 8px 16px;
  border-radius: var(--border-radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

.nav-btn.secondary {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.nav-btn.secondary:hover {
  background: var(--surface-hover);
  color: var(--text-primary);
  transform: translateY(-1px);
}

/* 用户头像样式 */
.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
}

.user-avatar:hover {
  transform: scale(1.05);
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 登录状态管理 */
.login-section,
.user-section {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* 主要内容区域 */
.main-content {
  margin-top: 0px;
}

/* 通用按钮样式 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: var(--border-radius-sm);
  font-weight: 500;
  font-size: 0.875rem;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  line-height: 1;
}

.btn-primary {
  background: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--light-bg);
  color: var(--text-color);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: var(--white);
  transform: translateY(-1px);
}

.btn-success {
  background: var(--success-color);
  color: white;
}

.btn-success:hover {
  background: var(--success-hover);
  transform: translateY(-1px);
}

.btn-danger {
  background: var(--danger-color);
  color: white;
}

.btn-danger:hover {
  background: #dc2626;
  transform: translateY(-1px);
}

/* 通用表单样式 */
.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-color);
}

.form-input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  font-size: 0.875rem;
  transition: var(--transition);
}

.form-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* 响应式样式 */
@media (max-width: 768px) {

  .btn {
    width: 100%;
    justify-content: center;
  }

  .header-container,
  .nav-container {
    padding: 0 16px;
    height: 56px;
  }

  .nav-left {
    gap: 24px;
  }

  .nav-menu {
    display: none;
  }

  .logo {
    font-size: 1.125rem;
  }

  .nav-right {
    gap: 12px;
  }

  .main-content {
    margin-top: 0px;
  }
}

@media (max-width: 480px) {
  .header-container,
  .nav-container {
    padding: 0 12px;
  }

  .nav-right {
    gap: 8px;
  }

  .theme-btn {
    width: 32px;
    height: 32px;
    font-size: 0.875rem;
  }

  .nav-btn {
    padding: 6px 12px;
    font-size: 0.8rem;
  }
}

/* Toast 提示样式 */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 12px 16px;
  border-radius: var(--border-radius-sm);
  color: white;
  font-size: 0.875rem;
  font-weight: 500;
  min-width: 250px;
  max-width: 400px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: translateX(100%);
  opacity: 0;
  transition: all 0.3s ease;
}

.toast.show {
  transform: translateX(0);
  opacity: 1;
}

.toast-info {
  background: var(--primary-color);
}

.toast-success {
  background: var(--success-color);
}

.toast-error {
  background: var(--danger-color);
}

.toast-warning {
  background: var(--warning-color);
}

/* 发布模态框样式 */
.publish-modal .publish-url {
  display: flex;
  gap: 8px;
  margin: 16px 0;
}

.publish-modal .publish-url input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}

.publish-modal .publish-url button,
.publish-modal .publish-actions button {
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.2s;
}

.publish-modal .publish-url button {
  background: var(--primary-color);
  color: white;
}

.publish-modal .publish-url button:hover {
  background: var(--primary-hover);
}

.publish-modal .publish-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 16px;
}

.publish-modal .publish-actions button:first-child {
  background: var(--success-color);
  color: white;
}

.publish-modal .publish-actions button:first-child:hover {
  background: var(--success-hover);
}

.publish-modal .publish-actions button:last-child {
  background: #6c757d;
  color: white;
}

.publish-modal .publish-actions button:last-child:hover {
  background: #545b62;
}
