:root {
  color-scheme: dark;
  --bg: #070a08;
  --panel: #121713;
  --panel-2: #1a211c;
  --text: #f5fbf7;
  --muted: #93a39a;
  --green: #3dff9c;
  --green-2: #06c875;
  --blue: #39aafc;
  --lime: #d7ff55;
  --line: rgba(255,255,255,.09);
  --shadow: 0 18px 44px rgba(0,0,0,.28);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 50% -18%, rgba(61,255,156,.18), transparent 34%), var(--bg); color: var(--text); overflow-x: hidden; }
button, a, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
.app-shell { width: min(100%, 680px); margin: 0 auto; padding: max(12px, env(safe-area-inset-top)) 14px 104px; }
.topbar { position: sticky; top: 0; z-index: 20; min-height: 54px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 4px 0 10px; background: linear-gradient(180deg, rgba(7,10,8,.96), rgba(7,10,8,.70), transparent); backdrop-filter: blur(14px); }
[dir="rtl"] .topbar { grid-template-areas: "cart spacer profile"; }
[dir="ltr"] .topbar { grid-template-areas: "profile spacer cart"; }
.icon-btn, .cart-btn, .profile-pill { border: 1px solid var(--line); color: var(--text); background: rgba(22,28,24,.88); box-shadow: inset 0 0 0 1px rgba(255,255,255,.02); }
.icon-btn { grid-area: cart; width: 42px; height: 42px; display: none; place-items: center; border-radius: 16px; font-size: 28px; }
[dir="rtl"] .icon-btn { justify-self: start; }
[dir="ltr"] .icon-btn { justify-self: end; }
.profile-pill { min-width: 0; max-width: min(68vw, 320px); height: 44px; display: inline-flex; align-items: center; gap: 9px; border-radius: 999px; padding: 6px 13px 6px 6px; font-weight: 850; }
.profile-pill { grid-area: profile; }
[dir="rtl"] .profile-pill { justify-self: end; direction: rtl; }
[dir="ltr"] .profile-pill { justify-self: start; direction: ltr; padding: 6px 6px 6px 13px; }
[dir="rtl"] .cart-btn, [dir="ltr"] .cart-btn { grid-area: cart; }
[dir="rtl"] .cart-btn { justify-self: start; }
[dir="ltr"] .cart-btn { justify-self: end; }
.topbar.subview .cart-btn { display: none; }
.topbar.subview .icon-btn.visible { display: grid; }
.profile-pill img, .profile-avatar { width: 32px; height: 32px; flex: 0 0 32px; border-radius: 50%; object-fit: cover; display: grid; place-items: center; background: linear-gradient(135deg, var(--green), var(--blue)); color: #04100b; }
.profile-copy { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cart-btn { position: relative; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 17px; font-size: 21px; }
.cart-btn span { position: absolute; top: -5px; inset-inline-end: -5px; min-width: 19px; height: 19px; display: grid; place-items: center; border-radius: 999px; color: #03110a; background: var(--green); font-size: 11px; font-weight: 950; }
.view { display: none; animation: rise .22s ease-out; }
.view.active { display: block; }
.hero { position: relative; min-height: 360px; overflow: hidden; border-radius: 28px; padding: 18px 16px 22px; display: grid; place-items: center; align-content: center; gap: 12px; text-align: center; background: linear-gradient(180deg, rgba(20,28,23,.92), rgba(10,14,12,.96)); border: 1px solid var(--line); box-shadow: var(--shadow); }
.hero::before { content: ""; position: absolute; width: 280px; height: 280px; border-radius: 999px; background: radial-gradient(circle, rgba(61,255,156,.30), transparent 62%); filter: blur(4px); }
.emoji-field { position: absolute; inset: 0; pointer-events: none; }
.emoji-field span { position: absolute; font-size: 24px; opacity: .72; filter: drop-shadow(0 8px 16px rgba(0,0,0,.32)); animation: drift 4.5s ease-in-out infinite; }
.emoji-field span:nth-child(1) { top: 16%; left: 20%; }
.emoji-field span:nth-child(2) { top: 20%; right: 18%; animation-delay: .5s; }
.emoji-field span:nth-child(3) { top: 44%; left: 12%; animation-delay: 1s; }
.emoji-field span:nth-child(4) { top: 48%; right: 12%; animation-delay: 1.5s; }
.emoji-field span:nth-child(5) { top: 10%; right: 48%; animation-delay: 2s; }
.hero-avatar { position: relative; z-index: 1; width: 142px; height: auto; object-fit: contain; border-radius: 0; background: transparent; box-shadow: none; filter: drop-shadow(0 24px 34px rgba(0,0,0,.42)); animation: float 3.2s ease-in-out infinite; }
.hero-copy { position: relative; z-index: 1; }
.eyebrow { display: inline-flex; margin-bottom: 8px; color: var(--green); font-size: 12px; font-weight: 950; letter-spacing: 0; background: rgba(61,255,156,.10); border: 1px solid rgba(61,255,156,.18); border-radius: 999px; padding: 7px 11px; }
.hero h1 { margin: 0 0 8px; font-size: clamp(25px, 8vw, 34px); letter-spacing: 0; line-height: 1.35; }
.hero p, .page-head p, .support-card p, .referral-card p { margin: 0; color: #c7d4cd; line-height: 1.75; }
.hero p { max-width: 410px; margin: 0 auto 16px; }
.primary-cta, .buy-btn, .chat-input button, .prompt-search button, .service-card button { border: 0; border-radius: 999px; color: #03110a; font-weight: 950; background: linear-gradient(135deg, var(--green), var(--blue)); box-shadow: 0 16px 34px rgba(7,200,117,.18); }
.primary-cta { width: min(100%, 360px); padding: 15px 20px; font-size: 16px; }
.section { margin-top: 18px; }
.section-title { display: flex; align-items: end; justify-content: space-between; margin: 0 4px 10px; gap: 10px; }
.section-title h2 { margin: 0; font-size: 19px; }
.section-title span { color: var(--muted); font-size: 13px; }
.tool-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.tool-card, .ai-panel, .prompt-card, .plan-card, .coin-wallet-card, .account-status-card, .usage-card, .mini-card, .service-card, .support-card, .referral-card, .guide-chat, .page-head { background: linear-gradient(180deg, rgba(255,255,255,.047), rgba(255,255,255,.018)), var(--panel); border-radius: 22px; border: 1px solid var(--line); box-shadow: inset 0 0 0 1px rgba(255,255,255,.018), 0 14px 32px rgba(0,0,0,.18); }
.tool-card { min-height: 138px; padding: 16px 10px; display: grid; place-items: center; gap: 8px; text-align: center; color: var(--text); transition: transform .16s ease, border-color .16s ease; }
.tool-card:active { transform: scale(.98); border-color: rgba(61,255,156,.36); }
.icon-bubble { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 21px; font-size: 28px; background: radial-gradient(circle at 30% 20%, rgba(61,255,156,.25), rgba(57,170,252,.13)); box-shadow: 0 0 0 9px rgba(61,255,156,.06); }
.tool-card b { font-size: 15px; }
.tool-card small { color: var(--green); font-weight: 850; }
.usage-grid { display: block; }
.account-status-card { padding: 15px; display: grid; gap: 13px; border-color: rgba(61,255,156,.24); background: radial-gradient(circle at 100% 0%, rgba(61,255,156,.13), transparent 42%), linear-gradient(180deg, rgba(255,255,255,.047), rgba(255,255,255,.018)), var(--panel); }
.account-status-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.account-plan-main { min-width: 0; display: flex; align-items: center; gap: 10px; }
.account-plan-emoji { width: 44px; height: 44px; display: grid; place-items: center; flex: 0 0 44px; border-radius: 17px; font-size: 23px; background: radial-gradient(circle at 30% 20%, rgba(61,255,156,.25), rgba(57,170,252,.12)); box-shadow: 0 0 0 7px rgba(61,255,156,.045); }
.account-plan-main b { display: block; font-size: 18px; line-height: 1.3; }
.account-plan-main small { display: block; margin-top: 3px; color: var(--green); font-size: 12px; font-weight: 900; }
.account-plan-code { flex: 0 0 auto; color: #06130d; background: linear-gradient(135deg, var(--green), var(--lime)); border-radius: 999px; padding: 7px 11px; font-size: 12px; font-weight: 950; }
.account-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.usage-card { padding: 13px; display: grid; gap: 10px; background: rgba(5,8,7,.52); border-radius: 17px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.055); border: 0; }
.usage-card div:first-child { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.usage-card span { color: var(--muted); font-size: 12px; white-space: nowrap; }
.meter { height: 7px; background: #0a0e0c; border-radius: 999px; overflow: hidden; }
.meter span { display: block; height: 100%; background: linear-gradient(90deg, var(--green), var(--blue)); }
.page-head { display: grid; grid-template-columns: auto 1fr; gap: 13px; align-items: center; padding: 16px; margin-bottom: 12px; }
.page-head > span { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 19px; font-size: 28px; background: rgba(61,255,156,.12); }
.page-head h2 { margin: 0 0 4px; font-size: 22px; }
#view-guide { min-height: calc(100vh - 152px); grid-template-rows: auto minmax(0, 1fr) auto auto auto; gap: 8px; }
#view-guide.active { display: grid; }
#view-guide .page-head { margin-bottom: 0; }
.guide-chat { min-height: 0; height: auto; overflow: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; scroll-behavior: smooth; }
.chat-bubble { max-width: 86%; padding: 12px 14px; border-radius: 18px; line-height: 1.8; background: rgba(255,255,255,.06); color: #dce9e1; }
.chat-bubble.user { align-self: flex-end; color: #03110a; background: linear-gradient(135deg, var(--green), var(--lime)); }
.quick-chips, .chip-row { display: flex; flex-wrap: nowrap; gap: 8px; overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; padding: 8px 1px; scrollbar-width: none; scroll-snap-type: x proximity; }
.quick-chips::-webkit-scrollbar, .chip-row::-webkit-scrollbar { display: none; }
.quick-chips.sub { margin-top: -4px; padding-top: 2px; padding-bottom: 8px; opacity: .96; }
.quick-chips button, .chip-row button { flex: 0 0 auto; white-space: nowrap; border: 1px solid var(--line); color: var(--text); background: rgba(255,255,255,.055); border-radius: 999px; padding: 8px 12px; font-size: 13px; font-weight: 850; scroll-snap-align: start; }
.quick-chips button.active, .chip-row button.active { color: #03110a; background: var(--green); }
.chat-input, .prompt-search, .ai-actions { display: grid; grid-template-columns: 1fr auto; gap: 9px; align-items: center; position: sticky; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 8; background: linear-gradient(180deg, rgba(7,10,8,0), rgba(7,10,8,.92) 24%, rgba(7,10,8,.98)); padding-top: 10px; padding-bottom: 2px; }
.chat-input input, .prompt-search input, textarea, select { width: 100%; border: 1px solid var(--line); outline: 0; color: var(--text); background: rgba(5,8,7,.74); border-radius: 18px; padding: 13px 14px; resize: vertical; }
.chat-input button, .prompt-search button, .buy-btn, .service-card button { padding: 13px 16px; }
.engine-chip { margin-top: 4px; display: inline-flex; color: #5effab; font-size: 12px; font-weight: 800; }
.engine-chip.warn { color: #ffcf66; }
.guide-typing { min-height: 24px; display: inline-flex; align-items: center; gap: 5px; padding: 0 2px; }
.guide-typing span { width: 7px; height: 7px; border-radius: 50%; background: rgba(94,255,171,.8); animation: typingPulse 1.1s infinite ease-in-out; }
.guide-typing span:nth-child(2) { animation-delay: .15s; }
.guide-typing span:nth-child(3) { animation-delay: .30s; }
.ai-panel { padding: 15px; }
.content-profile-card { margin-bottom: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.03); }
.content-profile-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.content-profile-fields { display: grid; gap: 8px; margin-bottom: 8px; }
.content-profile-fields label { display: grid; gap: 6px; font-size: 12px; color: var(--muted); font-weight: 800; }
.content-profile-fields input { width: 100%; border: 1px solid var(--line); outline: 0; color: var(--text); background: rgba(5,8,7,.74); border-radius: 12px; padding: 10px 12px; }
#contentProfileStatus { color: var(--green); font-size: 12px; font-weight: 700; }
.ai-tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-bottom: 14px; }
.ai-tool { min-height: 92px; border: 1px solid var(--line); border-radius: 18px; color: var(--text); background: rgba(255,255,255,.045); display: grid; align-content: center; justify-items: center; gap: 5px; text-align: center; padding: 10px; font-weight: 850; }
.ai-tool .badge { font-size: 11px; color: var(--green); }
.ai-tool.locked { opacity: .66; cursor: not-allowed; }
.ai-tool span { font-size: 24px; }
.ai-tool small { color: var(--muted); font-size: 11px; line-height: 1.45; }
.ai-tool.active { color: #03110a; background: linear-gradient(135deg, var(--green), var(--blue)); }
.ai-tool.active small { color: rgba(3,17,10,.74); }
.field-label { display: block; margin: 4px 2px 8px; color: var(--muted); font-size: 13px; font-weight: 850; }
.compact-cta { width: auto; min-width: 122px; padding-inline: 15px; }
.ai-output { min-height: 128px; white-space: pre-wrap; overflow-wrap: anywhere; margin: 12px 0 0; padding: 14px; color: #dce9e1; background: rgba(5,8,7,.72); border: 1px solid var(--line); border-radius: 18px; line-height: 1.8; font-family: inherit; }
.ai-output-actions { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px; }
.content-history { margin-top: 14px; }
#historyList { display: grid; gap: 8px; }
.history-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
  background: rgba(255,255,255,.03);
}
.history-item b { display: block; margin-bottom: 4px; }
.history-item small { color: var(--muted); display: block; line-height: 1.5; }
.history-item .ghost-btn { margin-top: 8px; }
.ghost-btn { border: 1px solid var(--line); background: rgba(255,255,255,.04); color: var(--text); border-radius: 12px; padding: 8px 10px; font-weight: 800; font-size: 12px; }
.prompt-search { margin-bottom: 2px; }
.prompt-grid { display: grid; gap: 11px; margin-top: 8px; }
.prompt-card { overflow: hidden; display: grid; grid-template-columns: 116px 1fr; min-height: 156px; }
.prompt-visual { min-height: 100%; display: grid; place-items: center; align-content: center; gap: 7px; background: radial-gradient(circle at 30% 20%, color-mix(in srgb, var(--accent) 44%, transparent), transparent 62%), linear-gradient(160deg, rgba(255,255,255,.10), rgba(255,255,255,.02)); }
.prompt-visual span { font-size: 36px; }
.prompt-visual b { color: var(--accent); font-size: 12px; }
.prompt-body { padding: 14px; }
.prompt-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--green); font-size: 12px; font-weight: 950; }
.prompt-card h3 { margin: 8px 0 6px; font-size: 15px; line-height: 1.55; }
.prompt-card p { margin: 0; color: #c8d6ce; line-height: 1.72; font-size: 13px; }
.prompt-card.locked { opacity: .72; }
.prompt-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.prompt-tags small { color: var(--green); background: rgba(61,255,156,.10); border-radius: 999px; padding: 4px 7px; }
.coin-wallet-card { position: relative; overflow: hidden; display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center; margin-bottom: 11px; padding: 17px; background: radial-gradient(circle at 100% 0%, rgba(61,255,156,.20), transparent 38%), linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02)), var(--panel); }
.coin-wallet-card h3 { margin: 7px 0 6px; font-size: 22px; }
.coin-wallet-card p, .mini-card p, .service-card p { margin: 0; color: #c8d6ce; line-height: 1.65; }
.coin-balance { min-width: 104px; display: grid; place-items: center; padding: 14px 10px; border-radius: 21px; color: #03110a; background: linear-gradient(135deg, var(--green), var(--lime)); }
.coin-balance strong { font-size: 24px; line-height: 1; }
.coin-balance span { font-size: 12px; font-weight: 950; }
.coin-toggle { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; color: var(--text); border-radius: 18px; background: rgba(255,255,255,.05); font-weight: 850; }
.coin-toggle input { width: 20px; height: 20px; accent-color: var(--green); }
.coin-methods, .service-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.mini-card, .service-card { padding: 14px; }
.service-card { min-height: 280px; display: flex; flex-direction: column; gap: 8px; }
.mini-card small { display: inline-flex; margin-top: 9px; color: var(--green); font-weight: 900; }
.product-list { display: grid; gap: 12px; }
.plan-card { position: relative; overflow: hidden; padding: 18px; }
.featured-plan { border-color: rgba(61,255,156,.38); box-shadow: 0 18px 46px rgba(7,200,117,.16), inset 0 0 0 1px rgba(61,255,156,.12); }
.featured-plan::before { content: ""; position: absolute; inset-inline: 16px; top: 0; height: 3px; border-radius: 999px; background: linear-gradient(90deg, var(--green), var(--blue)); }
.plan-head { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; }
.plan-emoji { width: 56px; height: 56px; display: grid; place-items: center; border-radius: 20px; font-size: 29px; background: radial-gradient(circle at 30% 20%, rgba(61,255,156,.26), rgba(57,170,252,.12)); box-shadow: 0 0 0 9px rgba(61,255,156,.05); }
.plan-head span { color: var(--green); font-size: 12px; font-weight: 950; }
.plan-head h3 { margin: 3px 0 2px; font-size: 24px; }
.plan-head p { margin: 0; color: var(--muted); font-size: 13px; }
.plan-price { margin: 16px 0 12px; font-size: 20px; font-weight: 950; }
.plan-features { display: grid; gap: 8px; margin-bottom: 16px; }
.plan-features span { display: flex; align-items: center; gap: 8px; min-height: 34px; padding: 8px 10px; color: #dce9e1; background: rgba(255,255,255,.045); border-radius: 14px; line-height: 1.45; }
.buy-btn { width: 100%; }
.buy-btn:disabled { color: var(--muted); background: rgba(255,255,255,.08); box-shadow: none; }
.service-card span { display: inline-grid; width: 48px; height: 48px; place-items: center; border-radius: 17px; margin-bottom: 10px; font-size: 26px; background: rgba(61,255,156,.12); }
.service-card h3 { margin: 0 0 8px; font-size: 16px; }
.service-card .service-meta { margin-top: auto; display: grid; gap: 8px; }
.service-card .service-meta small { color: var(--green); font-size: 12px; font-weight: 900; }
.service-card .service-meta ul { margin: 0; padding: 0 16px; color: #c8d6ce; font-size: 12px; line-height: 1.6; }
.service-card button { width: 100%; margin-top: 13px; padding-block: 11px; }
.service-card.disabled { opacity: .72; border-color: rgba(255,255,255,.12); }
.service-card.disabled button { color: #8e9b94; background: rgba(255,255,255,.10); box-shadow: none; cursor: not-allowed; }
.referral-card, .support-card { padding: 26px 18px; text-align: center; }
.gift-stack { min-height: 92px; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 42px; }
.gift-stack span { animation: float 2.8s ease-in-out infinite; }
.gift-stack span:nth-child(2) { animation-delay: .4s; }
.gift-stack span:nth-child(3) { animation-delay: .8s; }
.bottom-nav { position: fixed; left: 50%; bottom: max(12px, env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(420px, calc(100% - 28px)); height: 66px; z-index: 30; display: grid; grid-template-columns: repeat(4, 1fr); align-items: center; background: rgba(18,23,19,.92); backdrop-filter: blur(20px); border: 1px solid rgba(255,255,255,.10); border-radius: 999px; box-shadow: 0 18px 46px rgba(0,0,0,.34); }
.bottom-nav a { color: var(--muted); text-decoration: none; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 20px; font-weight: 850; }
.bottom-nav a span { font-size: 13px; line-height: 1.1; font-weight: 850; }
.bottom-nav a.active { color: var(--green); }
@keyframes rise { from { transform: translateY(8px); opacity: .75; } to { transform: translateY(0); opacity: 1; } }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes drift { 0%,100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-12px) rotate(7deg); } }
@keyframes typingPulse { 0%, 80%, 100% { opacity: .35; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-2px);} }
@media (max-width: 460px) {
  .app-shell { padding-inline: 12px; }
  .hero { min-height: 330px; }
  .hero-avatar { width: 122px; }
  .prompt-card { grid-template-columns: 96px 1fr; }
  .account-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .coin-methods, .service-grid { grid-template-columns: 1fr; }
  #view-guide { min-height: calc(100vh - 164px); }
}
@media (max-width: 390px) {
  .tool-grid, .ai-tools { grid-template-columns: 1fr; }
  .account-metrics { grid-template-columns: 1fr; }
  .chat-input, .prompt-search, .ai-actions, .coin-wallet-card { grid-template-columns: 1fr; position: static; background: transparent; padding-top: 0; }
  .compact-cta { width: 100%; }
  .coin-balance { width: 100%; }
  .profile-copy { max-width: 190px; }
  .prompt-card { grid-template-columns: 1fr; }
  .prompt-visual { min-height: 104px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; scroll-behavior: auto !important; }
}
