/* ===== 登录/注册/个人中心/上传 样式 - PBS Kids 升级版 ===== */

/* 登录/注册卡片 */
.auth-box {
  max-width: 440px;
  margin: 60px auto;
  background: white;
  border-radius: var(--radius-xl);
  padding: 44px 40px;
  box-shadow: var(--shadow-card);
  text-align: center;
  animation: bounce-in 0.6s ease-out;
  border: 3px solid rgba(255, 107, 53, 0.1);
  position: relative;
  overflow: hidden;
}

.auth-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--primary), var(--yellow), var(--blue), var(--green));
}

.auth-tabs {
  display: flex;
  background: #f5f5f5;
  border-radius: var(--radius-full);
  padding: 5px;
  margin-bottom: 32px;
}

.auth-tab {
  flex: 1;
  padding: 12px;
  border: none;
  background: transparent;
  border-radius: var(--radius-full);
  font-size: 1rem;
  cursor: pointer;
  color: #888;
  font-weight: 700;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.auth-tab.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  font-weight: 800;
  box-shadow: 0 4px 12px var(--primary-glow);
  transform: scale(1.02);
}

.auth-tab:hover:not(.active) {
  color: var(--primary);
  background: rgba(255, 107, 53, 0.05);
}

.auth-box h2 {
  font-size: 1.8rem;
  margin-bottom: 8px;
  color: var(--text-dark);
  font-weight: 900;
}

.subtitle {
  color: #aaa;
  margin-bottom: 28px;
  font-size: 1rem;
  font-weight: 500;
}

.input-field {
  width: 100%;
  padding: 16px 20px;
  border: 3px solid #eee;
  border-radius: var(--radius);
  font-size: 1rem;
  margin-bottom: 16px;
  outline: none;
  transition: all 0.3s;
  background: #fafafa;
  font-weight: 500;
  font-family: inherit;
}

.input-field:focus {
  border-color: var(--primary);
  background: white;
  box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.1);
}

.textarea-field {
  min-height: 100px;
  resize: vertical;
  border-radius: var(--radius-sm);
}

select.input-field {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23636e72' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

.auth-box .btn-primary,
.upload-box .btn-primary {
  width: 100%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  border: none;
  padding: 16px;
  border-radius: var(--radius-full);
  font-size: 1.1rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 4px 15px var(--primary-glow);
  margin-top: 8px;
}

.auth-box .btn-primary:hover,
.upload-box .btn-primary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 25px var(--primary-glow);
}

.auth-box .btn-primary:active,
.upload-box .btn-primary:active {
  transform: translateY(0) scale(0.98);
}

.auth-box .btn-primary:disabled,
.upload-box .btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background: #f0f0f0;
  color: #555;
  border: none;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-secondary:hover {
  background: #e0e0e0;
  transform: translateY(-2px);
}

.error-msg {
  color: var(--red);
  font-size: 0.9rem;
  margin-bottom: 12px;
  min-height: 20px;
  font-weight: 600;
}

/* 个人中心 */
.container {
  max-width: 900px;
  margin: 36px auto;
  padding: 0 24px;
}

.profile-header {
  background: white;
  border-radius: var(--radius-xl);
  padding: 36px;
  display: flex;
  align-items: center;
  gap: 28px;
  margin-bottom: 32px;
  box-shadow: var(--shadow-card);
  border: 3px solid rgba(255, 107, 53, 0.08);
  position: relative;
  overflow: hidden;
}

.profile-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--primary), var(--blue), var(--green));
}

.avatar {
  width: 96px;
  height: 96px;
  background: linear-gradient(135deg, #ffe0cc, #ffd700);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  flex-shrink: 0;
  border: 4px solid var(--primary-light);
  animation: float 3s ease-in-out infinite;
}

.profile-info h1 {
  font-size: 1.8rem;
  margin-bottom: 10px;
  font-weight: 900;
}

.coin-badge {
  background: linear-gradient(135deg, #fff8e1, #fff3cd);
  border: 3px solid #ffd700;
  color: #333;
  padding: 8px 20px;
  border-radius: var(--radius-full);
  font-weight: 800;
  display: inline-block;
  margin-bottom: 14px;
  font-size: 0.95rem;
}

.profile-actions {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}

.profile-actions .btn-primary {
  width: auto;
  padding: 12px 28px;
  border-radius: var(--radius-full);
  font-size: 0.95rem;
  font-weight: 800;
  color: white;
  box-shadow: 0 4px 12px var(--primary-glow);
  transition: all 0.3s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.profile-actions .btn-primary:hover {
  transform: translateY(-3px) scale(1.05);
}

.tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.tab {
  padding: 12px 28px;
  border-radius: var(--radius-full);
  border: 3px solid var(--primary);
  color: var(--primary);
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 700;
  background: white;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.tab:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--primary-glow);
}

.tab.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  font-weight: 800;
  border-color: transparent;
  box-shadow: 0 4px 15px var(--primary-glow);
}

.tab-content {
  background: white;
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.empty-tip {
  color: #aaa;
  text-align: center;
  padding: 40px;
  font-size: 1.1rem;
  font-weight: 600;
}

.empty-tip a {
  color: var(--primary);
  font-weight: 800;
  text-decoration: underline;
}

/* 我的游戏列表 */
.my-games-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.my-game-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: #f9f9f9;
  border-radius: var(--radius-sm);
  transition: all 0.3s;
}

.my-game-item:hover {
  background: #f0f0f0;
  transform: translateX(4px);
}

.my-game-name {
  font-weight: 700;
  font-size: 15px;
}

.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
}

.status-badge.online {
  background: linear-gradient(135deg, #d4edda, #c3e6cb);
  color: #155724;
}

.status-badge.pending {
  background: linear-gradient(135deg, #fff3cd, #ffeeba);
  color: #856404;
}

/* ===== 上传页面 ===== */
.upload-box {
  max-width: 600px;
  margin: 40px auto;
  background: white;
  border-radius: var(--radius-xl);
  padding: 44px 40px;
  box-shadow: var(--shadow-card);
  animation: bounce-in 0.6s ease-out;
  border: 3px solid rgba(255, 107, 53, 0.1);
  position: relative;
  overflow: hidden;
}

.upload-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--blue), var(--green), var(--primary));
}

.upload-box h1 {
  font-size: 1.8rem;
  font-weight: 900;
  text-align: center;
  margin-bottom: 8px;
}

.upload-form {
  margin-top: 28px;
}

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

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.file-upload-area {
  border: 3px dashed #ddd;
  border-radius: var(--radius-lg);
  padding: 30px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  background: #fafafa;
}

.file-upload-area:hover {
  border-color: var(--primary);
  background: rgba(255, 107, 53, 0.02);
}

.file-upload-area .upload-icon {
  font-size: 40px;
  margin-bottom: 10px;
}

.file-upload-area p {
  font-size: 14px;
  color: var(--text-light);
  font-weight: 600;
}

.file-upload-area .upload-hint {
  font-size: 12px;
  color: #bbb;
  margin-top: 4px;
}

.file-name-display {
  margin-top: 8px;
  font-size: 14px;
  color: var(--green);
  font-weight: 700;
}

/* 进度条 */
.progress-bar {
  background: #f0f0f0;
  border-radius: var(--radius-full);
  height: 36px;
  position: relative;
  overflow: hidden;
  margin-bottom: 16px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: var(--radius-full);
  transition: width 0.3s;
  width: 0%;
}

.progress-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-dark);
}

/* 管理后台 Tab */
.admin-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.admin-tab {
  padding: 12px 28px;
  border-radius: var(--radius-full);
  border: 3px solid var(--primary);
  color: var(--primary);
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 700;
  background: white;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.admin-tab:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--primary-glow);
}

.admin-tab.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  font-weight: 800;
  border-color: transparent;
  box-shadow: 0 4px 15px var(--primary-glow);
}

/* 响应式 */
@media (max-width: 768px) {
  .auth-box,
  .upload-box {
    margin: 30px 16px;
    padding: 32px 24px;
  }
  
  .profile-header {
    flex-direction: column;
    text-align: center;
    padding: 28px;
  }
  
  .profile-actions {
    justify-content: center;
  }
  
  .tabs {
    justify-content: center;
  }

  .admin-tabs {
    flex-wrap: wrap;
    justify-content: center;
  }
}
