


.oc-fab {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #d4af37, #8b6914);
  border: 2px solid rgba(255,215,0,.6);
  box-shadow: 0 4px 16px rgba(0,0,0,.4), 0 0 12px rgba(255,215,0,.3);
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  z-index: 9998;
  display: flex; align-items: center; justify-content: center;
  transition: transform .15s, box-shadow .15s;
}
.oc-fab:hover { transform: scale(1.08); box-shadow: 0 6px 20px rgba(255,215,0,.5); }
.oc-fab .oc-fab-badge {
  position: absolute; top: -4px; right: -4px;
  min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 10px;
  background: #e44; color: #fff;
  font-size: 11px; font-weight: 700; line-height: 20px;
  border: 2px solid #fff;
}
.oc-fab.oc-hide { display: none; }


.oc-panel {
  position: fixed;
  top: 60px; right: 0; bottom: 0;
  width: 380px;
  background: rgba(8, 12, 24, .45);    
  backdrop-filter: blur(8px) saturate(105%);
  -webkit-backdrop-filter: blur(8px) saturate(105%);
  border-left: 1px solid rgba(255,215,0,.3);
  box-shadow: -8px 0 24px rgba(0,0,0,.35);
  color: #f0e8d0;
  display: flex; flex-direction: column;
  z-index: 9999;
  transform: translateX(100%);
  transition: transform .28s cubic-bezier(.2,.7,.2,1), height .25s ease;
  font-family: -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}

.oc-panel,
.oc-panel * {
  text-shadow: 0 1px 2px rgba(0,0,0,.95), 0 0 1px rgba(0,0,0,.7);
}
.oc-panel.oc-open { transform: translateX(0); }

/* 📱 2026-06-14 (형 보고): 모바일(iOS·안드로이드)에서 채팅 한 번 열었다 닫으면 렉 심해짐.
   원인 = backdrop-filter:blur 레이어가 닫혀도(translateX로 화면밖) 매 프레임 GPU 합성 지속(특히 iOS).
   터치기기는 blur 제거 + 솔리드 배경으로 대체(가독성 유지, GPU 부하 0). PC는 위 blur 그대로. */
@media (pointer: coarse) {
  .oc-panel {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: rgba(8, 12, 24, .96);
  }
}


.oc-panel.oc-compact {
  top: auto;
  height: 320px;
}


.oc-header {
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255,215,0,.18);
  display: flex; align-items: center; gap: 6px;
  background: rgba(20,16,8,.35);
}
.oc-header-title {
  flex: 1; font-size: 13px; font-weight: 700; color: #ffd700;
  display: flex; align-items: center; gap: 5px;
}
.oc-online-count {
  font-size: 10.5px; color: #bbb; font-weight: 500;
}
.oc-online-count .oc-dot { color:#3c3; display:inline-block; margin-right:2px; }
.oc-header-btn {
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 6px; cursor: pointer;
  background: rgba(255,255,255,.08); border: none; color: #ddd;
  font-size: 12px;
}
.oc-header-btn:hover { background: rgba(255,215,0,.15); color: #ffd700; }
.oc-header-btn.oc-muted i { color:#888; }


.oc-messages {
  flex: 1; overflow-y: auto;
  padding: 6px 10px 6px 8px;
  display: flex; flex-direction: column;
  gap: 1px;
  scrollbar-width: thin; scrollbar-color: rgba(255,215,0,.3) transparent;
  font-size: 11.5px;
  line-height: 1.55;
}
.oc-messages::-webkit-scrollbar { width: 6px; }
.oc-messages::-webkit-scrollbar-thumb { background: rgba(255,215,0,.3); border-radius: 3px; }


.oc-msg {
  display: block;
  padding: 2px 6px;
  border-radius: 4px;
  color: #d8d0bf;
  word-break: break-word;
  cursor: default;
  border: none;
  background: transparent;
}
.oc-msg:hover { background: rgba(255,255,255,.035); }

.oc-msg-time {
  color: #6b7280;
  font-size: 10.5px;
  margin-right: 4px;
  font-variant-numeric: tabular-nums;
}
.oc-msg-title-img,
.oc-msg-title-video {
  width: 14px; height: 14px; border-radius: 50%;
  object-fit: cover; background: #0a0a0a;
  vertical-align: -2px;
  margin-right: 2px;
  display: inline-block;
}
.oc-msg-title-emoji {
  display: inline-block;
  font-size: 10.5px;
  vertical-align: baseline;
  margin-right: 2px;
}
.oc-msg-nick {
  font-weight: 700;
  color: #ffd700;
  cursor: pointer;
  white-space: nowrap;
}
.oc-msg-nick:hover { text-decoration: underline; }
.oc-msg-colon {
  color: #888;
  margin: 0 4px 0 1px;
}
.oc-msg-text {
  color: #e8e0c8;
  white-space: pre-wrap;
  display: inline;
}


.oc-msg-sys .oc-msg-nick,
.oc-msg-welcome .oc-msg-nick { color: #ffaa55; }
.oc-msg-sys .oc-msg-text,
.oc-msg-welcome .oc-msg-text { color: #ffd9a0; font-style: italic; }
.oc-msg-welcome .oc-msg-text { color: #b8e0d0; }


.oc-msg-jackpot {
  padding: 3px 8px;
  border-radius: 6px;
  font-weight: 600;
  margin: 1px 0;
}
.oc-msg-jackpot .oc-msg-nick { color: #ffd700; }
.oc-msg-jackpot .oc-msg-time { color: #999; }

.oc-msg-jackpot[data-tier="big"] {
  background: linear-gradient(90deg, rgba(255,215,0,.10), rgba(255,215,0,.02));
  border-left: 2px solid rgba(255,215,0,.55);
}
.oc-msg-jackpot[data-tier="big"] .oc-msg-text { color: #ffe066; }

.oc-msg-jackpot[data-tier="mega"] {
  background: linear-gradient(90deg, rgba(255,140,0,.16), rgba(255,140,0,.03));
  border-left: 2px solid rgba(255,140,0,.65);
}
.oc-msg-jackpot[data-tier="mega"] .oc-msg-text { color: #ffaa55; }

.oc-msg-jackpot[data-tier="jackpot"] {
  background: linear-gradient(90deg, rgba(255,60,60,.18), rgba(255,60,60,.04));
  border-left: 2px solid rgba(255,80,80,.7);
  box-shadow: inset 0 0 8px rgba(255,60,60,.08);
}
.oc-msg-jackpot[data-tier="jackpot"] .oc-msg-text { color: #ff8a8a; }

.oc-msg-jackpot[data-tier="super"] {
  background: linear-gradient(90deg, rgba(186,85,255,.22), rgba(186,85,255,.05));
  border-left: 2px solid rgba(220,120,255,.75);
  box-shadow: inset 0 0 12px rgba(186,85,255,.12);
  animation: oc-super-pulse 2s ease-in-out infinite;
}
.oc-msg-jackpot[data-tier="super"] .oc-msg-text {
  color: #e0aaff;
  text-shadow: 0 0 6px rgba(220,120,255,.5);
}
@keyframes oc-super-pulse {
  0%, 100% { box-shadow: inset 0 0 12px rgba(186,85,255,.12); }
  50%      { box-shadow: inset 0 0 22px rgba(220,120,255,.28); }
}
.oc-msg-jackpot:not([data-tier]) {
  background: linear-gradient(90deg, rgba(212,175,55,.10), rgba(212,175,55,.02));
  border-left: 2px solid rgba(255,215,0,.4);
}
.oc-msg-jackpot:not([data-tier]) .oc-msg-text { color: #ffd700; }


.oc-reactions {
  display: inline-flex; gap: 3px; flex-wrap: wrap;
  margin-left: 6px;
  vertical-align: middle;
}
.oc-reaction {
  font-size: 10px;
  padding: 0 5px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 8px;
  cursor: pointer; user-select: none;
  line-height: 16px;
  display: inline-block;
  transition: background .12s;
}
.oc-reaction:hover { background: rgba(255,215,0,.15); }
.oc-reaction.oc-reacted {
  background: rgba(255,215,0,.22);
  border-color: rgba(255,215,0,.5);
  color: #ffd700;
}
.oc-reaction-add {
  font-size: 11px;
  padding: 0 5px;
  opacity: 0;
  background: transparent;
  border: 1px dashed rgba(255,255,255,.18);
  border-radius: 8px;
  cursor: pointer;
  line-height: 16px;
  display: inline-block;
  margin-left: 3px;
  transition: opacity .12s;
}
.oc-msg:hover .oc-reaction-add { opacity: .55; }
.oc-reaction-add:hover { opacity: 1 !important; background: rgba(255,255,255,.05); }
.oc-reaction-picker {
  display: flex; gap: 3px; padding: 5px;
  background: rgba(20,16,8,.95); border: 1px solid rgba(255,215,0,.4);
  border-radius: 8px;
  position: absolute; z-index: 10000;
  box-shadow: 0 4px 12px rgba(0,0,0,.5);
}
.oc-reaction-picker button {
  width: 24px; height: 24px; padding: 0;
  background: none; border: none; cursor: pointer;
  font-size: 16px;
}
.oc-reaction-picker button:hover { background: rgba(255,215,0,.2); border-radius: 4px; }


.oc-quick {
  display: flex; gap: 5px; padding: 5px 8px;
  border-top: 1px solid rgba(255,255,255,.08);
  overflow-x: auto;
  scrollbar-width: none;
}
.oc-quick::-webkit-scrollbar { display: none; }
.oc-quick button {
  flex-shrink: 0;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,215,0,.18);
  color: #f0e8d0;
  padding: 3px 9px;
  border-radius: 14px;
  font-size: 11px;
  cursor: pointer;
  white-space: nowrap;
  transition: background .12s;
}
.oc-quick button:hover { background: rgba(255,215,0,.18); }


.oc-input-row {
  display: flex; gap: 6px; padding: 6px 8px;
  border-top: 1px solid rgba(255,215,0,.18);
  background: rgba(0,0,0,.22);
}
.oc-input {
  flex: 1;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  color: #fff;
  padding: 6px 10px;
  border-radius: 14px;
  font-size: 12px;
  outline: none;
}
.oc-input:focus { border-color: rgba(255,215,0,.5); }
.oc-send {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, #d4af37, #8b6914);
  border: none; color: #fff;
  border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
}
.oc-send:active { transform: scale(.95); }
.oc-send:disabled { opacity: .5; cursor: not-allowed; }


.oc-mini-card {
  position: fixed;
  z-index: 10001;
  background: rgba(15,18,30,.97);
  border: 1px solid rgba(255,215,0,.4);
  border-radius: 12px;
  padding: 12px 14px;
  min-width: 200px;
  max-width: 240px;
  box-shadow: 0 8px 28px rgba(0,0,0,.6);
  color: #f0e8d0;
  font-size: 12px;
}
.oc-mini-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.oc-mini-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: #333; object-fit: cover;
  border: 1px solid rgba(255,215,0,.3);
}
.oc-mini-nick { font-weight: 700; font-size: 14px; color: #ffd700; }
.oc-mini-row { display: flex; justify-content: space-between; padding: 2px 0; color: #ccc; }
.oc-mini-row b { color: #fff; }
.oc-mini-close {
  position: absolute; top: 4px; right: 6px;
  background: none; border: none; color: #888; cursor: pointer;
}


.oc-jump-new {
  position: absolute; bottom: 84px; right: 10px;
  background: #d4af37; color: #000;
  padding: 4px 9px; border-radius: 12px;
  font-size: 10.5px; font-weight: 700; cursor: pointer;
  border: none; display: none;
  box-shadow: 0 2px 8px rgba(0,0,0,.4);
}
.oc-jump-new.oc-show { display: block; }


@media (max-width: 900px) {
  .oc-panel {
    top: auto; bottom: 0; right: 0;
    width: 100%; height: 70vh;
    border-left: none;
    border-top: 1px solid rgba(255,215,0,.3);
    border-radius: 14px 14px 0 0;
    transform: translateY(100%);
  }
  .oc-panel.oc-open { transform: translateY(0); }
  .oc-panel.oc-compact { height: 38vh; }
  .oc-fab {
    bottom: 76px;
    right: 12px;
    width: 48px; height: 48px;
    font-size: 20px;
  }
}

@media (max-height: 500px) and (max-width: 900px) {
  .oc-panel { height: 90vh; }
  .oc-panel.oc-compact { height: 50vh; }
}
