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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: #f5f7fa;
  color: #333;
}

.header {
  background: #fff;
  padding: 12px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #eee;
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  font-size: 18px;
  font-weight: 600;
  color: #4A90D9;
  cursor: pointer;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-dropdown {
  position: relative;
  cursor: pointer;
  padding: 8px 16px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 160px;
  box-sizing: border-box;
}

.user-dropdown:hover {
  background: rgba(0,0,0,0.05);
}

.user-name {
  font-size: 14px;
  color: #666;
  flex: 1;
  text-align: center;
}

.dropdown-arrow {
  font-size: 10px;
  color: #999;
  transition: transform 0.2s;
  flex-shrink: 0;
}

.user-dropdown.open .dropdown-arrow {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 4px;
  width: 100%;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  z-index: 100;
  padding: 4px 0;
}

.dropdown-item {
  display: block;
  width: 100%;
  padding: 10px 16px;
  text-align: left;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 14px;
  color: #333;
}

.dropdown-item:hover {
  background: #f5f5f5;
}

.dropdown-divider {
  height: 1px;
  background: #eee;
  margin: 4px 0;
}

.dropdown-submenu {
  position: relative;
}

.dropdown-submenu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dropdown-submenu-header::after {
  content: '›';
  font-size: 16px;
  color: #999;
  transform: rotate(90deg);
}

.dropdown-submenu-content {
  display: none;
  padding-left: 16px;
}

.dropdown-submenu.open .dropdown-submenu-content {
  display: block;
}

.btn-login {
  padding: 6px 16px;
  background: #4A90D9;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
}

.btn-login:hover {
  background: #3a7bc8;
}

.main {
  padding: 32px 24px;
  max-width: 1200px;
  margin: 0 auto;
  padding-bottom: 80px;
}

.banner-section {
  margin-bottom: 28px;
}

.notice-card {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.notice-title {
  font-weight: 600;
  color: #595959;
  font-size: 14px;
}

.notice-line {
  font-size: 13px;
  color: #8c8c8c;
}

.section {
  margin-bottom: 32px;
}

.btn-back-full {
  width: 100%;
  justify-content: flex-start;
  border-radius: 0;
  border: none;
  background: #f5f7fa;
  border-bottom: 1px solid #eee;
  padding: 12px 24px;
  margin-top: 8px;
  margin-bottom: 8px;
  cursor: pointer;
  font-size: 14px;
  color: #666;
  text-align: left;
}

main.main.task-main .btn-back-full {
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  width: 100vw;
  padding-left: 24px;
  padding-right: 24px;
}

.btn-back-full:hover {
  background: #eee;
}

.section-header {
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title {
  font-size: 18px;
  font-weight: 600;
  color: #1f1f1f;
}

.section-desc {
  font-size: 13px;
  color: #999;
}

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

.feature-item {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid #f0f0f0;
  text-align: left;
}

.feature-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  border-color: #e8f0fe;
}

.feature-icon-wrap {
  margin-bottom: 16px;
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
}

.feature-icon-wrap svg {
  width: 36px;
  height: 36px;
}

.feature-tag {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  color: #fff;
  font-weight: 500;
}

.tag-hot {
  background: #FF6B6B;
}

.tag-ai {
  background: #722ED1;
}

.feature-name {
  font-size: 16px;
  font-weight: 600;
  color: #1f1f1f;
  margin-bottom: 8px;
  display: block;
}

.feature-desc {
  font-size: 13px;
  color: #8c8c8c;
  margin-bottom: 12px;
  line-height: 1.6;
  display: block;
}

.feature-note {
  font-size: 14px;
  color: #4A90D9;
  font-weight: 500;
}

.feature-note.free {
  color: #52c41a;
}

.taobao-banner {
  background: linear-gradient(135deg, #FF6B6B 0%, #FF8E53 100%);
  border-radius: 12px;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
  color: #fff;
  box-shadow: 0 4px 16px rgba(255, 107, 107, 0.3);
  position: relative;
}

.taobao-banner:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255, 107, 107, 0.4);
}

.taobao-icon {
  width: 36px;
  height: 36px;
  position: absolute;
  right: 24px;
}

.taobao-content {
  width: 100%;
  text-align: center;
}

.taobao-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 6px;
  display: block;
}

.taobao-desc {
  font-size: 13px;
  opacity: 0.9;
}

.footer {
  background: #fff;
  padding: 16px 24px;
  text-align: center;
  border-top: 1px solid #eee;
  font-size: 12px;
  color: #999;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
}

.footer a {
  color: #666;
  margin-right: 20px;
  text-decoration: none;
}

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

.footer .beian-link {
  display: inline-flex;
  align-items: center;
}

.footer .beian-icon {
  width: 14px;
  height: 14px;
  margin-right: 4px;
  flex-shrink: 0;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: #fff;
  border-radius: 12px;
  width: 340px;
  max-width: 90%;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}

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

.modal-header h3 {
  font-size: 16px;
  color: #1f1f1f;
}

.modal-close {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: #999;
  padding: 0;
  line-height: 1;
}

.modal-body {
  padding: 20px;
}

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

.form-group label {
  display: block;
  font-size: 14px;
  margin-bottom: 8px;
  color: #333;
}

.form-group input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.2s;
}

.form-group input:focus {
  outline: none;
  border-color: #4A90D9;
}

.code-group {
  display: flex;
  gap: 10px;
}

.code-group input {
  flex: 1;
}

.btn-code {
  padding: 12px 14px;
  background: #f5f5f5;
  border: 1px solid #ddd;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  white-space: nowrap;
}

.btn-code:disabled {
  color: #999;
  cursor: not-allowed;
}

.btn-primary {
  background: #4A90D9;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 12px 20px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s;
}

.btn-primary:hover {
  background: #3a7bc8;
}

.btn-primary:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.btn-secondary {
  background: #f5f5f5;
  color: #666;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 10px 16px;
  cursor: pointer;
  font-size: 13px;
  transition: background 0.2s;
}

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

.btn-block {
  width: 100%;
}

.login-tip {
  font-size: 12px;
  color: #999;
  text-align: center;
  margin-top: 12px;
}

.hidden {
  display: none !important;
}

.task-panel {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  border: 1px solid #f0f0f0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

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

.btn-back {
  padding: 6px 12px;
  background: #f5f5f5;
  color: #666;
  border: 1px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.btn-back:hover {
  background: #eee;
}

.task-title {
  font-size: 18px;
  font-weight: 600;
  color: #1f1f1f;
}

.task-desc {
  font-size: 13px;
  color: #8c8c8c;
  margin-left: auto;
}

.upload-area {
  border: 2px dashed #d9d9d9;
  border-radius: 12px;
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  background: #fff;
}

.upload-area:hover {
  border-color: #4A90D9;
  background: #f8fafc;
}

.upload-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  color: #999;
}

.upload-icon svg {
  width: 100%;
  height: 100%;
}

.upload-text {
  display: block;
  font-size: 15px;
  color: #333;
  margin-bottom: 6px;
  font-weight: 500;
}

.upload-hint {
  display: block;
  font-size: 13px;
  color: #999;
}

.preview-area {
  margin-bottom: 20px;
}

.preview-area video {
  width: 100%;
  max-height: 320px;
  border-radius: 8px;
}

.preview-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
}

.preview-info span {
  font-size: 13px;
  color: #666;
}

.preview-image {
  margin-bottom: 20px;
  text-align: center;
}

.preview-image img {
  max-width: 220px;
  max-height: 220px;
  border-radius: 8px;
}

.preview-video {
  margin-bottom: 20px;
}

.preview-video video {
  width: 100%;
  max-height: 220px;
  border-radius: 8px;
}

.upload-section {
  margin-bottom: 24px;
}

.upload-section h4 {
  font-size: 14px;
  margin-bottom: 12px;
  color: #333;
}

.radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.radio-item {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 10px 16px;
  background: #f5f5f5;
  border-radius: 6px;
  transition: all 0.2s;
  border: 1px solid transparent;
}

.radio-item:hover {
  background: #f0f0f0;
}

.radio-item input[type="radio"]:checked + span {
  color: #4A90D9;
  font-weight: 500;
}

.radio-item input[type="radio"] {
  width: auto;
  accent-color: #4A90D9;
}

.radio-item span {
  font-size: 13px;
}

.checkbox-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
}

.checkbox-item input[type="checkbox"] {
  width: auto;
  margin-top: 2px;
  accent-color: #4A90D9;
}

.checkbox-item span {
  font-size: 13px;
  color: #666;
}

.usage-info {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 20px;
  padding: 16px;
  background: #fafafa;
  border-radius: 8px;
  border: 1px solid #f0f0f0;
}

.usage-label {
  font-size: 14px;
  color: #666;
}

.usage-value {
  font-size: 20px;
  font-weight: 600;
  color: #FF6B6B;
}

.usage-unit {
  font-size: 13px;
  color: #999;
}

.usage-hint {
  font-size: 12px;
  color: #bfbfbf;
  margin-left: auto;
}

.rights-disclaimer-small {
  font-size: 12px;
  color: #999;
  line-height: 1.6;
  padding: 12px 14px;
  background: #f8fafc;
  border-radius: 6px;
  border-left: 3px solid #4A90D9;
  margin-bottom: 20px;
}

.rights-disclaimer-small span {
  display: block;
}

.permission-alert {
  background: #fff7e6;
  border: 1px solid #ffe58f;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 16px;
  text-align: center;
}

.permission-alert span {
  font-size: 14px;
  color: #fa8c16;
  font-weight: 500;
}

.benefits-card {
  background: #fafbfc;
  border-radius: 10px;
  padding: 24px;
  margin-bottom: 20px;
}

.benefits-status {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 8px;
}

.benefits-status-icon {
  font-size: 40px;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.benefits-status-title {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  margin-bottom: 4px;
}

.benefits-status-desc {
  font-size: 13px;
  color: #999;
}

.benefits-divider {
  height: 1px;
  background: #e8e8e8;
  margin: 20px 0;
}

/* 权益表格 */
.benefits-table-container {
  margin-bottom: 20px;
}

.benefits-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #eef0f3;
}

.benefits-table thead th {
  background: #f0f2f5;
  padding: 10px 12px;
  text-align: left;
  font-weight: 500;
  color: #333;
  border-bottom: 1px solid #eef0f3;
}

.benefits-table tbody td {
  padding: 10px 12px;
  color: #666;
  border-bottom: 1px solid #eef0f3;
}

.benefits-table tbody tr:last-child td {
  border-bottom: none;
}

.benefits-table tbody tr:hover {
  background: #f5f7fa;
}

.benefits-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.benefits-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.benefits-item {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  font-size: 14px;
  gap: 16px;
}

.benefits-label {
  color: #666;
  min-width: 56px;
}

.benefits-value {
  color: #333;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}

.link-blue {
  color: #4f7cff;
  font-size: 13px;
  font-weight: 400;
  cursor: pointer;
  text-decoration: none;
}

.link-blue:hover {
  text-decoration: underline;
}

.benefits-actions {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.section-subtitle {
  font-size: 15px;
  font-weight: 600;
  color: #333;
  margin-bottom: 16px;
}

.profile-card {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 8px;
}

.profile-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4A90D9, #67B8F7);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #fff;
}

.profile-email {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin-bottom: 4px;
}

.profile-register-time {
  font-size: 13px;
  color: #999;
}

.profile-error {
  margin-top: 8px;
  padding: 6px 10px;
  background: #fff2f0;
  border: 1px solid #ffccc7;
  border-radius: 4px;
  color: #cf1322;
  font-size: 13px;
}

.login-logs {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.log-item {
  padding: 12px 14px;
  background: #fafbfc;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.log-item-main {
  display: flex;
  align-items: center;
  gap: 10px;
}

.log-item-sub {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: #999;
}

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

.log-ip {
  font-size: 12px;
  color: #999;
}

.log-location {
  font-size: 12px;
  color: #888;
}

.log-item-time {
  font-size: 12px;
  color: #bbb;
}

.log-result-success {
  font-size: 13px;
  color: #16a34a;
}

.log-result-fail {
  font-size: 13px;
  color: #dc2626;
}

.log-error-msg {
  font-size: 12px;
  color: #dc2626;
  margin-top: 2px;
}

.log-item-single {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: 13px;
}

.log-item-single .log-type {
  flex: 0 0 80px;
}

.log-item-single .log-result-success,
.log-item-single .log-result-fail {
  flex: 0 0 50px;
  text-align: center;
  padding: 2px 0;
  border-radius: 4px;
}

.log-item-single .log-ip {
  flex: 0 0 80px;
  color: #666;
}

.log-item-single .log-location {
  flex: 1;
  color: #666;
  margin: 0 10px;
}

.log-item-single .log-item-time {
  flex: 0 0 140px;
  color: #999;
  text-align: right;
}

/* 手风琴折叠模块 */
.accordion-section {
  margin-top: 20px;
}

.accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  padding: 4px 0;
}

.accordion-header:hover {
  opacity: 0.8;
}

.accordion-link {
  font-size: 14px;
}

.accordion-arrow {
  font-size: 12px;
  color: #2563eb;
  transition: transform 0.2s;
}

.accordion-content {
  max-height: 2000px;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.accordion-content.collapsed {
  max-height: 0;
}

/* 蓝色链接样式（和个人中心"修改"一致） */
.link-like {
  color: #2563eb;
  font-size: 14px;
  cursor: pointer;
}

.link-like:hover {
  text-decoration: underline;
}

/* 核销记录 - 横向表格 */
.redeem-logs-container {
  margin-top: 12px;
}

.redeem-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: #fafbfc;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #eef0f3;
}

.redeem-table thead th {
  background: #f0f2f5;
  padding: 10px 12px;
  text-align: left;
  font-weight: 500;
  color: #333;
  border-bottom: 1px solid #eef0f3;
}

.redeem-table tbody td {
  padding: 10px 12px;
  color: #666;
  border-bottom: 1px solid #eef0f3;
}

.redeem-table tbody tr:last-child td {
  border-bottom: none;
}

.redeem-table tbody tr:hover {
  background: #f5f7fa;
}

.empty-tip {
  text-align: center;
  color: #999;
  font-size: 14px;
  padding: 32px 0;
}

/* 设备列表 */
.device-item {
  padding: 14px;
  background: #fafbfc;
  border-radius: 8px;
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.device-item-main {
  display: flex;
  align-items: center;
  gap: 10px;
}

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

.device-status-online {
  font-size: 12px;
  color: #16a34a;
  background: #dcfce7;
  padding: 2px 8px;
  border-radius: 10px;
}

.device-local-tag {
  font-size: 12px;
  color: #2563eb;
  background: #dbeafe;
  padding: 2px 8px;
  border-radius: 10px;
}

.device-status-offline {
  font-size: 12px;
  color: #999;
  background: #f3f4f6;
  padding: 2px 8px;
  border-radius: 10px;
}

.device-item-sub {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: #999;
}

.device-item-time {
  font-size: 12px;
  color: #bbb;
}

.btn-danger-sm {
  align-self: flex-end;
  margin-top: 4px;
  padding: 4px 12px;
  font-size: 12px;
  color: #dc2626;
  background: #fff;
  border: 1px solid #fca5a5;
  border-radius: 6px;
  cursor: pointer;
}

.btn-danger-sm:hover {
  background: #fef2f2;
}

.form-hint {
  font-size: 12px;
  color: #999;
  display: block;
  margin-top: 6px;
}

.redeem-tip {
  text-align: center;
  padding-top: 16px;
  border-top: 1px dashed #eee;
  margin-top: 16px;
}

.redeem-tip p {
  font-size: 13px;
  color: #666;
  margin-bottom: 10px;
}

.result-content {
  margin-bottom: 20px;
}

.result-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
}

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

.result-label {
  font-size: 14px;
  color: #666;
}

.result-value {
  font-size: 14px;
  font-weight: 600;
  color: #4A90D9;
}

.status-panel {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  border: 1px solid #f0f0f0;
  margin-top: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

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

.status-title {
  font-size: 16px;
  font-weight: 600;
  color: #1f1f1f;
}

.status-task-id {
  font-size: 12px;
  color: #999;
  font-family: monospace;
}

.progress-bar {
  height: 8px;
  background: #f0f0f0;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 10px;
}

.progress-fill {
  height: 100%;
  background: #4A90D9;
  border-radius: 4px;
  transition: width 0.3s;
}

.progress-text {
  display: flex;
  justify-content: space-between;
}

.progress-text span {
  font-size: 13px;
  color: #666;
}

.result-panel {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  border: 1px solid #f0f0f0;
  margin-top: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.result-header {
  margin-bottom: 20px;
}

.result-title {
  font-size: 16px;
  font-weight: 600;
  color: #52c41a;
}

.result-video video {
  width: 100%;
  max-height: 420px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.result-actions {
  display: flex;
  gap: 14px;
}

.result-actions button {
  flex: 1;
}

main.main.chat-main {
  max-width: 100%;
  padding: 0;
  margin: 0;
  padding-bottom: 50px;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 60px - 50px);
}

.chat-layout {
  display: flex;
  flex: 1;
  width: 100%;
  overflow: hidden;
}

.chat-sidebar {
  width: 280px;
  background: #fff;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  flex-shrink: 0;
}

.btn-back-sidebar {
  width: 100%;
  padding: 12px 20px;
  text-align: left;
  border: none;
  background: #f5f7fa;
  border-bottom: 1px solid #eee;
  color: #666;
  font-size: 14px;
  cursor: pointer;
}

.btn-back-sidebar:hover {
  background: #eee;
}

.chat-content-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #fff;
  overflow: hidden;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.chat-input-wrapper {
  padding: 12px 20px;
  border-top: 1px solid #eee;
  background: #fff;
  flex-shrink: 0;
  display: flex;
  justify-content: center;
}

.input-container {
  width: 100%;
  max-width: 800px;
  border: 1px solid #ddd;
  border-radius: 20px;
  padding: 8px 16px;
  background: #fff;
  transition: box-shadow 0.2s;
}

.input-container:focus-within {
  box-shadow: 0 0 0 2px rgba(74, 144, 217, 0.2);
  border-color: #4A90D9;
}

.input-container textarea {
  width: 100%;
  padding: 12px 0;
  border: none;
  font-size: 14px;
  resize: none;
  min-height: 40px;
  max-height: 120px;
  outline: none;
  background: transparent;
}

.input-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 8px;
  border-top: 1px solid #f0f0f0;
}

.bar-btn {
  padding: 6px 10px;
  border: none;
  background: transparent;
  color: #666;
  font-size: 13px;
  cursor: pointer;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.bar-btn:hover {
  background: #f5f5f5;
}

.btn-send {
  margin-left: auto;
  padding: 8px 20px;
  background: #4A90D9;
  color: #fff;
  border: none;
  border-radius: 16px;
  cursor: pointer;
  font-size: 14px;
  flex-shrink: 0;
}

.btn-send:hover {
  background: #3a7bc8;
}

.btn-send:disabled {
  background: #ccc;
  cursor: not-allowed;
}

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

.sidebar-title {
  font-size: 16px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
}

.sidebar-icon {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  margin-right: 6px;
  vertical-align: middle;
}

.btn-new-chat {
  padding: 6px 12px;
  background: #4A90D9;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
}

.chat-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

.chat-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 6px;
  cursor: pointer;
  margin-bottom: 4px;
}

.chat-item:hover {
  background: #f5f5f5;
}

.chat-item.active {
  background: #e8f0fe;
}

.chat-icon {
  font-size: 18px;
}

.chat-name {
  font-size: 13px;
  color: #333;
}

.chat-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.message {
  margin-bottom: 16px;
  width: 100%;
  max-width: 800px;
}

.system-message {
  text-align: center;
  font-size: 13px;
  color: #999;
}

.message-bubble {
  max-width: 70%;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.6;
}

.user-bubble {
  background: #fff;
  color: #333;
  border: 1px solid #eee;
  margin-left: auto;
  border-bottom-right-radius: 2px;
}

.ai-bubble {
  background: #fff;
  color: #333;
  border: 1px solid #eee;
  border-bottom-left-radius: 2px;
}



@media (max-width: 900px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .main {
    padding: 24px 16px;
  }
}

@media (max-width: 600px) {
  .feature-grid {
    grid-template-columns: 1fr;
  }
  
  .chat-sidebar {
    width: 200px;
  }
  
  .message-bubble {
    max-width: 85%;
  }
  
  .header {
    padding: 10px 16px;
  }
  
  .logo {
    font-size: 16px;
  }
}

/* ========== 登录/注册右侧抽屉 ========== */

.drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 999;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 420px;
  max-width: 100%;
  height: 100vh;
  background: #fff;
  z-index: 1000;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

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

.drawer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.drawer-logo-img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.drawer-site-name {
  font-size: 18px;
  font-weight: 600;
  color: #333;
}

.drawer-close {
  width: 32px;
  height: 32px;
  border: none;
  background: #f5f7fa;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  transition: background 0.2s;
}

.drawer-close:hover {
  background: #e8ecf1;
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 40px 32px;
}

.auth-view {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-title {
  font-size: 28px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 8px;
  text-align: center;
}

.wave-emoji {
  display: inline-block;
  animation: wave 2s ease-in-out infinite;
  transform-origin: 70% 70%;
}

@keyframes wave {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(20deg); }
  75% { transform: rotate(-10deg); }
}

.auth-input {
  position: relative;
}

.auth-input .input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #999;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-input input {
  width: 100%;
  padding: 12px 16px 12px 44px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.auth-input input:focus {
  border-color: #4A90D9;
}

.auth-input.code-input input {
  padding-right: 110px;
}

.auth-input .btn-code {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  height: 32px;
  padding: 0 12px;
  background: #f0f5ff;
  color: #4A90D9;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
}

.auth-input .btn-code:disabled {
  background: #f5f5f5;
  color: #999;
  cursor: not-allowed;
}

.auth-input .input-toggle {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #999;
  cursor: pointer;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-input .input-toggle:hover {
  color: #4A90D9;
}

.password-strength {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
  margin-bottom: 16px;
}

.strength-bar {
  flex: 1;
  height: 6px;
  background: #eee;
  border-radius: 3px;
  overflow: hidden;
}

.strength-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s, background-color 0.3s;
  width: 0;
  background: #eee;
}

.strength-fill.weak {
  width: 33%;
  background: #e53935;
}

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

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

.strength-text {
  font-size: 12px;
  color: #999;
  min-width: 40px;
}

.strength-text.weak {
  color: #e53935;
}

.strength-text.medium {
  color: #ff9800;
}

.strength-text.strong {
  color: #4caf50;
}

.password-match {
  font-size: 12px;
  color: #e53935;
  margin-bottom: 16px;
  height: 16px;
}

.password-match.success {
  color: #4caf50;
}

.auth-tip {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  color: #999;
  margin-bottom: 16px;
  line-height: 1.5;
}

.auth-tip svg {
  flex-shrink: 0;
  margin-top: 1px;
}

.auth-tip.forgot-tip {
  margin-bottom: 8px;
}

.auth-tip-warning {
  color: #d97706;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 6px;
  padding: 8px 12px;
  margin-bottom: 16px;
}

.auth-tip-warning svg {
  color: #d97706;
}

.auth-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 13px;
  color: #666;
}

.auth-checkbox input[type="checkbox"] {
  margin-top: 2px;
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.auth-checkbox label {
  cursor: pointer;
  line-height: 1.5;
}

.auth-checkbox a {
  color: #4A90D9;
  text-decoration: none;
}

.auth-checkbox a:hover {
  text-decoration: underline;
}

.auth-agreement {
  text-align: center;
  font-size: 12px;
  color: #999;
  margin-bottom: 16px;
  line-height: 1.5;
}

.auth-agreement a {
  color: #4A90D9;
  text-decoration: none;
}

.auth-agreement a:hover {
  text-decoration: underline;
}

.auth-forgot-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  font-size: 13px;
}

.auth-forgot-link {
  color: #4A90D9;
  text-decoration: none;
}

.auth-forgot-link:hover {
  text-decoration: underline;
}

.remember-group {
  display: flex;
  flex-direction: column;
}

.remember-checkbox {
  display: flex;
  align-items: center;
  cursor: pointer;
  color: #666;
}

.remember-checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin-right: 6px;
  cursor: pointer;
}

.remember-checkbox .checkbox-text {
  color: #333;
  font-weight: 500;
}

.checkbox-tip {
  color: #999;
  font-size: 12px;
  margin-left: 22px;
  margin-top: 2px;
}

.auth-divider {
  position: relative;
  text-align: center;
  margin: 8px 0;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 30%;
  height: 1px;
  background: #eee;
}

.auth-divider::before {
  left: 0;
}

.auth-divider::after {
  right: 0;
}

.auth-divider span {
  font-size: 12px;
  color: #999;
  background: #fff;
  padding: 0 12px;
}

.auth-switch {
  text-align: center;
  font-size: 14px;
  color: #666;
}

.auth-switch a {
  color: #4A90D9;
  text-decoration: none;
  font-weight: 500;
}

.auth-switch a:hover {
  text-decoration: underline;
}

/* 安全设置列表 */
.security-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.security-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s;
}

.security-item:hover {
  background: #f5f7fa;
}

.security-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.security-icon {
  font-size: 22px;
}

.security-title {
  font-size: 15px;
  font-weight: 500;
  color: #1a1a2e;
  margin-bottom: 2px;
}

.security-desc {
  font-size: 12px;
  color: #999;
}

.security-arrow {
  font-size: 20px;
  color: #ccc;
  font-weight: 300;
}

.security-item-danger .security-title {
  color: #e74c3c;
}

/* 弹窗通用 */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-overlay.hidden {
  display: none;
}

.modal-content {
  background: #fff;
  border-radius: 16px;
  width: 90%;
  max-width: 420px;
  max-height: 85vh;
  overflow-y: auto;
}

.modal-small {
  max-width: 380px;
}

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

.modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #1a1a2e;
}

.modal-header .danger-title {
  color: #e74c3c;
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: #999;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  line-height: 1;
}

.modal-body {
  padding: 24px;
}

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

.modal-body .form-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #333;
}

.modal-body .form-group input[type="text"],
.modal-body .form-group input[type="password"] {
  width: 100%;
  height: 42px;
  padding: 0 14px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-size: 14px;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.2s;
}

.modal-body .form-group input:focus {
  border-color: #4A90D9;
}

.code-input-group {
  display: flex;
  gap: 10px;
}

.code-input-group input {
  flex: 1;
}

.code-input-group .btn-code {
  flex-shrink: 0;
  width: 120px;
  height: 42px;
}

.btn-default {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 12px 20px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.2s;
}

.btn-default:hover {
  opacity: 0.9;
}

.btn-danger {
  background: #e74c3c;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 12px 20px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.2s;
}

.btn-danger:hover {
  opacity: 0.9;
}

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

.btn-block {
  width: 100%;
}

/* 危险警告 */
.danger-warning {
  display: flex;
  gap: 12px;
  padding: 16px;
  background: #fef0f0;
  border-radius: 10px;
  margin-bottom: 20px;
  color: #e74c3c;
}

.danger-warning p {
  margin: 0 0 8px 0;
  font-size: 14px;
  line-height: 1.5;
}

.danger-warning ul {
  margin: 8px 0 0 0;
  padding-left: 20px;
  font-size: 13px;
}

.danger-warning li {
  margin-bottom: 4px;
}

.danger-checkbox-label {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #666;
  cursor: pointer;
}

.delete-confirm-group .danger-checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  flex-shrink: 0;
  accent-color: #e74c3c;
}

/* 个人数据导出 */
.export-info-box {
  background: #fafafa;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 16px;
}

.export-info-box p,
.export-info-box li {
  font-size: 13px;
  color: #666;
  line-height: 1.6;
  font-weight: normal;
}

.export-info-box p {
  margin: 0 0 6px 0;
}

.export-info-box ul {
  margin: 4px 0 12px 0;
  padding-left: 18px;
}

.export-info-box li {
  margin-bottom: 2px;
}

.export-info-box .export-note {
  font-size: 13px;
  color: #888;
}

/* 隐私设置开关 */
.privacy-setting-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid #f0f0f0;
}

.privacy-setting-item:last-child {
  border-bottom: none;
}

.privacy-setting-info {
  flex: 1;
  padding-right: 16px;
}

.privacy-setting-title {
  font-size: 15px;
  font-weight: 500;
  color: #1a1a2e;
  margin-bottom: 4px;
}

.privacy-setting-desc {
  font-size: 12px;
  color: #999;
  line-height: 1.5;
}

.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.3s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: #4A90D9;
}

input:checked + .slider:before {
  transform: translateX(20px);
}

.privacy-tip {
  display: flex;
  gap: 8px;
  padding: 12px;
  background: #fff9e6;
  border-radius: 8px;
  margin-top: 16px;
  font-size: 12px;
  color: #996600;
  line-height: 1.5;
}

.privacy-tip svg {
  flex-shrink: 0;
  margin-top: 1px;
}

.privacy-links {
  text-align: center;
  margin-top: 16px;
  font-size: 13px;
}

.privacy-links a {
  color: #4A90D9;
  text-decoration: none;
}

.privacy-links a:hover {
  text-decoration: underline;
}

.link-divider {
  color: #ddd;
  margin: 0 10px;
}

.auth-checkbox-item {
  margin-bottom: 10px;
}

.auth-checkbox-item:last-child {
  margin-bottom: 0;
}

@media (max-width: 480px) {
  .drawer {
    width: 100%;
  }

  .drawer-body {
    padding: 24px 20px;
  }

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

/* Toast 提示 */
.toast-tip {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 13px;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  white-space: nowrap;
}

.toast-tip.show {
  opacity: 1;
}
