/* ============================================
   DREAM PAGE - Lunaple EN
   ============================================ */

body.page-dream {
  padding-top: var(--header-height);
  padding-bottom: calc(var(--tabbar-height) + env(safe-area-inset-bottom, 0px));
}

body.page-dream .bg-cosmos {
  background-image: url('/assets/bg_dream.png');
  background-size: cover;
  background-position: center center;
  inset: 0;
}

/* Text readability */
.dream-header,
.dream-input-area,
.dream-actions,
.dream-loading,
.dream-result {
  position: relative;
  z-index: 1;
}

.dream-header::before {
  content: '';
  position: absolute;
  inset: -20px -40px;
  background: radial-gradient(ellipse at center, rgba(244,249,247,0.8) 0%, transparent 70%);
  z-index: -1;
  pointer-events: none;
}

.dream-header {
  text-align: center;
  padding: var(--space-2xl) var(--space-md) var(--space-lg);
}

.dream-header h1 { margin-bottom: var(--space-sm); }
.dream-header p { color: var(--text-secondary); font-size: 0.9375rem; }

/* Input Area */
.dream-input-area {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: var(--space-md) var(--space-md) var(--space-lg);
  background: rgba(255, 255, 255, 0.9);
  border-radius: var(--radius-lg);
}

.dream-textarea {
  width: 100%;
  min-height: 160px;
  padding: 16px;
  background: var(--bg-surface-1);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  line-height: 1.6;
  resize: vertical;
  outline: none;
  transition: border-color var(--duration-fast) var(--ease-out);
}

.dream-textarea:focus { border-color: var(--color-teal); }
.dream-textarea::placeholder { color: var(--text-muted); }

.dream-char-count {
  text-align: right;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: var(--space-xs);
}

.dream-actions {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  padding: var(--space-md) 0;
}

/* Result */
.dream-result {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: var(--space-lg) var(--space-md) var(--space-3xl);
  display: none;
  background: rgba(255, 255, 255, 0.92);
  border-radius: var(--radius-lg);
}

.dream-result.visible {
  display: block;
  animation: fadeInUp 400ms var(--ease-out);
}

.dream-image {
  width: 100%;
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-lg);
  border: 1px solid var(--border-glass);
}

.dream-symbols {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.dream-symbol {
  padding: 6px 12px;
  border-radius: var(--radius-full);
  background: var(--color-teal-dim);
  color: var(--color-teal);
  font-size: 0.8125rem;
  font-weight: 500;
}

.dream-interpretation {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: var(--space-lg);
}

.dream-insight {
  padding: var(--space-md);
  border-left: 3px solid var(--color-teal);
  margin-bottom: var(--space-lg);
}

.dream-insight h3 {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: var(--space-xs);
}

.dream-insight p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Loading */
.dream-loading {
  display: none;
  text-align: center;
  padding: var(--space-2xl);
}

.dream-loading.visible { display: block; }
