.lirflix-chat {
  width: 100%;
  max-width: 900px;
  margin: 24px auto 0;
  background: #0b111b;
  border: 1px solid #1e2a3a;
  border-radius: 16px;
  overflow: hidden;
  text-align: left;
  font-family: "Nunito", "Segoe UI", sans-serif;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.lirflix-chat__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #1a2332;
  background: linear-gradient(180deg, #0f1624 0%, #0b111b 100%);
}

.lirflix-chat__header-left {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

.lirflix-chat__icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #111827;
  border: 2px solid #00d4ff55;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.lirflix-chat__titles {
  min-width: 0;
}

.lirflix-chat__show {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.6px;
  color: #00d4ff;
  text-transform: uppercase;
  margin: 0 0 2px;
  font-family: "Exo 2", sans-serif;
}

.lirflix-chat__episode {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  font-family: "Exo 2", sans-serif;
  line-height: 1.2;
}

.lirflix-chat__stats {
  text-align: right;
  flex-shrink: 0;
}

.lirflix-chat__online {
  font-size: 12px;
  color: #22c55e;
  font-weight: 700;
  margin: 0 0 2px;
  font-family: "Exo 2", sans-serif;
}

.lirflix-chat__online-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  margin-right: 4px;
  box-shadow: 0 0 8px #22c55e;
}

.lirflix-chat__count {
  font-size: 11px;
  color: #ffffff44;
  margin: 0;
}

.lirflix-chat__messages {
  height: 320px;
  overflow-y: auto;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #080c14;
}

.lirflix-chat__messages::-webkit-scrollbar {
  width: 6px;
}

.lirflix-chat__messages::-webkit-scrollbar-thumb {
  background: #1e2a3a;
  border-radius: 3px;
}

.lirflix-chat__empty {
  margin: auto;
  text-align: center;
  color: #ffffff33;
  font-size: 13px;
  padding: 40px 16px;
}

.lirflix-chat__msg {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.lirflix-chat__avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid currentColor;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  flex-shrink: 0;
  font-family: "Exo 2", sans-serif;
  background: rgba(255, 255, 255, 0.04);
}

.lirflix-chat__body {
  flex: 1;
  min-width: 0;
}

.lirflix-chat__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 3px;
  flex-wrap: nowrap;
  min-width: 0;
}

.lirflix-chat__meta-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  margin-left: auto;
}

.lirflix-chat__name {
  font-size: 13px;
  font-weight: 700;
  font-family: "Exo 2", sans-serif;
}

.lirflix-chat__badge-admin {
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  background: #ff6b3522;
  color: #ff6b35;
  border: 1px solid #ff6b3544;
  letter-spacing: 0.4px;
}

.lirflix-chat__time {
  font-size: 11px;
  color: #ffffff33;
  white-space: nowrap;
}

.lirflix-chat__reply-btn {
  flex-shrink: 0;
  margin-left: 6px;
  padding: 3px 8px;
  border: 1px solid #00d4ff44;
  border-radius: 8px;
  background: #00d4ff12;
  color: #00d4ff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: "Exo 2", sans-serif;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.lirflix-chat__reply-btn-icon {
  font-size: 15px;
  line-height: 1;
}

.lirflix-chat__reply-btn-label {
  font-size: 10px;
  letter-spacing: 0.2px;
}

.lirflix-chat__reply-btn:hover {
  color: #fff;
  background: #00d4ff33;
  border-color: #00d4ff88;
}

.lirflix-chat__text {
  margin: 0;
  font-size: 13px;
  color: #e2e8f0;
  line-height: 1.45;
  word-break: break-word;
}

.lirflix-chat__msg--clickable {
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.15s ease;
}

.lirflix-chat__msg--clickable:hover {
  background: rgba(255, 255, 255, 0.04);
}

.lirflix-chat__reply-quote {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 6px;
  padding: 6px 10px;
  border-radius: 8px;
  background: #1a2332;
  border-left: 3px solid #00d4ff88;
  max-width: 100%;
}

.lirflix-chat__reply-quote-name {
  font-size: 11px;
  font-weight: 700;
  color: #00d4ff;
  font-family: "Exo 2", sans-serif;
}

.lirflix-chat__reply-quote-text {
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lirflix-chat__reply-preview {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #141c28;
  border-left: 3px solid #00d4ff;
}

.lirflix-chat__reply-preview[hidden] {
  display: none !important;
}

.lirflix-chat__reply-preview-body {
  flex: 1;
  min-width: 0;
}

.lirflix-chat__reply-preview-label {
  display: block;
  font-size: 11px;
  color: #00d4ff;
  margin-bottom: 2px;
}

.lirflix-chat__reply-preview-label strong {
  font-weight: 800;
}

.lirflix-chat__reply-preview-text {
  margin: 0;
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lirflix-chat__reply-cancel {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: #243044;
  color: #94a3b8;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.lirflix-chat__reply-cancel:hover {
  background: #334155;
  color: #e2e8f0;
}

.lirflix-chat__composer {
  padding: 12px 14px;
  border-top: 1px solid #1a2332;
  background: #0b111b;
}

.lirflix-chat__input-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lirflix-chat__input-wrap {
  flex: 1;
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.lirflix-chat__input {
  width: 100%;
  background: #141c28;
  border: 1px solid #243044;
  border-radius: 24px;
  color: #e2e8f0;
  padding: 11px 44px 11px 16px;
  font-size: 13px;
  outline: none;
  font-family: inherit;
}

.lirflix-chat__input:focus {
  border-color: #00d4ff55;
}

.lirflix-chat__input::placeholder {
  color: #ffffff44;
}

.lirflix-chat__send {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: #1e2a3a;
  color: #ffffff55;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: all 0.2s;
}

.lirflix-chat__send:hover:not(:disabled) {
  background: #00d4ff;
  color: #0b111b;
}

.lirflix-chat__send:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.lirflix-chat__hint {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  font-size: 10px;
  color: #ffffff44;
  gap: 8px;
}

.lirflix-chat__hint--warn {
  color: #f97316;
}

.lirflix-chat__footer {
  padding: 0 14px 14px;
}

.lirflix-chat__footer-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  font-family: "Exo 2", sans-serif;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid transparent;
  transition: all 0.2s;
}

.lirflix-chat__footer-btn--connected {
  width: 100%;
  background: #00d4ff12;
  border-color: #00d4ff44;
  color: #00d4ff;
}

.lirflix-chat__toast {
  padding: 8px 14px;
  font-size: 12px;
  color: #f97316;
  text-align: center;
  min-height: 18px;
}

.lirflix-chat__auth {
  padding: 16px;
  border-top: 1px solid #1a2332;
  background: #080c14;
}

.lirflix-chat__auth-inner {
  max-width: 100%;
}

.lirflix-chat__auth-title {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  font-family: "Exo 2", sans-serif;
  text-align: center;
}

.lirflix-chat__auth-sub {
  margin: 0 0 14px;
  font-size: 12px;
  color: #ffffff55;
  text-align: center;
}

.lirflix-chat__auth-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.lirflix-chat__auth-tab {
  flex: 1;
  padding: 8px;
  border-radius: 10px;
  border: 1px solid #243044;
  background: #141c28;
  color: #ffffff55;
  font-size: 12px;
  font-weight: 700;
  font-family: "Exo 2", sans-serif;
  cursor: pointer;
}

.lirflix-chat__auth-tab.is-active {
  background: #00d4ff22;
  border-color: #00d4ff55;
  color: #00d4ff;
}

.lirflix-chat__auth-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}

.lirflix-chat__auth-form[hidden] {
  display: none !important;
}

.lirflix-chat__auth-form input {
  width: 100%;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid #243044;
  background: #141c28;
  color: #e2e8f0;
  font-size: 13px;
  box-sizing: border-box;
  font-family: inherit;
}

.lirflix-chat__auth-form input:focus {
  outline: none;
  border-color: #00d4ff55;
}

.lirflix-chat__auth-submit {
  padding: 11px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #00d4ff, #0099cc);
  color: #0b111b;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  font-family: "Exo 2", sans-serif;
}

.lirflix-chat__auth-link {
  background: none;
  border: none;
  color: #00d4ff99;
  font-size: 11px;
  cursor: pointer;
  text-decoration: underline;
  padding: 4px;
}

.lirflix-chat__auth-error {
  margin: 10px 0 0;
  font-size: 12px;
  color: #ef4444;
  text-align: center;
  min-height: 1em;
}

.lirflix-chat__auth-verify {
  margin: 10px 0 0;
  font-size: 12px;
  color: #22c55e;
  text-align: center;
  line-height: 1.45;
}

.lirflix-chat__auth-link:disabled {
  opacity: 0.6;
  cursor: wait;
}

.lirflix-chat__auth[hidden] {
  display: none !important;
}

#chat-composer[hidden] {
  display: none !important;
}

#chat-composer:not([hidden]) {
  display: block;
}

.lirflix-chat__verify-banner {
  margin: 0;
  padding: 8px 14px;
  font-size: 11px;
  text-align: center;
  color: #fbbf24;
  background: #fbbf2412;
  border-bottom: 1px solid #fbbf2433;
}

.lirflix-chat__verify-banner[hidden] {
  display: none !important;
}

@media (max-width: 640px) {
  .lirflix-chat__messages {
    height: 260px;
  }

  .lirflix-chat__episode {
    font-size: 17px;
  }
}
