/* ========================================
 * 豁出去小游戏厅 - 共用样式
 * ======================================== */

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: #e8e8f0;
  -webkit-font-smoothing: antialiased;
}

body {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  min-height: 100vh;
  color: #e8e8f0;
}

/* ----- 品牌色 ----- */
:root {
  --brand-primary: #ffb347;
  --brand-secondary: #ff6b6b;
  --brand-success: #6fcf97;
  --brand-danger: #ff8b94;
  --brand-info: #6bb5ff;
  --bg-card: rgba(255, 255, 255, 0.05);
  --bg-card-hover: rgba(255, 255, 255, 0.08);
  --border-soft: rgba(255, 255, 255, 0.1);
  --text-primary: #e8e8f0;
  --text-secondary: #a0a0b8;
  --text-tertiary: #606078;
}

/* ----- 通用卡片 ----- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 32px 28px;
  backdrop-filter: blur(10px);
}

/* ----- 页面容器 ----- */
.page-wrapper {
  min-height: 100vh;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.page-wrapper.start {
  justify-content: flex-start;
  padding-top: 40px;
}

/* ----- Logo ----- */
.brand-logo {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: 2px;
  background: linear-gradient(90deg, var(--brand-primary), var(--brand-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-align: center;
  margin-bottom: 4px;
}

.brand-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  text-align: center;
  letter-spacing: 1px;
  margin-bottom: 28px;
}

/* ----- 表单 ----- */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 6px;
  font-weight: 500;
}

.form-group .required {
  color: var(--brand-secondary);
  margin-left: 2px;
}

.input, .form-input {
  width: 100%;
  padding: 12px 14px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s;
}

.input:focus, .form-input:focus {
  border-color: var(--brand-primary);
}

.input::placeholder, .form-input::placeholder {
  color: var(--text-tertiary);
}

/* 生日两栏布局 */
.form-row {
  display: flex;
  gap: 12px;
}

.form-row .form-group {
  flex: 1;
}

.form-hint {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 4px;
}

.form-error {
  font-size: 12px;
  color: var(--brand-danger);
  margin-top: 4px;
}

/* ----- 按钮 ----- */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.1s, opacity 0.15s;
  text-decoration: none;
  text-align: center;
  font-family: inherit;
}

.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary {
  background: linear-gradient(90deg, var(--brand-primary), var(--brand-secondary));
  color: #fff;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border: 1px solid var(--border-soft);
}

.btn-block { display: block; width: 100%; }

.btn-link {
  background: transparent;
  color: var(--brand-primary);
  padding: 4px 0;
}

/* ----- 提示横幅 ----- */
.alert {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 16px;
}

.alert-success {
  background: rgba(76, 175, 80, 0.15);
  border: 1px solid rgba(76, 175, 80, 0.3);
  color: var(--brand-success);
}

.alert-error {
  background: rgba(244, 67, 54, 0.15);
  border: 1px solid rgba(244, 67, 54, 0.3);
  color: var(--brand-danger);
}

.alert-info {
  background: rgba(33, 150, 243, 0.12);
  border: 1px solid rgba(33, 150, 243, 0.25);
  color: var(--brand-info);
}

/* ----- 安全声明框 ----- */
.security-notice {
  background: rgba(33, 150, 243, 0.06);
  border: 1px solid rgba(33, 150, 243, 0.2);
  border-radius: 10px;
  padding: 14px 16px;
  margin-top: 16px;
  margin-bottom: 16px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--text-secondary);
}

.security-notice .notice-title {
  color: var(--brand-info);
  font-weight: 600;
  margin-bottom: 8px;
}

.security-notice p {
  margin-bottom: 8px;
}

.security-notice strong {
  color: var(--text-primary);
}

/* ----- 顶栏 ----- */
.top-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: rgba(26, 26, 46, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-soft);
}

.top-bar .title {
  font-size: 17px;
  font-weight: 600;
  background: linear-gradient(90deg, var(--brand-primary), var(--brand-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.top-bar .actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.top-bar .user-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-soft);
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
}

.top-bar .user-pill:hover { background: rgba(255, 255, 255, 0.1); }

/* ----- 移动端适配 ----- */
@media (max-width: 480px) {
  .card {
    padding: 24px 20px;
  }
  .brand-logo {
    font-size: 28px;
  }
}

/* ----- 工具类 ----- */
.text-center { text-align: center; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.hidden { display: none !important; }

.link {
  color: var(--brand-primary);
  text-decoration: none;
  cursor: pointer;
}
.link:hover { text-decoration: underline; }

/* 加载指示器 */
.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,0.2);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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