/* Chuajai Shell · Day 4 Polish v2 · Modern glass + Anuphan typography */

:root {
  --cj-bg-deep: #040a08;
  --cj-bg: #0a1612;
  --cj-bg-2: #0f201a;
  --cj-primary: #10b981;
  --cj-primary-soft: #34d399;
  --cj-text-high: #ecfdf5;
  --cj-text-mid: #a7f3d0;
  --cj-text-low: #6b8a7f;
  --cj-border: rgba(167, 243, 208, 0.10);
  --cj-border-glow: rgba(52, 211, 153, 0.18);
  --cj-bottom-nav-h: 68px;

  --cj-font-display: 'Anuphan', system-ui, sans-serif;
  --cj-font-body: 'IBM Plex Sans Thai', 'Anuphan', system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--cj-bg);
  font-family: var(--cj-font-body);
  -webkit-font-smoothing: antialiased;
}

.cj-body {
  padding-bottom: calc(var(--cj-bottom-nav-h) + env(safe-area-inset-bottom));
  min-height: 100vh;
  background: var(--cj-bg);
  color: var(--cj-text-high);
}

a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }

.cj-content { width: 100%; }

/* ============================================
   BOTTOM NAV · Modern glass with depth
   ============================================ */
.cj-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(var(--cj-bottom-nav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);

  /* Multi-layer glass effect */
  background:
    linear-gradient(180deg, rgba(15, 32, 26, 0.65) 0%, rgba(10, 22, 18, 0.85) 100%);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);

  /* Top edge: subtle glow line */
  border-top: 0.5px solid var(--cj-border-glow);
  box-shadow:
    0 -1px 0 0 rgba(255, 255, 255, 0.04) inset,
    0 -10px 40px rgba(0, 0, 0, 0.3);

  display: grid;
  grid-template-columns: repeat(4, 1fr);
  z-index: 9999;
}

/* Subtle top highlight line */
.cj-bottom-nav::before {
  content: '';
  position: absolute;
  top: 0;
  left: 20%;
  right: 20%;
  height: 0.5px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(52, 211, 153, 0.3) 50%,
    transparent 100%);
}

.cj-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 8px 0 6px;
  color: var(--cj-text-low);
  position: relative;
  transition: color 0.25s ease, transform 0.15s ease;
  cursor: pointer;
}

.cj-nav-item:active {
  transform: scale(0.92);
}

.cj-nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.cj-nav-icon svg { display: block; }

.cj-nav-label {
  font-family: var(--cj-font-display);
  font-size: 11px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.01em;
}

.cj-nav-badge {
  position: absolute;
  top: 4px;
  right: calc(50% - 24px);
  background: rgba(52, 211, 153, 0.12);
  color: var(--cj-primary-soft);
  font-family: var(--cj-font-display);
  font-size: 8.5px;
  font-weight: 600;
  padding: 2px 5px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border: 0.5px solid rgba(52, 211, 153, 0.15);
}

/* Active tab · soft glow */
.cj-nav-active {
  color: var(--cj-primary-soft);
}

.cj-nav-active .cj-nav-icon {
  filter: drop-shadow(0 0 8px rgba(52, 211, 153, 0.4));
}

.cj-nav-active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 2.5px;
  background: linear-gradient(90deg, var(--cj-primary), var(--cj-primary-soft));
  border-radius: 0 0 2.5px 2.5px;
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.5);
}

.cj-nav-disabled {
  opacity: 0.45;
  pointer-events: none;
}

/* ============================================
   PLACEHOLDER PAGES
   ============================================ */
.cj-page {
  padding: 40px 20px;
  max-width: 720px;
  margin: 0 auto;
}

.cj-h1 {
  font-family: var(--cj-font-display);
  font-size: 26px;
  font-weight: 600;
  margin: 0 0 8px;
  color: var(--cj-text-high);
  letter-spacing: -0.01em;
}

.cj-h2 {
  font-family: var(--cj-font-display);
  font-size: 20px;
  font-weight: 500;
  margin: 0 0 8px;
  color: var(--cj-text-high);
}

.cj-h3 {
  font-family: var(--cj-font-display);
  font-size: 16px;
  font-weight: 500;
  margin: 0 0 6px;
  color: var(--cj-text-high);
}

.cj-text-mid { color: var(--cj-text-mid); font-size: 15px; line-height: 1.6; }
.cj-text-low { color: var(--cj-text-low); font-size: 13px; }

.cj-card {
  background: rgba(15, 32, 26, 0.6);
  border: 0.5px solid var(--cj-border);
  border-radius: 16px;
  padding: 20px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.cj-card + .cj-card { margin-top: 12px; }

.cj-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  font-size: 15px;
  font-weight: 500;
  font-family: var(--cj-font-display);
  border-radius: 12px;
  border: 0.5px solid var(--cj-border);
  background: rgba(15, 32, 26, 0.6);
  color: var(--cj-text-high);
  width: 100%;
  cursor: pointer;
}

.cj-button-primary {
  background: linear-gradient(180deg, var(--cj-primary-soft), var(--cj-primary));
  color: white;
  border-color: var(--cj-primary);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}


/* ============================================
   PLACEHOLDER PAGE STYLES · Day 4
   ============================================ */

.cj-back-link {
  display: inline-block;
  font-family: var(--cj-font-display);
  font-size: 14px;
  color: var(--cj-text-mid);
  margin-bottom: 20px;
  transition: color 0.15s ease;
}

.cj-back-link:hover { color: var(--cj-primary-soft); }

.cj-empty {
  text-align: center;
  padding: 32px 0;
}

.cj-empty-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 24px;
  background: rgba(15, 32, 26, 0.6);
  border: 0.5px solid var(--cj-border-glow);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cj-primary-soft);
  backdrop-filter: blur(10px);
}

.cj-empty-icon-soon {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  background: rgba(15, 32, 26, 0.6);
  border: 0.5px solid var(--cj-border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cj-text-low);
}

.cj-subtitle-tag {
  display: inline-block;
  margin: 0 0 16px;
  font-family: var(--cj-font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--cj-primary-soft);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.cj-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 360px;
  margin: 0 auto;
}

/* Choice cards (used on /projects/new) */
.cj-choice-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cj-choice {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px;
  text-align: left;
  background: rgba(15, 32, 26, 0.6);
  border: 0.5px solid var(--cj-border);
  border-radius: 16px;
  font-family: var(--cj-font-body);
  cursor: pointer;
  width: 100%;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.15s ease;
  color: inherit;
}

.cj-choice:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.cj-choice:not(:disabled):hover {
  background: rgba(15, 32, 26, 0.85);
  border-color: var(--cj-border-glow);
}

.cj-choice-recommended {
  border-color: var(--cj-border-glow);
  background: linear-gradient(180deg, rgba(52, 211, 153, 0.06), rgba(15, 32, 26, 0.6));
}

.cj-choice-icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  background: rgba(52, 211, 153, 0.1);
  border: 0.5px solid var(--cj-border-glow);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cj-primary-soft);
}

.cj-choice-text {
  flex: 1;
  min-width: 0;
}

.cj-choice-title {
  font-family: var(--cj-font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--cj-text-high);
  margin-bottom: 4px;
  line-height: 1.3;
}

.cj-choice-subtitle {
  font-size: 14px;
  color: var(--cj-text-mid);
  line-height: 1.4;
  margin-bottom: 8px;
}

.cj-choice-status {
  display: inline-block;
  font-family: var(--cj-font-display);
  font-size: 11px;
  font-weight: 500;
  color: var(--cj-text-low);
  background: rgba(167, 243, 208, 0.06);
  border: 0.5px solid var(--cj-border);
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.02em;
}
