/*
  style.css — پیشگوی‌اینده
  تم: سرمه‌ای (#0a1f44)، مشکی (#0a0a0a)، طلایی (#ffd700)
  فونت وزیر، کارت‌های شیشه‌ای، دکمه‌های طلایی، واکنش‌گرا
*/

@font-face {
  font-family: "Vazirmatn";
  src: url("https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/Vazirmatn-font-face.css");
  font-display: swap;
}

:root {
  --navy: #0a1f44;
  --black: #0a0a0a;
  --gold: #ffd700;
  --gold-dark: #b8860b;
  --gold-glow: rgba(255, 215, 0, 0.6);
  --gold-soft: rgba(255, 215, 0, 0.25);
  --bg-gradient: radial-gradient(ellipse at 50% 0%, var(--navy) 0%, var(--black) 70%);
  --card-glass: rgba(10, 31, 68, 0.6);
  --card-border: rgba(255, 215, 0, 0.5);
  --text-primary: #f0f0f0;
  --text-secondary: rgba(255, 255, 255, 0.75);
  --shadow-gold: 0 0 15px var(--gold-glow);
  --font-vazir: "Vazirmatn", "Tahoma", sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-vazir);
  background: var(--bg-gradient);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

body.theme-day {
  --bg-gradient: radial-gradient(ellipse at 50% 0%, #1a3a6a 0%, #2a2a2a 70%);
  --card-glass: rgba(255, 255, 255, 0.15);
  color: var(--text-day-main, #111);
}

/* پس‌زمینه ستاره‌ها */
.stars-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(2px 2px at 20px 30px, #fff, transparent),
    radial-gradient(2px 2px at 40px 70px, rgba(255,215,0,0.5), transparent),
    radial-gradient(2px 2px at 50px 160px, #fff, transparent);
  background-size: 200px 200px;
  opacity: 0.4;
}

/* قاب اصلی */
.app-shell {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem;
  min-height: 100vh;
}

/* هدر */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--card-border);
}

.header-left,
.header-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.header-center {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
  justify-content: center;
}

.logo-mark {
  position: relative;
  width: 48px;
  height: 48px;
}

.logo-orbit {
  position: absolute;
  inset: 0;
  border: 2px solid var(--gold);
  border-radius: 50%;
  box-shadow: var(--shadow-gold);
  animation: orbit 8s linear infinite;
}

.logo-core {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  background: radial-gradient(circle, var(--gold), var(--gold-dark));
  border-radius: 50%;
  box-shadow: 0 0 12px var(--gold-glow);
}

@keyframes orbit {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.app-title {
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(to right, var(--gold), #fff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.app-subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 0.15rem;
}

/* دکمه‌ها */
.btn-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  background: var(--card-glass);
  backdrop-filter: blur(10px);
  color: var(--gold);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-gold);
}

.btn-circle:hover {
  background: var(--gold-soft);
  transform: scale(1.05);
}

.btn-theme-toggle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--card-border);
  background: var(--card-glass);
  backdrop-filter: blur(10px);
  cursor: pointer;
  color: var(--gold);
  font-size: 1.2rem;
  position: relative;
}

.theme-icon-day {
  display: none;
}

body.theme-day .theme-icon-night {
  display: none;
}

body.theme-day .theme-icon-day {
  display: inline;
}

.btn-outline {
  padding: 0.5rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--gold);
  background: transparent;
  color: var(--gold);
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-outline:hover {
  background: var(--gold-soft);
  box-shadow: var(--shadow-gold);
}

.btn-primary {
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  color: var(--black);
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-gold);
  animation: pulse-gold 2s ease-in-out infinite;
}

@keyframes pulse-gold {
  0%, 100% { box-shadow: 0 0 15px var(--gold-glow); }
  50% { box-shadow: 0 0 25px var(--gold-glow); }
}

.btn-primary:hover {
  transform: translateY(-2px);
}

.btn-secondary {
  padding: 0.5rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--gold);
  background: var(--card-glass);
  color: var(--gold);
  font-family: inherit;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-ghost {
  background: transparent;
  border: none;
  color: var(--gold);
  font-family: inherit;
  cursor: pointer;
  padding: 0.5rem;
  font-size: 0.9rem;
}

/* نوار کاربر */
.user-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  margin: 1rem 0;
  background: var(--card-glass);
  backdrop-filter: blur(12px);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  box-shadow: var(--shadow-gold);
}

.user-main {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-avatar-pulse {
  position: relative;
}

.avatar-circle {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  opacity: 0.5;
  animation: pulse-gold 2s ease-in-out infinite;
}

.avatar-inner {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--navy), var(--black));
  border: 1px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--gold);
  font-size: 1.2rem;
}

.user-name {
  font-weight: 700;
  font-size: 1.1rem;
}

.user-age {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-right: 0.5rem;
}

.badge {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-soft {
  background: var(--gold-soft);
  color: var(--gold);
  border: 1px solid var(--card-border);
}

.pill-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.75rem;
  background: rgba(0,0,0,0.3);
  border-radius: 999px;
  font-size: 0.85rem;
}

.pill-label {
  color: var(--text-secondary);
}

.pill-value {
  font-weight: 700;
  color: var(--gold);
}

/* محتوای اصلی */
.app-main {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 1.5rem;
  margin-top: 1rem;
}

@media (max-width: 900px) {
  .app-main {
    grid-template-columns: 1fr;
  }
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}

.section-title {
  font-size: 1.35rem;
  color: var(--gold);
  margin-bottom: 0.35rem;
}

.section-caption {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* کارت‌های تصمیم */
.decisions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}

.decision-card {
  background: var(--card-glass);
  backdrop-filter: blur(14px);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 1.25rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.decision-card:hover {
  box-shadow: var(--shadow-gold);
  transform: translateY(-2px);
}

.decision-header {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.decision-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--gold-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.decision-title {
  font-size: 1.1rem;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}

.decision-age-range {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.decision-description {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 0.75rem;
}

.decision-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.option-chip {
  padding: 0.3rem 0.6rem;
  background: rgba(0,0,0,0.4);
  border-radius: 8px;
  font-size: 0.8rem;
  color: var(--gold);
  border: 1px solid var(--card-border);
}

.decision-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.decision-ar-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.decision-ar-badge {
  font-size: 0.75rem;
  color: var(--gold);
  margin-right: 0.5rem;
}

.btn-view-result {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  color: var(--black);
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-gold);
}

.btn-view-result:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 20px var(--gold-glow);
}

/* حالت خالی */
.empty-state {
  text-align: center;
  padding: 3rem 2rem;
  background: var(--card-glass);
  border: 1px dashed var(--card-border);
  border-radius: 16px;
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.8;
}

.empty-state h3 {
  margin-bottom: 0.5rem;
  color: var(--gold);
}

.empty-state p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

/* پنل کناری */
.side-column {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.panel {
  background: var(--card-glass);
  backdrop-filter: blur(14px);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 1.25rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.panel-title {
  font-size: 1.1rem;
  color: var(--gold);
  margin-bottom: 0.25rem;
}

.panel-caption {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.panel-footer {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--card-border);
}

.panel-footnote {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.panel-soulbound {
  border-color: var(--gold);
  box-shadow: var(--shadow-gold);
}

.soulbound-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.soulbound-icon-outer {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--gold-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.soulbound-icon-inner {
  font-size: 1.5rem;
}

.soulbound-body .soul-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  font-size: 0.9rem;
}

.hash-chip {
  font-family: monospace;
  font-size: 0.75rem;
  background: rgba(0,0,0,0.4);
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* لیست اجتماعی */
.social-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.social-item {
  padding: 0.75rem;
  background: rgba(0,0,0,0.2);
  border-radius: 12px;
  border: 1px solid transparent;
}

.social-title {
  font-weight: 600;
  color: var(--gold);
  margin-bottom: 0.35rem;
}

.social-meta {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.social-bar {
  height: 6px;
  background: rgba(0,0,0,0.4);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.social-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold));
  border-radius: 999px;
  transition: width 0.5s ease;
}

.social-chip {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* نوتیفیکیشن */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  background: var(--card-glass);
  backdrop-filter: blur(12px);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  box-shadow: var(--shadow-gold);
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.toast-success {
  border-color: #4caf50;
  box-shadow: 0 0 15px rgba(76, 175, 80, 0.5);
}

.toast-error {
  border-color: #f44336;
  box-shadow: 0 0 15px rgba(244, 67, 54, 0.4);
}

.toast-blockhash {
  font-family: monospace;
  font-size: 0.7rem;
  opacity: 0.8;
}

/* صفحه AR */
.ar-body {
  padding: 0;
  overflow: hidden;
}

.ar-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  display: block;
}

.ar-overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.ar-overlay * {
  pointer-events: auto;
}

.ar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  background: linear-gradient(to bottom, rgba(10,10,10,0.9), transparent);
}

.ar-header-center {
  text-align: center;
}

.ar-title {
  font-size: 1rem;
  color: var(--gold);
}

.ar-subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.ar-info-panel {
  padding: 1rem;
  margin: 1rem;
  background: var(--card-glass);
  backdrop-filter: blur(14px);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  box-shadow: var(--shadow-gold);
  max-width: 400px;
  margin-right: auto;
}

.ar-choice .label,
.ar-future .label {
  font-size: 0.8rem;
  color: var(--gold);
  display: block;
  margin-bottom: 0.25rem;
}

.ar-future .future-text {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-primary);
  margin-top: 0.5rem;
}

.ar-footer {
  padding: 1rem;
  background: linear-gradient(to top, rgba(10,10,10,0.9), transparent);
}

.hash-row {
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

.ar-footer .hint {
  display: block;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.ar-options {
  margin: 0.75rem 0;
}

.ar-options .option-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.ar-options .option-chip {
  padding: 0.4rem 0.8rem;
  border-radius: 10px;
  border: 1px solid var(--card-border);
  background: var(--card-glass);
  color: var(--gold);
  font-family: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ar-options .option-chip:hover,
.ar-options .option-chip.active {
  background: var(--gold-soft);
  box-shadow: 0 0 10px var(--gold-glow);
}

.ar-submit-choice {
  width: 100%;
  margin-top: 1rem;
  padding: 0.75rem 1rem;
}

.ar-unsupported {
  position: fixed;
  inset: 20px;
  background: rgba(10, 10, 10, 0.95);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  z-index: 999;
  color: #ffe7a0;
  padding: 2rem;
}

.ar-unsupported h2 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.ar-unsupported p {
  margin-bottom: 1rem;
  opacity: 0.9;
}

/* واکنش‌گرایی */
@media (max-width: 600px) {
  .app-header {
    flex-direction: column;
    text-align: center;
  }
  .header-center {
    order: -1;
    width: 100%;
  }
  .decisions-grid {
    grid-template-columns: 1fr;
  }
  .decision-footer {
    flex-direction: column;
    align-items: stretch;
  }
  .btn-view-result {
    width: 100%;
    justify-content: center;
  }
}
