/* ============================
   AI Hairstyle Stylist - Global Styles
   Dark Theme + Champagne Gold Accent
   ============================ */

/* CSS Variables */
:root {
  --bg-primary: #0D0D0D;
  --bg-secondary: #1A1A1A;
  --bg-card: #262626;
  --bg-card-hover: #333333;
  --bg-input: #1E1E1E;
  --bg-overlay: rgba(0, 0, 0, 0.7);
  --text-primary: #FFFFFF;
  --text-secondary: #999999;
  --text-tertiary: #666666;
  --accent-gold: #D4AF37;
  --accent-gold-light: #E5C348;
  --accent-gold-dark: #B8941F;
  --accent-gold-bg: rgba(212, 175, 55, 0.12);
  --border-color: #2A2A2A;
  --border-light: #383838;
  --success: #4CAF50;
  --danger: #FF4757;
  --warning: #FFA502;
  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.3);
  --shadow-float: 0 8px 32px rgba(0, 0, 0, 0.4);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', sans-serif;
}

/* Reset */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-family);
  background: #000;
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 20px 0;
}

/* Phone Frame */
.phone-frame {
  width: 430px;
  min-height: 932px;
  background: var(--bg-primary);
  border-radius: 44px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 0 0 4px #333, 0 0 60px rgba(0, 0, 0, 0.5);
}

/* Status Bar */
.status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 32px 8px;
  font-size: 15px;
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-primary);
}

.status-bar .time { font-weight: 700; }

.status-bar .icons {
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-bar .icons svg { width: 18px; height: 18px; fill: #fff; }

/* Scrollable Content */
.page-content {
  height: calc(932px - 44px - 70px);
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.page-content::-webkit-scrollbar { display: none; }

/* ---- App Header ---- */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 20px 12px;
}

.app-header .title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.app-header .avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
}

/* ---- Gender Toggle ---- */
.gender-toggle {
  display: flex;
  background: var(--bg-card);
  border-radius: var(--radius-full);
  padding: 4px;
  margin: 0 20px 16px;
}

.gender-toggle .toggle-btn {
  flex: 1;
  padding: 10px 0;
  text-align: center;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  background: transparent;
  color: var(--text-secondary);
}

.gender-toggle .toggle-btn.active {
  background: var(--accent-gold);
  color: #000;
  box-shadow: 0 2px 12px rgba(212, 175, 55, 0.3);
}

/* ---- Category Tabs ---- */
.category-tabs {
  display: flex;
  gap: 8px;
  padding: 0 20px 16px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

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

.category-tab {
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid var(--border-light);
  background: transparent;
  color: var(--text-secondary);
}

.category-tab.active {
  background: var(--text-primary);
  color: #000;
  border-color: var(--text-primary);
  font-weight: 600;
}

.category-tab:hover:not(.active) {
  border-color: var(--text-secondary);
  color: var(--text-primary);
}

/* ---- Waterfall Grid ---- */
.waterfall-grid {
  column-count: 2;
  column-gap: 12px;
  padding: 0 16px;
}

.hairstyle-card {
  break-inside: avoid;
  margin-bottom: 12px;
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.hairstyle-card:hover { transform: scale(0.98); }

.hairstyle-card img {
  width: 100%;
  display: block;
  border-radius: var(--radius-md);
}

.hairstyle-card .card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px 14px 14px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.hairstyle-card .card-name {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}

.hairstyle-card .card-tags {
  display: flex;
  gap: 4px;
  margin-top: 4px;
}

.hairstyle-card .card-tag {
  font-size: 10px;
  padding: 2px 8px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-full);
  color: rgba(255, 255, 255, 0.7);
}

.hairstyle-card .card-heart {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  transition: var(--transition);
}

.hairstyle-card .card-heart:hover { background: rgba(212, 175, 55, 0.4); }
.hairstyle-card .card-heart.liked { background: var(--danger); }

/* ---- Bottom Nav ---- */
.bottom-nav {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 10px 0 28px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  z-index: 100;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  color: var(--text-tertiary);
  position: relative;
}

.nav-item.active { color: var(--accent-gold); }

.nav-item .nav-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.nav-item .nav-label {
  font-size: 10px;
  font-weight: 500;
}

.nav-item.center-btn .nav-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-gold);
  color: #000;
  font-size: 18px;
  margin-top: -4px;
}

/* ---- Detail Modal ---- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-overlay);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal-sheet {
  width: 430px;
  max-height: 85vh;
  background: var(--bg-secondary);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  overflow: hidden;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active .modal-sheet {
  transform: translateY(0);
}

.modal-handle {
  width: 40px;
  height: 4px;
  background: var(--border-light);
  border-radius: 2px;
  margin: 12px auto;
}

.modal-image {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
}

.modal-body {
  padding: 20px;
}

.modal-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
}

.modal-desc {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 16px;
}

.modal-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.tag {
  padding: 6px 14px;
  background: var(--bg-card);
  border-radius: var(--radius-full);
  font-size: 12px;
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
}

/* ---- Gold Button ---- */
.btn-gold {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-dark));
  color: #000;
  font-size: 16px;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-xl);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-gold:hover {
  background: linear-gradient(135deg, var(--accent-gold-light), var(--accent-gold));
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(212, 175, 55, 0.3);
}

.btn-gold:active { transform: translateY(0); }

.btn-outline {
  width: 100%;
  padding: 14px;
  background: transparent;
  color: var(--accent-gold);
  font-size: 14px;
  font-weight: 600;
  border: 1.5px solid var(--accent-gold);
  border-radius: var(--radius-xl);
  cursor: pointer;
  transition: var(--transition);
}

.btn-outline:hover {
  background: var(--accent-gold-bg);
}

.btn-dark {
  padding: 14px 28px;
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  cursor: pointer;
  transition: var(--transition);
}

/* ---- Studio Page ---- */
.step-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  gap: 0;
}

.step {
  display: flex;
  align-items: center;
  gap: 0;
}

.step-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  background: var(--bg-card);
  color: var(--text-tertiary);
  border: 2px solid var(--border-light);
  transition: var(--transition);
}

.step-circle.active {
  background: var(--accent-gold);
  color: #000;
  border-color: var(--accent-gold);
}

.step-circle.completed {
  background: var(--accent-gold);
  color: #000;
  border-color: var(--accent-gold);
}

.step-line {
  width: 60px;
  height: 2px;
  background: var(--border-light);
  margin: 0 4px;
}

.step-line.active {
  background: var(--accent-gold);
}

.step-label {
  font-size: 11px;
  color: var(--text-tertiary);
  text-align: center;
  margin-top: 6px;
}

.step-label.active {
  color: var(--accent-gold);
}

/* Source Selection */
.source-cards {
  display: flex;
  gap: 12px;
  padding: 0 20px;
  margin-bottom: 24px;
}

.source-card {
  flex: 1;
  padding: 24px 16px;
  background: var(--bg-card);
  border: 2px solid var(--border-light);
  border-radius: var(--radius-md);
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
}

.source-card:hover, .source-card.selected {
  border-color: var(--accent-gold);
  background: var(--accent-gold-bg);
}

.source-card .source-icon {
  font-size: 36px;
  margin-bottom: 12px;
}

.source-card .source-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}

.source-card .source-desc {
  font-size: 11px;
  color: var(--text-tertiary);
}

/* Upload Area */
.upload-area {
  margin: 0 20px 20px;
  padding: 48px 20px;
  border: 2px dashed var(--border-light);
  border-radius: var(--radius-lg);
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.upload-area:hover {
  border-color: var(--accent-gold);
  background: var(--accent-gold-bg);
}

.upload-area .upload-icon {
  font-size: 48px;
  margin-bottom: 12px;
  color: var(--text-tertiary);
}

.upload-area .upload-text {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.upload-area .upload-hint {
  font-size: 12px;
  color: var(--text-tertiary);
}

.upload-area.has-image {
  padding: 0;
  border-style: solid;
  border-color: var(--accent-gold);
}

.upload-area.has-image img {
  width: 100%;
  display: block;
  border-radius: calc(var(--radius-lg) - 2px);
}

.face-lock-badge {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  padding: 8px 16px;
  background: rgba(76, 175, 80, 0.9);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  backdrop-filter: blur(8px);
}

.face-box {
  position: absolute;
  border: 2px solid var(--success);
  border-radius: var(--radius-xs);
  box-shadow: 0 0 12px rgba(76, 175, 80, 0.3);
  pointer-events: none;
}

/* Confirm Section */
.confirm-section {
  padding: 0 20px;
}

.confirm-row {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.confirm-img {
  flex: 1;
  aspect-ratio: 3/4;
  border-radius: var(--radius-sm);
  overflow: hidden;
  position: relative;
}

.confirm-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.confirm-img .label {
  position: absolute;
  bottom: 8px;
  left: 8px;
  padding: 4px 10px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: var(--radius-full);
  font-size: 11px;
  backdrop-filter: blur(4px);
}

.cost-info {
  text-align: center;
  padding: 16px;
  background: var(--accent-gold-bg);
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
}

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

.cost-info .cost-value {
  font-size: 24px;
  font-weight: 800;
  color: var(--accent-gold);
}

.cost-info .cost-unit {
  font-size: 14px;
  color: var(--accent-gold);
}

/* ---- Generating Animation ---- */
.generating-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: calc(932px - 44px);
  padding: 40px;
  text-align: center;
}

.generating-animation {
  width: 200px;
  height: 200px;
  position: relative;
  margin-bottom: 32px;
}

.hair-strand {
  position: absolute;
  width: 3px;
  background: linear-gradient(to bottom, var(--accent-gold), transparent);
  border-radius: 2px;
  animation: growHair 2s ease-in-out infinite;
  transform-origin: top center;
}

@keyframes growHair {
  0% { height: 0; opacity: 0; }
  50% { height: 80px; opacity: 1; }
  100% { height: 120px; opacity: 0; }
}

.generating-text {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.generating-subtext {
  font-size: 13px;
  color: var(--text-tertiary);
}

.progress-dots {
  display: flex;
  gap: 8px;
  margin-top: 24px;
}

.progress-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-gold);
  animation: pulse 1.4s ease-in-out infinite;
}

.progress-dot:nth-child(2) { animation-delay: 0.2s; }
.progress-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes pulse {
  0%, 80%, 100% { opacity: 0.3; transform: scale(0.8); }
  40% { opacity: 1; transform: scale(1); }
}

/* ---- Result Page ---- */
.result-container {
  position: relative;
  margin: 0 20px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 3/4;
  touch-action: none;
}

.result-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.result-image.before { z-index: 1; }

.result-image.after {
  z-index: 2;
  clip-path: inset(0 0 0 50%);
}

.slider-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 4px;
  background: #fff;
  z-index: 3;
  cursor: ew-resize;
  transform: translateX(-50%);
}

.slider-handle::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  background: #fff;
  border-radius: 50%;
  box-shadow: var(--shadow-float);
  display: flex;
  align-items: center;
  justify-content: center;
}

.slider-label {
  position: absolute;
  top: 16px;
  z-index: 4;
  padding: 4px 12px;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
}

.slider-label.before { left: 16px; }
.slider-label.after { right: 16px; }

/* Action Bar */
.action-bar {
  display: flex;
  justify-content: space-around;
  padding: 20px;
  margin: 16px 20px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
}

.action-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: var(--transition);
  background: none;
  border: none;
  color: var(--text-secondary);
}

.action-item:hover { color: var(--accent-gold); }

.action-item .action-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.action-item .action-label {
  font-size: 11px;
  font-weight: 500;
}

/* ---- Profile Page ---- */
.profile-header {
  text-align: center;
  padding: 20px 20px 0;
}

.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-dark));
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  border: 3px solid var(--accent-gold);
}

.profile-name {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
}

.profile-id {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-bottom: 16px;
}

.points-display {
  padding: 20px;
  margin: 0 20px 20px;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.15), rgba(212, 175, 55, 0.05));
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.points-info .points-value {
  font-size: 36px;
  font-weight: 800;
  color: var(--accent-gold);
  line-height: 1;
}

.points-info .points-unit {
  font-size: 14px;
  color: var(--accent-gold);
  margin-left: 4px;
}

.btn-recharge {
  padding: 10px 24px;
  background: var(--accent-gold);
  color: #000;
  font-size: 14px;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition);
}

.btn-recharge:hover {
  background: var(--accent-gold-light);
}

/* Profile Tabs */
.profile-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  margin: 0 20px;
}

.profile-tab {
  flex: 1;
  padding: 12px 0;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: var(--transition);
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
}

.profile-tab.active {
  color: var(--text-primary);
  border-bottom-color: var(--accent-gold);
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 16px 20px;
}

.work-item {
  aspect-ratio: 1;
  border-radius: var(--radius-xs);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s;
}

.work-item:hover { transform: scale(0.96); }

.work-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Invite Banner */
.invite-banner {
  margin: 16px 20px;
  padding: 16px;
  background: linear-gradient(135deg, var(--accent-gold-bg), rgba(212, 175, 55, 0.05));
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: var(--transition);
}

.invite-banner:hover { background: rgba(212, 175, 55, 0.15); }

.invite-banner .invite-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--accent-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.invite-banner .invite-text {
  flex: 1;
}

.invite-banner .invite-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
}

.invite-banner .invite-desc {
  font-size: 12px;
  color: var(--text-secondary);
}

.invite-banner .invite-arrow {
  color: var(--text-tertiary);
  font-size: 18px;
}

/* ---- Login Page ---- */
.login-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(932px - 44px);
  padding: 40px 32px;
}

.login-logo {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  margin-bottom: 16px;
}

.login-title {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 8px;
}

.login-subtitle {
  font-size: 14px;
  color: var(--text-tertiary);
  margin-bottom: 40px;
}

.form-group {
  width: 100%;
  margin-bottom: 16px;
}

.form-input {
  width: 100%;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 15px;
  outline: none;
  transition: var(--transition);
  font-family: var(--font-family);
}

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

.form-input:focus {
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.login-actions {
  width: 100%;
  margin-top: 8px;
}

.login-link {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
  color: var(--text-secondary);
}

.login-link a {
  color: var(--accent-gold);
  text-decoration: none;
  font-weight: 600;
}

/* ---- Share Poster Modal ---- */
.poster-preview {
  margin: 20px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-card);
}

.poster-image {
  width: 100%;
  aspect-ratio: 9/16;
  object-fit: cover;
  position: relative;
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px;
}

.poster-result-img {
  width: 200px;
  height: 260px;
  border-radius: var(--radius-md);
  object-fit: cover;
  border: 3px solid var(--accent-gold);
  margin-bottom: 16px;
}

.poster-brand {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent-gold);
  margin-bottom: 8px;
}

.poster-slogan {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.poster-qr {
  width: 80px;
  height: 80px;
  background: #fff;
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: #000;
}

.share-actions {
  display: flex;
  gap: 12px;
  padding: 0 20px 20px;
}

.share-actions .btn-gold,
.share-actions .btn-outline {
  flex: 1;
}

/* ---- Utilities ---- */
.section-title {
  font-size: 16px;
  font-weight: 700;
  padding: 0 20px 12px;
}

.spacer { height: 20px; }
.spacer-sm { height: 12px; }

.hidden { display: none !important; }

/* Page transition */
.page {
  display: none;
}

.page.active {
  display: block;
}

/* Toast */
.toast {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  padding: 12px 24px;
  background: rgba(40, 40, 40, 0.95);
  backdrop-filter: blur(12px);
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 500;
  z-index: 999;
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
  white-space: nowrap;
}

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

/* Recharge packages */
.recharge-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 0 20px;
}

.recharge-item {
  padding: 20px 16px;
  background: var(--bg-card);
  border: 2px solid var(--border-light);
  border-radius: var(--radius-md);
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
}

.recharge-item:hover, .recharge-item.selected {
  border-color: var(--accent-gold);
  background: var(--accent-gold-bg);
}

.recharge-item.popular {
  position: relative;
}

.recharge-item.popular::before {
  content: '热门';
  position: absolute;
  top: -1px;
  right: 16px;
  padding: 2px 10px;
  background: var(--accent-gold);
  color: #000;
  font-size: 10px;
  font-weight: 700;
  border-radius: 0 0 var(--radius-xs) var(--radius-xs);
}

.recharge-points {
  font-size: 28px;
  font-weight: 800;
  color: var(--accent-gold);
  margin-bottom: 4px;
}

.recharge-unit {
  font-size: 12px;
  color: var(--text-secondary);
}

.recharge-price {
  font-size: 16px;
  font-weight: 700;
  margin-top: 8px;
}

.recharge-original {
  font-size: 12px;
  color: var(--text-tertiary);
  text-decoration: line-through;
}

/* Points Center Tabs */
.points-center-tabs {
  display: flex;
  margin: 0 20px 16px;
  background: var(--bg-card);
  border-radius: var(--radius-full);
  padding: 3px;
}

.points-center-tab {
  flex: 1;
  padding: 10px 0;
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: var(--radius-full);
  transition: var(--transition);
  border: none;
  background: transparent;
}

.points-center-tab.active {
  background: var(--accent-gold);
  color: #000;
  font-weight: 600;
}

.points-tab-content {
  /* container for tab content */
}

/* Back button */
.back-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-card);
  border: none;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  transition: var(--transition);
}

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

/* Insufficient points dialog */
.dialog-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-overlay);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.dialog-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.dialog-box {
  width: 340px;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  padding: 32px 24px 24px;
  text-align: center;
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.dialog-overlay.active .dialog-box {
  transform: scale(1);
}

.dialog-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.dialog-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.dialog-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 24px;
  line-height: 1.5;
}

.dialog-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Shimmer loading effect */
@keyframes shimmer {
  0% { background-position: -200px 0; }
  100% { background-position: 200px 0; }
}

.skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-hover) 50%, var(--bg-card) 75%);
  background-size: 400px 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}
