/**
 * PC 认证相关样式 (登录弹窗、注册弹窗、Toast通知、用户导航)
 * 全局加载，每个页面都需要
 */

/* === components/user-nav.php === */
.user-nav {
  display: flex;
  align-items: center;
}
.user-nav-guest {
  display: flex;
  gap: 10px;
}
.user-nav-logged {
  position: relative;
}
.user-dropdown {
  position: relative;
}
.user-dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s;
}
.user-dropdown-toggle:hover {
  background: rgba(255,255,255,0.2);
}
.user-name {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.vip-badge {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px 6px;
  background: linear-gradient(135deg, #ffd700 0%, #ffaa00 100%);
  color: #000;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
}
.vip-badge svg {
  color: #8b4500;
}
.dropdown-arrow {
  font-size: 10px;
  opacity: 0.7;
}
.user-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 160px;
  background: var(--card-bg, #1a1a2e);
  border: 1px solid var(--border-color, #333);
  border-radius: 8px;
  padding: 8px 0;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.2s ease;
  z-index: 100;
}
.user-dropdown:hover .user-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.user-dropdown-menu li {
  margin: 0;
}
.user-dropdown-menu a {
  display: block;
  padding: 10px 16px;
  color: var(--text-primary, #e0e0e0);
  text-decoration: none;
  font-size: 14px;
  transition: background 0.15s, color 0.15s;
}
.user-dropdown-menu a:hover {
  background: var(--hover-bg, #2a2a4e);
  color: var(--accent-color, #00ff9d);
}
.menu-info {
  padding: 8px 16px;
  font-size: 12px;
  color: var(--text-secondary, #888);
}
.menu-divider {
  height: 1px;
  background: var(--border-color, #333);
  margin: 8px 0;
}
.logout-link {
  color: #ff6b6b !important;
}
.logout-link:hover {
  background: rgba(255,107,107,0.1) !important;
}

/* === components/auth-modal.php === */
.auth-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
}

.auth-modal-content {
  position: relative;
  background: var(--card-bg, #1e1e2e);
  border-radius: 12px;
  width: 100%;
  max-width: 400px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: authModalSlideIn 0.3s ease-out;
}

@keyframes authModalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.auth-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  font-size: 20px;
  color: var(--text-secondary, #999);
  cursor: pointer;
  padding: 8px;
  transition: color 0.2s;
}

.auth-modal-close:hover {
  color: var(--text-primary, #e0e0e0);
}

.auth-modal-header {
  padding: 20px 20px 10px;
  text-align: center;
}

.auth-modal-title {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary, #e0e0e0);
}

.auth-modal-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-color, #333);
  margin: 0 20px;
}

.auth-tab {
  flex: 1;
  padding: 12px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  font-size: 15px;
  color: var(--text-secondary, #999);
  transition: all 0.2s;
}

.auth-tab:hover {
  color: var(--text-primary, #e0e0e0);
}

.auth-tab.active {
  color: var(--primary, #ff4757);
  border-bottom-color: var(--primary, #ff4757);
  font-weight: 500;
}

.auth-form {
  padding: 20px;
}

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

.auth-form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 500;
  color: #555;
}

.auth-form-group input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-color, #333);
  border-radius: 6px;
  font-size: 14px;
  color: var(--text-primary, #e0e0e0);
  background: var(--input-bg, #2a2a3e);
  transition: border-color 0.2s;
}

.auth-form-group input:focus {
  outline: none;
  border-color: var(--primary, #ff4757);
}

.auth-form-actions {
  margin-top: 24px;
}

.auth-submit-btn {
  width: 100%;
  padding: 12px;
  background: var(--primary, #ff4757);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.auth-submit-btn:hover {
  background: var(--primary-dark, #e04050);
}

.auth-form-footer {
  margin-top: 16px;
  text-align: center;
  font-size: 14px;
  color: var(--text-secondary, #999);
}

.auth-form-footer a {
  color: var(--primary, #ff4757);
  text-decoration: none;
  font-weight: 500;
}

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

.auth-modal-loading {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(30, 30, 46, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 15px;
  color: var(--primary, #ff4757);
  border-radius: 12px;
}

/* === components/toast.php === */
.toast-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  min-width: 250px;
  max-width: 350px;
  padding: 12px 16px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toastSlideIn 0.3s ease-out, toastFadeOut 0.3s ease-in 2.7s forwards;
  pointer-events: auto;
}

.toast.toast-success {
  border-left: 4px solid #4caf50;
}

.toast.toast-error {
  border-left: 4px solid #f44336;
}

.toast.toast-info {
  border-left: 4px solid #2196f3;
}

.toast.toast-warning {
  border-left: 4px solid #ff9800;
}

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

.toast-content {
  flex: 1;
  font-size: 14px;
  color: #333;
}

@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

.toast-close-btn {
  background: none;
  border: none;
  font-size: 16px;
  cursor: pointer;
  color: #999;
}

/* === pages/login.php === */

/* === pages/register.php === */
