/* ==========================================
   BeatBox 音乐酒吧 - 桌台预定系统样式
   ========================================== */

/* CSS Variables */
:root {
  /* Colors */
  --bg-dark: #0D0D0D;
  --bg-card: #1A1A2E;
  --bg-card-hover: #252542;
  --neon-pink: #FF2D78;
  --neon-blue: #00D4FF;
  --neon-purple: #9D4EDD;
  --neon-gold: #FFD700;
  --text-primary: #FFFFFF;
  --text-secondary: #B0B0B0;
  --text-muted: #666666;
  --success: #00FF88;
  --warning: #FF9500;
  --error: #FF3B30;

  /* Gradients */
  --gradient-neon: linear-gradient(135deg, #FF2D78, #9D4EDD, #00D4FF);
  --gradient-gold: linear-gradient(135deg, #FFD700, #FFA500);

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-xxl: 48px;

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Shadows */
  --shadow-neon-pink: 0 0 20px rgba(255, 45, 120, 0.5);
  --shadow-neon-blue: 0 0 20px rgba(0, 212, 255, 0.5);
  --shadow-neon-purple: 0 0 20px rgba(157, 78, 221, 0.5);

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
}

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  border: none;
  outline: none;
  background: none;
}

img {
  max-width: 100%;
  display: block;
}

ul, ol {
  list-style: none;
}

/* Utility Classes */
.container {
  width: 100%;
  max-width: 414px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.text-center {
  text-align: center;
}

.text-gradient {
  background: var(--gradient-neon);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ==========================================
   Navigation Bar
   ========================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: rgba(13, 13, 13, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 0 var(--space-md);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar-title {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 1px;
}

.navbar-back {
  position: absolute;
  left: var(--space-md);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--neon-blue);
  font-size: 24px;
}

/* ==========================================
   Page Layout
   ========================================== */
.page {
  padding-top: 56px;
  min-height: 100vh;
}

.page-content {
  padding: var(--space-lg) var(--space-md) var(--space-xxl);
}

/* ==========================================
   Hero Section
   ========================================== */
.hero {
  text-align: center;
  padding: var(--space-xl) 0;
}

.hero-logo {
  width: 80px;
  height: 80px;
  margin: 0 auto var(--space-md);
  background: var(--gradient-neon);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(255, 45, 120, 0.5), 0 0 40px rgba(157, 78, 221, 0.3);
  }
  50% {
    box-shadow: 0 0 30px rgba(255, 45, 120, 0.8), 0 0 60px rgba(157, 78, 221, 0.5);
  }
}

.hero-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: var(--space-sm);
  letter-spacing: 2px;
}

.hero-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  letter-spacing: 4px;
}

.hero-slogan {
  margin-top: var(--space-lg);
  font-size: 20px;
  color: var(--neon-pink);
  text-shadow: 0 0 10px rgba(255, 45, 120, 0.5);
  animation: flicker 3s ease-in-out infinite;
}

@keyframes flicker {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.8; }
  75% { opacity: 0.95; }
}

/* ==========================================
   Date Picker
   ========================================== */
.date-picker {
  display: flex;
  gap: var(--space-sm);
  overflow-x: auto;
  padding: var(--space-sm) 0;
  margin-bottom: var(--space-lg);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.date-picker::-webkit-scrollbar {
  display: none;
}

.date-item {
  flex-shrink: 0;
  min-width: 60px;
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-card);
  border-radius: var(--radius-md);
  text-align: center;
  cursor: pointer;
  transition: var(--transition-fast);
  border: 1px solid transparent;
}

.date-item:active {
  transform: scale(0.95);
}

.date-item.active {
  background: linear-gradient(135deg, rgba(255, 45, 120, 0.2), rgba(157, 78, 221, 0.2));
  border-color: var(--neon-pink);
  box-shadow: var(--shadow-neon-pink);
}

.date-item-day {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 2px;
}

.date-item-date {
  font-size: 18px;
  font-weight: 600;
}

.date-item-month {
  font-size: 10px;
  color: var(--text-muted);
}

.date-item.active .date-item-day,
.date-item.active .date-item-date,
.date-item.active .date-item-month {
  color: var(--neon-pink);
}

/* ==========================================
   Table Cards
   ========================================== */
.tables-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}

.table-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition-normal);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.table-card:active {
  transform: scale(0.98);
}

.table-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.table-card.vip {
  border: 1px solid rgba(255, 215, 0, 0.3);
}

.table-card.vip:hover {
  box-shadow: 0 10px 30px rgba(255, 215, 0, 0.2);
}

.table-card.disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.table-card.disabled:hover {
  transform: none;
  box-shadow: none;
}

.table-card.selected {
  border: 2px solid var(--neon-blue);
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}

.table-card-check {
  position: absolute;
  top: var(--space-sm);
  left: var(--space-sm);
  width: 24px;
  height: 24px;
  background: var(--neon-blue);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: white;
}

.multi-select-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

#selectedCount {
  font-size: 14px;
  font-weight: 600;
  color: var(--neon-blue);
}

#totalCapacity {
  font-size: 12px;
  color: var(--text-secondary);
}

.bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(13, 13, 13, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: var(--space-md);
  padding-bottom: calc(var(--space-md) + env(safe-area-inset-bottom, 0));
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.bottom-bar .multi-select-info {
  display: flex;
  justify-content: center;
  gap: 16px;
  font-size: 14px;
  color: var(--text-secondary);
  width: 100%;
}

.bottom-bar .multi-select-info span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.bottom-bar .btn {
  width: 100%;
  max-width: 414px;
  margin: 0 auto;
  display: block;
  text-align: center;
  padding: 14px 24px;
  font-size: 16px;
}

.table-card-image {
  height: 100px;
  background: linear-gradient(135deg, var(--bg-card-hover), var(--bg-card));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  position: relative;
}

.table-card-badge {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  padding: 2px 8px;
  background: var(--neon-gold);
  color: var(--bg-dark);
  font-size: 10px;
  font-weight: 700;
  border-radius: 4px;
}

.table-card-content {
  padding: var(--space-md);
}

.table-card-name {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: var(--space-xs);
}

.table-card-info {
  font-size: 12px;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.table-card-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: var(--space-sm);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}

.table-card-status.available {
  background: rgba(0, 255, 136, 0.15);
  color: var(--success);
}

.table-card-status.full {
  background: rgba(255, 59, 48, 0.15);
  color: var(--error);
}

.table-card-status.reserved {
  background: rgba(255, 149, 0, 0.15);
  color: var(--warning);
}

.table-card-status.occupied {
  background: rgba(157, 78, 221, 0.15);
  color: var(--neon-purple);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* ==========================================
   Filter Tabs
   ========================================== */
.filter-tabs {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.filter-tabs::-webkit-scrollbar {
  display: none;
}

.filter-tab {
  flex-shrink: 0;
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  font-size: 13px;
  color: var(--text-secondary);
  border: 1px solid transparent;
  transition: var(--transition-fast);
}

.filter-tab:active {
  transform: scale(0.95);
}

.filter-tab.active {
  background: rgba(0, 212, 255, 0.15);
  color: var(--neon-blue);
  border-color: var(--neon-blue);
}

/* ==========================================
   Detail Page
   ========================================== */
.detail-header {
  position: relative;
  height: 200px;
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 80px;
}

.detail-header-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-lg);
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
}

.detail-header-badge {
  display: inline-block;
  padding: 4px 12px;
  background: var(--neon-gold);
  color: var(--bg-dark);
  font-size: 12px;
  font-weight: 700;
  border-radius: 4px;
}

.detail-section {
  padding: var(--space-lg) 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.detail-section:last-child {
  border-bottom: none;
}

.detail-section-title {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.detail-info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}

.detail-info-item {
  background: var(--bg-card);
  padding: var(--space-md);
  border-radius: var(--radius-md);
}

.detail-info-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.detail-info-value {
  font-size: 16px;
  font-weight: 600;
}

.facilities-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.facility-tag {
  padding: 6px 12px;
  background: rgba(0, 212, 255, 0.1);
  color: var(--neon-blue);
  border-radius: var(--radius-xl);
  font-size: 12px;
}

/* ==========================================
   Time Slot Picker
   ========================================== */
.time-slots-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-sm);
}

.time-slot {
  padding: var(--space-md);
  background: var(--bg-card);
  border-radius: var(--radius-md);
  text-align: center;
  cursor: pointer;
  transition: var(--transition-fast);
  border: 1px solid transparent;
}

.time-slot:active {
  transform: scale(0.95);
}

.time-slot.active {
  background: rgba(255, 45, 120, 0.15);
  border-color: var(--neon-pink);
  box-shadow: var(--shadow-neon-pink);
}

.time-slot.full {
  opacity: 0.4;
  cursor: not-allowed;
}

.time-slot-time {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}

.time-slot-status {
  font-size: 11px;
  color: var(--text-muted);
}

.time-slot.active .time-slot-status {
  color: var(--neon-pink);
}

/* ==========================================
   Form Elements
   ========================================== */
.form-group {
  margin-bottom: var(--space-md);
}

.form-label {
  display: block;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
}

.form-input {
  width: 100%;
  padding: var(--space-md);
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 16px;
  transition: var(--transition-fast);
}

.form-input:focus {
  border-color: var(--neon-blue);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.2);
}

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

.form-input.error {
  border-color: var(--error);
}

.form-error {
  font-size: 12px;
  color: var(--error);
  margin-top: var(--space-xs);
}

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

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23B0B0B0' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}

/* ==========================================
   Buttons
   ========================================== */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  width: 100%;
  padding: var(--space-md) var(--space-lg);
  font-size: 16px;
  font-weight: 600;
  border-radius: var(--radius-lg);
  transition: var(--transition-normal);
}

.btn-primary {
  background: var(--gradient-neon);
  color: white;
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: 0.5s;
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary:disabled::before {
  display: none;
}

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

.btn-secondary:active {
  background: var(--bg-card-hover);
}

.btn-ghost {
  color: var(--neon-blue);
}

.btn-ghost:active {
  background: rgba(0, 212, 255, 0.1);
}

/* ==========================================
   Success Page
   ========================================== */
.success-animation {
  width: 120px;
  height: 120px;
  margin: var(--space-xxl) auto var(--space-xl);
  background: var(--gradient-neon);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 60px;
  animation: success-pulse 1s ease-out;
}

@keyframes success-pulse {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.success-title {
  font-size: 24px;
  font-weight: 700;
  text-align: center;
  margin-bottom: var(--space-sm);
}

.success-message {
  font-size: 14px;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: var(--space-xl);
}

.reservation-summary {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.reservation-item {
  display: flex;
  justify-content: space-between;
  padding: var(--space-sm) 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.reservation-item:last-child {
  border-bottom: none;
}

.reservation-label {
  color: var(--text-secondary);
  font-size: 14px;
}

.reservation-value {
  font-size: 14px;
  font-weight: 600;
}

.reservation-code {
  font-family: monospace;
  color: var(--neon-blue);
  font-size: 18px;
  letter-spacing: 2px;
}

/* ==========================================
   Empty State
   ========================================== */
.empty-state {
  text-align: center;
  padding: var(--space-xxl) 0;
}

.empty-state-icon {
  font-size: 60px;
  margin-bottom: var(--space-md);
  opacity: 0.5;
}

.empty-state-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.empty-state-text {
  font-size: 14px;
  color: var(--text-secondary);
}

/* ==========================================
   Loading
   ========================================== */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-xxl);
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--bg-card);
  border-top-color: var(--neon-pink);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* ==========================================
   Toast / Alert
   ========================================== */
.toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--bg-card);
  color: white;
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-lg);
  font-size: 14px;
  opacity: 0;
  transition: var(--transition-normal);
  z-index: 2000;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

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

.toast.success {
  border-color: var(--success);
}

.toast.error {
  border-color: var(--error);
}

/* ==========================================
   Bottom Action Bar
   ========================================== */
.bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(13, 13, 13, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: var(--space-md);
  padding-bottom: calc(var(--space-md) + env(safe-area-inset-bottom, 0));
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 100;
}

.bottom-bar .btn {
  max-width: 414px;
  margin: 0 auto;
}

/* ==========================================
   Animations
   ========================================== */
.fade-in {
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.slide-up {
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================
   WeChat specific fixes
   ========================================== */
body {
  /* Prevent pull-to-refresh */
  overscroll-behavior: none;
  /* Prevent long press context menu */
  -webkit-touch-callout: none;
  /* Disable text selection */
  -webkit-user-select: none;
  user-select: none;
}

/* WeChat scroll fix */
.page-content {
  -webkit-overflow-scrolling: touch;
}