:root {
  --bg-dark: #07090e;
  --panel-bg: rgba(18, 24, 38, 0.75);
  --panel-border: rgba(255, 255, 255, 0.08);
  --primary: #6366f1;
  --primary-glow: rgba(99, 102, 241, 0.4);
  --team-a: #ec4899;
  --team-a-glow: rgba(236, 72, 153, 0.35);
  --team-b: #06b6d4;
  --team-b-glow: rgba(6, 182, 212, 0.35);
  --gold: #f59e0b;
  --gold-glow: rgba(245, 158, 11, 0.4);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
  --radius-lg: 20px;
  --radius-md: 12px;
  --radius-sm: 8px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-body);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Ambient glow backgrounds */
.glow-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  z-index: 0;
  pointer-events: none;
  opacity: 0.25;
}
.orb-1 {
  top: -100px;
  left: -50px;
  width: 450px;
  height: 450px;
  background: var(--primary);
}
.orb-2 {
  bottom: -150px;
  right: -100px;
  width: 550px;
  height: 550px;
  background: var(--team-a);
}
.orb-3 {
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 500px;
  height: 500px;
  background: var(--team-b);
  opacity: 0.15;
}

/* Container */
.app-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Header */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: var(--panel-bg);
  backdrop-filter: blur(16px);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}
.logo-badge {
  background: linear-gradient(135deg, var(--team-a), var(--primary));
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 1px;
}
.logo-text {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.5px;
  background: linear-gradient(180deg, #ffffff, #cbd5e1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.header-status {
  display: flex;
  align-items: center;
  gap: 12px;
}

.room-chip, .players-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--panel-border);
  padding: 6px 14px;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 600;
}
.room-chip {
  cursor: pointer;
  transition: all 0.2s ease;
}
.room-chip:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--primary);
}
.chip-code {
  color: var(--gold);
  font-family: monospace;
  font-size: 16px;
  letter-spacing: 1px;
}

.icon-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--panel-border);
  border-radius: 50%;
  width: 38px;
  height: 38px;
  font-size: 16px;
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.icon-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: scale(1.05);
}

/* Glass Panels */
.glass-panel {
  background: var(--panel-bg);
  backdrop-filter: blur(16px);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.5);
}

/* Views Navigation */
.view {
  display: none;
  animation: fadeIn 0.3s ease forwards;
}
.view.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Typography & Inputs */
.gradient-text {
  background: linear-gradient(135deg, #a855f7, #6366f1, #38bdf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.custom-input, .custom-select, .custom-textarea {
  width: 100%;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  color: var(--text-main);
  font-family: inherit;
  font-size: 15px;
  outline: none;
  transition: all 0.2s ease;
}
.custom-input:focus, .custom-select:focus, .custom-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
  background: rgba(15, 23, 42, 0.9);
}
.custom-input.uppercase {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 700;
  text-align: center;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
  margin-top: 14px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 15px;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}
.btn-large {
  padding: 16px 28px;
  font-size: 18px;
  width: 100%;
  flex-direction: column;
}
.btn-large small {
  font-size: 12px;
  font-weight: 400;
  opacity: 0.8;
  margin-top: 2px;
}
.btn-small {
  padding: 8px 16px;
  font-size: 13px;
}
.btn-primary {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff;
  box-shadow: 0 6px 20px var(--primary-glow);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--primary-glow);
}
.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}
.btn-glow {
  animation: pulseGlow 2s infinite alternate;
}
@keyframes pulseGlow {
  0% { box-shadow: 0 0 15px rgba(99, 102, 241, 0.4); }
  100% { box-shadow: 0 0 35px rgba(124, 58, 237, 0.8); }
}

.btn-text {
  background: none;
  border: none;
  color: #38bdf8;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  padding: 6px 0;
  transition: color 0.2s ease;
}
.btn-text:hover {
  color: #7dd3fc;
  text-decoration: underline;
}

/* Toast */
.toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  background: #1e293b;
  color: #fff;
  padding: 12px 24px;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  font-weight: 600;
  z-index: 9999;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  opacity: 0;
}
.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* LANDING VIEW */
.hero-card {
  max-width: 600px;
  margin: 30px auto;
  text-align: center;
  padding: 36px 30px;
}
.hero-tag {
  display: inline-block;
  background: rgba(236, 72, 153, 0.15);
  color: var(--team-a);
  border: 1px solid rgba(236, 72, 153, 0.3);
  padding: 4px 14px;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 16px;
}
.hero-title {
  font-family: var(--font-heading);
  font-size: 34px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin-bottom: 16px;
}
.hero-desc {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.6;
  max-width: 480px;
  margin: 0 auto 28px;
}

.avatar-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 8px;
}
.avatar-opt {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid transparent;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.avatar-opt:hover {
  transform: scale(1.15);
  background: rgba(255, 255, 255, 0.1);
}
.avatar-opt.selected {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.25);
  box-shadow: 0 0 12px var(--primary-glow);
  transform: scale(1.12);
}

.entry-actions {
  margin-top: 24px;
}
.divider {
  position: relative;
  text-align: center;
  margin: 20px 0;
}
.divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
}
.divider span {
  position: relative;
  background: #111726;
  padding: 0 12px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
}

.join-box {
  display: flex;
  gap: 10px;
}
.join-box .custom-input {
  flex: 1;
}

/* LOBBY VIEW */
.lobby-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 24px;
}
@media (max-width: 860px) {
  .lobby-grid {
    grid-template-columns: 1fr;
  }
}

.room-share-card {
  text-align: center;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-md);
  padding: 18px;
  margin-bottom: 20px;
  border: 1px dashed rgba(255, 255, 255, 0.15);
}
.share-badge {
  font-size: 12px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 1px;
}
.room-code-display {
  font-family: monospace;
  font-size: 44px;
  font-weight: 900;
  letter-spacing: 4px;
  color: #fff;
  margin: 4px 0;
  text-shadow: 0 0 20px var(--primary-glow);
}
.share-hint {
  color: var(--text-muted);
  font-size: 13px;
  margin-bottom: 12px;
}
.invite-link-bar {
  display: flex;
  gap: 8px;
}
.url-input {
  font-size: 13px;
  color: #94a3b8;
}

.qr-trigger-area {
  margin-top: 12px;
}
.qr-box {
  background: #fff;
  padding: 14px;
  border-radius: var(--radius-md);
  display: inline-block;
  margin-top: 10px;
  text-align: center;
}
.qr-img {
  width: 180px;
  height: 180px;
  display: block;
  margin: 0 auto;
}
.qr-subtext {
  color: #0f172a;
  font-size: 12px;
  font-weight: 700;
  margin-top: 6px;
}

.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.live-dot-pulse {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.4);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.live-dot-pulse::before {
  content: '';
  width: 6px;
  height: 6px;
  background: #22c55e;
  border-radius: 50%;
  animation: pulseGreen 1.5s infinite;
}
@keyframes pulseGreen {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.5); opacity: 0.4; }
  100% { transform: scale(1); opacity: 1; }
}

.players-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 4px;
}
.player-tag {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  transition: all 0.2s ease;
}
.player-tag:hover {
  background: rgba(255, 255, 255, 0.09);
}
.player-avatar {
  font-size: 22px;
}
.player-info {
  overflow: hidden;
}
.player-name {
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.player-role {
  font-size: 10px;
  color: var(--gold);
  font-weight: 700;
}

/* Setup Tabs */
.setup-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 8px;
}
.setup-tab {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}
.setup-tab.active {
  background: rgba(99, 102, 241, 0.2);
  color: #fff;
}

.tab-content {
  display: none;
}
.tab-content.active {
  display: block;
}

.presets-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}
.preset-card {
  background: rgba(255, 255, 255, 0.04);
  border: 2px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.preset-card:hover {
  border-color: rgba(99, 102, 241, 0.5);
  background: rgba(255, 255, 255, 0.07);
}
.preset-card.selected {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.15);
  box-shadow: 0 0 15px var(--primary-glow);
}
.preset-title {
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 2px;
}
.preset-meta {
  color: var(--text-muted);
  font-size: 12px;
}
.preset-count {
  background: rgba(255, 255, 255, 0.1);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
}

/* Uwufufu Importer & Search Styles */
.input-with-btn {
  display: flex;
  gap: 8px;
  margin-bottom: 6px;
}
.input-with-btn .custom-input {
  flex: 1;
}

.uwu-search-divider {
  position: relative;
  text-align: center;
  margin: 18px 0 14px;
}
.uwu-search-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
}
.uwu-search-divider span {
  position: relative;
  background: #121826;
  padding: 0 10px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
}

.uwu-search-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 260px;
  overflow-y: auto;
  margin-top: 12px;
  padding-right: 4px;
}
.uwu-search-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 10px;
  transition: all 0.2s ease;
}
.uwu-search-item:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--primary);
}
.uwu-search-thumb {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: #000;
}
.uwu-search-details {
  flex: 1;
  overflow: hidden;
}
.uwu-search-title {
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #fff;
}
.uwu-search-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Loaded Tournament Card */
.loaded-tournament-card {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(236, 72, 153, 0.15));
  border: 2px solid var(--primary);
  box-shadow: 0 0 25px var(--primary-glow);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-top: 16px;
  animation: fadeIn 0.3s ease;
}
.loaded-card-header {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 12px;
}
.loaded-thumb {
  width: 65px;
  height: 65px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.2);
}
.loaded-info {
  flex: 1;
  overflow: hidden;
}
.loaded-status-tag {
  display: inline-block;
  background: #22c55e;
  color: #000;
  font-size: 10px;
  font-weight: 900;
  padding: 2px 8px;
  border-radius: 10px;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}
.loaded-title {
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.loaded-meta {
  font-size: 12px;
  color: #cbd5e1;
}

.loaded-thumbnails-strip {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 6px 0 10px;
}
.strip-thumb {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.15);
  flex-shrink: 0;
  background: #0b0f19;
}

.round-picker-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 13px;
  font-weight: 700;
}
.round-picker-row .custom-select {
  width: auto;
}

.custom-builder {
  margin-bottom: 18px;
}
.hint-text {
  display: block;
  margin-top: 6px;
  color: #64748b;
  font-size: 12px;
}

.match-settings-box {
  background: rgba(0, 0, 0, 0.25);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 20px;
}
.match-settings-box h4 {
  font-size: 14px;
  margin-bottom: 10px;
  color: var(--text-muted);
}
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 600;
}
.settings-row .custom-select {
  width: auto;
  min-width: 170px;
  padding: 6px 12px;
  font-size: 13px;
}

.waiting-box {
  text-align: center;
  padding: 40px 20px;
}
.waiting-box h3 {
  font-size: 20px;
  margin: 16px 0 8px;
}
.waiting-box p {
  color: var(--text-muted);
  font-size: 14px;
}
.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* VOTING VIEW / VERSUS ARENA */
.voting-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}
.round-badge {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 18px;
  color: var(--gold);
}
.match-counter {
  background: rgba(255, 255, 255, 0.08);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
}

.timer-area {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 180px;
}
.timer-circle {
  min-width: 48px;
  height: 44px;
  padding: 0 8px;
  border-radius: 22px;
  background: #1e1b4b;
  border: 2px solid var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 900;
  color: #fff;
  box-shadow: 0 0 15px var(--primary-glow);
  transition: all 0.2s ease;
  white-space: nowrap;
}
.timer-circle.danger {
  background: #450a0a;
  border-color: #ef4444;
  color: #fca5a5;
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.7);
  animation: pulseRed 0.5s infinite alternate;
}
@keyframes pulseRed {
  0% { transform: scale(1); }
  100% { transform: scale(1.1); }
}
.timer-progress-bg {
  flex: 1;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
}
.timer-progress-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--team-a), var(--team-b));
  border-radius: 10px;
  transition: width 1s linear;
}

.votes-progress-info {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted);
}
.votes-progress-info span {
  color: #fff;
}

/* IN-GAME FULLSCREEN ARENA STYLES */
body.in-game {
  overflow-y: auto;
}
body.in-game .app-container {
  max-width: 1600px;
  min-height: 100vh;
  padding: 10px 16px;
}
body.in-game .app-header {
  margin-bottom: 10px;
  padding: 8px 16px;
}
body.in-game .voting-header {
  margin-bottom: 12px;
  padding: 10px 20px;
}
body.in-game .app-footer {
  display: none !important;
}

#viewVoting.active {
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* Versus Arena */
.versus-arena {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 20px;
  align-items: stretch;
  margin-bottom: 12px;
}
@media (max-width: 860px) {
  .versus-arena {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

.battle-card {
  position: relative;
  background: var(--panel-bg);
  border: 2px solid var(--panel-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  height: 100%;
}
.battle-card:hover {
  transform: translateY(-4px);
}

.card-a {
  border-color: rgba(236, 72, 153, 0.4);
}
.card-a:hover {
  border-color: var(--team-a);
  box-shadow: 0 15px 35px var(--team-a-glow);
}
.card-b {
  border-color: rgba(6, 182, 212, 0.4);
}
.card-b:hover {
  border-color: var(--team-b);
  box-shadow: 0 15px 35px var(--team-b-glow);
}

/* Card winner / loser states */
.battle-card.winner {
  border-color: var(--gold) !important;
  box-shadow: 0 0 45px var(--gold-glow) !important;
  transform: scale(1.02);
  z-index: 2;
}
.battle-card.winner::after {
  content: '🏆 KAZANDI!';
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--gold);
  color: #000;
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 14px;
  padding: 6px 14px;
  border-radius: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  animation: bounceIn 0.4s ease;
  z-index: 10;
}
.battle-card.loser {
  opacity: 0.35;
  filter: grayscale(80%);
  transform: scale(0.97);
}

@keyframes bounceIn {
  0% { transform: scale(0.5); opacity: 0; }
  70% { transform: scale(1.15); }
  100% { transform: scale(1); opacity: 1; }
}

.image-wrapper {
  position: relative;
  width: 100%;
  flex: 1;
  min-height: 280px;
  max-height: 500px;
  background: #07090e;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-in;
}

.zoom-indicator {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  opacity: 0.85;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 4px;
  pointer-events: none;
  z-index: 5;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}
.battle-card:hover .zoom-indicator {
  opacity: 1;
  background: rgba(99, 102, 241, 0.9);
  border-color: rgba(255, 255, 255, 0.4);
  transform: scale(1.05);
}
@media (max-width: 860px) {
  .battle-card {
    min-height: 380px;
  }
  .image-wrapper {
    min-height: 220px;
    max-height: 300px;
  }
}
.battle-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.5s ease;
}
.battle-card:hover .battle-image {
  transform: scale(1.04);
}
.vote-badge-overlay {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 900;
  color: #fff;
  backdrop-filter: blur(8px);
  z-index: 5;
}
#badgeA { background: rgba(236, 72, 153, 0.9); box-shadow: 0 0 16px var(--team-a-glow); }
#badgeB { background: rgba(6, 182, 212, 0.9); box-shadow: 0 0 16px var(--team-b-glow); }

.card-details {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: rgba(13, 18, 30, 0.95);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.card-title {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 800;
  line-height: 1.3;
  color: #fff;
  text-align: center;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 56px;
}
@media (max-width: 860px) {
  .card-title {
    font-size: 18px;
    min-height: auto;
  }
}

/* Live Vote Stats Bar */
.vote-stats-bar {
  position: relative;
  height: 30px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  align-items: center;
  padding: 0 12px;
}
.vote-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  border-radius: 20px;
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.fill-a { background: linear-gradient(90deg, #ec4899, #db2777); }
.fill-b { background: linear-gradient(90deg, #06b6d4, #0284c7); }

.vote-percent {
  position: relative;
  z-index: 2;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

/* Big Vote Button */
.btn-vote {
  width: 100%;
  padding: 16px;
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 900;
  border: none;
  cursor: pointer;
  color: #fff;
  transition: all 0.2s ease;
  position: relative;
}
.btn-vote-a {
  background: linear-gradient(135deg, #ec4899, #be185d);
  box-shadow: 0 6px 20px var(--team-a-glow);
}
.btn-vote-a:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px var(--team-a-glow);
}
.btn-vote-b {
  background: linear-gradient(135deg, #06b6d4, #0369a1);
  box-shadow: 0 6px 20px var(--team-b-glow);
}
.btn-vote-b:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px var(--team-b-glow);
}

.btn-vote.my-vote {
  border: 3px solid #ffffff;
  box-shadow: 0 0 25px #ffffff, 0 0 40px var(--primary-glow);
}
.btn-vote.my-vote::after {
  content: '✓ SENİN OYUN';
  position: absolute;
  top: -12px;
  right: 12px;
  background: #ffffff;
  color: #0f172a;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 10px;
}

/* Voters Container */
.voters-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 32px;
  align-items: center;
  justify-content: center;
}
.voter-chip {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
  animation: popIn 0.2s ease;
}
@keyframes popIn {
  from { transform: scale(0.6); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* VS Center Badge */
.vs-center-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  user-select: none;
}
.vs-text {
  font-family: var(--font-heading);
  font-size: 32px;
  font-weight: 900;
  font-style: italic;
  background: linear-gradient(180deg, #ffffff, #64748b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 10px rgba(255,255,255,0.4));
}
.vs-sub {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--gold);
  margin-top: 2px;
}

.host-controls-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: var(--radius-md);
}
.host-badge {
  color: var(--gold);
  font-size: 13px;
  font-weight: 700;
}

/* CHAMPION CELEBRATION VIEW */
.champion-panel {
  max-width: 680px;
  margin: 20px auto;
  text-align: center;
  padding: 40px 30px;
  border-color: rgba(245, 158, 11, 0.3);
  box-shadow: 0 0 50px rgba(245, 158, 11, 0.15);
}
.crown-icon {
  font-size: 54px;
  animation: bounceSlow 2s infinite;
}
@keyframes bounceSlow {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.champion-subtitle {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 3px;
  color: var(--gold);
  margin: 8px 0;
}
.champion-name {
  font-family: var(--font-heading);
  font-size: 36px;
  font-weight: 900;
  margin-bottom: 24px;
}

.champion-card-hero {
  position: relative;
  width: 260px;
  height: 260px;
  margin: 0 auto 24px;
  border-radius: 50%;
  padding: 8px;
  background: linear-gradient(135deg, var(--gold), #ef4444, var(--primary));
  box-shadow: 0 0 40px var(--gold-glow);
}
.champion-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid #0f172a;
}
.trophy-badge {
  position: absolute;
  bottom: 0;
  right: 15px;
  background: var(--gold);
  color: #000;
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 900;
  padding: 6px 16px;
  border-radius: 20px;
  border: 3px solid #0f172a;
  box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}

.champion-stats {
  background: rgba(0, 0, 0, 0.25);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 20px;
  text-align: left;
}
.champion-stats h3 {
  font-size: 15px;
  margin-bottom: 12px;
  color: var(--text-muted);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  text-align: center;
}
@media (max-width: 600px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
}
.stat-item {
  background: rgba(255, 255, 255, 0.05);
  padding: 10px;
  border-radius: var(--radius-sm);
}
.stat-val {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 800;
  color: #fff;
}
.stat-lbl {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.history-accordion {
  margin-bottom: 24px;
}
.history-list {
  max-height: 240px;
  overflow-y: auto;
  text-align: left;
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.history-item {
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.history-round {
  color: var(--gold);
  font-weight: 700;
  font-size: 11px;
}
.history-match {
  color: #fff;
  font-weight: 600;
}
.history-winner {
  color: #22c55e;
  font-weight: 700;
}

.champion-actions {
  margin-top: 20px;
}

.app-footer {
  margin-top: auto;
  padding: 24px 0 12px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.app-footer strong {
  color: #fff;
  letter-spacing: 0.5px;
}

/* ===================================================
   IMAGE LIGHTBOX / ZOOM MODAL
=================================================== */
.image-lightbox-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: modalFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.image-lightbox-modal.closing {
  animation: modalFadeOut 0.2s ease forwards;
}
@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes modalFadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 7, 15, 0.94);
  backdrop-filter: blur(20px);
  cursor: zoom-out;
}

.lightbox-dialog {
  position: relative;
  z-index: 2;
  max-width: 92vw;
  max-height: 94vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: dialogZoomIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes dialogZoomIn {
  from { transform: scale(0.92) translateY(10px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

.lightbox-close-btn {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #1e293b;
  border: 2px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
  z-index: 10;
}
.lightbox-close-btn:hover {
  background: #ef4444;
  border-color: #ef4444;
  transform: scale(1.1);
}

.lightbox-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 900;
  color: #fff;
  backdrop-filter: blur(8px);
  z-index: 10;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}
.lightbox-badge.team-a {
  background: rgba(236, 72, 153, 0.95);
  box-shadow: 0 0 20px var(--team-a-glow);
}
.lightbox-badge.team-b {
  background: rgba(6, 182, 212, 0.95);
  box-shadow: 0 0 20px var(--team-b-glow);
}

.lightbox-img-box {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.95);
  border: 2px solid rgba(255, 255, 255, 0.16);
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
  max-width: 100%;
}
.lightbox-img {
  max-width: 88vw;
  max-height: 75vh;
  object-fit: contain;
  display: block;
  user-select: none;
  transition: transform 0.25s ease;
}
.lightbox-img-box:hover .lightbox-img {
  transform: scale(1.02);
}

.lightbox-info {
  margin-top: 14px;
  text-align: center;
}
.lightbox-title {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9);
}
.lightbox-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ==========================================
   FLOATING ROOM CHAT WIDGET
   ========================================== */
.chat-widget {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1000;
  font-family: var(--font-body);
}

/* Floating Toggle Button */
.chat-toggle-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(18, 24, 38, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 9999px;
  padding: 10px 18px;
  color: var(--text-main);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5), 0 0 15px rgba(99, 102, 241, 0.15);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}
.chat-toggle-btn:hover {
  background: rgba(30, 41, 59, 0.95);
  border-color: rgba(99, 102, 241, 0.6);
  transform: translateY(-2px);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.6), 0 0 25px rgba(99, 102, 241, 0.3);
}
.chat-toggle-btn:active {
  transform: scale(0.96);
}
.chat-btn-icon {
  font-size: 16px;
  line-height: 1;
}
.chat-badge {
  background: linear-gradient(135deg, #ef4444, #f43f5e);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  padding: 2px 7px;
  border-radius: 9999px;
  min-width: 18px;
  text-align: center;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.7);
  animation: badgePulse 1.8s infinite;
}
@keyframes badgePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

/* Floating Toast Preview (Non-intrusive message preview when closed) */
.chat-toast-preview {
  position: absolute;
  right: 0;
  bottom: 56px;
  max-width: 290px;
  min-width: 200px;
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.6), 0 0 20px rgba(99, 102, 241, 0.2);
  animation: toastSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  pointer-events: auto;
  cursor: pointer;
  z-index: 10;
}
@keyframes toastSlideUp {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.chat-toast-avatar {
  font-size: 18px;
  line-height: 1;
  flex-shrink: 0;
}
.chat-toast-body {
  flex: 1;
  font-size: 12px;
  line-height: 1.35;
  color: #f1f5f9;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-toast-body strong {
  color: #a5b4fc;
  margin-right: 4px;
}

/* Chat Box Panel */
.chat-box-panel {
  position: absolute;
  right: 0;
  bottom: 56px;
  width: 325px;
  height: 420px;
  max-height: calc(100vh - 110px);
  max-width: calc(100vw - 32px);
  background: rgba(13, 18, 30, 0.94);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.75), 0 0 35px rgba(99, 102, 241, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: chatOpenAnim 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes chatOpenAnim {
  from { opacity: 0; transform: translateY(14px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Chat Header */
.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.chat-header-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}
.chat-title-icon {
  font-size: 16px;
}
.chat-online-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}
.chat-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.chat-icon-btn {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.chat-icon-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  transform: scale(1.08);
}

/* Chat Messages Container */
.chat-messages-container {
  flex: 1;
  overflow-y: auto;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}
.chat-messages-container::-webkit-scrollbar {
  width: 5px;
}
.chat-messages-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
}

.chat-welcome-msg {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  border: 1px dashed rgba(255, 255, 255, 0.08);
  margin-bottom: 4px;
}

.chat-system-msg {
  align-self: center;
  font-size: 11px;
  color: #94a3b8;
  background: rgba(148, 163, 184, 0.1);
  padding: 4px 10px;
  border-radius: 9999px;
  border: 1px solid rgba(148, 163, 184, 0.15);
}

.chat-msg-row {
  display: flex;
  flex-direction: column;
  max-width: 85%;
}
.chat-msg-row.mine {
  align-self: flex-end;
}
.chat-msg-row.theirs {
  align-self: flex-start;
}

.chat-msg-header {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  margin-bottom: 3px;
}
.chat-msg-row.mine .chat-msg-header {
  justify-content: flex-end;
}
.chat-msg-sender {
  font-weight: 700;
  color: #c7d2fe;
}
.chat-msg-time {
  font-size: 10px;
  color: var(--text-muted);
  opacity: 0.8;
}
.chat-host-tag {
  font-size: 9px;
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 4px;
  padding: 1px 4px;
  font-weight: 800;
}

.chat-bubble {
  padding: 8px 12px;
  font-size: 13px;
  line-height: 1.4;
  word-break: break-word;
  position: relative;
}
.chat-msg-row.mine .chat-bubble {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #fff;
  border-radius: 14px 14px 2px 14px;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.25);
}
.chat-msg-row.theirs .chat-bubble {
  background: rgba(255, 255, 255, 0.07);
  color: #f1f5f9;
  border-radius: 14px 14px 14px 2px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Quick Reactions Bar */
.chat-quick-reactions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 12px;
  background: rgba(0, 0, 0, 0.25);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.quick-reaction-btn {
  background: transparent;
  border: none;
  font-size: 17px;
  padding: 4px 6px;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1), background 0.15s ease;
  line-height: 1;
}
.quick-reaction-btn:hover {
  transform: scale(1.3);
  background: rgba(255, 255, 255, 0.12);
}
.quick-reaction-btn:active {
  transform: scale(0.9);
}

/* Chat Input Form */
.chat-input-form {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.02);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.chat-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 8px 14px;
  font-size: 13px;
  color: #fff;
  outline: none;
  font-family: inherit;
  transition: border-color 0.2s, background 0.2s;
}
.chat-input::placeholder {
  color: var(--text-muted);
}
.chat-input:focus {
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.09);
  box-shadow: 0 0 12px var(--primary-glow);
}
.chat-send-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), background 0.2s ease;
  flex-shrink: 0;
}
.chat-send-btn:hover {
  transform: scale(1.08);
  background: #4f46e5;
  box-shadow: 0 0 15px var(--primary-glow);
}
.chat-send-btn:active {
  transform: scale(0.92);
}

/* Mobile Responsiveness for Chat */
@media (max-width: 640px) {
  .chat-widget {
    right: 14px;
    bottom: 14px;
  }
  .chat-toggle-btn {
    padding: 8px 14px;
    font-size: 13px;
  }
  .chat-box-panel {
    right: 0;
    bottom: 48px;
    width: calc(100vw - 28px);
    max-width: 330px;
    height: 370px;
  }
  .chat-toast-preview {
    right: 0;
    bottom: 48px;
    max-width: calc(100vw - 28px);
  }
}

