/* ===== Palmistry AI - Modern Mystic Design System ===== */

:root {
  --bg-primary: #0a0914;
  --bg-secondary: #121026;
  --bg-card: rgba(22, 19, 48, 0.7);
  --bg-card-hover: rgba(32, 28, 70, 0.85);
  --bg-glass: rgba(18, 16, 38, 0.75);

  --text-primary: #f3f4f6;
  --text-secondary: #a7abb9;
  --text-muted: #6b7280;

  --accent-purple: #8b5cf6;
  --accent-indigo: #6366f1;
  --accent-amber: #f59e0b;
  --accent-emerald: #10b981;
  --accent-rose: #f43f5e;
  --accent-cyan: #06b6d4;

  --accent-gradient: linear-gradient(135deg, #a855f7 0%, #6366f1 50%, #06b6d4 100%);
  --gold-gradient: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #d97706 100%);
  --glow-purple: rgba(168, 85, 247, 0.35);

  --border-subtle: rgba(168, 85, 247, 0.18);
  --border-active: rgba(168, 85, 247, 0.5);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --font-serif: 'Cinzel', serif;
  --font-sans: 'Plus Jakarta Sans', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --header-height: 70px;
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-secondary: #f1f5f9;
  --bg-card: rgba(255, 255, 255, 0.95);
  --bg-card-hover: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.9);

  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;

  --border-subtle: rgba(99, 102, 241, 0.22);
  --border-active: rgba(99, 102, 241, 0.55);
  --glow-purple: rgba(99, 102, 241, 0.2);
}

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

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

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

.hidden {
  display: none !important;
}

/* Mystic Background Orbs & Stars */
.mystic-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.mystic-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.25;
  animation: orbFloat 22s ease-in-out infinite alternate;
}

.orb-1 {
  top: -10%;
  left: 20%;
  width: 450px;
  height: 450px;
  background: #7c3aed;
}

.orb-2 {
  bottom: 10%;
  right: 15%;
  width: 500px;
  height: 500px;
  background: #3b82f6;
  animation-delay: -7s;
}

.orb-3 {
  top: 40%;
  left: -10%;
  width: 380px;
  height: 380px;
  background: #ec4899;
  animation-delay: -14s;
}

@keyframes orbFloat {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(60px, -40px) scale(1.1); }
  100% { transform: translate(-40px, 60px) scale(0.95); }
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  height: var(--header-height);
  transition: background 0.3s ease;
}

@media (max-width: 768px) {
  .site-header {
    height: calc(var(--header-height) + 50px) !important;
    padding-top: max(env(safe-area-inset-top, 0px), 50px) !important;
  }
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
}

.logo-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 0 16px var(--glow-purple);
}

.logo-text {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

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

.header-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Language Toggle */
.lang-toggle {
  display: flex;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 3px;
}

.lang-btn {
  padding: 5px 12px;
  font-size: 0.76rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.lang-btn.active {
  background: var(--accent-gradient);
  color: #fff;
  box-shadow: 0 2px 8px var(--glow-purple);
}

/* Theme Toggle */
.theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-subtle);
  background: var(--bg-secondary);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.theme-toggle:hover {
  border-color: var(--accent-purple);
  box-shadow: 0 0 12px var(--glow-purple);
}

[data-theme="dark"] .icon-sun { display: block; }
[data-theme="dark"] .icon-moon { display: none; }
[data-theme="light"] .icon-sun { display: none; }
[data-theme="light"] .icon-moon { display: block; }

/* Hero Section */
.hero-section {
  padding: 32px 0 24px;
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: rgba(168, 85, 247, 0.12);
  border: 1px solid var(--border-subtle);
  color: #c084fc;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 10px;
  background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 50%, #c084fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 0.95rem;
  color: var(--text-secondary);
  max-width: 680px;
  margin: 0 auto;
  line-height: 1.5;
}

[data-theme="light"] .hero-title {
  background: linear-gradient(135deg, #1e1b4b 0%, #4338ca 60%, #7c3aed 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="light"] .hero-badge {
  background: rgba(124, 58, 237, 0.08);
  border-color: rgba(124, 58, 237, 0.3);
  color: #6d28d9;
}

[data-theme="light"] .hero-subtitle {
  color: #334155;
  font-weight: 500;
}

[data-theme="light"] .mystic-orb {
  opacity: 0.12;
}

[data-theme="light"] .glass-card {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .prop-chip {
  background: #e2e8f0;
  color: #1e293b;
  font-weight: 600;
}

/* Glass Card Component */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  transition: border-color var(--transition-normal);
}

.glass-card:hover {
  border-color: var(--border-active);
}

/* Main Content Wrapper */
.main-content {
  position: relative;
  z-index: 1;
  padding-bottom: 48px;
}

/* Scanner Card */
.scanner-card {
  padding: 24px;
  max-width: 720px;
  margin: 0 auto;
}

/* Single Row Control Bar (Hand Select Dropdown + Camera Tab + Upload Tab) */
.control-bar-single-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  align-items: center;
  margin-bottom: 20px;
  width: 100%;
}

/* Modern Custom Dropdown Component */
.custom-dropdown {
  position: relative;
  width: 100%;
  min-width: 0;
}

.dropdown-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  width: 100%;
  padding: 9px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  color: var(--text-primary);
  cursor: pointer;
  outline: none;
  transition: all var(--transition-fast);
  box-sizing: border-box;
  white-space: nowrap;
}

.dropdown-trigger:hover, .dropdown-trigger.open {
  border-color: var(--accent-purple);
  box-shadow: 0 0 14px var(--glow-purple);
  color: var(--text-primary);
}

.dropdown-trigger .chevron-icon {
  transition: transform var(--transition-fast);
  color: var(--accent-purple);
  flex-shrink: 0;
}

.dropdown-trigger.open .chevron-icon {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 50;
  background: var(--bg-glass);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--border-active);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25), 0 0 20px var(--glow-purple);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dropdown-menu.hidden {
  display: none !important;
}

.dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.dropdown-item:hover {
  background: rgba(139, 92, 246, 0.15);
  color: var(--text-primary);
}

.dropdown-item.active {
  background: var(--accent-purple);
  color: #ffffff;
  box-shadow: 0 2px 10px var(--glow-purple);
}

.dropdown-item .check-icon {
  display: none;
}

.dropdown-item.active .check-icon {
  display: block;
  color: #ffffff;
}

/* Light Mode Custom Dropdown Theme Overrides */
[data-theme="light"] .dropdown-menu {
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(139, 92, 246, 0.3);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12), 0 0 16px rgba(139, 92, 246, 0.15);
}

[data-theme="light"] .dropdown-item {
  color: #334155;
}

[data-theme="light"] .dropdown-item:hover {
  background: rgba(139, 92, 246, 0.12);
  color: #0f172a;
}

[data-theme="light"] .dropdown-item.active {
  background: var(--accent-purple);
  color: #ffffff;
}

/* Mode Tabs inside single row grid */
.mode-tabs {
  display: contents;
}

.mode-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 8px;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.mode-tab:hover {
  color: var(--text-primary);
  border-color: var(--accent-purple);
}

.mode-tab.active {
  background: var(--accent-gradient);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 16px var(--glow-purple);
}

/* View Panels */
.view-panel {
  display: none;
}

.view-panel.active {
  display: block;
}

/* Camera Box */
.camera-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  min-height: 440px;
  max-height: 600px;
  background: #000;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8), 0 8px 32px rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
}

#webcam-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#camera-overlay-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Palm Guide Overlay */
.palm-guide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.palm-guide svg {
  width: 65%;
  height: 75%;
  filter: drop-shadow(0 0 8px rgba(168, 85, 247, 0.8));
}

.guide-text {
  position: absolute;
  bottom: 14px;
  padding: 6px 14px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  color: #e9d5ff;
  font-weight: 500;
  border: 1px solid rgba(168, 85, 247, 0.4);
}

/* Laser Scanner Beam */
.scanner-beam {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, transparent, #c084fc, #06b6d4, transparent);
  box-shadow: 0 0 16px #c084fc, 0 0 24px #06b6d4;
  display: none;
  z-index: 10;
}

.scanner-beam.scanning {
  display: block;
  animation: scanLine 2s linear infinite alternate;
}

@keyframes scanLine {
  0% { top: 2%; }
  100% { top: 98%; }
}

.camera-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
  font-family: var(--font-sans);
}

.btn-primary {
  background: var(--accent-gradient);
  color: #fff;
  box-shadow: 0 4px 20px var(--glow-purple);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px var(--glow-purple);
}

.btn-secondary {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
}

.btn-secondary:hover {
  border-color: var(--accent-purple);
  background: var(--bg-card-hover);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-active);
  color: var(--text-primary);
}

.btn-outline:hover {
  background: rgba(168, 85, 247, 0.15);
}

.btn-lg {
  padding: 12px 28px;
  font-size: 0.98rem;
}

/* Upload Panel */
.upload-dropzone {
  border: 2px dashed var(--border-active);
  border-radius: var(--radius-md);
  padding: 40px 20px;
  text-align: center;
  background: rgba(18, 16, 38, 0.4);
  cursor: pointer;
  transition: all var(--transition-normal);
  position: relative;
}

.upload-dropzone:hover, .upload-dropzone.dragover {
  border-color: var(--accent-purple);
  background: rgba(168, 85, 247, 0.08);
}

.file-input-hidden {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.upload-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.dropzone-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.dropzone-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

/* Sample Hands Grid */
.sample-intro {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 14px;
}

.sample-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.sample-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.sample-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-purple);
  box-shadow: 0 6px 20px var(--glow-purple);
}

.sample-img-box {
  position: relative;
  width: 100%;
  height: 120px;
  overflow: hidden;
}

.sample-img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-normal);
}

.sample-card:hover .sample-img-box img {
  transform: scale(1.05);
}

.sample-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 3px 8px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  color: #e9d5ff;
  font-weight: 600;
}

.sample-info {
  padding: 10px;
}

.sample-info h4 {
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.sample-info p {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.3;
}

/* Loading Card */
.analysis-loading-card {
  padding: 48px 24px;
  text-align: center;
  max-width: 550px;
  margin: 0 auto;
}

.loading-animation {
  position: relative;
  width: 90px;
  height: 90px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mystic-circle {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 3px solid transparent;
  border-top-color: #c084fc;
  border-right-color: #06b6d4;
  border-radius: 50%;
  animation: spin 1.2s linear infinite;
}

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

.mystic-icon {
  color: #c084fc;
}

.loading-title {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.loading-step {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.progress-bar {
  width: 100%;
  height: 6px;
  background: var(--bg-secondary);
  border-radius: var(--radius-full);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

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

/* Results Container */
.results-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
}

.results-header-card {
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.scanned-thumb-wrapper {
  position: relative;
  width: 130px;
  height: 150px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 2px solid var(--border-active);
  flex-shrink: 0;
}

#scanned-result-canvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.scanned-overlay-badge {
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  padding: 2px 8px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  color: #e9d5ff;
  font-weight: 600;
  white-space: nowrap;
}

.results-header-meta {
  flex: 1;
}

.element-tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fbbf24;
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.results-name-title {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.results-date {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.action-btn-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Report Navigation Tabs */
.report-nav-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  background: var(--bg-card);
  padding: 4px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
}

.report-tab {
  padding: 10px 8px;
  font-size: 0.84rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: center;
}

.report-tab:hover {
  color: var(--text-primary);
}

.report-tab.active {
  background: var(--accent-gradient);
  color: #fff;
  box-shadow: 0 4px 14px var(--glow-purple);
}

/* Report Sections */
.report-section {
  display: none;
}

.report-section.active {
  display: block;
}

/* Overview Grid */
.overview-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.metric-card {
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.metric-icon {
  font-size: 1.5rem;
}

.metric-data {
  display: flex;
  flex-direction: column;
}

.metric-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 700;
}

.metric-val {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
}

.summary-card {
  padding: 20px;
}

.card-subtitle {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.summary-p {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Lines Analysis Grid */
.lines-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.line-detail-card {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.line-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.line-badge {
  display: inline-block;
  align-self: flex-start;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
}

.badge-life { background: rgba(239, 68, 68, 0.15); color: #f87171; }
.badge-heart { background: rgba(236, 72, 153, 0.15); color: #f472b6; }
.badge-head { background: rgba(99, 102, 241, 0.15); color: #818cf8; }
.badge-fate { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }

.line-name {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 700;
}

.line-props {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.prop-chip {
  padding: 3px 8px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 0.74rem;
  color: var(--text-secondary);
}

.line-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Planetary Mounts Grid */
.mounts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.mount-card {
  padding: 18px;
}

.mount-icon {
  font-size: 0.85rem;
  font-weight: 700;
  color: #c084fc;
  margin-bottom: 4px;
}

.mount-card h4 {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.mount-status {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.status-high { color: var(--accent-emerald); }
.status-mod { color: var(--accent-amber); }

.mount-card p {
  font-size: 0.86rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Destiny Section */
.destiny-card {
  padding: 24px;
}

.guidance-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 12px;
}

.guidance-list li {
  display: flex;
  gap: 12px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.list-bullet {
  color: var(--accent-purple);
  font-size: 1.1rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 24px 0;
  position: relative;
  z-index: 1;
  background: var(--bg-glass);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-logo {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-primary);
}

.footer-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-copy {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Responsive Breakpoints */
@media (max-width: 768px) {
  .hero-title { font-size: 1.8rem !important; }
  .hero-subtitle { font-size: 0.85rem; }

  .hand-side-toggle { flex-direction: column; align-items: stretch; gap: 8px; }
  .sample-grid { grid-template-columns: 1fr; }

  .results-header-card { flex-direction: column; text-align: center; }
  .action-btn-group { justify-content: center; }

  .report-nav-bar { grid-template-columns: repeat(2, 1fr); border-radius: var(--radius-md); }
  .overview-grid { grid-template-columns: repeat(2, 1fr); }
  .lines-grid, .mounts-grid { grid-template-columns: 1fr; }

  /* Expanded camera viewport for mobile vertical hand scanning */
  .camera-wrapper {
    aspect-ratio: 3/4;
    min-height: 480px;
    max-height: 70vh;
  }

  .palm-guide svg {
    width: 80%;
    height: 85%;
  }

  .guide-text {
    bottom: 18px;
    font-size: 0.85rem;
    padding: 8px 16px;
  }
}

@media (max-width: 480px) {
  .overview-grid { grid-template-columns: 1fr; }
  .mode-tabs { grid-template-columns: 1fr; }
  .camera-wrapper {
    min-height: 420px;
    max-height: 65vh;
  }
}
