/* ==========================================================================
   CALISTHENICS CLUB (街头健身俱乐部) - MODERN ATHLETIC DESIGN SYSTEM
   Optimized for Mobile, WeChat In-App Browser & Desktop.
   ZERO external font or CDN dependencies.
   ========================================================================== */

:root {
  --bg-main: #0c111d;
  --bg-card: #151d30;
  --bg-card-hover: #1b253d;
  --bg-input: #0e1626;
  --border-color: #24324f;
  --border-focus: #3b82f6;

  --accent-blue: #3b82f6;
  --accent-cyan: #06b6d4;
  --accent-green: #10b981;
  --accent-orange: #f59e0b;
  --accent-danger: #ef4444;

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-white: #ffffff;

  --font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --shadow-card: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.4);
  --shadow-btn: 0 4px 14px 0 rgba(59, 130, 246, 0.39);
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

/* Background subtle ambient athletic glow */
.ambient-bg {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
  background: 
    radial-gradient(circle at 15% 15%, rgba(59, 130, 246, 0.12) 0%, transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(16, 185, 129, 0.08) 0%, transparent 45%),
    var(--bg-main);
  pointer-events: none;
}

/* Main Container */
.container {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  padding: 20px 16px 40px;
}

.container-wide {
  max-width: 1100px;
}

/* Header & Branding */
.club-header {
  text-align: center;
  margin-bottom: 24px;
  padding-top: 10px;
}

.badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.club-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-white);
  letter-spacing: -0.5px;
  margin-bottom: 6px;
  line-height: 1.25;
}

.club-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 400;
}

/* Card Container */
.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(8px);
}

/* Form Styles */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.form-label .sub {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted);
  margin-left: 4px;
}

.required-star {
  color: #f43f5e;
  margin-left: 2px;
}

.form-control {
  width: 100%;
  padding: 12px 14px;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 16px; /* Prevents auto-zoom in mobile Safari & WeChat */
  transition: all 0.2s ease-in-out;
  outline: none;
}

.form-control::placeholder {
  color: var(--text-muted);
  font-size: 14px;
}

.form-control:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  padding-right: 40px;
}

select.form-control option {
  background-color: var(--bg-card);
  color: var(--text-primary);
}

textarea.form-control {
  resize: vertical;
  min-height: 80px;
}

.helper-text {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 5px;
}

/* Radio / Pill Selector for Gender */
.pill-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.pill-option {
  position: relative;
}

.pill-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.pill-label {
  display: block;
  text-align: center;
  padding: 10px 8px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.pill-option input[type="radio"]:checked + .pill-label {
  background: rgba(59, 130, 246, 0.15);
  border-color: var(--accent-blue);
  color: #93c5fd;
  font-weight: 600;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  border-radius: var(--radius-md);
  padding: 14px 20px;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all 0.2s ease;
  width: 100%;
}

.btn-primary {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: #ffffff;
  box-shadow: var(--shadow-btn);
}

.btn-primary:hover, .btn-primary:active {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  transform: translateY(-1px);
}

.btn-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px 0 rgba(16, 185, 129, 0.35);
}

.btn-success:hover, .btn-success:active {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.btn-secondary {
  background-color: var(--border-color);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background-color: #334468;
}

/* Alert Notification */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 14px;
  margin-bottom: 20px;
  display: none;
}

.alert-danger {
  background-color: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

/* Success Card */
.success-card {
  text-align: center;
  padding: 36px 20px;
}

.success-icon-wrap {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.15);
  border: 2px solid var(--accent-green);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  color: var(--accent-green);
}

.qr-box {
  background-color: #ffffff;
  border-radius: var(--radius-md);
  padding: 16px;
  display: inline-block;
  margin: 20px auto;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.qr-box img, .qr-box svg {
  display: block;
  width: 200px;
  height: 200px;
  margin: 0 auto;
}

.wechat-step-box {
  background: var(--bg-input);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Admin Dashboard Specifics */
.admin-navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.admin-title-wrap h1 {
  font-size: 22px;
  font-weight: 700;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px 20px;
}

.metric-label {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.metric-value {
  font-size: 32px;
  font-weight: 800;
  color: var(--text-white);
  line-height: 1;
}

.metric-sub {
  font-size: 12px;
  color: var(--accent-green);
  margin-top: 6px;
}

.admin-toolbar {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.search-input-wrap {
  flex: 1;
  min-width: 240px;
  position: relative;
}

.table-responsive {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
  white-space: nowrap;
}

.data-table th {
  background: #19243a;
  color: var(--text-secondary);
  font-weight: 600;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-color);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.5px;
}

.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
}

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

.data-table tbody tr:hover {
  background-color: var(--bg-card-hover);
}

.level-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}

.level-beginner {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}

.level-intermediate {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
}

.level-advanced {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
}

/* Footer */
.club-footer {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: auto;
  padding: 24px 16px 16px;
}

/* Loading Spinner */
.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 0.8s ease-in-out infinite;
}

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

@media (max-width: 640px) {
  .container {
    padding: 14px 12px 30px;
  }
  .card {
    padding: 20px 16px;
  }
  .club-title {
    font-size: 22px;
  }
  .pill-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .pill-label {
    padding: 8px 4px;
    font-size: 12px;
  }
}

/* Checkbox and Safety Agreement Styles */
.checkbox-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  cursor: pointer;
  margin-top: 14px;
}

.checkbox-card input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--accent-blue);
  cursor: pointer;
  flex-shrink: 0;
}

.checkbox-card .checkbox-text {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-secondary);
}

.checkbox-card .checkbox-text strong {
  color: var(--text-primary);
}

.time-slots-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.time-checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.time-checkbox-label:hover {
  background: var(--bg-card-hover);
}

.time-checkbox-label input[type="checkbox"] {
  accent-color: var(--accent-blue);
  width: 16px;
  height: 16px;
}

/* ==========================================================================
   Orderly Section Dividers & Elegant Bilingual Label Hierarchy
   ========================================================================== */

.lang-switch-wrap {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 16px;
}

.lang-toggle {
  display: inline-flex;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 3px;
  gap: 2px;
}

.lang-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s ease;
}

.lang-btn.active {
  background: var(--accent-blue);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
}

.form-section {
  background: rgba(14, 22, 38, 0.5);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px 16px;
  margin-bottom: 22px;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(36, 50, 79, 0.7);
}

.section-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.4);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
}

.section-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-white);
  letter-spacing: 0.3px;
}

.section-sub {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 400;
  margin-left: 6px;
}

.form-label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 7px;
}

.label-zh {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.label-en {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted);
}

/* Honeypot field (hidden from humans, traps bots) */
.hp-field {
  display: none !important;
  visibility: hidden !important;
  position: absolute !important;
  left: -9999px !important;
}

/* ==========================================================================
   WeChat In-App Browser (MicroMessenger) Optimizations & Guide System
   ========================================================================== */

.wechat-notice-bar {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.98), rgba(15, 23, 42, 0.98));
  border: 1px solid rgba(59, 130, 246, 0.45);
  border-radius: var(--radius-md);
  margin-bottom: 18px;
  padding: 12px 14px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.wechat-notice-inner {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wechat-notice-text {
  font-size: 13px;
  line-height: 1.5;
  color: #e2e8f0;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.wechat-badge {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.wechat-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-wechat-action {
  font-size: 12px;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  border: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-wechat-action.primary {
  background: var(--accent-blue);
  color: #ffffff;
}

.btn-wechat-action.secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  border: 1px solid var(--border-color);
}

.btn-wechat-action:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* WeChat Full-Screen Top-Right Arrow Guide Overlay */
.wechat-guide-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 999999;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  cursor: pointer;
}

.wechat-guide-box {
  width: 100%;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  margin-top: 8px;
}

.wechat-arrow-wrap {
  margin-right: 22px;
  animation: floatArrow 1.5s infinite ease-in-out;
}

@keyframes floatArrow {
  0%, 100% { transform: translateY(0) translateX(0); }
  50% { transform: translateY(-8px) translateX(6px); }
}

.wechat-instructions {
  background: rgba(30, 41, 59, 0.98);
  border: 1px solid rgba(56, 189, 248, 0.5);
  border-radius: 14px;
  padding: 20px;
  width: 100%;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.8);
  text-align: left;
}

.guide-step {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  font-size: 14px;
  color: #f1f5f9;
}

.step-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent-blue);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.guide-hint {
  margin-top: 14px;
  font-size: 12px;
  color: #94a3b8;
  text-align: center;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
  padding-top: 10px;
}

/* Floating Toast Notification */
.toast-notice {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #1e293b;
  color: #f8fafc;
  border: 1px solid var(--accent-blue);
  padding: 12px 20px;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 10px 25px rgba(0,0,0,0.6);
  z-index: 1000000;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 90%;
  text-align: center;
}

.toast-notice.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
