/* Rial Hooshmand v11 — Mobile ONLY, Dark Luxury Glassmorphism */
:root {
  --bg: #0A0A0F;
  --surface: #14141F;
  --glass: rgba(255, 255, 255, 0.04);
  --primary: #00F0FF;
  --secondary: #B026FF;
  --gold: #FFD700;
  --success: #00FF66;
  --danger: #FF0055;
  --warning: #FFB800;
  --text-1: #FFFFFF;
  --text-2: #A0A0AB;
  --border: rgba(255, 255, 255, 0.08);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body.rial-body {
  background: #050507;
  overscroll-behavior-y: none;
  color: var(--text-1);
  font-family: 'Vazirmatn', 'Outfit', sans-serif;
}
[dir="ltr"] body.rial-body { font-family: 'Outfit', 'Vazirmatn', sans-serif; }

.num { font-family: 'Outfit', sans-serif; font-variant-numeric: tabular-nums; }

.rial-shell {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  background: var(--bg);
  overflow-x: hidden;
  padding-bottom: 96px;
  box-shadow: 0 0 60px rgba(0,240,255,0.06), 0 0 120px rgba(176,38,255,0.05);
}

.rial-boot { display:flex; flex-direction:column; align-items:center; justify-content:center; min-height:70vh; gap:12px; color:var(--text-2); font-size:14px; }
.rial-boot-logo { width:64px; height:64px; border-radius:18px; border:2px solid var(--primary); box-shadow:0 0 24px rgba(0,240,255,0.4); animation:rialPulse 1.4s ease-in-out infinite; }
@keyframes rialPulse { 0%,100%{opacity:1} 50%{opacity:.4} }

.glass-card {
  background: var(--glass);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  border-radius: 20px;
}

.gold-text { background: linear-gradient(90deg,#FFD700,#FFA500,#FFD700); -webkit-background-clip: text; background-clip: text; color: transparent; }
.neon-text { background: linear-gradient(90deg,#00F0FF,#B026FF); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* header */
.rial-header { display:flex; align-items:center; justify-content:space-between; padding:20px 20px 8px; position:relative; z-index:10; }
.rial-header-brand { display:flex; align-items:center; gap:12px; }
.rial-header-brand img { width:42px; height:42px; }
.rial-header h1 { font-size:18px; font-weight:800; line-height:1.2; }
.rial-header p { font-size:10px; color:var(--text-2); }
.rial-header-btn { background:var(--glass); border:1px solid var(--border); border-radius:14px; padding:10px; color:var(--text-2); cursor:pointer; transition:color .2s; font-size:16px; line-height:1; }
.rial-header-btn:active { color: var(--primary); }

/* sections */
.rial-section { padding: 0 20px; position: relative; z-index: 5; }
.rial-row-between { display:flex; align-items:center; justify-content:space-between; margin:14px 0 12px; }
.rial-h2 { font-size:15px; font-weight:700; }
.rial-link { color:var(--primary); font-size:11px; text-decoration:none; background:none; border:none; cursor:pointer; }

/* status badge */
.badge { display:inline-flex; align-items:center; gap:6px; font-size:10px; font-weight:700; padding:3px 9px; border-radius:999px; }
.badge .dot { width:6px; height:6px; border-radius:999px; background:currentColor; }
.badge-live { color:var(--success); background:rgba(0,255,102,.1); border:1px solid rgba(0,255,102,.25); }
.badge-live .dot { animation: rialPulse 1.6s ease-in-out infinite; }
.badge-cached { color:var(--warning); background:rgba(255,184,0,.1); border:1px solid rgba(255,184,0,.25); }
.badge-demo { color:var(--text-2); background:rgba(160,160,171,.1); border:1px solid rgba(160,160,171,.25); }
.badge-error { color:var(--danger); background:rgba(255,0,85,.1); border:1px solid rgba(255,0,85,.25); }
.badge-wrap { display:flex; flex-direction:column; align-items:flex-end; gap:2px; }
.badge-time { font-size:9px; color:var(--text-2); }

/* grids & cards */
.grid-2 { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.hero-card { padding:16px; position:relative; overflow:hidden; }
.hero-card .glow { position:absolute; top:-32px; inset-inline-end:-32px; width:96px; height:96px; border-radius:999px; opacity:.2; filter:blur(28px); }
.hero-card .label { font-size:11px; color:var(--text-2); margin-bottom:6px; }
.hero-card .value { font-size:20px; font-weight:800; line-height:1.2; }
.hero-card .meta { display:flex; align-items:center; justify-content:space-between; margin-top:4px; font-size:10px; color:var(--text-2); }
.bubble-tag { font-size:10px; font-weight:700; }

/* horizontal strip */
.strip { display:flex; gap:12px; overflow-x:auto; padding-bottom:4px; scrollbar-width:none; }
.strip::-webkit-scrollbar { display:none; }
.strip-card { min-width:120px; flex-shrink:0; padding:12px 16px; }
.strip-card .label { font-size:10px; color:var(--text-2); white-space:nowrap; }
.strip-card .value { font-size:14px; font-weight:700; margin-top:4px; }

/* lists */
.list { overflow:hidden; }
.list-row { display:flex; align-items:center; justify-content:space-between; padding:12px 16px; border-bottom:1px solid rgba(255,255,255,.05); }
.list-row:last-child { border-bottom:none; }
.list-start { display:flex; align-items:center; gap:12px; }
.list-flag { font-size:20px; }
.list-name { font-size:13px; font-weight:700; }
.list-sub { font-size:10px; color:var(--text-2); }
.list-end { text-align:end; }
.list-price { font-size:13px; font-weight:800; }
.chg-up { color:var(--success); font-size:11px; font-weight:700; }
.chg-down { color:var(--danger); font-size:11px; font-weight:700; }

/* flash */
@keyframes flashUp { 0%{background-color:rgba(0,255,102,.22)} 100%{background-color:transparent} }
@keyframes flashDown { 0%{background-color:rgba(255,0,85,.22)} 100%{background-color:transparent} }
.flash-up { animation: flashUp 1.2s ease-out; }
.flash-down { animation: flashDown 1.2s ease-out; }

/* tabs/pills */
.pills { display:flex; gap:8px; }
.pill { padding:7px 16px; border-radius:999px; font-size:12px; font-weight:700; border:1px solid rgba(255,255,255,.1); color:var(--text-2); background:transparent; cursor:pointer; transition:all .2s; font-family:inherit; }
.pill.active { background:linear-gradient(90deg,rgba(0,240,255,.2),rgba(176,38,255,.2)); border-color:rgba(0,240,255,.4); color:var(--primary); }

/* search */
.search-box { display:flex; align-items:center; gap:8px; padding:9px 12px; margin-bottom:12px; }
.search-box input { background:transparent; border:none; outline:none; color:var(--text-1); font-size:13px; width:100%; font-family:inherit; }
.search-box input::placeholder { color:rgba(160,160,171,.6); }

/* skeleton */
@keyframes shimmer { 0%{background-position:-400px 0} 100%{background-position:400px 0} }
.skeleton { background:linear-gradient(90deg,rgba(255,255,255,.04) 25%,rgba(255,255,255,.09) 50%,rgba(255,255,255,.04) 75%); background-size:800px 100%; animation:shimmer 1.4s infinite linear; border-radius:12px; }

@keyframes fadeSlideUp { from{opacity:0; transform:translateY(14px)} to{opacity:1; transform:translateY(0)} }
.fade-up { animation: fadeSlideUp .45s cubic-bezier(.22,1,.36,1) both; }

/* news */
.news-card { padding:16px; margin-bottom:12px; }
.news-top { display:flex; align-items:flex-start; justify-content:space-between; gap:8px; }
.src-chip { font-size:9px; font-weight:700; padding:2px 6px; border-radius:6px; background:rgba(176,38,255,.15); color:var(--secondary); border:1px solid rgba(176,38,255,.25); flex-shrink:0; }
.news-title { font-size:13px; font-weight:600; line-height:1.8; margin-top:8px; }
.news-desc { font-size:11px; color:var(--text-2); line-height:1.7; margin-top:4px; }
.sum-btn { margin-top:12px; font-size:11px; font-weight:700; padding:7px 14px; border-radius:999px; border:1px solid rgba(0,240,255,.35); color:var(--primary); background:rgba(0,240,255,.08); cursor:pointer; font-family:inherit; }
.sum-btn:disabled { opacity:.5; }
.sum-box { margin-top:12px; border-radius:14px; padding:12px; background:linear-gradient(90deg,rgba(176,38,255,.1),rgba(0,240,255,.1)); border:1px solid rgba(176,38,255,.25); }
.sum-box .sum-label { font-size:10px; font-weight:700; color:var(--secondary); margin-bottom:4px; }
.sum-box .sum-text { font-size:11px; line-height:1.8; }
.news-ext { color:var(--text-2); font-size:12px; text-decoration:none; }

/* AI chat */
.ai-wrap { display:flex; flex-direction:column; min-height:calc(100dvh - 96px); }
.ai-msgs { flex:1; padding:12px 20px; display:flex; flex-direction:column; gap:12px; overflow-y:auto; }
.msg { max-width:85%; padding:14px; font-size:13px; line-height:1.9; white-space:pre-wrap; }
.msg-user { align-self:flex-end; border-radius:18px; border-end-end-radius:6px; background:linear-gradient(90deg,var(--secondary),rgba(0,240,255,.8)); color:#fff; box-shadow:0 6px 20px rgba(176,38,255,.3); }
.msg-ai { align-self:flex-start; border-radius:18px; border-start-start-radius:6px; }
.ai-inputbar { position:fixed; bottom:88px; left:50%; transform:translateX(-50%); width:100%; max-width:430px; padding:0 16px; z-index:40; }
.ai-inputbar-inner { display:flex; align-items:center; gap:8px; padding:8px 12px; border-radius:999px; background:rgba(10,10,15,.9); backdrop-filter:blur(24px); border:1px solid var(--border); }
.ai-inputbar input { background:transparent; border:none; outline:none; color:var(--text-1); font-size:13px; width:100%; font-family:inherit; padding:0 4px; }
.ai-inputbar input::placeholder { color:rgba(160,160,171,.6); }
.ai-send { width:36px; height:36px; flex-shrink:0; border-radius:999px; border:none; background:linear-gradient(90deg,var(--primary),var(--secondary)); color:#000; font-size:15px; cursor:pointer; display:flex; align-items:center; justify-content:center; }
.ai-send:disabled { opacity:.4; }
.ai-disclaimer { text-align:center; font-size:9px; color:rgba(160,160,171,.7); margin-top:6px; }
[dir="rtl"] .ai-send span { display:inline-block; transform:scaleX(-1); }

/* analysis */
.ana-card { padding:16px; margin-top:16px; }
.ana-head { display:flex; align-items:center; justify-content:space-between; }
.ana-title { font-size:13px; font-weight:700; }
.ana-btn { font-size:11px; font-weight:700; padding:7px 14px; border-radius:999px; background:linear-gradient(90deg,rgba(176,38,255,.25),rgba(0,240,255,.25)); border:1px solid rgba(176,38,255,.4); color:#fff; cursor:pointer; font-family:inherit; }
.ana-btn:disabled { opacity:.5; }
.ana-text { font-size:12px; line-height:2; margin-top:12px; color:#E8E8F0; }

/* more page */
.lang-grid { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.lang-btn { display:flex; align-items:center; gap:8px; padding:11px 12px; border-radius:14px; font-size:12px; font-weight:700; border:1px solid rgba(255,255,255,.1); color:var(--text-2); background:transparent; cursor:pointer; font-family:inherit; transition:all .2s; }
.lang-btn.active { background:linear-gradient(90deg,rgba(0,240,255,.2),rgba(176,38,255,.2)); border-color:rgba(0,240,255,.4); color:var(--primary); }
.about-text { font-size:11px; color:var(--text-2); line-height:2; }
.more-block { padding:16px; margin-bottom:16px; }
.more-title { font-size:13px; font-weight:700; margin-bottom:12px; }

/* bottom nav */
.rial-nav {
  position:fixed; bottom:0; left:50%; transform:translateX(-50%);
  width:100%; max-width:430px; height:84px;
  backdrop-filter:blur(28px); -webkit-backdrop-filter:blur(28px);
  background:rgba(10,10,15,.82); border-top:1px solid rgba(255,255,255,.1);
  z-index:50; display:flex; justify-content:space-around; align-items:center;
  padding:0 8px env(safe-area-inset-bottom,0);
}
.rial-nav button { display:flex; flex-direction:column; align-items:center; gap:4px; padding:8px 12px; background:none; border:none; color:var(--text-2); cursor:pointer; font-family:inherit; transition:all .2s; }
.rial-nav button .ico { font-size:20px; line-height:1; }
.rial-nav button span { font-size:10px; font-weight:600; }
.rial-nav button.active { color:var(--primary); filter:drop-shadow(0 0 8px rgba(0,240,255,.55)); }

.center-note { text-align:center; color:var(--text-2); font-size:12px; padding:40px 0; }
::selection { background:rgba(176,38,255,.5); color:#fff; }
