:root {
  --bg-primary: #0a121a;
  --bg-panel: rgba(14, 24, 34, 0.88);
  --accent-gold: #f5a623;
  --accent-cyan: #4fc3f7;
  --accent-green: #43a047;
  --text-main: #e0f2fe;
  --text-muted: #90a4ae;
  --border-glass: rgba(255, 255, 255, 0.12);
  --font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-family);
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Header Bar */
header {
  background: var(--bg-panel);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-glass);
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10;
}

.brand-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.1rem;
  font-weight: bold;
  color: var(--accent-gold);
}

.zen-stats {
  display: flex;
  align-items: center;
  gap: 12px;
}

.stat-pill {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-glass);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: bold;
  color: var(--text-main);
}

.btn-ambient {
  background: rgba(79, 195, 247, 0.2);
  border: 1px solid var(--accent-cyan);
  color: var(--accent-cyan);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-ambient.active {
  background: var(--accent-cyan);
  color: #000;
}

/* 3D Canvas Viewport with Photorealistic Beach Photo Background */
#canvas-container {
  flex: 1;
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: none;
  background-image: url('assets/beach_bg.png');
  background-size: cover;
  background-position: center bottom;
}

canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
  touch-action: none;
}

/* Floating Bottom Tool Bar */
#toolbar {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-panel);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: 28px;
  padding: 10px 18px;
  display: flex;
  gap: 14px;
  z-index: 10;
  box-shadow: 0 10px 30px rgba(0,0,0,0.6);
  max-width: 95vw;
  overflow-x: auto;
}

.tool-chip {
  width: 76px;
  height: 80px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.tool-chip .icon {
  font-size: 1.6rem;
  margin-bottom: 4px;
}

.tool-chip .label {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.tool-chip.selected {
  background: rgba(245, 166, 35, 0.25);
  border-color: var(--accent-gold);
  transform: translateY(-4px);
}

.tool-chip.selected .label {
  color: #fff;
  font-weight: bold;
}

/* Toast Message */
#toast {
  position: absolute;
  top: 75px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(14, 24, 34, 0.95);
  border: 1px solid var(--accent-gold);
  color: var(--accent-gold);
  padding: 10px 22px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: bold;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 20;
}

#toast.show {
  opacity: 1;
}
