:root {
  --primary:#6d4aff;
  --accent:#ff2da1;
  --glass-bg:rgba(20,20,30,.65);
  --glass-border:rgba(255,255,255,.15);
  --glass-highlight:rgba(255,255,255,.08);
  --text:#f5f5fa;
  --muted:#a0a0b8;
  --radius:18px;
  --bar-h:64px;
  --shell-h:560px;
}

.launcher-container {position:fixed; bottom:10px; left:50%; transform:translateX(-50%); display:flex; flex-direction:column; align-items:center; z-index:9999;}
.stars {position:relative; width:64px; height:64px; cursor:pointer;}
.star-main svg {width:32px; height:32px; fill:url(#gradStarAnim); animation:pulse 3s infinite;}
.ai-label {margin-top: -30px; padding:4px 12px; border-radius:10px; font-size:13px; color:var(--text); background:var(--glass-bg); backdrop-filter:blur(10px) saturate(160%); opacity:0; transform:translateY(8px); transition:all .3s ease;}
.launcher-container:hover .ai-label {opacity:1; transform:translateY(0);}
@keyframes pulse {0%,100%{transform:scale(1);}50%{transform:scale(1.2);}}
@keyframes gradientShift {0%{stop-color:#6d4aff;}50%{stop-color:#ff2da1;}100%{stop-color:#6d4aff;}}
#gradStarAnim stop {animation:gradientShift 6s infinite;}


.ai-shell {position:fixed; bottom:80px; left:50%; transform:translateX(-50%) scale(.9); width:min(560px,calc(100% - 40px)); height:var(--shell-h); border-radius:var(--radius); overflow:hidden; backdrop-filter:blur(18px) saturate(160%); background:var(--glass-bg); border:1px solid var(--glass-border); opacity:0; pointer-events:none; transition:all .45s ease; z-index:9998; background-image:linear-gradient(135deg,rgba(109,74,255,.15),rgba(255,45,161,.15));}
.ai-shell.open {opacity:1; transform:translateX(-50%) scale(1); pointer-events:auto;}
.ai-surface {position:absolute; inset:0; display:grid; grid-template-rows:auto 1fr auto;}


.ai-header {display:flex; align-items:center; justify-content:space-between; padding:12px 16px; border-bottom:1px solid var(--glass-highlight);}
.ai-brand {display:flex; align-items:center; gap:10px;}
.ai-avatar {width:28px; height:28px; border-radius:50%; background:linear-gradient(135deg,var(--primary),var(--accent)); box-shadow:0 0 12px rgba(255,45,161,.6); animation:pulse 3s infinite;}
.ai-dot {width:8px; height:8px; border-radius:999px; background:#22c55e; box-shadow:0 0 8px #22c55e80;}
.ai-title {font-weight:600; font-size:15px; color:var(--text);}
.rfc-select-header {height:30px; border-radius:8px; border:1px solid var(--glass-highlight); background:rgba(255,255,255,.07); color:var(--text); padding:0 8px; font-size:13px; backdrop-filter:blur(8px);}
.ai-close {background:transparent; border:1px solid var(--glass-highlight); color:var(--muted); width:28px; height:28px; border-radius:8px; display:grid; place-items:center; cursor:pointer;}
.ai-close:hover {background:var(--glass-highlight); color:var(--text);}


.ai-messages {padding:16px; overflow-y:auto; display:flex; flex-direction:column; gap:12px;}
.msg {max-width:80%; padding:12px 14px; border-radius:14px; font-size:15px; line-height:1.4; color:var(--text); animation:fadeIn .4s ease;}
.msg.ai {align-self:flex-start; background:rgba(255,255,255,.08); position:relative; padding-left:28px;}
.msg.ai::before {content:'⭐'; position:absolute; left:8px; top:12px; font-size:12px; opacity:.7;}
.msg.user {align-self:flex-end; background:rgba(109,74,255,.25);}
.msg.card {background:rgba(255,255,255,.1); border:1px solid var(--glass-highlight);}
.msg.card h4 {margin:0 0 6px 0; font-size:14px;}
@keyframes fadeIn {from{opacity:0; transform:translateY(8px);}to{opacity:1; transform:translateY(0);}}


.ai-footer {padding:10px; border-top:1px solid var(--glass-highlight); background:rgba(0,0,0,.2); display:flex; flex-direction:column; gap:6px;}
.chips {display:flex; gap:6px; flex-wrap:wrap;}
.chips span {padding:6px 10px; border-radius:10px; background:rgba(255,255,255,.08); font-size:12px; color:var(--text); cursor:pointer;}
.chips span:hover {background:rgba(255,255,255,.15);}
.composer {display:flex; gap:6px; align-items:center;}
.composer input {flex:1; height:44px; border-radius:12px; border:1px solid var(--glass-highlight); background:rgba(255,255,255,.07); color:var(--text); padding:0 12px;}
.composer input::placeholder {color:var(--muted);}
.composer button {width:40px; height:40px; border-radius:12px; border:0; cursor:pointer; display:grid; place-items:center;}
.attach {background:rgba(255,255,255,.08); color:var(--text);}
.mic {background:rgba(255,255,255,.08); color:var(--text);}
.send {background:var(--primary); color:#fff; font-size:16px;}


.typing {display:flex; gap:4px; padding:10px;}
.typing span {width:6px; height:6px; background:var(--text); border-radius:50%; opacity:.6; animation:bounce 1.2s infinite;}
.typing span:nth-child(2){animation-delay:.2s;}
.typing span:nth-child(3){animation-delay:.4s;}
@keyframes bounce {0%,80%,100%{transform:scale(0);}40%{transform:scale(1);}}
