:root {
  --bg: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --panel: #ffffff;
  --panel-2: #f7f9fc;
  --line: #e2e8f0;
  --text: #1e293b;
  --sub: #64748b;
  --primary: #667eea;
  --primary-light: #91a7ff;
  --primary-dark: #5a67d8;
  --accent: #764ba2;
  --accent-light: #9f7aea;
  --warn: #f59e0b;
  --danger: #ef4444;
  --success: #10b981;
  --r: 16px;
  --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --gradient-tertiary: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  --mobile-fixed-page-top: 148px;
  --mobile-settings-nav-h: 84px;
}
body.dark-theme {
  --bg: linear-gradient(135deg, #1a103c 0%, #2d1b69 100%);
  --panel: #2d1b69;
  --panel-2: #3a2480;
  --line: #4c3599;
  --text: #f1f5f9;
  --sub: #a78bfa;
  --primary: #8b5cf6;
  --primary-light: #a78bfa;
  --primary-dark: #7c3aed;
  --accent: #d946ef;
  --accent-light: #f472b6;
  --warn: #fbbf24;
  --danger: #f87171;
  --success: #34d399;
  --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
  --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
  --gradient-primary: linear-gradient(135deg, #8b5cf6 0%, #d946ef 100%);
  --gradient-secondary: linear-gradient(135deg, #c026d3 0%, #db2777 100%);
  --gradient-tertiary: linear-gradient(135deg, #6366f1 0%, #3b82f6 100%);
}
* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow-x: hidden; }
body {
  font-family: "Segoe UI", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
  font-size: 15px;
  position: relative;
}

/* 全局动画效果 */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

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

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

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

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes slideInFlip {
  0% {
    opacity: 0;
    transform: rotateY(-90deg) scale(0.8);
    box-shadow: 0 0 0 rgba(0, 0, 0, 0);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
  }
  50% {
    opacity: 0.5;
    transform: rotateY(-45deg) scale(0.9);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.3) 0%, rgba(118, 75, 162, 0.3) 100%);
  }
  100% {
    opacity: 1;
    transform: rotateY(0deg) scale(1);
    box-shadow: var(--shadow-xl);
    background: var(--panel);
  }
}

/* 按钮动画 */
.btn {
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.6s;
  z-index: -1;
}

.btn:hover::before {
  left: 100%;
}

.btn-primary::before {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
}

.btn:active {
  transform: scale(0.98);
  transition: transform 0.1s;
}

/* 输入框动画 */
.login-input {
  position: relative;
  transition: all 0.3s ease;
}

.login-input:focus {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* 卡片动画 */
.login-card {
  animation: fadeIn 0.6s ease-out;
}

/* 导航项动画 */
.nav-item {
  transition: all 0.3s ease;
  position: relative;
}

.nav-item::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: var(--gradient-primary);
  transition: width 0.3s ease;
}

.nav-item:hover::after {
  width: 100%;
}

/* 状态卡片动画 */
.status-item {
  transition: all 0.3s ease;
}

.status-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.app-shell { height: 100%; display: grid; grid-template-columns: 280px 1fr; position: relative; }

/* 侧边栏切换按钮 */
.btn-toggle-sidebar {
  display: none;
}

/* 侧边栏遮罩 */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9;
}
.app-sidebar {
  background: var(--panel);
  border-right: 1px solid var(--line);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  box-shadow: var(--shadow-lg);
  animation: slideInLeft 0.6s ease-out;
  z-index: 15;
  position: relative;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  padding: 12px 0;
  font-size: 20px;
  color: var(--text);
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.brand i { 
  color: var(--primary); 
  font-size: 22px;
  animation: pulse 2s infinite;
}

.current-account {
  width: 100%;
  background: var(--panel-2);
  color: var(--text);
  border: 2px solid var(--line);
  border-radius: var(--r);
  padding: 12px 16px;
  cursor: pointer;
  display: flex;
  gap: 12px;
  align-items: center;
  transition: all 0.3s ease;
  position: relative;
}

.account-selector-wrapper {
  position: relative;
  width: 100%;
}

.current-account-avatar {
    position: relative;
    flex-shrink: 0;
}

.current-account-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--line);
}

.current-account-avatar i {
    font-size: 40px;
    color: var(--sub);
}

.current-account-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: left;
}

.current-account-info span:first-child {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.current-account-meta {
    font-size: 10px;
    color: var(--sub);
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.current-account-meta span {
    font-size: 10px;
    white-space: nowrap;
}
.current-account-meta i {
    font-size: 9px;
}

.current-account-meta .fas.fa-star {
    color: #9333EA;
}

.current-account-meta .fas.fa-coins {
    color: #FFD700;
}

.current-account-meta .platform-tag {
    padding: 2px 6px !important;
    border-radius: 4px !important;
    font-size: 9px !important;
    font-weight: 600 !important;
    color: white !important;
    background: linear-gradient(135deg, #12B7F5 0%, #0EA5E9 100%) !important;
    margin-right: 0 !important;
    display: inline-block !important;
    vertical-align: middle !important;
    line-height: 1 !important;
}

.current-account > i:last-child {
    color: var(--sub);
    transition: transform 0.3s ease;
}

.current-account::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
  transition: left 0.6s;
}

.current-account:hover::before {
  left: 100%;
}

.current-account:hover {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
  transform: translateY(-2px);
}

.account-dropdown {
  position: absolute !important;
  top: 70px !important;
  left: 0;
  right: 0;
  display: none;
  max-height: 300px;
  overflow-y: auto;
  border: 2px solid var(--line);
  border-radius: var(--r);
  background: var(--panel-2);
  box-shadow: var(--shadow-xl);
  z-index: 1000;
  animation: fadeIn 0.3s ease;
  box-sizing: border-box;
}

.account-dropdown.show, .mobile-account-dropdown.show { display: block; }

.account-option {
    padding: 12px 16px;
    display: flex;
    gap: 12px;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}



.account-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
    transition: left 0.6s;
}

.account-option:hover::before {
    left: 100%;
}

.account-option:hover {
    background: rgba(102, 126, 234, 0.1);
    transform: translateX(4px);
}

.account-option.active {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2) 0%, rgba(118, 75, 162, 0.1) 100%);
}

.account-option-avatar {
    position: relative;
    flex-shrink: 0;
}

.account-option-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--line);
    transition: border-color 0.3s ease;
}

.account-option:hover .account-option-avatar img {
    border-color: var(--primary);
}

.account-option-avatar i {
    font-size: 40px;
    color: var(--sub);
}

.account-option-avatar .platform-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 7px;
    border: 2px solid var(--panel);
}

.account-option-avatar .platform-badge i {
    font-size: 7px !important;
    line-height: 1;
}

.account-option-avatar .platform-badge.qq {
    background: #12B7F5;
    color: white;
}

.account-option-avatar .platform-badge.wx {
    background: #07C160;
    color: white;
}

.account-option-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.account-option-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.account-option.active .account-option-name {
    color: var(--primary);
}

.account-option-meta {
    font-size: 11px;
    color: var(--sub);
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
}

.account-option-meta .acc-status-dot {
    margin-left: 4px;
}

.account-option-meta i {
    font-size: 9px;
}

.account-option-meta .fas.fa-star {
    color: #9333EA;
}

.account-option-meta .fas.fa-coins {
    color: #FFD700;
}

.account-option-meta .meta-item {
    display: flex;
    align-items: center;
    gap: 2px;
}

.account-option-meta .platform-tag {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 9px;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #12B7F5 0%, #0EA5E9 100%);
}

.account-option-meta .platform-tag.wx {
    background: linear-gradient(135deg, #07C160 0%, #059669 100%);
}

.nav-list { display: grid; gap: 12px; flex: 1; }

.nav-item {
  border: 2px solid transparent;
  border-radius: var(--r);
  padding: 14px 18px;
  color: var(--sub);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 18px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.nav-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
  transition: left 0.6s;
}

.nav-item:hover::before {
  left: 100%;
}

.nav-item:hover {
  background: var(--panel-2);
  border-color: var(--primary);
  color: var(--text);
  transform: translateX(8px);
  box-shadow: var(--shadow);
}

.nav-item.active {
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: var(--shadow-lg);
  transform: translateX(4px);
}

.nav-item.active::after {
  width: 100%;
}

/* 侧边栏图标样式 */
.nav-item i {
  font-size: 20px;
  width: 24px;
  text-align: center;
  transition: all 0.3s ease;
}

/* 侧边栏图标颜色 */
.nav-item[data-page="dashboard"] i {
  color: #3b82f6; /* 蓝色 */
}

.nav-item[data-page="personal"] i {
  color: #10b981; /* 绿色 */
}

.nav-item[data-page="friends"] i {
  color: #f59e0b; /* 橙色 */
}

.nav-item[data-page="accounts"] i {
  color: #6366f1; /* 靛蓝色 */
}

.nav-item[data-page="settings"] i {
  color: #8b5cf6; /* 紫色 */
}

.nav-item[data-page="logs"] i {
  color: #ec4899; /* 粉色 */
}

/* 外部链接图标颜色 */
.nav-item[href="https://ncjs.ziyang.ink/"] i {
  color: #ef4444 !important; /* 红色 */
}

.nav-item[href="https://www.ziyang.ink/"] i {
  color: #14b8a6 !important; /* 深青色 */
}

.nav-item[href="https://qm.qq.com/q/GrBEezEYM0"] i {
  color: #06b6d4 !important; /* 青色 */
}

/* 激活状态的图标颜色 */
.nav-item.active i {
  color: #f106d2ce !important; /* 紫色 */
  transform: scale(1.1);
}

.sidebar-foot {
  margin-top: auto;
  border: 2px solid var(--line);
  border-radius: var(--r);
  background: var(--panel-2);
  padding: 16px 20px;
  font-size: 14px;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-lg);
  transition: all 0.3s ease;
}

.sidebar-foot:hover {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.conn {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.dot { 
  width: 12px; 
  height: 12px; 
  border-radius: 999px; 
  display: inline-block;
  animation: pulse 2s infinite;
}

.dot.online { 
  background: var(--success); 
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
  animation-delay: 0.5s;
}

.dot.offline { 
  background: var(--danger); 
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
  animation-delay: 1s;
}

.uptime-mini { 
  display: block; 
  color: var(--sub); 
  font-size: 13px;
  font-weight: 500;
}

.system-time { 
  display: block; 
  text-align: right; 
  margin: 0; 
  color: var(--sub); 
  font-size: 16px; 
  font-weight: 600;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}



.app-main { display: grid; grid-template-rows: 80px 1fr; min-width: 0; max-width: 100%; overflow-x: hidden; }
.topbar {
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-lg);
  z-index: 5;
  animation: slideInRight 0.6s ease-out;
}
.topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
}

.topbar-brand {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
}

.topbar h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-name {
  font-size: 16px;
  color: var(--sub);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-actions { display: flex; gap: 16px; }
.icon-btn {
  width: 48px;
  height: 48px;
  border: 2px solid var(--line);
  background: var(--panel-2);
  color: var(--sub);
  border-radius: var(--r);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.icon-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.2), transparent);
  transition: left 0.6s;
  z-index: -1;
}

.icon-btn:hover::before {
  left: 100%;
}

.icon-btn:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: rgba(102, 126, 234, 0.1);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.icon-btn:active {
  transform: scale(0.95);
  transition: transform 0.1s;
}

.page-wrap { overflow: auto; padding: 24px; max-width: 100%; overflow-x: hidden; }
.page { display: none; }
.page.active {
  display: block;
  animation: fadeIn 0.6s ease-out;
}
.card {
  background: var(--panel);
  border: 2px solid var(--line);
  border-radius: var(--r);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-lg);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
  animation: gradientShift 3s ease infinite;
  background-size: 200% 200%;
}

.card:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-5px);
  border-color: var(--primary);
}

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  flex-wrap: nowrap;
}

.card-head h3 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  display: flex;
  gap: 12px;
  align-items: center;
  color: var(--text);
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  white-space: nowrap;
  flex-shrink: 0;
}

.card-head h3 i {
  color: var(--primary);
  font-size: 24px;
  animation: pulse 2s infinite;
}
.dashboard-grid .card-head h3 { font-size: 20px; }

.compact-status {
  display: grid;
  grid-template-columns: repeat(6, minmax(0,1fr));
  gap: 15px;
  margin-bottom: 24px;
}
.status-item {
  border: 2px solid var(--line);
  border-radius: var(--r);
  padding: 20px;
  background: var(--panel-2);
  min-height: 100px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
  animation: fadeIn 0.6s ease-out;
}

.status-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
  transition: left 0.6s;
}

.status-item:hover::before {
  left: 100%;
}

.status-item:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-xl);
  transform: translateY(-8px);
  background: var(--panel);
}

.status-item.stretch { grid-column: span 1; }

.status-head { display: flex; align-items: center; gap: 10px; }

.si { 
  width: 24px; 
  text-align: center; 
  font-size: 20px; 
  opacity: 1;
  animation: pulse 2s infinite;
}

.si.coin { color: #f59e0b; animation-delay: 0.2s; }
.si.level { color: #8b5cf6; animation-delay: 0.4s; }
.si.exp { color: var(--primary); animation-delay: 0.6s; }
.si.total { color: var(--success); animation-delay: 0.8s; }
.si.time { color: #8b5cf6; animation-delay: 1.0s; }
.si.rate { color: var(--accent); animation-delay: 1.2s; }
.si.key { color: var(--success); animation-delay: 1.4s; }

.status-item .k { 
  font-size: 16px; 
  color: var(--sub); 
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-item .v { 
  font-size: 16px; 
  font-weight: 700; 
  margin-top: 6px; 
  line-height: 1.1; 
  color: var(--text);
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.status-item .s { 
    font-size: 16px; 
    color: var(--sub); 
    margin-top: 6px;
    font-weight: 500;
}

.status-item .v.inspecting {
    animation: pulse 1s ease-in-out infinite;
    color: var(--success);
    -webkit-text-fill-color: var(--success);
}

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

.status-item .gain-gold { 
  color: var(--success); 
  font-weight: 600;
  background: var(--gradient-tertiary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.exp-inline #stat-exp { 
  color: var(--success); 
  font-weight: 600;
  background: var(--gradient-tertiary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.status-account {
  margin-top: 8px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-width: 0;
}
.status-account-item .status-account { margin-top: 0; }
.status-account img,
.status-account #topbar-account-fallback {
  width: 84px;
  height: 84px;
  border-radius: 999px;
  flex-shrink: 0;
}
.status-account img { object-fit: cover; border: 1px solid var(--line); background: #fff; }
.status-account #topbar-account-fallback {
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(24,160,111,.2); color: var(--text); font-size: 26px; font-weight: 700;
}
.status-account-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 0;
}
.status-account #topbar-account-name {
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 17px;
  color: var(--text);
}
.status-account #topbar-account-status {
  font-size: 15px;
  color: var(--sub);
}

@media (min-width: 981px) {
  .mobile-account-section {
    display: none;
  }
  
  .app-main {
    grid-template-rows: 80px 1fr;
  }
  
  .topbar-brand {
    flex-direction: row;
    gap: 16px;
    align-items: center;
  }
  
  .brand-name {
    font-size: 16px;
    margin-top: 0;
  }
  
  .dashboard-grid > .logs-card { margin-bottom: 0; }
  #page-dashboard .compact-status { margin-bottom: 22px; }
  #page-dashboard .dashboard-grid {
    grid-template-columns: 1.75fr 0.65fr;
    column-gap: 18px;
    row-gap: 22px;
    align-items: stretch;
  }
  #page-dashboard .side-stack { gap: 20px; }
  #page-dashboard .dashboard-grid .card { margin-bottom: 18px; }
  #page-dashboard .side-stack .card-head h3 { font-size: 26px; }
  #page-dashboard .ops-list .op-stat { padding: 12px 14px; }
  #page-dashboard .ops-list .op-stat .label { font-size: 18px; }
  #page-dashboard .ops-list .op-stat .count { font-size: 20px; }
  #page-dashboard .switch-item { font-size: 19px; }
  .app-sidebar { padding: 12px; gap: 12px; }
  .brand { font-size: 26px; }
  .brand i { font-size: 28px; }
  .current-account {
    padding: 12px 14px;
    font-size: 16px;
    border-radius: 12px;
  }
  .account-dropdown { max-height: 280px; }
  .account-option {
    padding: 10px 12px;
    font-size: 15px;
  }
  .nav-list { gap: 10px; }
  .nav-item { padding: 10px 12px; font-size: 18px; }
  .compact-status {
    grid-template-columns: 0.9fr 0.9fr 1.1fr 1.1fr 0.9fr 0.9fr;
    gap: 22px;
  }
  .compact-status .status-item {
    padding: 10px;
  }
  .status-account {
    gap: 12px;
  }
  .status-account img,
  .status-account #topbar-account-fallback {
    width: 94px;
    height: 94px;
  }
  .status-account #topbar-account-fallback {
    font-size: 32px;
  }
  .status-account #topbar-account-name {
    max-width: 300px;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.2;
  }
  .status-account #topbar-account-status {
    font-size: 17px;
    line-height: 1.2;
  }
}
.exp-inline { display: flex; align-items: baseline; gap: 8px; margin-top: 2px; }
.inline-select { margin-left: 4px; font-size: 12px; border: none; background: transparent; color: var(--sub); }
.progress { width: 100%; height: 5px; border-radius: 999px; background: rgba(255,255,255,0.12); overflow: hidden; margin-top: 4px; }
body.light-theme .progress { background: rgba(0,0,0,0.08); }
.progress-fill { height: 100%; background: linear-gradient(90deg, #3ea9ff, #6ad7ff); }

.dashboard-grid { display: grid; grid-template-columns: 1.45fr .95fr; gap: 14px; align-items: stretch; }
.side-stack { display: grid; gap: 14px; align-content: stretch; }
.logs-card { display: flex; flex-direction: column; min-height: 300px; height: 100%; max-height: 300px; }

.logs-container {
  border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  font-family: Consolas, monospace; font-size: 15px; background: var(--panel-2);
}

/* 电脑端特定样式 */
@media (min-width: 1281px) {
  .side-stack { height: 100%; min-height: 500px; }
  .logs-card { height: 100%; min-height: 580px; max-height: 400px; }
  .logs-container {
    min-height: 480px;
    max-height: 300px;
  }
}
.log-row { display: flex; gap: 8px; border-bottom: 1px dashed var(--line); padding: 8px 0; align-items: flex-start; min-height: 32px; }
.log-row:last-child { border-bottom: 0; }
.log-time { min-width: 70px; }
.log-tag { min-width: 60px; }
.log-msg { flex: 1; word-break: break-all; }
.log-row.warn .log-msg { color: var(--warn); }

.log-filters {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  align-items: center;
  max-width: 100%;
  overflow: visible;
  padding-bottom: 0;
  justify-content: flex-end;
}
.log-filter-select,
.log-filter-input {
  height: 32px;
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1.2;
  background: transparent;
  border-color: var(--line);
  color: var(--sub);
}
.log-filter-select {
  width: 96px;
  min-width: 96px;
}
.log-filter-input {
  width: 112px;
  min-width: 112px;
  transition: width 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
#logs-keyword-filter {
  width: 180px;
  min-width: 180px;
}
.log-filter-input:focus {
  width: 140px;
  color: var(--text);
  border-color: var(--primary);
}
#logs-keyword-filter:focus {
  width: 220px;
}
.log-filter-select:focus {
  color: var(--text);
  border-color: var(--primary);
}

.form-control { border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2); color: var(--text); padding: 7px 9px; font-size: 14px; }
.form-control:focus { outline: none; border-color: var(--primary); }

.ops-list-container {
    min-height: 450px;
}

.ops-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.op-stat-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--panel-2);
    transition: all 0.2s ease;
}

.op-stat-item:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.op-stat-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.op-stat-left i {
    font-size: 20px;
    width: 24px;
    text-align: center;
}

.op-stat-label {
    font-size: 15px;
    color: var(--sub);
}

.op-stat-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
}

/* 图标颜色 */
.text-green-500 { color: #22c55e; }
.text-blue-400 { color: #60a5fa; }
.text-yellow-500 { color: #eab308; }
.text-red-400 { color: #f87171; }
.text-emerald-500 { color: #10b981; }
.text-lime-500 { color: #84cc16; }
.text-purple-500 { color: #a855f7; }
.text-indigo-500 { color: #6366f1; }
.text-orange-500 { color: #f97316; }
.text-blue-300 { color: #93c5fd; }
.text-yellow-400 { color: #facc15; }
.text-red-300 { color: #fca5a5; }
.text-pink-500 { color: #ec4899; }
.text-gray-500 { color: #6b7280; }

.ops-list { display: grid; gap: 8px; }
.op-stat { display: flex; justify-content: space-between; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2); }
.op-stat .count { color: var(--accent); font-weight: 700; }

.tasks-list { display: grid; gap: 8px; }
.task-item { display: flex; justify-content: space-between; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2); transition: all 0.3s ease; }
.task-item:hover { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1); }
.task-status { font-size: 12px; padding: 2px 8px; border-radius: 999px; font-weight: 600; }
.task-status.completed { background: rgba(16, 185, 129, 0.2); color: var(--success); }
.task-status.pending { background: rgba(245, 158, 11, 0.2); color: var(--warn); }
.task-status.failed { background: rgba(14, 236, 14, 0.575); color: var(--danger); }

.switches-list { display: grid; gap: 16px; }
.switch-item { display: flex; justify-content: space-between; align-items: center; font-size: 16px; }
.switch-item input { display: none; }
.slider { width: 38px; height: 20px; border-radius: 999px; background: #3a4652; position: relative; border: 1px solid var(--line); }
.slider::before { content: ""; width: 14px; height: 14px; border-radius: 50%; background: #fff; position: absolute; top: 2px; left: 2px; transition: .18s; }
.switch-item input:checked + .slider { background: rgba(24,160,111,.75); border-color: rgba(24,160,111,.85); }
.switch-item input:checked + .slider::before { left: 20px; }
.friend-sub-controls { margin-left: 10px; padding-left: 12px; border-left: 2px dashed var(--line); display: grid; gap: 14px; }
.friend-sub-controls.disabled { opacity: .5; pointer-events: none; }
.settings-switches { padding: 16px 0; }
.settings-switches .switch-item { padding: 8px 0; border-bottom: 1px solid var(--line); }
.settings-switches .switch-item:last-child { border-bottom: none; }
.settings-switches .form-group { margin-top: 12px; }

.btn {
  border: 2px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  border-radius: var(--r);
  padding: 12px 20px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
  overflow: hidden;
  z-index: 1;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: center;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.2), transparent);
  transition: left 0.6s;
  z-index: -1;
}

.btn:hover::before {
  left: 100%;
}

.btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.btn:active {
  transform: scale(0.98);
  transition: transform 0.1s;
}

.btn-primary {
  background: var(--gradient-primary);
  border-color: transparent;
  color: #fff;
}

.btn-primary::before {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
}

.btn-primary:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-3px);
  color: #fff;
}

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

.btn-ghost {
  background: transparent;
  border-color: var(--primary);
  color: var(--primary);
}

.btn-ghost:hover {
  background: rgba(102, 126, 234, 0.1);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  background: linear-gradient(90deg, #f093fb 0%, #f5576c 100%);
  border-color: transparent;
  color: white;
  border-radius: 9999px;
}

.btn-secondary::before {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
}

.btn-secondary:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-3px);
  color: #fff;
}

/* 操作按钮组 */
.actions-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.actions-group .btn {
  flex: 1 1 auto;
  min-width: 120px;
}

.actions-group .btn-primary {
  flex: 2 1 auto;
}

.summary { margin-bottom: 6px; text-align: right; color: var(--sub); font-size: 13px; }
.farm-grid { display: grid; grid-template-columns: repeat(6, 1fr); grid-template-rows: repeat(4, 1fr); grid-auto-flow: column; gap: 10px; }
.farm-grid.mini { grid-template-columns: repeat(6, 1fr); grid-template-rows: repeat(4, 1fr); grid-auto-flow: column; gap: 8px; }
.land-cell { position: relative; border-radius: 10px; border: 2px solid transparent; background: var(--panel-2); min-height: 160px; padding: 8px; text-align: center; display: flex; flex-direction: column; justify-content: flex-start; align-items: center; }

.land-cell .seed-image { 
  width: 48px; 
  height: 48px; 
  margin: 4px auto; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
}
.land-cell .seed-image img { 
  max-width: 100%; 
  max-height: 100%; 
  object-fit: contain; 
}

.bag-summary { margin-bottom: 12px; text-align: right; color: var(--sub); font-size: 13px; }
.bag-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(120px,1fr)); gap: 10px; }
.bag-item { border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2); padding: 10px; text-align: center; transition: all 0.3s ease; position: relative; }
.bag-item:hover { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1); transform: translateY(-2px); }
.bag-item.selected { border-color: var(--success); box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2); }
.bag-item-checkbox { position: absolute; top: 5px; left: 5px; }
.bag-item-checkbox-input { width: 18px; height: 18px; cursor: pointer; accent-color: var(--success); }
.bag-item-image { width: 60px; height: 60px; margin: 0 auto 8px; background: rgba(0,0,0,0.05); border-radius: 8px; display: flex; align-items: center; justify-content: center; }
.bag-item-image img { max-width: 100%; max-height: 100%; object-fit: contain; }
.bag-item-name { font-size: 14px; font-weight: 600; margin-bottom: 4px; color: var(--text); }
.bag-item-count { font-size: 16px; font-weight: 700; color: var(--accent); }
.bag-item-category { font-size: 12px; color: var(--sub); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.5px; }
.bag-item-hours { font-size: 12px; color: var(--success); margin-top: 4px; font-weight: 600; }
.bag-batch-actions { display: flex; gap: 10px; padding: 10px 16px; background: var(--panel-2); border-radius: 8px; margin-bottom: 8px; flex-wrap: wrap; align-items: center; justify-content: flex-start; }
.bag-batch-actions .btn { flex-shrink: 0; }
.land-cell .id { position: absolute; left: 5px; top: 5px; font-size: 10px; font-weight: 600; }
.land-cell .needs { position: absolute; right: 5px; bottom: 5px; font-size: 10px; background: var(--danger); color: #fff; padding: 1px 4px; border-radius: 6px; }

.land-cell .land-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  gap: 2px;
}

.land-cell .land-level-badge {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.2);
  color: #fff;
  font-weight: 600;
}

.land-cell .countdown {
  font-size: 11px;
  color: var(--warn);
  font-weight: 600;
}

.land-cell .land-mature-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  padding: 2px 8px;
  border-radius: 999px;
  box-shadow: 0 6px 14px rgba(34, 197, 94, 0.25);
}

.land-cell .countdown.ready {
  color: var(--success);
}
/* 合种徽章样式 */
.plant-size-badge { 
  position: absolute; 
  right: 5px; 
  top: 5px; 
  font-size: 10px; 
  background: #e91e63; 
  color: #fff; 
  padding: 2px 6px; 
  border-radius: 6px; 
  font-weight: 600; 
  z-index: 3; 
}

/* 季数徽章样式 - 单独一行显示，居中对齐 */
.seasons-badge {
  display: block !important;
  font-size: 10px !important;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
  color: white !important;
  font-weight: 600 !important;
  padding: 2px 6px !important;
  border-radius: 6px !important;
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3) !important;
  margin: 2px auto 0 auto !important;
  width: fit-content !important;
  max-width: fit-content !important;
}

.plant-name { 
  font-size: 14px; 
  font-weight: 700;
}

.phase-name, .land-meta { font-size: 12px; opacity: .9; }
.land-cell.harvestable { border-color: #f3be4f; }
.land-cell.dead { opacity: .66; }
.land-cell.occupied { opacity: .5; border-style: dashed; }
.land-cell.land-level-0 { background: #2b2f33; border-color: #454f58; color: #d5dde4; }
.land-cell.land-level-1 { background: #6e5716; border-color: #8c6f1e; color: #f7e7b5; }
.land-cell.land-level-2 { background: #6b1e1e; border-color: #8b2a2a; color: #ffe6e6; }
.land-cell.land-level-3 { background: #141414; border-color: #090909; color: #eaeaea; }
.land-cell.land-level-4 { background: #6f5b16; border-color: #8f7420; color: #f9e8a8; }
body.light-theme .land-cell.land-level-0 { background: #d7d7d7; border-color: #bdbdbd; color: #333; }
body.light-theme .land-cell.land-level-1 { background: #f2c14e; border-color: #d8a730; color: #2b1e00; }
body.light-theme .land-cell.land-level-2 { background: #d9534f; border-color: #b53a37; color: #fff5f5; }
body.light-theme .land-cell.land-level-3 { background: #2f2f2f; border-color: #1b1b1b; color: #f0f0f0; }
body.light-theme .land-cell.land-level-4 { background: #d4af37; border-color: #b9962f; color: #2d2300; }

/* 合并卡片样式 - 2x2合种 */
.land-cell.merged-master {
    border-color: #ff6b9d !important;
    box-shadow: 0 0 15px rgba(255, 107, 157, 0.4);
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
}

.land-cell.merged-master .seed-image {
    margin: 20px auto 10px auto;
}

.land-cell.merged-master .seed-image img {
    width: 60px;
    height: 60px;
}

.land-cell.merged-master .plant-name {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 5px;
}

.land-cell.merged-master .countdown {
    margin: 5px 0;
}

.land-cell.merged-master .land-level-badge {
    margin-top: 5px;
}

/* 隐藏的从属土地 */
.slave-land-hidden {
    display: none !important;
}

/* 合并卡片的土地ID矩阵 */
.merged-land-ids {
    position: absolute;
    left: 5px;
    top: 5px;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.4;
}

.merged-id {
    display: inline-block;
    margin-right: 2px;
    padding: 1px 3px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 3px;
}

/* 合种标识样式 */
.plant-size-badge {
    position: absolute;
    right: 5px;
    top: 5px;
    font-size: 10px;
    background: linear-gradient(135deg, #ff6b9d, #c44569);
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
}

.friends-list { display: grid; gap: 6px; }
.friend-item { border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); overflow: hidden; }
.friend-header { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px; cursor: pointer; gap: 10px; }
.friend-header:hover { filter: brightness(1.05); }
.friend-header .preview { font-size: 13px; color: var(--sub); }
.friend-header .preview.has-work { color: var(--primary); font-weight: 700; }

.friend-avatar-wrapper {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.friend-avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 18px;
}

.friend-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.friend-info .name {
    font-weight: 600;
    font-size: 14px;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.friend-details {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.friend-details .friend-gid {
    font-size: 11px;
    color: var(--sub);
}

.friend-details .friend-level {
    font-size: 11px;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 2px;
}

.friend-details .friend-level i {
    font-size: 10px;
    color: #ffc107;
}

.friend-details .friend-gold {
    font-size: 11px;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 2px;
}

.friend-details .friend-gold i {
    font-size: 10px;
    color: #ffd700;
}

.blocked-tag {
    flex-shrink: 0;
    font-size: 11px;
    padding: 2px 6px;
    background: #dc2626;
    color: white;
    border-radius: 4px;
}
.friend-actions { display: flex; gap: 4px; padding: 0 10px 8px; align-items: center; }
.friend-actions .btn { font-size: 11px; padding: 6px 10px; min-width: auto; }

.friend-lands { border-top: 1px solid var(--line); margin: 8px 10px 0; }

.friend-level-gold { display: none; }

.accounts-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(240px,1fr)); gap: 8px; }
.acc-item {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--panel-2);
    padding: 16px;
    transition: all 0.3s ease;
}

.acc-item:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.acc-item-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.acc-item-avatar {
    position: relative;
    flex-shrink: 0;
}

.acc-item-avatar img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--line);
    transition: border-color 0.3s ease;
}

.acc-item:hover .acc-item-avatar img {
    border-color: var(--primary);
}

.acc-item-avatar i {
    font-size: 48px;
    color: var(--sub);
}

.acc-item-avatar .platform-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 7px;
    border: 2px solid var(--panel-2);
}

.acc-item-avatar .platform-badge i {
    font-size: 7px !important;
    line-height: 1;
}

.acc-item-avatar .platform-badge.qq {
    background: #12B7F5;
    color: white;
}

.acc-item-avatar .platform-badge.wx {
    background: #07C160;
    color: white;
}

.acc-item-info {
    flex: 1;
    min-width: 0;
}

.acc-item-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}

.acc-item-stats {
    display: flex;
    gap: 12px;
    align-items: center;
}

.acc-stat {
    font-size: 11px;
    color: var(--sub);
    display: flex;
    align-items: center;
    gap: 3px;
}

.acc-stat i {
    font-size: 9px;
}

.acc-stat .fas.fa-star {
    color: #9333EA;
}

.acc-stat.gold i {
    color: #FFD700;
}

.acc-stat.platform-tag {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 9px;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #12B7F5 0%, #0EA5E9 100%);
}

.acc-stat.platform-tag.wx {
    background: linear-gradient(135deg, #07C160 0%, #059669 100%);
}

.acc-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.acc-status-dot.online {
    background: #4CAF50;
    box-shadow: 0 0 8px rgba(76, 175, 80, 0.5);
    animation: statusPulse 2s ease-in-out infinite;
}

.acc-status-dot.offline {
    background: var(--danger);
}

@keyframes statusPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.acc-item-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-start;
}

.settings-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px 10px; }
.settings-grid .full { grid-column: 1/-1; }
.checkbox-inline { display: inline-flex; gap: 8px; align-items: center; }
.save-btn {
  width: 100%;
  border-radius: 9999px;
  background: linear-gradient(90deg, #f093fb 0%, #f5576c 100%);
  border: none;
  color: white;
  padding: 12px 20px;
  font-size: 16px;
  font-weight: 600;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  z-index: 1;
  text-align: center;
}

.save-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.6s;
  z-index: -1;
}

.save-btn:hover::before {
  left: 100%;
}

.save-btn:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-3px);
  color: #fff;
}
.compact-select { width: 140px; }

/* Settings navigation tabs */
.settings-nav {
  grid-column: 1 / -1;
  display: flex;
  gap: 12px;
  margin-bottom: 8px;
  flex-wrap: wrap;
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--panel);
  padding: 10px;
  border-radius: var(--r);
  box-shadow: var(--shadow);
  max-width: 100%;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: thin;
}

/* 电脑端导航菜单容器配置 */
@media (min-width: 981px) {
  .settings-nav {
    max-width: 49%;
    height: auto;
    min-height: 60px;
    padding: 12px 16px;
  }
  
  .settings-nav-btn {
    padding: 10px 18px;
    font-size: 14px;
  }
}

.settings-nav-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border: 2px solid var(--line);
  border-radius: 9999px;
  background: var(--panel-2);
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.settings-nav-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
}

.settings-nav-btn.active {
  background: var(--gradient-primary);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.settings-nav-btn i {
  font-size: 16px;
}

/* Settings card animation */
.settings-card-animate {
  animation: settingsSlideIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes settingsSlideIn {
  0% {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  50% {
    opacity: 0.8;
    transform: translateY(-5px) scale(1.02);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Settings nav button animation */
.settings-nav-btn {
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.settings-nav-btn:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.settings-nav-btn.active {
  animation: navBtnPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes navBtnPop {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

/* Settings container for side-by-side display */
.settings-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  align-items: start;
}

/* Settings card size controls */
.settings-card {
  min-height: auto;
}

#settings-global {
  width: 100%;
  max-width: 100%;
  min-width: auto;
  height: auto;
  max-height: none;
  min-height: auto;
}

#settings-auto {
  width: 100%;
  max-width: 100%;
  min-width: auto;
  height: auto;
  max-height: none;
  min-height: auto;
}

#settings-daily {
  width: 100%;
  max-width: 100%;
  min-width: auto;
  height: auto;
  max-height: none;
  min-height: auto;
}

/* Select container for multi-select dropdowns */
.select-container {
  position: relative;
  width: 100%;
}

.select-container .multi-select {
  width: 100%;
  min-height: 120px;
  max-height: 200px;
  overflow-y: auto;
  padding: 8px;
  border: 2px solid var(--line);
  border-radius: 10px;
  background: var(--panel-2);
  color: var(--text);
  font-size: 16px;
  transition: all 0.3s ease;
}

.select-container .multi-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.select-container .select-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  gap: 8px;
}

.select-container .select-actions .btn {
  flex: 1;
  font-size: 14px;
  padding: 8px 12px;
  text-align: center;
}

.select-container .selected-count {
  font-size: 14px;
  color: var(--sub);
  font-weight: 600;
  background: var(--panel-2);
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  min-width: 120px;
  text-align: center;
  transition: all 0.3s ease;
}

.select-container .selected-count:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* Settings page readability */
#page-settings .card-head h3 { font-size: 24px; }
#page-settings .settings-grid { grid-template-columns: 1fr; gap: 12px 16px; }
#page-settings .form-group { margin-bottom: 4px; }
#page-settings .form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 15px;
  color: var(--text);
  line-height: 1.3;
}
#page-settings .form-control {
  font-size: 15px;
  padding: 10px 12px;
  min-height: 40px;
  border-radius: 8px;
}
#page-settings #strategy-select,
#page-settings #seed-select,
#page-settings #interval-farm,
#page-settings #interval-farm-max,
#page-settings #interval-friend,
#page-settings #interval-friend-max {
  width: 100%;
  max-width: 100%;
}

#page-settings .interval-section {
  margin-bottom: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--panel-2);
}

#page-settings .interval-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  cursor: pointer;
  user-select: none;
  transition: background 0.2s;
}

#page-settings .interval-header:hover {
  background: var(--panel-hover, rgba(255,255,255,0.05));
}

#page-settings .interval-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

#page-settings .interval-title i {
  color: var(--primary);
}

#page-settings .interval-arrow {
  transition: transform 0.3s ease;
  color: var(--sub);
  font-size: 12px;
}

#page-settings .interval-header.collapsed .interval-arrow {
  transform: rotate(-90deg);
}

#page-settings .interval-content {
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  background: var(--panel);
  max-height: 1000px;
  overflow: visible;
  transition: max-height 0.3s ease, padding 0.3s ease, opacity 0.3s ease;
}

#page-settings .interval-content.collapsed {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-top: none;
  opacity: 0;
}

#page-settings .interval-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}

#page-settings .interval-row .form-group {
  margin-bottom: 0;
}

#page-settings .switches-sub {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

#page-settings .switches-sub .switch-item {
  margin-bottom: 4px;
}

#page-settings #settings-auto .interval-content {
  padding: 12px 14px;
}

#page-settings #settings-auto .interval-content .switch-item:first-child {
  margin-bottom: 8px;
}

#page-settings .interval-section.full {
  grid-column: 1/-1;
}
#page-settings .checkbox-inline { gap: 8px; font-size: 15px; }
#page-settings .checkbox-inline input[type="checkbox"] { width: 16px; height: 16px; }
#page-settings .save-btn { margin-top: 12px; font-size: 16px; padding: 10px 14px; }
#page-settings .switches-list { 
  padding: 12px 0; 
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px 16px;
}

/* 顶部弹窗提示样式 */
.toast-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  pointer-events: none;
  padding: 20px;
}

.toast {
  min-width: 300px;
  max-width: 400px;
  width: 100%;
  max-width: 500px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  animation: toastSlideIn 0.3s ease-out, toastFadeOut 0.3s ease-in 2.7s forwards;
}

.toast {
  background: var(--panel);
  border: 2px solid var(--line);
  border-radius: var(--r);
  padding: 16px 20px;
  box-shadow: var(--shadow-xl);
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 300px;
  max-width: 400px;
  animation: toastSlideIn 0.3s ease-out, toastFadeOut 0.3s ease-in 2.7s forwards;
  pointer-events: auto;
  position: relative;
  overflow: hidden;
}

.toast::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--gradient-primary);
  animation: gradientShift 3s ease infinite;
  background-size: 200% 200%;
}

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

.toast.success::before {
  background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
}

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

.toast.error::before {
  background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
}

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

.toast.info::before {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

.toast-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.toast.success .toast-icon {
  color: var(--success);
  animation: pulse 1.5s ease-in-out infinite;
}

.toast.error .toast-icon {
  color: var(--success);
  animation: pulse 1.5s ease-in-out infinite;
}

.toast.info .toast-icon {
  color: var(--primary);
  animation: pulse 1.5s ease-in-out infinite;
}

.toast-content {
  flex: 1;
}

.toast-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.toast-message {
  font-size: 14px;
  color: var(--sub);
  line-height: 1.4;
}

.toast-close {
  background: none;
  border: none;
  color: var(--sub);
  font-size: 18px;
  cursor: pointer;
  flex-shrink: 0;
  padding: 4px;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.toast-close:hover {
  background: var(--panel-2);
  color: var(--text);
  transform: scale(1.1);
}

@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateY(-100px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toastFadeOut {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(-50px) scale(0.9);
  }
}

/* 增强用户信息卡片样式 */
.user-info-card {
  background: var(--panel);
  border: 2px solid var(--line);
  border-radius: var(--r);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-lg);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  animation: userCardSlideIn 0.6s ease-out;
}

.user-info-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
  animation: gradientShift 3s ease infinite;
  background-size: 200% 200%;
}

.user-info-card:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-5px);
  border-color: var(--primary);
}

.user-info-card .card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.user-info-card .card-head h3 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  display: flex;
  gap: 12px;
  align-items: center;
  color: var(--text);
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.user-info-card .card-head h3 i {
  color: var(--primary);
  font-size: 24px;
  animation: pulse 2s infinite;
}

.user-badge {
  padding: 6px 12px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
  animation: pulse 2s infinite;
}

.user-avatar-section {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  padding: 20px;
  background: var(--panel-2);
  border-radius: var(--r);
  transition: all 0.3s ease;
}

.user-avatar-section:hover {
  background: rgba(102, 126, 234, 0.1);
  transform: translateY(-2px);
}

.user-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: white;
  box-shadow: var(--shadow-lg);
  animation: pulse 3s ease-in-out infinite;
  flex-shrink: 0;
}

.user-welcome {
  flex: 1;
}

.welcome-text {
  font-size: 14px;
  color: var(--sub);
  margin-right: 8px;
}

.user-name-display {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.user-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.user-info-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: var(--panel-2);
  border: 2px solid var(--line);
  border-radius: var(--r);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.user-info-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
  transition: left 0.6s;
}

.user-info-item:hover::before {
  left: 100%;
}

.user-info-item:hover {
  border-color: var(--primary);
  background: var(--panel);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.info-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: white;
  flex-shrink: 0;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  animation: pulse 2s infinite 1.5s;
}

.info-icon:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow-lg);
}

.info-icon.card-type-icon {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  animation: pulse 2s infinite;
}

.info-icon.expires-icon {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  animation: pulse 2s infinite 0.5s;
}

.info-icon.quota-icon {
  background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
  animation: pulse 2s infinite 1s;
}

.info-content {
  flex: 1;
}

.user-info-label {
  font-size: 14px;
  color: var(--sub);
  display: block;
  margin-bottom: 4px;
}

.user-info-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

/* 密码颜色改为红色 */
#user-info-password {
  color: #ef4444;
  font-weight: 700;
  font-family: monospace;
  letter-spacing: 2px;
}

.password-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-toggle-password {
  background: rgba(139, 92, 246, 0.1);
  border: 2px solid #8b5cf6;
  color: #8b5cf6;
  font-size: 10px;
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.2);
}

.btn-toggle-password:hover {
  background: rgba(139, 92, 246, 0.2);
  color: #7c3aed;
  border-color: #7c3aed;
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.card-type-value {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 700;
}

.quota-value {
  color: var(--success);
  font-weight: 700;
}

/* 续费充值区域样式增强 */
.renew-section {
  background: var(--panel-2);
  border: 2px solid var(--line);
  border-radius: var(--r);
  padding: 20px;
  transition: all 0.3s ease;
}

.renew-section:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.renew-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.renew-header i {
  font-size: 20px;
  color: var(--accent);
  animation: pulse 2s infinite;
}

.renew-header span {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.renew-content {
  margin-bottom: 16px;
}

.renew-input-wrapper {
  position: relative;
  margin-bottom: 16px;
}

.renew-input-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: var(--sub);
  pointer-events: none;
}

.renew-input {
  width: 100%;
  padding: 14px 16px 14px 48px;
  border: 2px solid var(--line);
  border-radius: var(--r);
  background: var(--panel);
  color: var(--text);
  font-size: 16px;
  transition: all 0.3s ease;
}

.renew-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
  transform: translateY(-2px);
}

.renew-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.renew-actions .btn {
  flex: 1 1 auto;
  min-width: 140px;
}

.btn-renew {
  background: var(--gradient-primary);
  border-color: transparent;
  color: white;
}

.btn-renew:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-3px);
  color: white;
}

.btn-contact {
  background: var(--gradient-secondary);
  border-color: transparent;
  color: white;
  text-decoration: none;
}

.btn-contact:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-3px);
  color: white;
}

.renew-result {
  padding: 12px;
  border-radius: var(--r);
  text-align: center;
  font-weight: 600;
  margin-top: 16px;
  transition: all 0.3s ease;
}

.renew-result.success {
  background: rgba(4, 235, 158, 0.2);
  color: var(--danger);
  border: 1px solid var(--danger);
  animation: pulse 1s ease-in-out;
}

.renew-result.error {
  background: rgba(4, 235, 158, 0.2);
  color: var(--danger);
  border: 1px solid var(--danger);
  animation: pulse 1s ease-in-out;
}

/* 动画效果 */
@keyframes userCardSlideIn {
  0% {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  50% {
    opacity: 0.8;
    transform: translateY(-5px) scale(1.02);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* 电脑端全局设置2列显示 */
@media (min-width: 981px) {
  #page-settings .settings-grid {
    grid-template-columns: repeat(2, minmax(260px, 1fr)) !important;
    gap: 12px 16px !important;
  }
  
  #page-settings .switches-list {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}
#page-settings .switch-item { padding: 6px 0; font-size: 15px; }

/* Responsive design for settings container */
@media (max-width: 1280px) {
  .settings-container {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

.modal { 
  position: fixed; 
  inset: 0; 
  display: none; 
  align-items: center; 
  justify-content: center; 
  background: rgba(0,0,0,.55); 
  z-index: 100;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal.show { 
  display: flex;
  animation: modalBackdropFadeIn 0.3s ease forwards;
}

.modal.closing {
  animation: modalBackdropFadeOut 0.3s ease forwards;
}

/* 背景淡入动画 */
@keyframes modalBackdropFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* 背景淡出动画 */
@keyframes modalBackdropFadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}
.modal-content { width: min(92vw, 500px); background: rgba(255, 255, 255, 0.8); border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 16px; padding: 20px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1); transition: all 0.3s ease; }
body.dark-theme .modal-content { background: rgba(45, 27, 105, 0.8); border: 1px solid rgba(167, 139, 250, 0.2); box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3); }
.chart-modal { width: min(95vw, 760px); }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; padding-bottom: 10px; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
body.dark-theme .modal-header { border-bottom: 1px solid rgba(167, 139, 250, 0.1); }
.modal-header h3 { margin: 0; font-size: 24px; font-weight: 700; color: var(--text); background: var(--gradient-primary); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.close-modal { cursor: pointer; font-size: 24px; color: var(--sub); transition: all 0.3s ease; }
.close-modal:hover { color: var(--text); transform: rotate(90deg); }
.modal-footer { display: flex; justify-content: space-between; gap: 10px; margin-top: 20px; padding-top: 15px; border-top: 1px solid rgba(255, 255, 255, 0.1); }
body.dark-theme .modal-footer { border-top: 1px solid rgba(167, 139, 250, 0.1); }

.tabs { display: flex; gap: 6px; margin-bottom: 8px; }
.tab-btn { border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2); color: var(--sub); padding: 7px 10px; cursor: pointer; font-size: 14px; }
.tab-btn.active { background: var(--primary); color: #fff; border-color: transparent; }
.qr-wrap { min-height: 250px; display: grid; place-items: center; gap: 8px; }

/* 更新公告内容样式 */
.update-content {
  animation: fadeIn 0.6s ease-out;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  max-height: 300px;
  overflow-y: auto;
  padding-right: 8px;
}

.update-content::-webkit-scrollbar {
  width: 0;
  display: none;
}

.update-content::-webkit-scrollbar-track {
  background: transparent;
}

.update-content::-webkit-scrollbar-thumb {
  background: transparent;
}

.update-content::-webkit-scrollbar-thumb:hover {
  background: transparent;
}

body.dark-theme .update-content::-webkit-scrollbar-track {
  background: transparent;
}

body.dark-theme .update-content::-webkit-scrollbar-thumb {
  background: transparent;
}

body.dark-theme .update-content::-webkit-scrollbar-thumb:hover {
  background: transparent;
}

.update-content h4 {
  margin: 0 0 15px 0;
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.update-content h4 i {
  color: var(--primary);
  font-size: 20px;
  animation: pulse 2s infinite;
}

.update-content ul {
  margin: 0 0 20px 0;
  padding-left: 20px;
  list-style: none;
}

.update-content li {
  margin-bottom: 10px;
  padding-left: 25px;
  position: relative;
  font-size: 16px;
  line-height: 1.4;
  color: var(--text);
  transition: all 0.3s ease;
}

.update-content li:hover {
  transform: translateX(5px);
  color: var(--primary);
}

.update-content li::before {
  content: '✅';
  position: absolute;
  left: 0;
  top: 2px;
  font-size: 14px;
}

.update-footer {
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

body.dark-theme .update-footer {
  border-top: 1px solid rgba(167, 139, 250, 0.1);
}

.update-footer p {
  margin: 5px 0;
  font-size: 14px;
  color: var(--sub);
  line-height: 1.4;
}
.qr-display { display: grid; place-items: center; gap: 8px; }
#qr-code-img { width: 220px; height: 220px; border-radius: 8px; border: 1px solid var(--line); background: #fff; }

/* Add account modal (desktop-first) */
#modal-add-acc .modal-content {
  width: min(92vw, 640px);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  padding: 12px;
}
#modal-add-acc .modal-body {
  overflow: auto;
  padding-right: 2px;
}
#modal-add-acc #tab-manual,
#modal-add-acc #tab-qrcode {
  padding-top: 2px;
}
#modal-add-acc #tab-qrcode .form-group {
  margin-bottom: 10px;
}
#modal-add-acc #qr-container {
  min-height: 320px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  background: var(--panel-2);
  padding: 12px;
}
#modal-add-acc #qr-code-display {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
#modal-add-acc #qr-status {
  text-align: center;
  font-size: 13px;
  color: var(--sub);
}
#modal-add-acc .modal-footer {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.login-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  z-index: 120;
  backdrop-filter: blur(10px);
}

.login-overlay.show {
  display: flex;
}

.login-overlay.show .login-card {
  animation: slideInFlip 0.6s ease-out;
}

.login-card {
  width: min(90vw, 400px);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 32px;
  box-shadow: var(--shadow-xl);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
  perspective: 1000px;
}

.login-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
  animation: gradientShift 3s ease infinite;
  background-size: 200% 200%;
}

.login-card:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-5px);
}

.login-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  margin-bottom: 12px;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.login-sub {
  font-size: 16px;
  color: var(--sub);
  text-align: center;
  margin-bottom: 32px;
  line-height: 1.4;
}

.login-input {
  width: 100%;
  border: 2px solid var(--line);
  border-radius: var(--r);
  background: var(--panel-2);
  color: var(--text);
  padding: 14px 20px;
  font-size: 16px;
  margin-bottom: 20px;
  transition: all 0.3s ease;
}

.login-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
  transform: translateY(-2px);
}

.login-error {
  min-height: 28px;
  color: var(--danger);
  font-size: 14px;
  margin-bottom: 20px;
  text-align: center;
  animation: fadeIn 0.3s ease;
}

.login-btn {
  width: 100%;
  padding: 14px 24px;
  font-size: 18px;
  font-weight: 600;
  border-radius: 9999px;
  transition: all 0.3s ease;
  margin-bottom: 20px;
  background: linear-gradient(90deg, #f093fb 0%, #f5576c 100%);
  border: none;
  color: white;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  z-index: 1;
  text-align: center;
}

.login-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.6s;
  z-index: -1;
}

.login-btn:hover::before {
  left: 100%;
}

.login-btn:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-3px);
  color: #fff;
}

.login-btn:active {
  transform: scale(0.98);
}

.login-footer {
  margin-top: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  color: var(--sub);
}

.btn-link {
  background: none;
  border: none;
  color: var(--primary);
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  padding: 0;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: width 0.3s ease;
}

.btn-link:hover::after {
  width: 100%;
}

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

/* 发送卡密按钮 */
#btn-send-card {
  width: 100%;
  padding: 12px 20px;
  font-size: 16px;
  font-weight: 500;
  border-radius: 9999px;
  transition: all 0.3s ease;
  margin-bottom: 20px;
  background: linear-gradient(90deg, #f093fb 0%, #f5576c 100%);
  border: none;
  color: white;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  z-index: 1;
  text-align: center;
}

#btn-send-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.6s;
  z-index: -1;
}

#btn-send-card:hover::before {
  left: 100%;
}

#btn-send-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

#btn-send-card:active {
  transform: scale(0.98);
}

.value-changed, .value-changed-gold { animation: bump .4s ease; display: inline-block; }
@keyframes bump { 0% { transform: scale(1); } 45% { transform: scale(1.16); } 100% { transform: scale(1); } }

::-webkit-scrollbar { width: 0; height: 0; display: none; }
::-webkit-scrollbar-thumb { background: transparent; }
::-webkit-scrollbar-track { background: transparent; }
* { scrollbar-width: none; -ms-overflow-style: none; }

@media (max-width: 1280px) {
  .compact-status { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .status-item.stretch { grid-column: span 1; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .app-sidebar { padding: 16px; gap: 16px; }
  .topbar { padding: 0 16px; }
  .page-wrap { padding: 16px; }
}

@media (max-width: 980px) {
  html, body { height: auto; min-height: 100%; }
  body { overflow: auto; overflow-x: hidden; padding-left: 10px; padding-right: 10px; }
  .app-shell { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .app-shell { height: auto; min-height: 100dvh; }
  .app-sidebar {
    position: fixed;
    left: -280px;
    top: 0;
    height: 100vh;
    width: 280px;
    border-right: 1px solid var(--line);
    border-bottom: 0;
    z-index: 60;
    padding: 24px;
    gap: 24px;
    transition: left 0.3s ease;
  }
  
  .app-sidebar.open {
    left: 0;
  }
  
  .topbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
  }
  
  .topbar-brand {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
  }
  
  .brand-name {
    font-size: 14px;
    color: var(--sub);
    margin-top: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  #btn-toggle-sidebar {
    display: block;
  }
  
  .sidebar-overlay.show {
    display: block;
  }
  .sidebar-overlay {
    z-index: 55;
  }
  
  .mobile-account-section {
    padding: 12px 16px;
    background: var(--panel);
    border-bottom: 1px solid var(--line);
    display: block;
    position: relative;
  }
  
  .mobile-account-btn {
    width: 100%;
    justify-content: space-between;
  }
  
  .mobile-account-dropdown {
    position: absolute !important;
    top: 65px !important;
    left: 16px;
    right: 16px;
    z-index: 100;
    display: none;
    border: 2px solid var(--line);
    border-radius: var(--r);
    background: var(--panel-2);
    box-shadow: var(--shadow-xl);
    box-sizing: border-box;
  }
  .brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 20px;
    padding: 8px 0 12px;
    border-bottom: 1px solid var(--line);
  }
  .brand i { font-size: 24px; }
  .current-account { padding: 10px 14px; font-size: 14px; width: 100%; min-width: 200px; }
  .account-dropdown, .mobile-account-dropdown { max-height: none; overflow-y: visible; }
  .account-dropdown {
    top: 128px;
    left: 10px;
    right: 8px;
  }
  .account-option { padding: 12px 14px; width: 100%; box-sizing: border-box; }
  .account-option-info { flex: 1; min-width: 0; }
  .nav-list {
    display: grid;
    gap: 12px;
    flex: 1;
  }
  .nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    font-size: 18px;
    border-radius: var(--r);
  }
  .nav-item span { 
    display: block;
  }
  .nav-item i { 
    font-size: 18px;
  }
  .sidebar-foot {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
  }
  .uptime-mini, .system-time { margin-top: 0; white-space: nowrap; }

  .app-main { grid-template-rows: auto 1fr; min-height: 0; }
  .topbar {
    padding: 0 16px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    min-height: 64px;
    z-index: 20;
    border-bottom: 0;
  }
  .topbar h1 { font-size: 20px; }
  .mobile-account-section {
    display: block;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    z-index: 19;
    margin: 0;
    box-shadow: var(--shadow-lg);
  }
  .icon-btn { width: 36px; height: 36px; }
  .page-wrap { padding: var(--mobile-fixed-page-top, 148px) 16px 16px; overflow: visible; }
  #page-settings.page.active {
    animation: fadeInOpacityOnly 0.2s ease-out;
    transform: none;
  }
  #page-settings .settings-nav {
    position: fixed;
    top: var(--mobile-fixed-page-top, 148px);
    left: 10px;
    right: 10px;
    z-index: 18;
    margin: 0;
  }
  #page-settings .settings-container {
    padding-top: calc(var(--mobile-settings-nav-h, 84px) + 10px);
  }
  .card { padding: 16px; margin-bottom: 16px; }

  .compact-status { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  .status-item.stretch { grid-column: span 1; }
  .status-item { min-height: 80px; padding: 12px; }
  .status-item .k { font-size: 13px; }
  .status-item .v { font-size: 24px; }
  .status-item .s { font-size: 13px; }

  .dashboard-grid { grid-template-columns: 1fr; gap: 16px; }
  .side-stack { gap: 16px; }
  .logs-card { height: auto; max-height: none; }
  .logs-container { flex: 1; min-height: 250px; max-height: 280px; font-size: 14px; overflow-y: auto; }
  .card-head { flex-wrap: wrap; gap: 8px; }
  .card-head h3 { font-size: 16px; }
  .dashboard-grid .card-head h3 { font-size: 18px; }
  .log-filters {
    width: 100%;
    justify-content: flex-start;
    gap: 8px;
  }
  .log-filter-select, .log-filter-input {
    flex: 1 1 120px;
    width: auto;
    min-width: 0;
  }
  #logs-keyword-filter {
    flex-basis: 180px;
  }
  .log-filter-input:focus { width: auto; }

  .switches-list { gap: 12px; }
  .switch-item { font-size: 15px; }
  .friend-sub-controls { gap: 10px; }
  .actions-group { gap: 8px; }
  .btn { font-size: 14px; padding: 8px 12px; }
  .btn-sm { font-size: 13px; padding: 6px 10px; }

  .farm-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: repeat(6, 1fr); grid-auto-flow: column; gap: 8px; }
  .farm-grid.mini { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: repeat(6, 1fr); grid-auto-flow: column; gap: 6px; }
  .land-cell { min-height: 120px; padding: 6px; }
  .land-cell .seed-image { width: 36px; height: 36px; margin: 2px auto; }
  .plant-name { font-size: 12px; }
  .land-level-badge { font-size: 9px; }
  .countdown { font-size: 10px; }

  .accounts-grid { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; gap: 12px; }
  .compact-select { width: 100%; }
  .modal-content { width: min(96vw, 560px); padding: 16px; }
  #modal-add-acc .modal-content { width: min(96vw, 560px); max-height: 92vh; }
  #modal-add-acc #qr-container { min-height: 260px; }

  #page-settings .card-head h3 { font-size: 20px; }
  #page-settings .settings-grid { grid-template-columns: 1fr; gap: 12px; }
  #page-settings .switches-list { grid-template-columns: 1fr; gap: 8px; }
  #page-settings .form-group label { font-size: 16px; margin-bottom: 6px; }
  #page-settings .form-control { font-size: 16px; min-height: 42px; padding: 10px 12px; }
  #page-settings .offline-message-row { grid-template-columns: 1fr; }
  #page-settings .checkbox-inline { font-size: 16px; }
  #page-settings .save-btn { font-size: 16px; padding: 11px 12px; }
}

@media (max-width: 640px) {
  body { padding-left: 8px; padding-right: 8px; }
  .app-sidebar {
    padding: 12px;
    gap: 12px;
  }
  .brand {
    font-size: 18px;
    padding: 6px 0 10px;
  }
  .brand i { font-size: 20px; }
  .current-account {
    padding: 8px 12px;
    font-size: 13px;
  }
  .nav-list {
    display: grid;
    gap: 10px;
    flex: 1;
  }
  .nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    font-size: 16px;
    border-radius: var(--r);
  }
  .nav-item span { 
    display: block;
  }
  .nav-item i { 
    font-size: 16px;
  }
  .sidebar-foot {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    font-size: 12px;
  }

  .app-main { grid-template-rows: auto 1fr; min-height: 0; }
  .topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    min-height: 56px;
    z-index: 20;
  }
  .mobile-account-section {
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    z-index: 19;
    margin: 0;
  }
  .topbar h1 { font-size: 16px; }
  .icon-btn { width: 32px; height: 32px; font-size: 14px; }
  .topbar-left {
    gap: 8px;
  }
  .brand-name {
    font-size: 12px;
  }
  .page-wrap { padding: var(--mobile-fixed-page-top, 132px) 12px 12px; overflow: visible; }
  #page-settings .settings-nav {
    top: var(--mobile-fixed-page-top, 132px);
    left: 8px;
    right: 8px;
    margin: 0;
  }
  #page-settings .settings-container {
    padding-top: calc(var(--mobile-settings-nav-h, 84px) + 8px);
  }
  .card { padding: 12px; margin-bottom: 12px; }
  .card-head h3 { font-size: 15px; }

  .compact-status { grid-template-columns: 1fr; gap: 10px; }
  .status-item.stretch { grid-column: span 1; }
  .status-item { min-height: 70px; padding: 10px; }
  .status-item .v { font-size: 22px; }

  .logs-container { height: 250px; min-height: 250px; max-height: 380px; font-size: 13px; overflow-y: auto; }
  .log-row { 
    font-size: 13px; 
    flex-wrap: wrap; 
    gap: 6px;
    align-items: flex-start;
  }
  .log-row .log-time { order: 1; flex: 0 0 auto; }
  .log-row .log-tag { order: 2; flex: 0 0 auto; }
  .log-row .log-account { order: 3; flex: 1 0 auto; }
  .log-row .log-msg { 
    order: 4; 
    flex: 1 1 100%; 
    display: flex; 
    flex-wrap: wrap; 
    gap: 6px;
    align-items: flex-start;
  }
  .log-row .log-meta-row {
    order: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    flex: 1 1 100%;
  }
  .log-row .log-meta-row > span {
    flex: 0 1 auto;
    min-width: 80px;
  }
  .log-row .log-content {
    order: 2;
    flex: 1 1 100%;
  }

  .farm-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: repeat(6, 1fr); grid-auto-flow: column; gap: 6px; }
  .farm-grid.mini { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: repeat(6, 1fr); grid-auto-flow: column; gap: 6px; }
  .land-cell { min-height: 100px; padding: 6px; }
  .land-cell .seed-image { width: 32px; height: 32px; margin: 2px auto; }
  .plant-name { font-size: 11px; }
  .land-level-badge { font-size: 8px; padding: 1px 4px; }
  .countdown { font-size: 9px; }
  .seasons-badge { font-size: 8px !important; padding: 1px 4px !important; }

  .login-card {
    padding: 20px;
    width: min(95vw, 320px);
  }
  .login-title { font-size: 20px; }
  .login-input { padding: 10px 14px; }

  .modal-content { width: 96vw; padding: 12px; }
  #modal-add-acc .modal-content { width: 96vw; padding: 12px; }
  #qr-code-img { width: 180px; height: 180px; }
}

/* 卡密管理界面样式 */
.key-management {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: var(--bg);
  color: var(--text);
}

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

.key-header h1 {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--primary);
}

.key-header p {
  font-size: 18px;
  color: var(--sub);
}

.key-content {
  width: 100%;
  max-width: 600px;
  background: var(--panel);
  border-radius: var(--r);
  padding: 30px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.key-section {
  margin-bottom: 30px;
}

.key-section h2 {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 15px;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 10px;
}

.key-section h2 i {
  color: var(--primary);
}

.key-section p {
  font-size: 16px;
  color: var(--sub);
  margin-bottom: 20px;
}

.key-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.key-form .form-control {
  font-size: 16px;
  padding: 12px 15px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
}

.key-form .form-control:focus {
  outline: none;
  border-color: var(--primary);
}

.error-message {
  min-height: 20px;
  color: var(--danger);
  font-size: 14px;
}

.key-form .btn {
  font-size: 16px;
  padding: 12px 20px;
  border-radius: 8px;
  border: none;
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s;
}

.key-form .btn:hover {
  background: #148861;
}

.key-instructions {
  list-style: none;
  padding: 0;
  margin: 0;
}

.key-instructions li {
  margin-bottom: 15px;
  padding-left: 30px;
  position: relative;
  font-size: 16px;
  line-height: 1.4;
}

.key-instructions li i {
  position: absolute;
  left: 0;
  top: 2px;
  color: var(--primary);
  font-size: 18px;
}

.key-instructions li strong {
  color: var(--text);
}

.key-instructions li:nth-child(4) i {
  color: var(--accent);
}

.key-section:last-child {
  margin-bottom: 0;
  text-align: center;
}

.key-section .btn {
  font-size: 16px;
  padding: 10px 20px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s;
}

.key-section .btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

@media (max-width: 768px) {
  .key-header h1 {
    font-size: 28px;
  }
  
  .key-content {
    padding: 20px;
  }
  
  .key-section h2 {
    font-size: 20px;
  }
  
  .key-instructions li {
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .key-management {
    padding: 10px;
  }
  
  .key-header h1 {
    font-size: 24px;
  }
  
  .key-header p {
    font-size: 16px;
  }
  
  .key-content {
    padding: 15px;
  }
  
  .key-section h2 {
    font-size: 18px;
  }
  
  .key-form .form-control {
    font-size: 14px;
    padding: 10px 12px;
  }
  
  .key-form .btn {
    font-size: 14px;
    padding: 10px 15px;
  }
  
  .key-instructions li {
    font-size: 13px;
  }
}

/* 获取卡密弹窗样式 */
.key-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.6);
  z-index: 130;
}

.key-modal.show {
  display: flex;
}

.key-modal-content {
  width: min(90vw, 350px);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
}

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

.key-modal-header h3 {
  margin: 0;
  font-size: 18px;
  color: var(--accent);
}

.key-modal-close {
  cursor: pointer;
  font-size: 22px;
  color: var(--sub);
  transition: color 0.2s;
}

.key-modal-close:hover {
  color: var(--danger);
}

.key-modal-body {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.key-modal-body p {
  margin: 0;
  font-size: 14px;
  color: var(--sub);
  line-height: 1.4;
}

.key-modal-body .login-input {
  font-size: 15px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
}

.key-modal-body .login-input:focus {
  outline: none;
  border-color: var(--primary);
}

.key-modal-body .login-error {
  min-height: 20px;
  color: var(--danger);
  font-size: 13px;
}

.key-modal-body .btn {
  font-size: 15px;
  padding: 10px 15px;
  border-radius: 8px;
  border: none;
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s;
}

.key-modal-body .btn:hover {
  background: #148861;
}

.key-modal-body .btn:disabled {
  background: var(--sub);
  cursor: not-allowed;
}

/* 全局字体设置，不影响图标字体 */

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

.toast {
  background: var(--gradient-secondary);
  color: white;
  padding: 12px 20px;
  border-radius: var(--r);
  box-shadow: var(--shadow-lg);
  font-size: 16px;
  font-weight: 500;
  opacity: 1;
  transform: translateX(0);
  transition: opacity 0.3s ease-out, transform 0.3s ease-out;
  min-width: 200px;
  max-width: 400px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.toast::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.6s;
  z-index: -1;
}

.toast:hover::before {
  left: 100%;
}

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

.toast.error {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.toast.info {
  background: var(--gradient-primary);
}
body, div, span, h1, h2, h3, h4, h5, h6, p, a, input, select, button, label {
    font-family: "楷体", "Segoe UI", "Microsoft YaHei", sans-serif !important;
}

/* 拉黑标签样式 */
.blocked-tag {
    display: inline-block;
    padding: 2px 8px;
    background-color: #f44336;
    color: white;
    border-radius: 12px;
    font-size: 12px;
    margin-left: 8px;
}

/* 好友操作按钮样式 */
.btn-steal {
    background-color: #f59e0b;
    color: white;
}

.btn-water {
    background-color: #3b82f6;
    color: white;
}

.btn-weed {
    background-color: #10b981;
    color: white;
}

.btn-bug {
    background-color: #8b5cf6;
    color: white;
}

.btn-bad {
    background-color: #ec4899;
    color: white;
}

.btn-block {
    background-color: #ef4444;
    color: white;
}

.btn-unblock {
    background-color: #4caf50;
    color: white;
}

/* 按钮通用样式 */
.btn {
    border: none;
    border-radius: 4px;
    padding: 8px 12px;
    margin: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.btn:hover {
    opacity: 0.8;
}

.btn-sm {
    padding: 6px 10px;
    font-size: 12px;
}

/* 提示弹窗样式 */
.toast-container {
    position: fixed;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 0 20px;
    pointer-events: none;
}

.toast {
    background-color: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    font-size: 15px;
    font-weight: 600;
    animation: toastAnimation 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    max-width: 90%;
    width: auto;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    pointer-events: auto;
}

.toast.success {
    background-color: rgba(76, 175, 80, 0.95);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.3);
}

.toast.error {
    background-color: rgba(244, 67, 54, 0.95);
    box-shadow: 0 6px 20px rgba(244, 67, 54, 0.3);
}

.toast.info {
    background-color: rgba(33, 150, 243, 0.95);
    box-shadow: 0 6px 20px rgba(33, 150, 243, 0.3);
}

@keyframes toastAnimation {
    0% {
        opacity: 0;
        transform: translateY(-30px) scale(0.9);
    }
    50% {
        opacity: 1;
        transform: translateY(5px) scale(1.05);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);}
    }

#friends-search {
  border: 2px solid var(--line);
  border-radius: 12px;
  background: var(--panel-2);
  color: var(--text);
  padding: 8px 12px;
  font-size: 14px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

#friends-search:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
  transform: translateY(-1px);
}

#friends-search-clear {
  border: 2px solid var(--line);
  border-radius: 12px;
  background: var(--panel-2);
  color: var(--sub);
  padding: 8px 12px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
}

#friends-search-clear:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(102, 126, 234, 0.1);
  box-shadow: 0 4px 8px rgba(102, 126, 234, 0.2);
  transform: translateY(-1px);
}

#friends-filter {
  border: 2px solid var(--line);
  border-radius: 12px;
  background: var(--panel-2);
  color: var(--text);
  padding: 8px 12px;
  font-size: 14px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  cursor: pointer;
}

#friends-filter:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
  transform: translateY(-1px);
}

#friends-filter:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 8px rgba(102, 126, 234, 0.2);
  transform: translateY(-1px);
}

.blocked-tag {
  background-color: rgba(33, 233, 6, 0.2);
  color: var(--danger);
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  margin-left: 8px;
}

/* 标签页切换动画 */
.tab-content {
    transition: all 0.3s ease-in-out;
    opacity: 0;
    transform: translateY(10px);
    display: none;
}

.tab-content.active {
    opacity: 1;
    transform: translateY(0);
    display: block;
}

.tab-btn {
    transition: all 0.3s ease;
}

/* 底部按钮动画 */
.modal-footer {
    transition: all 0.3s ease-in-out;
    opacity: 1;
    transform: translateY(0);
}

/* 批量售卖样式 */
.batch-sell-controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--line);
}

.batch-sell-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.batch-sell-stats {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.stat-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--panel-2);
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  border: 2px solid var(--line);
  transition: all 0.3s ease;
}

.stat-badge i {
  font-size: 16px;
}

.stat-badge-gold {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  color: white;
  border-color: #f59e0b;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.btn-select-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 14px;
  transition: all 0.3s ease;
}

.btn-select-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-select-action i {
  font-size: 14px;
}

/* 按钮样式增强 */
.btn-sell-fruits {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  border: none;
  color: white;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.btn-sell-fruits:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.4);
}

.btn-sell-seeds {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  border: none;
  color: white;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.btn-sell-seeds:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.4);
}

.btn-batch-use-gift {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  border: none;
  color: white;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

.btn-batch-use-gift:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.4);
}

.btn-batch-use-gift i {
  color: white;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.3s ease;
}

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

.btn-confirm-sell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-confirm-sell:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

.btn-cancel {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 16px;
  transition: all 0.3s ease;
}

.btn-cancel:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 模态框样式增强 */
.batch-sell-modal {
  max-width: 700px;
  animation: modalZoomBounceIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* 模态框打开动画 - 缩放+弹跳+旋转 */
@keyframes modalZoomBounceIn {
  0% {
    opacity: 0;
    transform: scale(0.3) rotate(-10deg);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.05) rotate(2deg);
  }
  70% {
    transform: scale(0.95) rotate(-1deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

/* 模态框关闭动画 - 缩放+旋转+淡出 */
@keyframes modalZoomOut {
  0% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
  100% {
    opacity: 0;
    transform: scale(0.3) rotate(10deg);
  }
}

/* 为关闭状态添加动画类 */
.batch-sell-modal.closing {
  animation: modalZoomOut 0.3s cubic-bezier(0.6, -0.28, 0.735, 0.045) forwards;
}

.batch-sell-header {
  background: linear-gradient(135deg, var(--primary) 0%, #5a7ceb 100%);
  color: white;
  padding: 20px 24px;
  border-radius: 12px 12px 0 0;
}

.batch-sell-title-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
}

.batch-sell-icon {
  font-size: 24px;
  animation: iconBounceSpin 2s ease-in-out infinite;
}

/* 图标弹跳+旋转动画 */
@keyframes iconBounceSpin {
  0%, 100% {
    transform: translateY(0) rotate(0deg) scale(1);
  }
  25% {
    transform: translateY(-8px) rotate(-5deg) scale(1.1);
  }
  50% {
    transform: translateY(0) rotate(0deg) scale(1);
  }
  75% {
    transform: translateY(-4px) rotate(5deg) scale(1.05);
  }
}

.batch-sell-header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
}

.batch-sell-header .close-modal {
  color: white;
  opacity: 0.9;
  font-size: 28px;
}

.batch-sell-header .close-modal:hover {
  opacity: 1;
  transform: rotate(90deg);
}

.batch-sell-footer {
  padding: 16px 24px;
  background: var(--panel-2);
  border-radius: 0 0 12px 12px;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.batch-sell-list {
  max-height: 400px;
  overflow-y: auto;
  padding: 8px 0;
}

.batch-sell-item {
  display: flex;
  align-items: center;
  padding: 12px;
  margin-bottom: 8px;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: var(--panel-2);
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.batch-sell-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--primary);
  transform: scaleY(0);
  transition: transform 0.3s ease;
}

.batch-sell-item:hover {
  border-color: var(--primary);
  background: var(--panel);
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.batch-sell-item:hover::before {
  transform: scaleY(1);
}

.batch-sell-item.selected {
  border-color: var(--primary);
  background: rgba(102, 126, 234, 0.1);
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.batch-sell-item.selected::before {
  transform: scaleY(1);
}

.batch-sell-item input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-right: 12px;
  cursor: pointer;
  accent-color: var(--primary);
}

.batch-sell-item-image {
  width: 56px;
  height: 56px;
  margin-right: 16px;
  background: rgba(0,0,0,0.05);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 2px solid var(--line);
  transition: all 0.3s ease;
}

.batch-sell-item:hover .batch-sell-item-image {
  transform: scale(1.05);
  border-color: var(--primary);
}

.batch-sell-item-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.batch-sell-item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.batch-sell-item-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.batch-sell-item-count {
  font-size: 13px;
  color: var(--sub);
  display: flex;
  align-items: center;
  gap: 4px;
}

.batch-sell-item-count strong {
  color: var(--accent);
  font-weight: 700;
  font-size: 14px;
}

.batch-sell-item-price {
  font-size: 12px;
  color: var(--sub);
  display: flex;
  align-items: center;
  gap: 4px;
}

.batch-sell-item-price strong {
  color: var(--text);
  font-weight: 600;
}

.batch-sell-item-total {
  font-size: 14px;
  color: var(--sub);
  display: flex;
  align-items: center;
  gap: 4px;
}

.batch-sell-item-total strong {
  color: #f59e0b;
  font-weight: 700;
  font-size: 15px;
}

.price-highlight {
  color: #f59e0b !important;
  text-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
}

/* 滚动条美化 */
.batch-sell-list::-webkit-scrollbar {
  width: 0;
  display: none;
}

.batch-sell-list::-webkit-scrollbar-track {
  background: transparent;
}

.batch-sell-list::-webkit-scrollbar-thumb {
  background: transparent;
}

.batch-sell-list::-webkit-scrollbar-thumb:hover {
  background: transparent;
}

@media (max-width: 768px) {
  .batch-sell-modal {
    max-width: 95%;
    margin: 10px;
  }
  
  .batch-sell-list {
    max-height: 300px;
  }
  
  .batch-sell-item {
    padding: 10px;
  }
  
  .batch-sell-item-image {
    width: 48px;
    height: 48px;
  }
  
  .batch-sell-controls {
    font-size: 12px;
  }
  
  .batch-sell-stats {
    width: 100%;
  }
  
  .stat-badge {
    flex: 1;
    justify-content: center;
    font-size: 12px;
    padding: 6px 12px;
  }
  
  .batch-sell-actions {
    width: 100%;
  }
  
  .btn-select-action {
    flex: 1;
    justify-content: center;
    font-size: 12px;
    padding: 6px 12px;
  }
  
  .batch-sell-footer {
    flex-direction: column;
  }
  
  .batch-sell-footer button {
    width: 100%;
  }
}


/* 批量催熟选择框样式 */
.land-checkbox {
  position: absolute;
  left: 5px;
  top: 25px;
  width: 16px;
  height: 16px;
  cursor: pointer;
  z-index: 5;
}

.batch-ripen-controls {
  animation: slideDown 0.3s ease;
}

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

/* 土地ID徽章样式 */
.land-id-badge {
  display: inline-block;
  background: var(--primary);
  color: white;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  margin-right: 6px;
}

/* 详情徽章样式 */
.detail-badge {
  display: inline-block;
  background: var(--panel);
  color: var(--text);
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  margin-right: 4px;
}

/* 生长阶段徽章 */
.detail-badge-phase {
  background: #e0e7ff;
  color: #4338ca;
  font-weight: 600;
}

/* 土地类型徽章 */
.detail-badge-land {
  background: #fef3c7;
  color: #92400e;
  font-weight: 600;
}

/* 时间徽章 */
.detail-badge-time {
  background: #fbbf24;
  color: #78350f;
  font-weight: 600;
}

/* 催熟次数徽章 */
.detail-badge-ripen {
  background: #86efac;
  color: #14532d;
  font-weight: 600;
}


/* ============ 批量催熟样式增强 ============ */

/* 批量催熟项目容器 */
.batch-ripen-item {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 12px;
  transition: all 0.3s ease;
  overflow: hidden;
}

.batch-ripen-item:hover {
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(0, 123, 255, 0.1);
  transform: translateY(-2px);
}

.batch-ripen-checkbox-wrapper {
  display: flex;
  align-items: flex-start;
  padding: 12px;
  cursor: pointer;
  width: 100%;
}

.batch-ripen-checkbox-wrapper input[type="checkbox"] {
  margin-right: 12px;
  margin-top: 4px;
  cursor: pointer;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.batch-ripen-item-info {
  flex: 1;
  min-width: 0;
}

.batch-ripen-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  gap: 12px;
  flex-wrap: wrap;
}

.batch-ripen-item-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  color: var(--text);
  flex: 1;
  min-width: 0;
}

/* 催熟次数输入区域 */
.ripen-times-input-wrapper {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f0f0f0;
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid #d0d0d0;
  transition: all 0.3s ease;
}

.ripen-times-input-wrapper:hover {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.ripen-times-label {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #333333;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

.ripen-times-label i {
  color: var(--success);
  font-size: 12px;
}

.ripen-times-input {
  width: 50px;
  padding: 4px 6px;
  border: 1px solid #d0d0d0;
  border-radius: 4px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: #1a1a1a;
  background: #ffffff;
  transition: all 0.2s ease;
}

.ripen-times-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.1);
}

.ripen-times-unit {
  color: #333333;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

.batch-ripen-item-details {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

/* 按钮图标样式 */
.btn-with-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.btn-with-icon i {
  font-size: 16px;
  transition: transform 0.3s ease;
}

.btn-with-icon:hover i {
  transform: scale(1.2) rotate(5deg);
}

.btn-with-icon span {
  font-weight: 500;
}

/* 确认催熟按钮特殊效果 */
.btn-confirm-ripen {
  background: linear-gradient(135deg, var(--success) 0%, #28a745 100%);
  position: relative;
}

.btn-confirm-ripen::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s ease;
}

.btn-confirm-ripen:hover::before {
  left: 100%;
}

.btn-confirm-ripen:hover {
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
  transform: translateY(-2px);
}

/* 批量催熟底部按钮区域 */
.batch-ripen-footer {
  padding: 16px 24px;
  background: var(--panel-2);
  border-top: 1px solid var(--line);
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

/* 模态框关闭动画 */
@keyframes modalSlideOut {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
}

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

/* 移动端响应式 */
@media (max-width: 768px) {
  /* 桌面端催熟次数输入框隐藏 */
  .ripen-times-desktop {
    display: none !important;
  }
  
  /* 移动端催熟次数输入框显示 */
  .ripen-times-mobile {
    display: flex !important;
  }
  
  .batch-ripen-item-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .ripen-times-input-wrapper {
    width: auto;
    justify-content: flex-start;
  }
  
  .batch-ripen-footer {
    flex-direction: row;
    flex-wrap: wrap;
    padding: 12px 16px;
  }
  
  .batch-ripen-footer button {
    flex: 1;
    min-width: calc(50% - 6px);
  }
  
  .btn-with-icon {
    padding: 10px 16px;
    font-size: 14px;
  }
  
  .btn-with-icon i {
    font-size: 14px;
  }
}

/* 桌面端：隐藏移动端催熟次数输入框 */
@media (min-width: 769px) {
  .ripen-times-mobile {
    display: none !important;
  }
  
  .ripen-times-desktop {
    display: flex !important;
  }
}

/* ============ 访客记录样式 ============ */
.visitor-records-card {
  animation: fadeIn 0.5s ease;
}

.visitors-list {
  max-height: 400px;
  overflow-y: auto;
  padding: 12px;
}

.visitors-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: var(--sub);
  font-size: 14px;
}

.visitors-empty i {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.5;
}

.visitor-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--panel-2);
  border-radius: 12px;
  margin-bottom: 8px;
  transition: all 0.3s ease;
  animation: slideInLeft 0.3s ease;
  border: 1px solid var(--line);
}

.visitor-item:hover {
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-color: var(--primary);
}

.visitor-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--line);
  transition: all 0.3s ease;
}

.visitor-item:hover .visitor-avatar {
  border-color: var(--primary);
  transform: scale(1.1);
}

.visitor-avatar-fallback {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 16px;
}

.visitor-info {
  flex: 1;
  min-width: 0;
}

.visitor-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.visitor-name .visitor-level {
  font-size: 12px;
  color: var(--sub);
  font-weight: 400;
}

.visitor-action {
  font-size: 12px;
  color: var(--sub);
  display: flex;
  align-items: center;
  gap: 6px;
}

.visitor-action-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
}

.visitor-action-badge.steal {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  color: white;
}

.visitor-action-badge.help {
  background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
  color: white;
}

.visitor-action-badge.bad {
  background: linear-gradient(135deg, #f87171 0%, #ef4444 100%);
  color: white;
}

.visitor-time {
  font-size: 11px;
  color: var(--sub);
  white-space: nowrap;
}

.visitor-gid {
  font-size: 11px;
  color: var(--sub);
  background: var(--panel);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
}

/* ============ GID管理样式 ============ */
.gid-management-card {
  animation: fadeIn 0.5s ease;
}

.gid-summary {
  display: flex;
  gap: 16px;
  padding: 16px;
  flex-wrap: wrap;
}

.gid-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 20px;
  background: var(--panel-2);
  border-radius: 12px;
  border: 1px solid var(--line);
  transition: all 0.3s ease;
  min-width: 120px;
}

.gid-stat:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.gid-stat-label {
  font-size: 12px;
  color: var(--sub);
}

.gid-stat-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
}

/* GID导入模态框 */
.gid-import-modal-content {
  max-width: 500px;
  animation: modalZoomBounceIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.gid-import-tabs {
  display: flex;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.gid-import-tab {
  flex: 1;
  padding: 10px 16px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-2);
  transition: all 0.3s ease;
}

.gid-import-tab.active {
  border-bottom-color: var(--primary);
  color: var(--primary);
  font-weight: 600;
}

.gid-import-tab:hover {
  color: var(--primary);
}

.gid-import-mode {
  margin-bottom: 16px;
}

.gid-import-mode-indicator {
  font-size: 12px;
  color: var(--text-2);
  margin-bottom: 16px;
  padding: 8px 12px;
  background: var(--panel-2);
  border-radius: 6px;
}

.gid-import-preview {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.gid-preview-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--panel-2);
  font-size: 14px;
  font-weight: 600;
  border-bottom: 1px solid var(--line);
}

.gid-preview-list {
  max-height: 200px;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.gid-preview-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  font-size: 12px;
  font-family: monospace;
  animation: fadeIn 0.3s ease;
}

.gid-preview-item.new {
  border-color: var(--success);
  background: rgba(16, 185, 129, 0.1);
}

.gid-preview-item.duplicate {
  border-color: var(--warn);
  background: rgba(245, 158, 11, 0.1);
  opacity: 0.7;
}

/* GID列表模态框 */
.gid-list-modal-content {
  max-width: 600px;
  animation: modalZoomBounceIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.gid-list-container {
  max-height: 400px;
  overflow-y: auto;
  padding: 12px;
}

.gid-list-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: var(--sub);
  font-size: 14px;
}

.gid-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 8px;
  transition: all 0.3s ease;
  animation: fadeIn 0.3s ease;
}

.gid-list-item:hover {
  border-color: var(--primary);
  transform: translateX(4px);
}

.gid-list-item-gid {
  font-family: monospace;
  font-size: 14px;
  font-weight: 500;
}

.gid-list-item-actions {
  display: flex;
  gap: 8px;
}

.gid-list-item-actions .btn {
  padding: 4px 10px;
  font-size: 12px;
}

.gid-list-pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  flex-wrap: wrap;
}

.gid-list-pagination .btn {
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  font-size: 14px;
}

.gid-list-pagination .btn.active {
  background: var(--primary);
  color: white;
}

/* 好友等级和金币显示 */
.friend-level-gold {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--sub);
  margin-top: 4px;
}

.friend-level {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 12px;
  font-weight: 600;
}

.friend-gold {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #fbbf24;
  font-weight: 600;
}

.friend-gold i {
  font-size: 12px;
}

/* 动画效果增强 */
@keyframes visitorItemIn {
  from {
    opacity: 0;
    transform: translateX(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

.visitor-item {
  animation: visitorItemIn 0.3s ease;
}

@keyframes gidStatPulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.02);
  }
}

.gid-stat:hover .gid-stat-value {
  animation: gidStatPulse 0.5s ease;
}

/* 响应式适配 */
@media (max-width: 768px) {
  .visitors-list {
    max-height: 300px;
  }
  
  .visitor-item {
    padding: 10px;
  }
  
  .visitor-avatar,
  .visitor-avatar-fallback {
    width: 36px;
    height: 36px;
    font-size: 14px;
  }
  
  .gid-summary {
    flex-direction: column;
    gap: 12px;
  }
  
  .gid-stat {
    width: 100%;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
  
  .gid-import-modal-content,
  .gid-list-modal-content {
    max-width: 95%;
    margin: 10px;
  }
  
  .gid-preview-list {
    max-height: 150px;
  }
  
  .gid-list-container {
    max-height: 300px;
  }
  
  .friend-level-gold {
    flex-wrap: wrap;
    gap: 8px;
  }
}

/* 小屏幕优化 */
@media (max-width: 480px) {
  .ripen-times-input-wrapper {
    padding: 4px 10px;
  }
  
  .ripen-times-input {
    width: 45px;
    font-size: 13px;
  }
  
  .ripen-times-label {
    font-size: 12px;
  }
  
  .ripen-times-unit {
    font-size: 12px;
  }
}

/* ============ 农场操作按钮样式增强 ============ */

/* 农场操作按钮容器 */
.farm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
  width: 100%;
}

/* 农场操作按钮基础样式 */
.btn-farm-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 8px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-farm-action i {
  font-size: 16px;
  transition: transform 0.3s ease;
}

.btn-farm-action span {
  font-weight: 500;
}

/* 按钮悬停效果 */
.btn-farm-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-farm-action:hover i {
  transform: scale(1.2) rotate(5deg);
}

/* 按钮点击效果 */
.btn-farm-action:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 光泽扫过效果 */
.btn-farm-action::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s ease;
}

.btn-farm-action:hover::before {
  left: 100%;
}

/* 收获按钮特殊样式 */
.btn-farm-action.btn-primary {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  border-color: #2563eb;
  color: white !important;
}

.btn-farm-action.btn-primary i {
  color: white !important;
}

.btn-farm-action.btn-primary:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
  color: white !important;
}

/* 批量催熟按钮特殊样式 */
.btn-farm-action.btn-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border-color: #059669;
  color: white !important;
}

.btn-farm-action.btn-success i {
  color: white !important;
}

.btn-farm-action.btn-success:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
  color: white !important;
}

/* 普通按钮样式 - 为不同按钮添加不同颜色 */
.btn-farm-action.btn-sm:not(.btn-primary):not(.btn-success) {
  background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
  color: #374151;
  border-color: #d1d5db;
}

.btn-farm-action.btn-sm:not(.btn-primary):not(.btn-success):hover {
  background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
  color: #1f2937;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* 除草/虫按钮 - 橙色 */
.btn-farm-action:nth-child(2) {
  background: linear-gradient(135deg, #fb923c 0%, #f97316 100%) !important;
  color: white !important;
  border-color: #f97316 !important;
}

.btn-farm-action:nth-child(2):hover {
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%) !important;
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.4) !important;
}

/* 种植按钮 - 紫色 */
.btn-farm-action:nth-child(3) {
  background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 100%) !important;
  color: white !important;
  border-color: #8b5cf6 !important;
}

.btn-farm-action:nth-child(3):hover {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%) !important;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4) !important;
}

/* 升级土地按钮 - 粉色 */
.btn-farm-action:nth-child(4) {
  background: linear-gradient(135deg, #f472b6 0%, #ec4899 100%) !important;
  color: white !important;
  border-color: #ec4899 !important;
}

.btn-farm-action:nth-child(4):hover {
  background: linear-gradient(135deg, #ec4899 0%, #db2777 100%) !important;
  box-shadow: 0 4px 12px rgba(236, 72, 153, 0.4) !important;
}

/* 一键全收按钮 - 青色 */
.btn-farm-action:nth-child(5) {
  background: linear-gradient(135deg, #22d3ee 0%, #06b6d4 100%) !important;
  color: white !important;
  border-color: #06b6d4 !important;
}

.btn-farm-action:nth-child(5):hover {
  background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%) !important;
  box-shadow: 0 4px 12px rgba(6, 182, 212, 0.4) !important;
}

/* 桌面端：按钮紧凑靠右 */
@media (min-width: 769px) {
  .farm-actions {
    justify-content: flex-end;
    gap: 8px;
  }
  
  .btn-farm-action {
    flex: 0 0 auto;
    min-width: auto;
    padding-left: 12px !important;
    padding-right: 12px !important;
    white-space: nowrap;
  }
}

/* 移动端：一排两个按钮 */
@media (max-width: 768px) {
  /* 减少card的padding以增加按钮空间 */
  #page-farm .card {
    padding: 12px !important;
  }
  
  #page-farm .card-body {
    padding: 0 !important;
  }
  
  /* 让card-head在移动端换行 */
  #page-farm .card-head.with-actions {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 12px !important;
  }
  
  #page-farm .card-head.with-actions h3 {
    width: 100% !important;
  }
  
  .farm-actions {
    display: flex !important;
    justify-content: flex-start !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: 8px !important;
    box-sizing: border-box !important;
  }
  
  .btn-farm-action {
    flex: 1 1 calc(50% - 4px) !important;
    min-width: calc(50% - 4px) !important;
    max-width: calc(50% - 4px) !important;
    width: calc(50% - 4px) !important;
    padding: 12px 8px !important;
    font-size: 13px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
  }
  
  .btn-farm-action i {
    font-size: 14px !important;
  }
}

/* 小屏幕优化 */
@media (max-width: 480px) {
  .btn-farm-action {
    padding: 10px 6px;
    font-size: 12px;
    gap: 4px;
  }
  
  .btn-farm-action i {
    font-size: 13px;
  }
  
  .btn-farm-action span {
    font-size: 12px;
  }
}

/* 按钮加载动画 */
@keyframes buttonPulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.btn-farm-action.loading {
  animation: buttonPulse 1s ease-in-out infinite;
  pointer-events: none;
  opacity: 0.7;
}

/* 按钮成功反馈动画 */
@keyframes buttonSuccess {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

.btn-farm-action.success {
  animation: buttonSuccess 0.3s ease-out;
}

/* 图标旋转动画（用于加载状态） */
@keyframes iconSpin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.btn-farm-action.loading i {
  animation: iconSpin 1s linear infinite;
}

/* ============ 背包种子优先级样式 ============ */
.bag-seeds-container {
    position: relative;
    overflow: hidden;
}

.bag-seeds-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(139, 92, 246, 0.05) 100%);
    border: 1px solid rgba(102, 126, 234, 0.2);
    border-radius: 12px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.bag-seeds-header:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(139, 92, 246, 0.08) 100%);
    border-color: rgba(102, 126, 234, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
}

.bag-seeds-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: var(--text);
}

.bag-seeds-title i {
    color: var(--primary);
    font-size: 16px;
    animation: seedPulse 2s ease-in-out infinite;
}

@keyframes seedPulse {
    0%, 100% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.1) rotate(-5deg); }
    75% { transform: scale(1.1) rotate(5deg); }
}

.bag-seeds-toggle {
    width: 32px !important;
    height: 32px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    border-radius: 8px !important;
    transition: all 0.3s ease !important;
}

.bag-seeds-toggle i {
    transition: transform 0.3s ease;
}

.bag-seeds-toggle.expanded i {
    transform: rotate(180deg);
}

.bag-seeds-content {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.3s ease, padding 0.3s ease;
    padding: 0;
}

.bag-seeds-content.expanded {
    max-height: 500px;
    opacity: 1;
    padding: 12px 0 0;
}

.bag-seeds-stats {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
    padding: 12px 16px;
    background: var(--panel-2);
    border-radius: 12px;
    border: 1px solid var(--line);
}

.bag-seeds-stat {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--sub);
}

.bag-seeds-stat i {
    font-size: 14px;
    color: var(--primary);
}

.bag-seeds-stat strong {
    color: var(--text);
    font-weight: 600;
}

.bag-seeds-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 280px;
    overflow-y: auto;
    padding: 4px;
}

.bag-seed-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    min-height: 72px;
    background: var(--panel-2);
    border: 2px solid var(--line);
    border-radius: 14px;
    cursor: grab;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    position: relative;
    overflow: visible;
    animation: seedItemSlideIn 0.3s ease backwards;
}

@keyframes seedItemSlideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.bag-seed-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary) 0%, #8b5cf6 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.bag-seed-item:hover {
    border-color: var(--primary);
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.08) 0%, var(--panel-2) 100%);
    transform: translateX(4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.bag-seed-item:hover::before {
    opacity: 1;
}

.bag-seed-item:active {
    cursor: grabbing;
    transform: scale(1.02);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.bag-seed-item.dragging {
    opacity: 0.5;
    transform: scale(0.98);
    border-style: dashed;
}

.bag-seed-item.drag-over {
    border-color: var(--primary);
    background: rgba(102, 126, 234, 0.1);
    transform: translateY(4px);
}

.bag-seed-drag {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--sub);
    min-width: 50px;
}

.bag-seed-drag i {
    font-size: 16px;
    opacity: 0.4;
    transition: opacity 0.3s ease;
}

.bag-seed-item:hover .bag-seed-drag i {
    opacity: 0.8;
}

.bag-seed-index {
    font-size: 14px;
    font-weight: 700;
    color: white;
    min-width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, #8b5cf6 100%);
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.bag-seed-img {
    width: 44px;
    height: 44px;
    object-fit: contain;
    border-radius: 10px;
    background: var(--panel);
    padding: 4px;
    transition: transform 0.3s ease;
}

.bag-seed-item:hover .bag-seed-img {
    transform: scale(1.1) rotate(3deg);
}

.bag-seed-img-placeholder {
    width: 44px;
    height: 44px;
    background: var(--panel);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--sub);
    transition: transform 0.3s ease;
}

.bag-seed-item:hover .bag-seed-img-placeholder {
    transform: scale(1.1);
}

.bag-seed-info {
    flex: 1;
    min-width: 0;
}

.bag-seed-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.bag-seed-tag {
    display: inline-flex;
    padding: 2px 8px;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: white;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(245, 158, 11, 0.3);
}

.bag-seed-meta {
    font-size: 12px;
    color: var(--sub);
    display: flex;
    gap: 8px;
}

.bag-seed-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.bag-seed-actions {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.bag-seed-actions button {
    padding: 6px 10px;
    min-width: 32px;
    border-radius: 8px !important;
    transition: all 0.2s ease !important;
}

.bag-seed-actions button:hover {
    transform: scale(1.1);
}

.bag-seed-actions button:active {
    transform: scale(0.95);
}

.bag-seed-actions button:disabled {
    opacity: 0.3;
    transform: none !important;
}

/* 空状态样式 */
.bag-seeds-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: var(--sub);
    text-align: center;
}

.bag-seeds-empty i {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
    animation: emptyFloat 3s ease-in-out infinite;
}

@keyframes emptyFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.bag-seeds-empty span {
    font-size: 14px;
}

/* 加载状态样式 */
.bag-seeds-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: var(--sub);
}

.bag-seeds-loading i {
    font-size: 32px;
    margin-bottom: 12px;
    animation: spin 1s linear infinite;
}

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

/* ============ 排除作物样式 ============ */
.steal-blacklist-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(239, 68, 68, 0.05) 100%);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.steal-blacklist-header:hover {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(239, 68, 68, 0.08) 100%);
    border-color: rgba(239, 68, 68, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.1);
}

.steal-blacklist-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: var(--text);
}

.steal-blacklist-title i {
    color: #ef4444;
    font-size: 16px;
    animation: pulseIcon 2s ease-in-out infinite;
}

@keyframes pulseIcon {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.steal-blacklist-badge {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    min-width: 24px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
    transition: all 0.3s ease;
}

.steal-blacklist-badge:not(:empty) {
    animation: badgePop 0.3s ease;
}

@keyframes badgePop {
    0% { transform: scale(0.8); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.steal-blacklist-toggle {
    width: 32px !important;
    height: 32px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    border-radius: 8px !important;
    transition: all 0.3s ease !important;
}

.steal-blacklist-toggle i {
    transition: transform 0.3s ease;
}

.steal-blacklist-toggle.expanded i {
    transform: rotate(180deg);
}

.steal-blacklist-content {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.3s ease, padding 0.3s ease;
    padding: 0;
}

.steal-blacklist-content.expanded {
    max-height: 600px;
    opacity: 1;
    padding: 16px 0 0;
}

.steal-blacklist-stats {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
    padding: 12px 16px;
    background: var(--panel-2);
    border-radius: 12px;
    border: 1px solid var(--line);
}

.steal-blacklist-stat {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--sub);
}

.steal-blacklist-stat i {
    font-size: 14px;
    color: var(--primary);
}

.steal-blacklist-stat.selected i {
    color: #10b981;
}

.steal-blacklist-stat strong {
    color: var(--text);
    font-weight: 600;
}

.steal-blacklist-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.steal-blacklist-actions .form-control {
    flex: 1;
}

.steal-blacklist-btn-group {
    display: flex;
    gap: 4px;
}

.steal-blacklist-btn-group .btn {
    width: 36px !important;
    height: 36px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    border-radius: 8px !important;
    transition: all 0.2s ease !important;
}

.steal-blacklist-btn-group .btn:hover {
    transform: scale(1.1);
}

.steal-blacklist-btn-group .btn:active {
    transform: scale(0.95);
}

.steal-blacklist-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.steal-blacklist-filters .btn {
    flex: 1;
}

.steal-blacklist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    max-height: 280px;
    overflow-y: auto;
    padding: 4px;
}

.steal-crop-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: var(--panel-2);
    border: 2px solid var(--line);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    position: relative;
    overflow: visible;
    animation: cropItemFadeIn 0.3s ease backwards;
}

@keyframes cropItemFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.steal-crop-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(102, 126, 234, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.steal-crop-item:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.steal-crop-item:hover::before {
    opacity: 1;
}

.steal-crop-item.selected {
    border-color: var(--primary);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.25) 0%, rgba(102, 126, 234, 0.1) 100%);
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
    animation: selectPulse 0.5s ease;
}

@keyframes selectPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.4);
    }
    30% {
        transform: scale(0.95);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(102, 126, 234, 0);
    }
    70% {
        transform: scale(0.98);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0);
    }
}

.steal-crop-img {
    width: 36px;
    height: 36px;
    object-fit: contain;
    border-radius: 8px;
    background: var(--panel);
    padding: 4px;
    transition: transform 0.3s ease;
}

.steal-crop-item:hover .steal-crop-img {
    transform: scale(1.1) rotate(5deg);
}

.steal-crop-img-placeholder {
    width: 36px;
    height: 36px;
    background: var(--panel);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--sub);
    transition: transform 0.3s ease;
}

.steal-crop-item:hover .steal-crop-img-placeholder {
    transform: scale(1.1);
}

.steal-crop-info {
    flex: 1;
    min-width: 0;
}

.steal-crop-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.3s ease;
}

.steal-crop-item.selected .steal-crop-name {
    color: var(--primary);
}

.steal-crop-meta {
    font-size: 11px;
    color: var(--sub);
}

.steal-crop-check {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--sub);
    font-size: 18px;
    transition: all 0.3s ease;
    border-radius: 50%;
    background: transparent;
}

.steal-crop-item.selected .steal-crop-check {
    color: white;
    background: linear-gradient(135deg, var(--primary) 0%, #8b5cf6 100%);
    animation: iconPop 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}

@keyframes iconPop {
    0% {
        transform: scale(0) rotate(-180deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.3) rotate(10deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

/* ============ 弹窗样式 ============ */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

.popup-window {
    background: var(--panel);
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.05);
    max-width: 500px;
    width: 90%;
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: scale(0.8) translateY(20px);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}

.popup-overlay.active .popup-window {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.popup-header {
    position: relative;
    padding: 24px 24px 20px;
    text-align: center;
    background: linear-gradient(180deg, var(--panel-2) 0%, var(--panel) 100%);
    border-bottom: 1px solid var(--line);
}

.popup-header-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary) 0%, #8b5cf6 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
    animation: iconFloat 3s ease-in-out infinite;
}

.popup-header-icon.list-icon {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
}

.popup-header-icon i {
    font-size: 24px;
    color: white;
}

@keyframes iconFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

.popup-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    margin: 0;
}

.popup-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    background: var(--panel-2);
    border: 1px solid var(--line);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--sub);
    transition: all 0.2s ease;
}

.popup-close:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    transform: rotate(90deg);
}

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

.popup-footer {
    padding: 16px 24px 24px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    border-top: 1px solid var(--line);
    background: var(--panel-2);
}

.popup-footer .btn {
    min-width: 100px;
}

/* GID导入弹窗特定样式 */
.gid-import-popup {
    max-width: 480px;
}

.gid-import-preview {
    margin-top: 16px;
    background: var(--panel-2);
    border-radius: 12px;
    overflow: hidden;
    animation: slideDown 0.3s ease;
}

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

.gid-preview-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--panel);
    border-bottom: 1px solid var(--line);
    font-size: 13px;
    color: var(--sub);
}

.gid-preview-head i {
    margin-right: 6px;
}

.gid-preview-badge {
    background: linear-gradient(135deg, var(--primary) 0%, #8b5cf6 100%);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.gid-preview-list {
    max-height: 200px;
    overflow-y: auto;
    padding: 8px;
}

.gid-preview-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 20px;
    margin: 4px;
    font-size: 13px;
    color: var(--text);
    animation: popIn 0.2s ease backwards;
}

.gid-preview-item:nth-child(1) { animation-delay: 0.05s; }
.gid-preview-item:nth-child(2) { animation-delay: 0.1s; }
.gid-preview-item:nth-child(3) { animation-delay: 0.15s; }
.gid-preview-item:nth-child(4) { animation-delay: 0.2s; }
.gid-preview-item:nth-child(5) { animation-delay: 0.25s; }

@keyframes popIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.gid-preview-item i {
    font-size: 10px;
    color: var(--primary);
}

/* GID列表弹窗特定样式 */
.gid-list-popup {
    max-width: 520px;
}

.gid-list-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.gid-list-actions .form-control {
    flex: 1;
    min-width: 150px;
}

.gid-list-container {
    max-height: 350px;
    overflow-y: auto;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--panel-2);
}

.gid-list-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: var(--sub);
}

.gid-list-empty i {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
    animation: emptyBounce 2s ease-in-out infinite;
}

@keyframes emptyBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.gid-list-empty span {
    font-size: 14px;
}

.gid-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
    transition: background 0.2s ease;
    animation: fadeInUp 0.3s ease backwards;
}

.gid-list-item:last-child {
    border-bottom: none;
}

.gid-list-item:hover {
    background: var(--panel);
}

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

.gid-list-item-gid {
    display: flex;
    align-items: center;
    gap: 10px;
}

.gid-list-item-gid i {
    color: var(--primary);
    font-size: 14px;
}

.gid-list-item-gid span {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', monospace;
    font-size: 14px;
    color: var(--text);
}

.gid-list-item-actions {
    display: flex;
    gap: 4px;
}

.gid-list-item-actions button {
    width: 28px;
    height: 28px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.gid-list-item-actions button:hover {
    transform: scale(1.1);
}

.gid-list-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
}

.gid-list-pagination button {
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
}

.gid-list-pagination span {
    font-size: 13px;
    color: var(--sub);
    padding: 0 8px;
}

/* ============ 背包种子弹窗特定样式 ============ */
.bag-seeds-popup {
    max-width: 520px;
}

.popup-header-icon.seeds-icon {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
}

.bag-seeds-stats {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    padding: 14px 18px;
    background: var(--panel-2);
    border-radius: 12px;
    border: 1px solid var(--line);
}

.bag-seeds-stat {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--sub);
}

.bag-seeds-stat i {
    font-size: 14px;
    color: var(--primary);
}

.bag-seeds-stat strong {
    color: var(--text);
    font-weight: 600;
}

.bag-seeds-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.bag-seeds-actions .btn {
    flex: 1;
    justify-content: center;
}

.bag-seeds-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 320px;
    overflow-y: auto;
    padding: 4px;
}

.bag-seeds-loading,
.bag-seeds-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: var(--sub);
    text-align: center;
}

.bag-seeds-loading i,
.bag-seeds-empty i {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.bag-seeds-loading i {
    animation: spin 1s linear infinite;
}

.bag-seeds-empty i {
    animation: emptyFloat 3s ease-in-out infinite;
}

.bag-seeds-tip {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--sub);
}

.bag-seeds-tip i {
    color: var(--primary);
}

.bag-seeds-count-badge {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

/* ============ 排除作物弹窗特定样式 ============ */
.steal-blacklist-popup {
    max-width: 560px;
}

.popup-header-icon.blacklist-icon {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.3);
}

.steal-blacklist-stats {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    padding: 14px 18px;
    background: var(--panel-2);
    border-radius: 12px;
    border: 1px solid var(--line);
}

.steal-blacklist-stat {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--sub);
}

.steal-blacklist-stat i {
    font-size: 14px;
    color: var(--primary);
}

.steal-blacklist-stat.selected i {
    color: #10b981;
}

.steal-blacklist-stat strong {
    color: var(--text);
    font-weight: 600;
}

.steal-blacklist-search-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.steal-blacklist-search-bar .form-control {
    flex: 1;
}

.steal-blacklist-btn-group {
    display: flex;
    gap: 4px;
}

.steal-blacklist-btn-group .btn {
    width: 36px !important;
    height: 36px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    border-radius: 8px !important;
    transition: all 0.2s ease !important;
}

.steal-blacklist-btn-group .btn:hover {
    transform: scale(1.1);
}

.steal-blacklist-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.steal-blacklist-filters .btn {
    flex: 1;
    justify-content: center;
}

.steal-blacklist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
    max-height: 320px;
    overflow-y: auto;
    padding: 4px;
}

.steal-blacklist-tip {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--sub);
}

.steal-blacklist-tip i {
    color: var(--primary);
}

.steal-blacklist-count-badge {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.steal-crop-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: var(--sub);
    text-align: center;
    grid-column: 1 / -1;
}

.steal-crop-empty i {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
    animation: emptyFloat 3s ease-in-out infinite;
}

/* ============ 个人页面样式 ============ */
.personal-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.personal-nav {
    display: flex;
    gap: 12px;
    background: var(--panel);
    padding: 8px;
    border-radius: 16px;
    box-shadow: var(--shadow);
    border: 2px solid var(--line);
    overflow-x: auto;
}

.personal-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    border-radius: 12px;
    border: 2px solid transparent;
    background: transparent;
    color: var(--sub);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.personal-nav-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 10px;
}

.personal-nav-item i {
    font-size: 18px;
    transition: transform 0.3s ease;
}

.personal-nav-item span {
    position: relative;
    z-index: 1;
}

.personal-nav-item:hover {
    color: var(--primary);
    border-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.personal-nav-item:hover i {
    transform: scale(1.1);
}

.personal-nav-item.active {
    color: white;
    border-color: transparent;
    background: var(--gradient-primary);
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
}

.personal-nav-item.active::before {
    opacity: 1;
}

.personal-nav-item.active i {
    color: white;
    transform: scale(1.1);
}

.personal-content {
    position: relative;
    min-height: 400px;
}

.personal-tab {
    display: none;
    animation: personalTabFadeIn 0.4s ease;
}

.personal-tab.active {
    display: block;
}

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

/* ============ 任务页面样式 ============ */
.tasks-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.tasks-gifts-card {
    background: var(--panel);
}

.daily-gifts-loading,
.growth-tasks-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: var(--sub);
    gap: 12px;
}

.daily-gifts-loading .loading-spinner,
.growth-tasks-loading .loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--line);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.daily-gifts-empty,
.growth-tasks-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: var(--sub);
    gap: 12px;
    text-align: center;
}

.daily-gifts-empty i,
.growth-tasks-empty i {
    font-size: 48px;
    opacity: 0.5;
}

.daily-gifts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 4px;
}

@media (min-width: 768px) {
    .daily-gifts-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.gift-item {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 14px;
    background: var(--panel-2);
    border: 2px solid var(--line);
    border-radius: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
    min-height: 100px;
}

.gift-item:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.gift-item.completed {
    background: rgba(16, 185, 129, 0.1);
    border-color: var(--success);
}

.gift-item .gift-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.gift-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--panel);
    color: var(--sub);
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.gift-icon.completed {
    background: var(--success);
    color: white;
}

.gift-icon.pending {
    background: rgba(59, 130, 246, 0.15);
    color: #3B82F6;
}

.gift-icon.disabled {
    background: var(--panel);
    color: var(--sub);
    opacity: 0.6;
}

.gift-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.gift-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.gift-status {
    font-size: 11px;
    color: var(--sub);
}

.gift-status.completed {
    color: var(--success);
}

.gift-status.pending {
    color: #3B82F6;
}

.gift-status.disabled {
    color: var(--sub);
    opacity: 0.7;
}

.gift-extra {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    margin-top: auto;
}

.gift-progress {
    font-size: 11px;
    font-weight: 600;
    color: var(--sub);
}

.gift-subtext {
    font-size: 10px;
    color: var(--sub);
    opacity: 0.7;
}

/* 成长任务卡片 */
.growth-tasks-card {
    background: var(--panel);
}

.growth-tasks-card .card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.growth-tasks-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.growth-tasks-badge.completed {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
}

.growth-tasks-badge.pending {
    background: rgba(59, 130, 246, 0.15);
    color: #3B82F6;
}

.growth-tasks-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 400px;
    overflow-y: auto;
}

.growth-task-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--panel-2);
    border: 2px solid var(--line);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.growth-task-item:hover {
    border-color: var(--primary);
    transform: translateX(4px);
}

.growth-task-item.completed {
    background: rgba(16, 185, 129, 0.1);
    border-color: var(--success);
}

.growth-task-name {
    font-size: 14px;
    color: var(--text);
    font-weight: 500;
}

.growth-task-progress {
    font-size: 12px;
    color: var(--sub);
    display: flex;
    align-items: center;
    gap: 6px;
}

.growth-task-progress.completed {
    color: var(--success);
}

.growth-task-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: var(--sub);
    text-align: center;
}

.growth-task-empty i {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
    animation: emptyFloat 3s ease-in-out infinite;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .personal-nav {
        padding: 6px;
        gap: 8px;
    }
    
    .personal-nav-item {
        padding: 10px 16px;
        font-size: 14px;
        flex: 1;
        justify-content: center;
    }
    
    .personal-nav-item i {
        font-size: 16px;
    }
    
    .daily-gifts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .gift-item {
        padding: 12px;
    }
    
    .gift-icon {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
    
    .gift-name {
        font-size: 13px;
    }
    
    .gift-status {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .personal-nav {
        border-radius: 12px;
    }
    
    .personal-nav-item {
        padding: 8px 12px;
        font-size: 13px;
        gap: 6px;
    }
    
    .personal-nav-item i {
        font-size: 14px;
    }
    
    .daily-gifts-grid {
        grid-template-columns: 1fr;
    }
}

/* 好友页面导航标签样式 */
.friends-nav-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.friends-nav-tabs {
    display: flex;
    gap: 8px;
    padding: 8px;
    background: var(--panel-2);
    border-radius: 16px;
    position: relative;
    overflow: hidden;
}

.friends-nav-tabs::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    pointer-events: none;
}

.friends-nav-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 16px 20px;
    background: transparent;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
    color: var(--sub);
}

.friends-nav-tab i {
    font-size: 24px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.friends-nav-tab span {
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.friends-nav-tab .tab-indicator {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 60%;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 3px 3px 0 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.friends-nav-tab:hover {
    color: var(--text);
    background: rgba(102, 126, 234, 0.08);
}

.friends-nav-tab:hover i {
    transform: scale(1.1) translateY(-2px);
}

.friends-nav-tab.active {
    color: var(--text);
    background: var(--panel);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

.friends-nav-tab.active i {
    transform: scale(1.15);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.friends-nav-tab.active span {
    font-weight: 600;
}

.friends-nav-tab.active .tab-indicator {
    transform: translateX(-50%) scaleX(1);
}

/* 标签内容样式 */
.friends-tab-content {
    display: none;
    opacity: 0;
    transform: translateY(20px) scale(0.98);
    animation: fadeOutTab 0.3s ease forwards;
}

.friends-tab-content.active {
    display: block;
    animation: fadeInTab 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes fadeInTab {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes fadeOutTab {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-10px) scale(0.98);
    }
}

/* 标签切换时的波纹效果 */
.friends-nav-tab::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.friends-nav-tab:active::after {
    width: 200%;
    height: 200%;
}

/* 图标动画 */
.friends-nav-tab i {
    animation: iconFloat 3s ease-in-out infinite;
    animation-play-state: paused;
}

.friends-nav-tab.active i {
    animation-play-state: running;
}

@keyframes iconFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-3px);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .friends-nav-tabs {
        flex-direction: row;
        gap: 4px;
        padding: 6px;
    }
    
    .friends-nav-tab {
        padding: 12px 16px;
    }
    
    .friends-nav-tab i {
        font-size: 20px;
    }
    
    .friends-nav-tab span {
        font-size: 11px;
    }
}
