.layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.header {
  background-color: #fff;
  border-bottom: 1px solid #e0e0e0;
  padding: 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.header .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 40px;
  height: 64px;
}

.header .logo {
  margin-right: auto;
}

.logo {
  font-size: 24px;
  font-weight: bold;
  color: #007AFF;
  text-decoration: none;
}

.nav {
  display: flex;
  gap: 32px;
}

.nav a {
  color: #666;
  text-decoration: none;
  font-size: 16px;
  transition: color 0.2s;
  position: relative;
}

.nav a:hover {
  color: #007AFF;
}

.nav a.active {
  color: #007AFF;
  font-weight: 500;
}

.nav a.active::after {
  content: '';
  position: absolute;
  bottom: -20px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: #007AFF;
}

.main {
  flex: 1;
  padding: 32px 0;
  position: relative;
  z-index: 1;
}

.main .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* 用户菜单 */
.user-menu {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
}

.user-profile-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 8px;
  transition: all 0.2s;
}

.user-profile-link:hover {
  background: #f5f5f5;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #e0e0e0;
}

.user-avatar-placeholder {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 600;
  border: 2px solid #e0e0e0;
}

.username {
  font-size: 14px;
  color: #333;
  font-weight: 500;
}

.logout-btn {
  padding: 6px 16px;
  background: transparent;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  color: #666;
  cursor: pointer;
  transition: all 0.2s;
}

.logout-btn:hover {
  background: #f5f5f5;
  border-color: #007AFF;
  color: #007AFF;
}

/* 移动端汉堡菜单 */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  padding: 8px;
  color: #333;
  margin-left: auto;
}

.mobile-menu-btn:hover {
  color: #007AFF;
}

.mobile-nav-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none; /* 默认不阻止点击 */
  visibility: hidden; /* 完全隐藏 */
}

.mobile-nav-overlay.active {
  display: block; /* 激活时显示 */
  opacity: 1;
  pointer-events: auto; /* 只有激活时才阻止点击 */
  visibility: visible; /* 显示 */
}

.mobile-nav {
  position: fixed;
  top: 0;
  right: -100%;
  width: 280px;
  max-width: 80%;
  height: 100vh;
  background: white;
  z-index: 1000;
  transition: right 0.3s ease;
  box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);
  overflow-y: auto;
  pointer-events: none; /* 默认不阻止点击 */
  visibility: hidden; /* 完全隐藏 */
}

.mobile-nav.active {
  right: 0;
  pointer-events: auto; /* 只有激活时才可交互 */
  visibility: visible; /* 显示 */
}

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

.mobile-nav-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  padding: 4px;
  color: #666;
}

.mobile-nav-content {
  padding: 20px;
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 24px;
}

.mobile-nav-links a {
  padding: 14px 16px;
  color: #333;
  text-decoration: none;
  border-radius: 8px;
  font-size: 16px;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  gap: 12px;
}

.mobile-nav-links a:hover,
.mobile-nav-links a.active {
  background: #f5f5f5;
  color: #007AFF;
}

.mobile-user-section {
  padding-top: 20px;
  border-top: 1px solid #e0e0e0;
}

.mobile-user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #f9f9f9;
  border-radius: 12px;
  margin-bottom: 12px;
}

.mobile-logout-btn {
  width: 100%;
  padding: 14px;
  background: transparent;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 15px;
  color: #666;
  cursor: pointer;
  transition: all 0.2s;
}

.mobile-logout-btn:hover {
  background: #f5f5f5;
  border-color: #007AFF;
  color: #007AFF;
}

/* 移动端响应式 */
@media (max-width: 768px) {
  .header .container {
    padding: 0 16px;
    gap: 16px;
  }

  .logo {
    font-size: 20px;
  }

  .nav {
    display: none;
  }

  .user-menu {
    display: none;
  }

  .mobile-menu-btn {
    display: block;
  }

  .mobile-nav-overlay {
    display: block; /* 移动端显示遮罩层元素 */
  }
  
  .mobile-nav {
    display: block; /* 移动端显示菜单元素 */
  }

  .main {
    padding: 20px 0;
  }

  .main .container {
    padding: 0 16px;
  }
}

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

  .logo {
    font-size: 18px;
  }

  .mobile-menu-btn {
    font-size: 22px;
  }

  .mobile-nav {
    width: 100%;
    max-width: 100%;
  }

  .main {
    padding: 16px 0;
  }

  .main .container {
    padding: 0 12px;
  }
}
.home-page {
  width: 100%;
  padding: 20px;
  display: flex;
  overflow: hidden;
}

/* ===== Main Container ===== */
.main-container {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 60px;
  overflow: hidden;
  width: 100%;
  max-width: 1400px;
  height: calc(100vh - 200px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ===== Hero Section ===== */
.hero-section {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px 30px;
  flex-shrink: 0;
}

.hero-content {
  text-align: center;
  color: white;
  max-width: 900px;
}

.hero-title {
  font-size: 64px;
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: -2px;
  line-height: 1.1;
}

.hero-subtitle {
  font-size: 24px;
  font-weight: 500;
  margin-bottom: 12px;
  opacity: 0.95;
  line-height: 1.3;
}

.hero-description {
  font-size: 16px;
  opacity: 0.9;
  margin-bottom: 28px;
  letter-spacing: 0.5px;
  line-height: 1.5;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 40px;
  background: white;
  color: #667eea;
  border-radius: 50px;
  font-size: 18px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  min-height: 56px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}

.cta-button:active {
  transform: translateY(0);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.cta-button .arrow {
  font-size: 20px;
  transition: transform 0.3s ease;
}

.cta-button:hover .arrow {
  transform: translateX(4px);
}

/* ===== Features Section ===== */
.features-section {
  padding: 20px 40px 40px;
  flex-shrink: 0;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  max-width: 1100px;
  margin: 0 auto;
}

.feature-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 36px 28px;
  border-radius: 28px;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.feature-card:hover {
  transform: translateY(-8px);
  background: white;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15);
}

.feature-icon {
  font-size: 48px;
  margin-bottom: 16px;
  display: block;
  line-height: 1;
}

.feature-card h3 {
  font-size: 20px;
  font-weight: 600;
  color: #333;
  margin-bottom: 12px;
  line-height: 1.3;
}

.feature-card p {
  color: #666;
  line-height: 1.6;
  font-size: 15px;
  margin: 0;
}

/* ===== Responsive Design ===== */
@media (max-width: 1024px) {
  .hero-section {
    padding: 30px 20px 24px;
  }

  .hero-title {
    font-size: 52px;
    margin-bottom: 12px;
  }

  .hero-subtitle {
    font-size: 20px;
    margin-bottom: 10px;
  }

  .hero-description {
    margin-bottom: 20px;
  }

  .cta-button {
    padding: 14px 36px;
    font-size: 17px;
  }

  .features-section {
    padding: 16px 40px 32px;
  }

  .features-grid {
    gap: 24px;
  }

  .feature-card {
    padding: 30px 24px;
  }

  .feature-icon {
    font-size: 44px;
    margin-bottom: 12px;
  }

  .feature-card h3 {
    font-size: 19px;
    margin-bottom: 10px;
  }

  .feature-card p {
    font-size: 14px;
  }
}

@media (max-width: 768px) {
  .home-page {
    padding: 12px;
    overflow-y: auto;
  }

  .main-container {
    border-radius: 32px;
    height: auto;
    min-height: calc(100vh - 120px);
  }

  .hero-section {
    padding: 28px 20px 20px;
  }

  .hero-content {
    max-width: 100%;
  }

  .hero-title {
    font-size: 36px;
    margin-bottom: 12px;
    line-height: 1.2;
  }

  .hero-subtitle {
    font-size: 16px;
    margin-bottom: 10px;
    line-height: 1.4;
    padding: 0 12px;
  }

  .hero-description {
    font-size: 14px;
    margin-bottom: 20px;
    padding: 0 12px;
  }

  .cta-button {
    padding: 13px 36px;
    font-size: 16px;
  }

  .features-section {
    padding: 20px 16px 32px;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .feature-card {
    padding: 24px 20px;
    border-radius: 20px;
  }

  .feature-icon {
    font-size: 36px;
    margin-bottom: 10px;
  }

  .feature-card h3 {
    font-size: 17px;
    margin-bottom: 8px;
  }

  .feature-card p {
    font-size: 14px;
    line-height: 1.5;
  }
}

@media (max-width: 480px) {
  .home-page {
    padding: 8px;
    overflow-y: auto;
  }

  .main-container {
    border-radius: 24px;
    height: auto;
    min-height: calc(100vh - 100px);
  }

  .hero-section {
    padding: 24px 16px 20px;
  }

  .hero-content {
    max-width: 100%;
  }

  .hero-title {
    font-size: 28px;
    margin-bottom: 12px;
    line-height: 1.2;
    letter-spacing: -0.5px;
  }

  .hero-subtitle {
    font-size: 14px;
    margin-bottom: 10px;
    line-height: 1.5;
    word-break: keep-all;
    padding: 0 8px;
  }

  .hero-description {
    font-size: 13px;
    margin-bottom: 20px;
    padding: 0 8px;
  }

  .cta-button {
    padding: 14px 36px;
    font-size: 16px;
    gap: 10px;
    border-radius: 40px;
    min-height: 50px;
    width: auto;
    max-width: 90%;
  }

  .cta-button .arrow {
    font-size: 16px;
  }

  .features-section {
    padding: 16px 12px 28px;
  }

  .features-grid {
    gap: 12px;
  }

  .feature-card {
    padding: 20px 16px;
    border-radius: 16px;
  }

  .feature-icon {
    font-size: 32px;
    margin-bottom: 8px;
  }

  .feature-card h3 {
    font-size: 16px;
    margin-bottom: 6px;
  }

  .feature-card p {
    font-size: 13px;
    line-height: 1.5;
  }
}
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 20px;
}

.login-container {
  background: white;
  border-radius: 24px;
  padding: 48px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.login-header {
  text-align: center;
  margin-bottom: 32px;
}

.login-header h1 {
  font-size: 32px;
  font-weight: 700;
  margin: 0 0 8px 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.login-header p {
  color: #666;
  font-size: 14px;
  margin: 0;
}

.success-message {
  background: #e7f7e7;
  color: #2d7a2d;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 14px;
  border: 1px solid #9cd99c;
  animation: slideIn 0.3s ease-out;
}

.error-message {
  background: #fee;
  color: #c33;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 14px;
  border: 1px solid #fcc;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 14px;
  font-weight: 600;
  color: #333;
}

.form-group input[type="text"],
.form-group input[type="password"] {
  padding: 12px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  font-size: 15px;
  transition: all 0.2s;
  outline: none;
}

.form-group input[type="text"]:focus,
.form-group input[type="password"]:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group input:disabled {
  background: #f5f5f5;
  cursor: not-allowed;
}

.checkbox-group {
  flex-direction: row;
  align-items: center;
}

.checkbox-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 400;
  cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.checkbox-group span {
  font-size: 14px;
  color: #666;
}

.btn-block {
  width: 100%;
  margin-top: 12px;
  padding: 14px;
  font-size: 16px;
  font-weight: 600;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.login-footer {
  margin-top: 24px;
  text-align: center;
}

.login-footer p {
  color: #666;
  font-size: 14px;
  margin: 0;
}

.login-footer a {
  color: #667eea;
  text-decoration: none;
  font-weight: 600;
}

.login-footer a:hover {
  text-decoration: underline;
}

/* 移动端响应式 */
@media (max-width: 768px) {
  .login-page {
    padding: 16px;
  }

  .login-container {
    padding: 32px 24px;
    border-radius: 20px;
  }

  .login-header h1 {
    font-size: 28px;
  }

  .login-header p {
    font-size: 13px;
  }

  .form-group label {
    font-size: 14px;
  }

  .form-input {
    padding: 12px 16px;
    font-size: 16px; /* 防止 iOS 放大 */
  }

  .submit-btn {
    padding: 14px;
    font-size: 16px;
    min-height: 48px;
  }

  .form-input {
    min-height: 48px;
  }

  .login-footer a {
    padding: 8px 4px;
    margin: -8px -4px;
  }

  .login-footer p {
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .login-page {
    padding: 12px;
  }

  .login-container {
    padding: 28px 20px;
    border-radius: 16px;
  }

  .login-header h1 {
    font-size: 24px;
  }

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

  .form-input {
    padding: 11px 14px;
  }

  .submit-btn {
    padding: 13px;
    font-size: 15px;
  }
}
.register-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 20px;
}

.register-container {
  background: white;
  border-radius: 24px;
  padding: 48px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.register-header {
  text-align: center;
  margin-bottom: 32px;
}

.register-header h1 {
  font-size: 32px;
  font-weight: 700;
  margin: 0 0 8px 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.register-header p {
  color: #666;
  font-size: 14px;
  margin: 0;
}

.error-message {
  background: #fee;
  color: #c33;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 14px;
  border: 1px solid #fcc;
}

.register-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 14px;
  font-weight: 600;
  color: #333;
}

.form-group input[type="text"],
.form-group input[type="password"] {
  padding: 12px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  font-size: 15px;
  transition: all 0.2s;
  outline: none;
}

.form-group input[type="text"]:focus,
.form-group input[type="password"]:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group input:disabled {
  background: #f5f5f5;
  cursor: not-allowed;
}

.form-hint {
  font-size: 12px;
  color: #999;
}

.password-strength {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.strength-indicator {
  height: 4px;
  background: #e0e0e0;
  border-radius: 2px;
  overflow: hidden;
}

.strength-bar {
  height: 100%;
  width: 0;
  transition: all 0.3s;
  border-radius: 2px;
}

.strength-bar.weak {
  width: 33%;
  background: #f44336;
}

.strength-bar.medium {
  width: 66%;
  background: #ff9800;
}

.strength-bar.strong {
  width: 100%;
  background: #4caf50;
}

.btn-block {
  width: 100%;
  margin-top: 12px;
  padding: 14px;
  font-size: 16px;
  font-weight: 600;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.register-footer {
  margin-top: 24px;
  text-align: center;
}

.register-footer p {
  color: #666;
  font-size: 14px;
  margin: 0;
}

.register-footer a {
  color: #667eea;
  text-decoration: none;
  font-weight: 600;
}

.register-footer a:hover {
  text-decoration: underline;
}


/* 移动端响应式 */
@media (max-width: 768px) {
  .register-page {
    padding: 16px;
  }

  .register-container {
    padding: 32px 24px;
    border-radius: 20px;
  }

  .register-header h1 {
    font-size: 28px;
  }

  .register-header p {
    font-size: 13px;
  }

  .form-group label {
    font-size: 14px;
  }

  .form-input {
    padding: 12px 16px;
    font-size: 16px;
  }

  .submit-btn {
    padding: 14px;
    font-size: 16px;
  }

  .register-footer p {
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .register-page {
    padding: 12px;
  }

  .register-container {
    padding: 28px 20px;
    border-radius: 16px;
  }

  .register-header h1 {
    font-size: 24px;
  }

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

  .form-input {
    padding: 11px 14px;
  }

  .submit-btn {
    padding: 13px;
    font-size: 15px;
    min-height: 48px;
  }

  .form-input {
    min-height: 48px;
  }

  .register-footer a {
    padding: 8px 4px;
    margin: -8px -4px;
    padding: 13px;
    font-size: 15px;
  }

  .password-strength {
    font-size: 12px;
  }

  .strength-indicator {
    height: 3px;
  }

  .strength-text {
    font-size: 12px;
  }
}
.profile-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 20px;
}

.profile-header {
  margin-bottom: 40px;
}

.profile-header h1 {
  font-size: 32px;
  font-weight: 700;
  color: #333;
  margin: 0 0 8px 0;
}

.profile-header p {
  font-size: 16px;
  color: #666;
  margin: 0;
}

.loading {
  text-align: center;
  padding: 60px 20px;
  font-size: 18px;
  color: #666;
}

.profile-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.profile-card {
  background: white;
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.profile-card h2 {
  font-size: 20px;
  font-weight: 600;
  color: #333;
  margin: 0 0 24px 0;
  padding-bottom: 16px;
  border-bottom: 2px solid #f0f0f0;
}

/* 用户信息 */
.user-info {
  display: flex;
  gap: 24px;
  align-items: center;
}

.avatar-display {
  flex-shrink: 0;
}

.avatar-display img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #f0f0f0;
}

.avatar-placeholder {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  font-weight: 600;
  border: 3px solid #f0f0f0;
}

.user-details {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.info-row {
  display: flex;
  gap: 12px;
  font-size: 15px;
}

.info-row .label {
  color: #666;
  font-weight: 500;
  min-width: 80px;
}

.info-row .value {
  color: #333;
  font-weight: 600;
}

/* 表单样式 */
.avatar-form,
.password-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 14px;
  font-weight: 600;
  color: #333;
}

.form-group input[type="text"],
.form-group input[type="password"] {
  padding: 12px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  font-size: 15px;
  transition: all 0.2s;
  outline: none;
}

.form-group input[type="text"]:focus,
.form-group input[type="password"]:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group input:disabled {
  background: #f5f5f5;
  cursor: not-allowed;
}

.form-hint {
  font-size: 12px;
  color: #999;
}

/* 消息提示 */
.success-message {
  background: #e7f7e7;
  color: #2d7a2d;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 14px;
  border: 1px solid #9cd99c;
  animation: slideIn 0.3s ease-out;
}

.error-message {
  background: #fee;
  color: #c33;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 14px;
  border: 1px solid #fcc;
}

/* 按钮 */
.btn {
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  outline: none;
}

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 响应式设计 */
@media (max-width: 768px) {
  .profile-page {
    padding: 20px 16px;
  }

  .profile-card {
    padding: 24px;
  }

  .user-info {
    flex-direction: column;
    text-align: center;
  }

  .user-details {
    align-items: center;
  }

  .info-row {
    justify-content: center;
  }
}

/* 文章列表页样式 */
.article-list-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
}

.article-list-page.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #e0e0e0;
  border-top-color: #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 12px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* 页面头部 */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}

.page-title {
  font-size: 32px;
  font-weight: 700;
  color: #333;
  margin: 0;
}

/* 按钮样式 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  margin: 0;
  box-sizing: border-box;
  position: relative;
  vertical-align: middle;
  z-index: 1;
  pointer-events: auto;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
  touch-action: manipulation;
  user-select: none;
}

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-processing {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: white;
  animation: pulse 2s ease-in-out infinite;
}

.btn-processing:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(240, 147, 251, 0.4);
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.8;
  }
}

.btn-secondary {
  background: #f5f5f5;
  color: #666;
}

.btn-secondary:hover {
  background: #e0e0e0;
}

.btn-large {
  padding: 14px 32px;
  font-size: 16px;
}

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 80px 20px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.empty-icon {
  font-size: 64px;
  margin-bottom: 24px;
}

.empty-state h2 {
  font-size: 24px;
  color: #333;
  margin: 0 0 12px 0;
}

.empty-state p {
  color: #666;
  margin: 0 0 24px 0;
}

/* 文章网格 */
.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

/* 文章卡片 */
.article-card {
  background: white;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.3s;
  height: 280px; /* 固定高度 */
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: visible;
  z-index: 1;
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

/* 确保卡片内的按钮区域可点击 */
.article-card * {
  pointer-events: auto;
}

.article-card .card-actions {
  pointer-events: auto !important;
}

.card-header {
  margin-bottom: 12px;
  flex-shrink: 0; /* 防止收缩 */
}

/* 状态标签 */
.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}

.status-pending {
  background: #fff3e0;
  color: #e65100;
}

.status-processing {
  background: #e3f2fd;
  color: #1565c0;
}

.status-completed {
  background: #e8f5e9;
  color: #2e7d32;
}

.status-failed {
  background: #ffebee;
  color: #c62828;
}

.article-title {
  font-size: 20px;
  font-weight: 600;
  color: #333;
  margin: 0 0 12px 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex-shrink: 0; /* 防止收缩 */
}

.article-meta {
  font-size: 14px;
  color: #999;
  margin: 0 0 20px 0;
  flex-grow: 1; /* 自动填充剩余空间 */
  flex-shrink: 0; /* 防止收缩 */
}

.card-actions {
  display: flex;
  gap: 12px;
  margin-top: auto;
  flex-shrink: 0;
  width: 100%;
  align-items: stretch;
  position: relative;
  z-index: 2;
  pointer-events: auto;
}

.card-actions .btn {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 10px 16px;
  box-sizing: border-box;
  margin: 0;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 3;
  pointer-events: auto;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
  touch-action: manipulation;
}

/* 响应式 */
@media (max-width: 768px) {
  .article-list-page {
    padding: 16px;
  }

  .page-header {
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
  }

  .page-title {
    font-size: 24px;
  }

  /* 移动端按钮优化 */
  .btn {
    min-height: 44px !important;
    padding: 12px 20px !important;
    font-size: 15px !important;
    white-space: nowrap;
  }

  .btn-large {
    min-height: 48px !important;
    padding: 14px 28px !important;
    font-size: 16px !important;
  }

  .article-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .article-card {
    padding: 18px;
    height: auto;
    min-height: auto;
  }

  .article-title {
    font-size: 17px;
    margin-bottom: 10px;
  }

  .article-meta {
    font-size: 13px;
    margin-bottom: 16px;
  }

  .card-actions {
    gap: 12px !important;
    flex-direction: row;
    flex-wrap: wrap;
    margin-top: 20px;
    z-index: 10 !important;
    pointer-events: auto !important;
  }

  .card-actions .btn {
    flex: 1;
    min-width: calc(50% - 6px);
    min-height: 44px !important;
    padding: 12px 16px !important;
    font-size: 14px !important;
    margin: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 11 !important;
    pointer-events: auto !important;
    touch-action: manipulation !important;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.2) !important;
  }
}

@media (max-width: 480px) {
  .article-list-page {
    padding: 12px;
  }

  .page-header {
    padding: 0;
  }

  .page-title {
    font-size: 22px;
  }

  .article-grid {
    gap: 12px;
  }

  .article-card {
    padding: 16px;
  }

  .article-title {
    font-size: 16px;
  }

  .card-actions {
    gap: 12px !important;
    flex-direction: column !important;
    width: 100%;
    margin-top: 20px;
    z-index: 10 !important;
    pointer-events: auto !important;
  }

  .card-actions .btn {
    width: 100% !important;
    min-width: 100% !important;
    min-height: 48px !important;
    padding: 14px 20px !important;
    font-size: 15px !important;
    flex: none !important;
    margin: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    z-index: 11 !important;
    pointer-events: auto !important;
    touch-action: manipulation !important;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.2) !important;
    position: relative !important;
  }
}
.article-detail-page {
  max-width: 900px;
  margin: 0 auto;
}

.article-header {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid #e0e0e0;
}

.article-title {
  font-size: 36px;
  font-weight: bold;
  margin-bottom: 12px;
  color: #333;
}

.article-meta {
  font-size: 14px;
  color: #999;
}

.article-content {
  background: white;
  padding: 32px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  margin-bottom: 32px;
}

.article-text {
  font-size: 16px;
  line-height: 1.8;
  color: #333;
}

.article-text p {
  margin-bottom: 16px;
}

.article-text h1,
.article-text h2,
.article-text h3 {
  margin-top: 24px;
  margin-bottom: 16px;
  font-weight: 600;
}

.article-annotations {
  background: white;
  padding: 32px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.article-annotations h2 {
  font-size: 24px;
  margin-bottom: 24px;
  color: #333;
}

.annotations-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.annotation-item {
  padding: 16px;
  background: #f5f5f5;
  border-radius: 8px;
  border-left: 4px solid #007AFF;
}

.annotation-text {
  font-weight: 600;
  color: #333;
  margin-right: 12px;
}

.annotation-type {
  display: inline-block;
  padding: 4px 12px;
  background: #007AFF;
  color: white;
  border-radius: 4px;
  font-size: 12px;
  margin-left: 8px;
}

.annotation-content {
  margin-top: 8px;
  color: #666;
  line-height: 1.6;
}

.loading,
.error {
  text-align: center;
  padding: 40px;
  font-size: 18px;
  color: #666;
}

/* 上传页面样式 */
.upload-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
  padding: 40px 24px;
}

.upload-container {
  max-width: 800px;
  margin: 0 auto;
}

.upload-header {
  text-align: center;
  margin-bottom: 40px;
}

.upload-header h1 {
  font-size: 36px;
  font-weight: 700;
  color: #333;
  margin: 0 0 12px 0;
}

.upload-header p {
  font-size: 16px;
  color: #666;
  margin: 0;
}

/* 表单样式 */
.upload-form {
  background: white;
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

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

.form-group label {
  display: flex;
  align-items: center;
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin-bottom: 12px;
}

.label-icon {
  margin-right: 8px;
}

.form-group input[type="text"] {
  width: 100%;
  padding: 14px 18px;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  font-size: 16px;
  transition: all 0.2s;
  box-sizing: border-box;
}

.form-group input[type="text"]:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
  width: 100%;
  padding: 18px;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  font-size: 15px;
  line-height: 1.8;
  resize: vertical;
  transition: all 0.2s;
  box-sizing: border-box;
  font-family: 'Georgia', serif;
}

.form-group textarea:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.word-count {
  text-align: right;
  font-size: 13px;
  color: #999;
  margin-top: 8px;
}

/* 拖拽区域 */
.drop-zone {
  position: relative;
  border: 2px dashed #d0d0d0;
  border-radius: 12px;
  padding: 40px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  background: #fafafa;
}

.drop-zone:hover,
.drop-zone.active {
  border-color: #667eea;
  background: rgba(102, 126, 234, 0.05);
}

.file-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.drop-content {
  pointer-events: none;
}

.drop-icon {
  font-size: 48px;
  display: block;
  margin-bottom: 12px;
}

.drop-content p {
  font-size: 16px;
  color: #666;
  margin: 0 0 8px 0;
}

.drop-hint {
  font-size: 13px;
  color: #999;
}

/* 按钮样式 */
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  margin-top: 32px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-secondary {
  background: #f0f0f0;
  color: #666;
}

.btn-secondary:hover {
  background: #e0e0e0;
}

.btn-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-right: 8px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* 响应式 */
@media (max-width: 768px) {
  .upload-form {
    padding: 24px;
  }

  .form-actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }
}
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  animation: fadeIn 0.2s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal-content {
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
  from {
    transform: translateY(50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.prompt-modal {
  width: 800px;
}

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

.modal-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: #333;
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: #666;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  transition: all 0.2s;
}

.modal-close:hover {
  color: #333;
  background-color: #f5f5f5;
  border-radius: 4px;
}

.modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;
}

.prompt-info {
  margin-bottom: 16px;
  padding: 12px 16px;
  background-color: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid #1976d2;
}

.info-text {
  margin: 6px 0;
  font-size: 14px;
  color: #555;
  line-height: 1.6;
}

.prompt-text-container {
  background-color: #f5f5f5;
  border-radius: 8px;
  padding: 16px;
  border: 1px solid #e0e0e0;
  max-height: 500px;
  overflow-y: auto;
}

.prompt-text {
  font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
  font-size: 13px;
  line-height: 1.6;
  color: #333;
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid #e0e0e0;
}

.modal-footer button {
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.btn-copy {
  background-color: #1976d2;
  color: white;
}

.btn-copy:hover {
  background-color: #1565c0;
}

.btn-close {
  background-color: #e0e0e0;
  color: #333;
}

.btn-close:hover {
  background-color: #d0d0d0;
}

/* 滚动条样式 */
.prompt-text-container::-webkit-scrollbar,
.modal-body::-webkit-scrollbar {
  width: 8px;
}

.prompt-text-container::-webkit-scrollbar-track,
.modal-body::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.prompt-text-container::-webkit-scrollbar-thumb,
.modal-body::-webkit-scrollbar-thumb {
  background: #bbb;
  border-radius: 4px;
}

.prompt-text-container::-webkit-scrollbar-thumb:hover,
.modal-body::-webkit-scrollbar-thumb:hover {
  background: #999;
}

/* 精读页面 - 左右分区布局 */
.reading-page {
  min-height: 100vh;
  background: #f5f7fa;
}

.reading-layout {
  display: flex;
  min-height: 100vh;
}

/* 左侧文章区域 */
.article-area {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
  max-width: calc(100% - 380px);
}

/* 右侧配置区域 */
.config-area {
  width: 360px;
  background: #fff;
  border-left: 1px solid #e0e0e0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.05);
}

/* 文章头部 */
.article-header {
  text-align: center;
  padding: 20px;
  margin-bottom: 16px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.article-title {
  font-size: 26px;
  font-weight: 700;
  color: #333;
  margin: 0 0 8px 0;
  line-height: 1.4;
}

.article-title-translation {
  font-size: 15px;
  color: #666;
  margin: 0;
}

/* 词性颜色图例 */
.pos-legend {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: white;
  border-radius: 8px;
  margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  font-size: 13px;
}

.legend-title {
  color: #666;
  margin-right: 4px;
}

.legend-item {
  padding: 3px 10px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 500;
}

/* 文章摘要 */
.article-summary {
  background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
  padding: 14px 18px;
  border-radius: 10px;
  margin-bottom: 16px;
}

.article-summary h3 {
  margin: 0 0 6px 0;
  font-size: 13px;
  color: #2e7d32;
}

.article-summary p {
  margin: 0;
  color: #333;
  line-height: 1.7;
  font-size: 13px;
}

/* 段落区域 */
.paragraphs-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.paragraph-section {
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.paragraph-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 8px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.paragraph-number {
  color: white;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.5px;
}

.paragraph-label {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  padding: 3px 10px;
  border-radius: 10px;
  font-size: 11px;
}

.paragraph-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.original-text {
  padding: 14px 16px;
  font-size: 14px;
  line-height: 1.9;
  color: #333;
  border-right: 1px solid #e8e8e8;
}

.translation-text {
  padding: 14px 16px;
  background: #fafafa;
  color: #444;
  line-height: 1.8;
  font-size: 13px;
}

/* 高亮词汇容器 - 紧凑版 */
.highlighted-word-wrapper {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  margin: 0 1px 4px 1px;
  vertical-align: top;
  position: relative;
}

.highlighted-word-wrapper:hover .highlighted-word {
  transform: scale(1.03);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* 高亮词汇本身 */
.highlighted-word {
  display: inline-block;
  padding: 1px 4px;
  border-radius: 3px;
  transition: all 0.2s;
  font-weight: 500;
}

/* 词汇下方标注（词性+中文释义） - 紧凑版 */
.word-annotation-label {
  display: block;
  font-size: 9px;
  line-height: 1.2;
  margin-top: 1px;
  text-align: center;
  white-space: nowrap;
  opacity: 0.9;
}

/* 中文译文中的高亮 */
.highlighted-meaning {
  padding: 1px 3px;
  border-radius: 3px;
  font-weight: 500;
}

/* 原文内容预览 */
.raw-content {
  background: white;
  border-radius: 12px;
  padding: 20px;
  position: relative;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.content-preview {
  line-height: 1.9;
  color: #333;
  font-size: 14px;
}

/* 分析进度横幅 */
.analysis-progress-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    transform: translateY(-100%);
  }
  to {
    transform: translateY(0);
  }
}

.progress-banner-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 12px 24px;
}

.progress-info {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.loading-spinner-small {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.progress-status {
  font-size: 14px;
  font-weight: 600;
}

.progress-detail {
  font-size: 13px;
  opacity: 0.9;
}

.progress-bar-inline {
  height: 6px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill-inline {
  height: 100%;
  background: white;
  border-radius: 3px;
  transition: width 0.3s ease;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* 进度条容器 */
.progress-container {
  width: 400px;
  max-width: 90%;
  margin: 20px 0;
}

.progress-bar {
  width: 100%;
  height: 24px;
  background: #e0e0e0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #4CAF50, #66BB6A);
  transition: width 0.3s ease;
  border-radius: 12px;
  box-shadow: 0 2px 4px rgba(76, 175, 80, 0.3);
}

.progress-text {
  margin-top: 12px;
  font-size: 14px;
  color: #666;
  font-weight: 500;
}

/* 配置面板 */
.config-panel {
  padding: 14px;
}

.config-section {
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid #eee;
}

.config-section:last-child {
  border-bottom: none;
}

.config-section h4 {
  margin: 0 0 8px 0;
  font-size: 12px;
  color: #666;
  font-weight: 500;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
}

.button-row button,
.button-row .btn {
  min-height: 40px;
  padding: 8px 16px;
  font-size: 14px;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  /* 段落导航在移动端保持横向布局，方便左右切换 */
  .paragraph-navigation .button-row {
    gap: 10px;
    flex-direction: row; /* 保持横向布局 */
  }

  .paragraph-navigation .button-row button {
    flex: 1;
    min-height: 48px;
    padding: 12px 16px;
    font-size: 15px;
    font-weight: 600;
  }

  /* 其他按钮组在移动端改为垂直布局 */
  .button-row:not(.paragraph-navigation .button-row) {
    gap: 10px;
    flex-direction: column;
  }

  .button-row:not(.paragraph-navigation .button-row) button,
  .button-row:not(.paragraph-navigation .button-row) .btn {
    width: 100%;
    min-height: 44px;
    padding: 12px 20px;
    font-size: 15px;
  }
}

/* 段落导航区域 */
.paragraph-navigation {
  background: linear-gradient(135deg, #f5f7fa 0%, #e8eef5 100%);
  border-radius: 12px;
  padding: 16px !important;
  border: 2px solid #667eea;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
}

.paragraph-navigation h4 {
  margin: 0 0 12px 0 !important;
  font-size: 14px !important;
  color: #333 !important;
  font-weight: 600 !important;
}

.mode-toggle {
  margin-bottom: 12px;
  font-weight: 600;
  font-size: 13px;
}

.paragraph-counter {
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  color: #667eea;
  padding: 12px;
  background: white;
  border-radius: 8px;
  margin-bottom: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.flex-1 {
  flex: 1;
}

.paragraph-indicator {
  font-size: 12px;
  color: #666;
  padding: 5px 10px;
}

/* 配置按钮 */
.config-btn {
  padding: 6px 12px;
  border: 1px solid #ddd;
  border-radius: 5px;
  background: #fff;
  color: #333;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.config-btn:hover:not(:disabled) {
  border-color: #667eea;
  color: #667eea;
}

.config-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.config-btn.full-width {
  width: 100%;
  margin-bottom: 6px;
}

.config-btn.large {
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 500;
}

.config-btn.primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
}

.config-btn.primary:hover:not(:disabled) {
  opacity: 0.9;
  transform: translateY(-1px);
}

.config-btn.success {
  background: #4caf50;
  color: white;
  border: none;
}

.config-btn.warning {
  background: #ff9800;
  color: white;
  border: none;
}

.config-btn.danger {
  background: #f44336;
  color: white;
  border: none;
}

.config-btn.info {
  background: #2196f3;
  color: white;
  border: none;
}

/* 配置输入框 */
.config-input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 12px;
  margin-bottom: 8px;
  box-sizing: border-box;
}

.config-input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

.config-hint {
  font-size: 10px;
  color: #999;
  margin: 3px 0 0 0;
}

.config-group {
  margin-top: 6px;
}

/* 难度筛选标签 */
.level-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.level-filter {
  display: flex;
  align-items: center;
  cursor: pointer;
}

.level-filter input {
  display: none;
}

.level-tag {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  background: #f5f5f5;
  color: #999;
  border: 1px solid #e0e0e0;
  transition: all 0.2s;
}

.level-tag.active {
  background: #667eea;
  color: white;
  border-color: #667eea;
}

.level-filter:hover .level-tag {
  border-color: #667eea;
}

/* 配置选项 */
.config-options {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* 词汇卡片 */
.word-card-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.word-card {
  background: white;
  border-radius: 14px;
  padding: 24px;
  min-width: 280px;
  max-width: 360px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  position: relative;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.word-card-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  font-size: 22px;
  color: #999;
  cursor: pointer;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.word-card-close:hover {
  background: #f0f0f0;
  color: #333;
}

.word-card-header {
  margin-bottom: 10px;
}

.word-card-header h3 {
  font-size: 26px;
  font-weight: 700;
  color: #333;
  margin: 0 0 4px 0;
}

.word-card-header .phonetic {
  color: #666;
  font-size: 14px;
}

.word-card-tags {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.word-pos-tag {
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.word-level-tag {
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  background: #f5f5f5;
  color: #666;
}

.word-meaning {
  font-size: 15px;
  color: #333;
  line-height: 1.5;
}

/* 加载状态 */
.loading-state,
.error-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  text-align: center;
}

.loading-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid #e0e0e0;
  border-top-color: #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 10px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.error-state button {
  margin-top: 14px;
  padding: 12px 24px;
  background: #667eea;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  min-height: 44px;
  font-size: 15px;
  width: 100%;
  max-width: 300px;
}

@media (max-width: 768px) {
  .error-state button {
    width: 100%;
    max-width: 100%;
    padding: 14px 24px;
    min-height: 48px;
  }
}

/* 响应式设计 */
@media (max-width: 1024px) {
  .config-area {
    width: 300px;
  }
  
  .article-area {
    max-width: calc(100% - 320px);
  }
}

@media (max-width: 768px) {
  .reading-layout {
    flex-direction: column;
  }
  
  .article-area {
    max-width: 100%;
    padding: 12px;
  }
  
  .article-header {
    padding: 16px;
    margin-bottom: 16px;
  }
  
  .article-title-display {
    font-size: 20px;
  }
  
  .config-area {
    width: 100%;
    height: auto;
    position: relative;
    border-left: none;
    border-top: 1px solid #e0e0e0;
    padding: 16px;
  }
  
  .config-section {
    margin-bottom: 16px;
  }
  
  .paragraph-content {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .original-text {
    border-right: none;
    border-bottom: 2px solid #e8e8e8;
    padding-bottom: 16px;
  }

  .paragraph-item {
    padding: 16px;
    margin-bottom: 12px;
  }
}

@media (max-width: 480px) {
  .article-area {
    padding: 8px;
  }

  .article-header {
    padding: 12px;
    margin-bottom: 12px;
  }

  .article-title-display {
    font-size: 18px;
  }

  .config-area {
    padding: 12px;
  }

  .config-section h3 {
    font-size: 14px;
  }

  /* 移动端段落导航优化 - 保持在顶部，按钮横向排列 */
  .paragraph-navigation {
    margin-bottom: 16px;
    padding: 12px !important;
  }

  .paragraph-navigation h4 {
    font-size: 13px !important;
    margin-bottom: 10px !important;
  }

  .paragraph-navigation .button-row {
    gap: 8px;
    flex-direction: row !important; /* 强制横向布局 */
  }

  .paragraph-navigation .button-row button {
    flex: 1;
    min-height: 48px !important;
    padding: 12px 14px !important;
    font-size: 14px !important;
    font-weight: 600;
  }

  .paragraph-counter {
    font-size: 14px;
    padding: 10px;
    margin-bottom: 10px;
  }

  .paragraph-content {
    gap: 12px;
  }

  .paragraph-item {
    padding: 12px;
    margin-bottom: 10px;
  }

  .sentence {
    font-size: 14px;
    line-height: 1.6;
  }

  .word-item {
    padding: 6px 10px;
    font-size: 13px;
  }

  .translation-text {
    font-size: 13px;
  }
}

/* 未分析提示 */
.no-analysis-tip {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 32px 24px;
  border-radius: 16px;
  text-align: center;
  margin-bottom: 24px;
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
}

.no-analysis-tip .tip-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.no-analysis-tip h3 {
  font-size: 24px;
  margin: 0 0 16px 0;
  font-weight: 600;
}

.no-analysis-tip p {
  font-size: 15px;
  margin: 12px 0;
  opacity: 0.95;
}

.no-analysis-tip ul {
  list-style: none;
  padding: 0;
  margin: 16px 0;
  text-align: left;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.no-analysis-tip ul li {
  padding: 8px 0;
  font-size: 15px;
  opacity: 0.95;
}

.no-analysis-tip .hint-text {
  font-size: 13px;
  opacity: 0.8;
  margin-top: 16px;
  font-style: italic;
}

.no-analysis-tip strong {
  color: #ffd700;
  font-weight: 600;
}

.raw-content .content-preview {
  background: white;
  padding: 24px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.raw-content .content-preview h4 {
  margin: 0 0 16px 0;
  color: #666;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.raw-content .content-preview p {
  color: #444;
  line-height: 1.8;
  white-space: pre-wrap;
  word-break: break-word;
}

/* 禁用状态样式 */
.disabled-hint {
  font-size: 12px;
  color: #999;
  font-weight: normal;
}

.level-filter.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.level-filter.disabled input {
  cursor: not-allowed;
}

.level-filter.disabled .level-tag {
  cursor: not-allowed;
}

.config-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}
/* 全局移动端响应式补充样式 */

/* 按钮触摸优化 */
button, a, input[type="submit"], .clickable {
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
  touch-action: manipulation;
  cursor: pointer;
}

/* 按钮组优化 - 防止按钮挤在一起 */
.button-group,
.btn-group,
.actions,
.card-actions {
  display: flex;
  gap: 12px;
  width: 100%;
  flex-wrap: wrap;
}

.button-group button,
.btn-group button,
.actions button,
.card-actions button,
.button-group .btn,
.btn-group .btn,
.actions .btn,
.card-actions .btn {
  flex: 1;
  min-width: 0;
}

/* 确保所有可点击元素都有足够的触摸区域 */
@media (max-width: 768px) {
  /* 通用按钮优化 */
  button, .btn, a.button {
    min-height: 44px !important;
    min-width: 44px;
    padding: 12px 20px !important;
    font-size: 16px !important;
    line-height: 1.5;
  }
  
  /* 链接优化 */
  a {
    display: inline-block;
    padding: 8px 4px;
    margin: -8px -4px;
  }
  
  /* 表单元素优化 */
  input, textarea, select {
    font-size: 16px !important;
    min-height: 44px;
    padding: 12px 16px !important;
  }
  
  /* 小按钮也要有足够触摸区域 */
  button[class*="small"],
  .small-btn,
  .icon-btn {
    min-height: 40px !important;
    min-width: 40px !important;
    padding: 8px 16px !important;
  }
  
  /* Ant Design 组件移动端优化 */
  .ant-btn {
    min-height: 44px !important;
    padding: 8px 20px !important;
    font-size: 16px !important;
  }
  
  .ant-btn-sm {
    min-height: 40px !important;
    padding: 6px 16px !important;
  }
  
  .ant-input, 
  .ant-input-password,
  .ant-input-number,
  .ant-select-selector {
    font-size: 16px !important;
    min-height: 44px !important;
    padding: 10px 12px !important;
  }
  
  .ant-modal {
    max-width: calc(100vw - 32px) !important;
    margin: 16px auto !important;
  }
  
  .ant-modal-body {
    padding: 16px !important;
  }
  
  .ant-table {
    font-size: 14px;
  }
  
  .ant-table-thead > tr > th,
  .ant-table-tbody > tr > td {
    padding: 12px 8px !important;
  }
  
  /* 卡片点击区域 */
  .card, .article-card, .feature-card {
    cursor: pointer;
  }
  
  /* 下拉菜单选项 */
  .ant-dropdown-menu-item,
  .ant-select-item {
    min-height: 44px !important;
    padding: 10px 16px !important;
  }

  /* 按钮组移动端优化 */
  .button-group,
  .btn-group,
  .actions,
  .card-actions {
    gap: 12px;
    flex-wrap: wrap;
    pointer-events: auto !important;
    z-index: 10 !important;
  }

  .button-group button,
  .btn-group button,
  .actions button,
  .card-actions button,
  .button-group .btn,
  .btn-group .btn,
  .actions .btn,
  .card-actions .btn {
    min-width: calc(50% - 6px);
    pointer-events: auto !important;
    z-index: 11 !important;
    touch-action: manipulation !important;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.2) !important;
  }
}

@media (max-width: 480px) {
  .ant-modal {
    max-width: calc(100vw - 24px) !important;
  }
  
  button, .btn {
    font-size: 15px !important;
  }

  /* 小屏幕按钮组改为垂直布局 */
  .button-group,
  .btn-group,
  .actions,
  .card-actions {
    flex-direction: column;
    gap: 12px;
  }

  .button-group button,
  .btn-group button,
  .actions button,
  .card-actions button,
  .button-group .btn,
  .btn-group .btn,
  .actions .btn,
  .card-actions .btn {
    width: 100% !important;
    min-width: 100% !important;
    flex: none !important;
    pointer-events: auto !important;
    z-index: 11 !important;
    touch-action: manipulation !important;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.2) !important;
    position: relative !important;
  }
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* 移除默认的点击高亮，但保留按钮的点击反馈 */
a, button, .btn, [role="button"], input[type="submit"], input[type="button"] {
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: #f5f5f5;
  /* 移动端优化 */
  -webkit-overflow-scrolling: touch;
  /* 移除全局 touch-action，让按钮自己控制 */
}

code {
  font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
    monospace;
}

#root {
  min-height: 100vh;
  min-height: -webkit-fill-available;
}

/* 移动端滚动优化 */
@media (max-width: 768px) {
  html {
    font-size: 16px;
  }
  
  body {
    overflow-x: hidden;
  }
  
  input, textarea, button, select {
    font-size: 16px; /* 防止 iOS 放大 */
  }

  /* 确保所有链接和按钮可点击 */
  a, button, .btn, [role="button"] {
    pointer-events: auto !important;
    touch-action: manipulation !important;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1) !important;
    cursor: pointer !important;
  }
}

