.footer-wap.fixed-bottom {
  display: none;
  position: fixed !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  background-color: #fff !important;
  border-top: 1px solid #f0f0f0;
  z-index: 9999 !important;
  box-shadow: 0 -3px 10px rgba(0, 0, 0, 0.05) !important;
  border-radius: 20px 20px 0 0 !important;
  overflow: hidden;
  padding-top: 4px;
}

@media (max-width: 768px) {
  .footer.pc {
    display: none !important;
  }
  .footer-wap.fixed-bottom {
    display: block;
  }
  .wap-nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 56px;
    padding: 0 8px;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .wap-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
    color: #666;
    font-size: 11px;
    font-weight: 500;
    gap: 3px;
    flex: 1;
    text-align: center;
    transition: all 0.25s ease;
    border-radius: 12px;
    padding: 6px 4px;
  }
  .wap-item i {
    font-size: 18px;
  }
  .wap-item.active {
    color: #0088ff !important;
  }
  body {
    padding-bottom: 62px !important;
  }
  .wap-center {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .wap-center .center-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #ff6a00;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
    transform: translateY(-6px);
    z-index: 1000;
    cursor: pointer;
    transition: transform 0.2s ease;
  }
  .wap-center .center-btn:active {
    transform: translateY(-4px);
    transition: transform 0.05s;
  }
  .nav-popup {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) scale(0.8);
    opacity: 0;
    visibility: hidden;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    padding: 12px 24px;
    display: flex;
    gap: 32px;
    transition: all 0.3s cubic-bezier(0.25,0.8,0.25,1);
    z-index: 9998;
  }
  .nav-popup.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) scale(1);
  }
  .nav-popup .popup-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: #333;
    font-size: 12px;
    text-decoration: none;
  }
  .nav-popup .popup-item i {
    font-size: 22px;
    color: #666;
  }
  .nav-popup .popup-item span {
    writing-mode: horizontal-tb !important;
    white-space: nowrap !important;
    font-size: 12px;
    line-height: 1.2;
  }
  .nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0);
    opacity: 0;
    visibility: hidden;
    z-index: 9997;
    transition: opacity 0.3s ease;
  }
  .nav-overlay.show {
    opacity: 1;
    visibility: visible;
    background: rgba(0,0,0,0);
  }
  .login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 10000 !important;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
  }
  .login-overlay.show {
    opacity: 1;
    visibility: visible;
  }
  .login-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: #fff;
    border-radius: 12px;
    width: 80%;
    max-width: 288px;
    z-index: 10001 !important;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.25,0.8,0.25,1);
    overflow: hidden;
  }
  .login-modal.show {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
  }
  .login-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px 8px;
    border-bottom: 1px solid #f0f0f0;
  }
  .login-header h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
  }
  .login-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #666;
    margin-top: -2px;
  }
  .login-body {
    padding: 16px 14px;
  }
  .login-form-group {
    margin-bottom: 12px;
    position: relative;
  }
  .login-form-group label {
    display: block;
    font-size: 13px;
    margin-bottom: 4px;
  }
  .login-input-wrapper input {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 13px;
    outline: none;
  }
  .login-remember {
    margin-bottom: 16px;
    font-size: 12px;
  }
  .login-btn {
    width: 100%;
    background: #f1f1f1;
    color: #333;
    border: none;
    border-radius: 8px;
    padding: 10px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
  }
  .login-btn:hover {
    opacity: 0.9;
    background: #e5e5e5;
  }
  .login-error {
    background: #fff2f2;
    color: #e03030;
    padding: 6px 10px;
    border-radius: 6px;
    margin-bottom: 8px;
    font-size: 12px;
    display: none;
  }
  .login-error.show {
    display: block;
  }
  .register-link {
    text-align: center;
    margin-top: 12px;
    font-size: 12px;
  }
  .register-link a {
    color: #0088ff;
    text-decoration: none;
    cursor: pointer;
  }
  .custom-toast {
    position: fixed;
    bottom: 20%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 10px 20px;
    border-radius: 8px;
    z-index: 10002;
    font-size: 14px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  }
  @media (max-width: 768px) {
    .custom-toast {
      white-space: normal;
      max-width: 80%;
      text-align: center;
      line-height: 1.4;
      bottom: 30%;
    }
  }
}

body.dark .footer-wap.fixed-bottom,
html[data-theme="dark"] .footer-wap.fixed-bottom {
  background-color: #1e1e1e !important;
  border-top-color: #2d2d2d !important;
  box-shadow: 0 -3px 10px rgba(0, 0, 0, 0.2) !important;
}
body.dark .wap-item,
html[data-theme="dark"] .wap-item {
  color: #a0a0a0 !important;
}
body.dark .wap-item.active,
html[data-theme="dark"] .wap-item.active {
  color: #409eff !important;
}
body.dark .wap-center .center-btn {
  background: #ff6a00;
}
body.dark .nav-popup,
html[data-theme="dark"] .nav-popup {
  background: #2a2a2a;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
body.dark .nav-popup .popup-item,
html[data-theme="dark"] .nav-popup .popup-item {
  color: #ddd;
}
body.dark .nav-popup .popup-item i,
html[data-theme="dark"] .nav-popup .popup-item i {
  color: #aaa;
}
body.dark .login-modal,
html[data-theme="dark"] .login-modal {
  background: #2a2a2a;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}
body.dark .login-header,
html[data-theme="dark"] .login-header {
  border-bottom-color: #444;
}
body.dark .login-header h2,
html[data-theme="dark"] .login-header h2 {
  color: #eee;
}
body.dark .login-close,
html[data-theme="dark"] .login-close {
  color: #aaa;
}
body.dark .login-form-group label,
html[data-theme="dark"] .login-form-group label {
  color: #ddd;
}
body.dark .login-input-wrapper input,
html[data-theme="dark"] .login-input-wrapper input {
  background: #3a3a3a;
  border-color: #555;
  color: #eee;
}
body.dark .login-remember,
html[data-theme="dark"] .login-remember {
  color: #ccc;
}
body.dark .login-btn,
html[data-theme="dark"] .login-btn {
  background: #444;
  color: #eee;
}
body.dark .login-btn:hover,
html[data-theme="dark"] .login-btn:hover {
  background: #555;
}
body.dark .login-error,
html[data-theme="dark"] .login-error {
  background: #442222;
  color: #ff8888;
}
body.dark .register-link a,
html[data-theme="dark"] .register-link a {
  color: #66ccff;
}

@media (min-width: 769px) {
  .footer-wap.fixed-bottom,
  .nav-popup,
  .nav-overlay,
  .login-modal,
  .login-overlay {
    display: none !important;
  }
}
