/* 讲师浮动按钮 + 聊天面板 v3.0 */
.teacher-float{position:fixed; bottom:24px; right:24px; width:56px; height:56px; border-radius:50%;
  background:linear-gradient(135deg,#6c8cff,#38d9a9); font-size:24px; display:flex; align-items:center;
  justify-content:center; cursor:pointer; box-shadow:0 4px 20px rgba(108,140,255,0.4); z-index:2147483647;
  transition:all .3s cubic-bezier(.34,1.56,.64,1); animation:floatBob 3s ease-in-out infinite; border:none; outline:none;}
.teacher-float:hover{transform:scale(1.15) rotate(8deg); box-shadow:0 6px 28px rgba(108,140,255,0.6);}
.teacher-float:active{transform:scale(0.9);}
@keyframes floatBob{0%,100%{transform:translateY(0);}50%{transform:translateY(-8px);}}

.teacher-panel{position:fixed; bottom:90px; right:24px; width:380px; height:520px;
  background:#161b27; border:1px solid #2a3350; border-radius:16px;
  box-shadow:0 16px 48px rgba(0,0,0,0.5); z-index:2147483646;
  display:none; flex-direction:column; overflow:hidden;}
.teacher-panel.open{display:flex !important;}

.tp-header{display:flex; align-items:center; justify-content:space-between; padding:12px 16px;
  background:#1c2333; border-bottom:1px solid #2a3350; font-size:14px; font-weight:600; color:#e6e9f0;}
.tp-header button{background:none; border:none; color:#8b93a7; font-size:16px; cursor:pointer;
  padding:4px 8px; border-radius:4px;}
.tp-header button:hover{background:#2a3350;}

.teacher-chat{display:flex; flex-direction:column; flex:1; overflow:hidden;}
.tc-header{display:flex; align-items:center; gap:10px; padding:10px 14px; border-bottom:1px solid #2a3350;
  background:#161b27; flex-shrink:0;}
.tc-header canvas{border-radius:50%; background:#1a1f2e; flex-shrink:0;}
.tc-info .tc-name{font-size:13px; font-weight:600; color:#e6e9f0;}
.tc-info .tc-status{font-size:11px; color:#51e08c;}

.tc-messages{flex:1; overflow-y:auto; padding:14px; display:flex; flex-direction:column; gap:10px;
  scroll-behavior:smooth;}
.tc-messages::-webkit-scrollbar{width:5px;}
.tc-messages::-webkit-scrollbar-track{background:transparent;}
.tc-messages::-webkit-scrollbar-thumb{background:#2a3350; border-radius:3px;}

.tc-msg{display:flex; animation:msgIn .25s ease-out; position:relative;}
@keyframes msgIn{from{opacity:0; transform:translateY(8px);} to{opacity:1;}}
.tc-msg.user{justify-content:flex-end;}
.tc-bubble{max-width:82%; padding:10px 14px; border-radius:14px; font-size:13px; line-height:1.7;
  word-wrap:break-word;}
.tc-msg.teacher .tc-bubble{background:#1c2333; border:1px solid #2a3350; color:#e6e9f0; border-bottom-left-radius:4px;}
.tc-msg.user .tc-bubble{background:linear-gradient(135deg,#6c8cff,#4a7cff); color:#fff; border-bottom-right-radius:4px;}
.tc-time{font-size:10px; color:#5c6370; margin-top:3px; padding:0 4px;}
.tc-msg.user .tc-time{text-align:right;}

/* 打字动画 */
.typing-msg .tc-bubble{display:flex; align-items:center; gap:4px; padding:12px 16px;}
.typing-dot{width:6px; height:6px; border-radius:50%; background:#8b93a7; animation:typingBounce 1.4s infinite;}
.typing-dot:nth-child(2){animation-delay:.2s;}
.typing-dot:nth-child(3){animation-delay:.4s;}
@keyframes typingBounce{0%,60%,100%{transform:translateY(0); opacity:.4;}30%{transform:translateY(-5px); opacity:1;}}

.tc-quick{display:flex; gap:6px; padding:8px 12px; flex-wrap:wrap; border-top:1px solid #2a3350;
  background:#161b27; flex-shrink:0;}
.tc-quick-btn{padding:6px 12px; border-radius:16px; font-size:12px; cursor:pointer;
  background:#1c2333; border:1px solid #2a3350; color:#8b93a7; transition:.15s; display:flex; align-items:center; gap:4px;}
.tc-quick-btn:hover{border-color:var(--school); color:var(--school); background:rgba(245,158,11,0.1);}

.tc-input{display:flex; gap:8px; padding:10px 12px; border-top:1px solid #2a3350; flex-shrink:0;
  background:#161b27;}
.tc-input input{flex:1; background:#0a0c12; border:1px solid #2a3350; border-radius:10px;
  padding:10px 14px; color:#e6e9f0; font-size:13px; outline:none; transition:.15s;}
.tc-input input:focus{border-color:#6c8cff; box-shadow:0 0 0 2px rgba(108,140,255,0.15);}
.tc-input input::placeholder{color:#5c6370;}
.tc-input button{background:linear-gradient(135deg,#6c8cff,#4a7cff); color:#fff; border:none; border-radius:10px;
  padding:10px 14px; cursor:pointer; font-size:16px; transition:.15s; display:flex; align-items:center;}
.tc-input button:hover{filter:brightness(1.1);}
.tc-input button:active{transform:scale(0.9);}

@media(max-width:500px){
  .teacher-panel{width:calc(100vw - 16px); right:8px; bottom:75px; height:55vh; border-radius:12px;}
  .teacher-float{right:8px; bottom:16px; width:48px; height:48px; font-size:20px;}
}
