@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Public+Sans:wght@300;400;600;800&display=swap');

:root {
  /* DARK THEME PREMIUM COLORS */
  --bg-color: #0b1120;
  --surface-color: #1e293b;
  --surface-hover: #334155;
  --primary-color: #0f172a;
  
  --secondary-color: #ff6b00; /* Neon Orange */
  --secondary-hover: #e05e00;
  --accent-blue: #38bdf8;
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --border-color: #334155;
  
  --success-color: #10b981;
  --danger-color: #ef4444;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.7);
  --shadow-glow: 0 0 15px rgba(255, 107, 0, 0.4);
  
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;

  /* VIBRANT ARENA (Purple & Neon Orange) THEME */
  --bg-vibrant: #17002b;
  --primary-vibrant: #4c1d95;
  --accent-orange: #ff6b00;
  --accent-glow: rgba(255, 107, 0, 0.4);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Outfit', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
}

h1, h2, h3, h4 {
  color: var(--text-main);
  font-weight: 800;
  letter-spacing: -0.5px;
}

h2 { font-size: 1.5rem; margin-bottom: 10px; }
h3 { font-size: 1.2rem; }

p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 15px;
}

/* LAYOUT & CONTAINERS */
.container {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  position: relative;
  min-height: 100vh;
  background-color: var(--primary-color);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
}

header {
  background: linear-gradient(135deg, #17002b 0%, #2d004d 100%);
  color: white;
  padding: 20px;
  text-align: center;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  position: sticky;
  top: 0;
  z-index: 10;
}

header h1 {
  font-size: 1.6rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  background: linear-gradient(to right, #fff, var(--text-muted));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* CARDS */
.card {
  background: var(--surface-color);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 15px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: #475569;
}

.card.locked {
  opacity: 0.6;
  filter: grayscale(100%);
}

/* BUTTONS */
.btn {
  display: block;
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--secondary-color) 0%, #f97316 100%);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
  font-family: 'Outfit', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: var(--shadow-sm);
}

.btn:hover {
  background: linear-gradient(135deg, var(--secondary-hover) 0%, #ea580c 100%);
  box-shadow: var(--shadow-glow);
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled {
  background: var(--surface-color);
  color: #64748b;
  cursor: not-allowed;
  box-shadow: none;
  border: 1px solid var(--border-color);
}

.btn-secondary {
  background: var(--surface-hover);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}
.btn-secondary:hover {
  background: #475569;
  box-shadow: none;
}

/* FORMS */
.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.form-control {
  width: 100%;
  padding: 12px 15px;
  background-color: #0f172a;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  transition: all 0.2s;
  color: white;
  font-family: inherit;
}

.form-control:focus {
  outline: none;
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.2);
}

/* FLEX UTILITIES */
.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* BADGES & ANIMATIONS */
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-live {
  background: var(--danger-color);
  color: white;
  animation: pulse-red 2s infinite;
}

@keyframes pulse-red {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  70% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* BOTTOM NAVIGATION (GLASSMORPHISM) */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 600px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  border-top: 1px solid rgba(255,255,255,0.05);
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom);
}

.bottom-nav .nav-tab {
  flex: 1;
  padding: 12px 5px;
  text-align: center;
  color: var(--text-muted);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.8rem;
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.bottom-nav .nav-tab svg {
  width: 24px;
  height: 24px;
  margin-bottom: 4px;
  fill: currentColor;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.bottom-nav .nav-tab:hover {
  color: white;
}

.bottom-nav .nav-tab.active {
  color: var(--secondary-color);
}

.bottom-nav .nav-tab.active svg {
  transform: scale(1.1);
  filter: drop-shadow(0px 0px 5px rgba(255,107,0,0.5));
}

/* AUTH GATEWAY */
/* AUTH GATEWAY - THE VIBRANT ARENA */
.login-wrapper {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  min-height: 100vh;
  padding: 20px;
  background-color: #0b0214;
  background-image: 
    url('vibrant_purple_orange_login_bg_1776501909710.png');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  font-family: 'Outfit', sans-serif;
  position: relative;
  overflow: hidden;
}

/* Vibrant Glow & Watermark Overlay */
.login-wrapper::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(circle at center, transparent 0%, rgba(23, 0, 43, 0.4) 100%);
  opacity: 0.8;
  pointer-events: none;
}

.login-card {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: rgba(23, 0, 43, 0.7); /* Deep Purple Translucent */
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 50px 40px;
  border-radius: 20px;
  border: 1px solid rgba(255, 107, 0, 0.3); /* Neon Orange Border at 30% */
  box-shadow: 
    0 25px 50px -12px rgba(0, 0, 0, 0.5),
    0 0 20px rgba(255, 107, 0, 0.15); /* Orange ambient glow */
  z-index: 10;
  text-align: center;
}

.login-card h1 {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 2.2rem;
  color: #fff;
  text-align: center;
  margin-bottom: 30px !important;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-shadow: 0 0 10px rgba(255, 107, 0, 0.3);
}

.login-wrapper .form-group label {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.8rem;
  opacity: 0.9;
}

.login-wrapper .form-control {
  background: rgba(255, 255, 255, 0.05); 
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 15px;
  font-family: 'Outfit', sans-serif;
  color: white;
  transition: all 0.3s ease;
}

.login-wrapper .form-control:focus {
  border-color: var(--accent-orange);
  box-shadow: 0 0 15px rgba(255, 107, 0, 0.2);
  background: rgba(255, 255, 255, 0.08);
}

.login-wrapper .btn-secondary {
  background: var(--accent-orange);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 18px;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-top: 25px !important;
  box-shadow: 0 10px 25px rgba(255, 107, 0, 0.4);
  transition: all 0.3s ease;
}

.login-wrapper .btn-secondary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 15px 30px rgba(255, 107, 0, 0.6);
  background: #ff8c00;
}

.btn-google {
  background-color: white;
  color: #333;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-weight: 800;
}

.btn-google:hover {
  background-color: #f8f9fa;
  box-shadow: 0 4px 15px rgba(255,255,255,0.2);
}

.divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 30px 0;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 1px;
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border-color);
}
.divider:not(:empty)::before { margin-right: .5em; }
.divider:not(:empty)::after { margin-left: .5em; }

/* WIZARD & LEADERBOARD UI */
.wizard-steps {
  display: flex;
  justify-content: center;
  margin-bottom: 25px;
}

.wizard-step {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface-color);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.8rem;
  margin: 0 15px;
  position: relative;
  border: 2px solid var(--border-color);
}

.wizard-step.active {
  background: var(--secondary-color);
  color: white;
  border-color: var(--secondary-color);
  box-shadow: var(--shadow-glow);
}

.wizard-step:not(:last-child)::after {
  content: '';
  position: absolute;
  right: -27px;
  top: 50%;
  transform: translateY(-50%);
  width: 25px;
  height: 2px;
  background: var(--border-color);
}

.list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  border-bottom: 1px solid var(--border-color);
  transition: background 0.2s;
}

.list-item:last-child {
  border-bottom: none;
}

.list-item:hover {
  background: var(--surface-hover);
}

.rank {
  width: 30px;
  font-weight: 800;
  color: var(--text-muted);
}

.lock-in-alert {
  padding: 3px 6px;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: var(--accent-blue);
  border-radius: 4px;
  font-size: 0.6rem;
  font-weight: 800;
  position: absolute;
  top: 5px;
  left: 5px;
  z-index: 5;
  text-transform: uppercase;
  white-space: nowrap;
}
.lock-in-alert.locked {
  background: rgba(239, 68, 68, 0.15);
  border-color: var(--danger-color);
  color: var(--danger-color);
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.2);
}

.lb-toggles {
  display: flex;
  margin-bottom: 20px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border-color);
  background: var(--surface-color);
}
.lb-toggle {
  flex: 1;
  padding: 12px;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.2s;
}
.lb-toggle.active {
  background: var(--secondary-color);
  color: white;
}

/* UTILS */
.tab-content { display: none; }
.tab-content.active { display: block; }
#app-content { 
  padding-bottom: 140px; 
}

/* Player Slot Cards UI */
.player-slot-card {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px 20px;
    margin: 0 auto 15px auto;
    width: 90%;
    max-width: 360px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.player-slot-card:hover, .player-slot-card:focus-within {
    border-color: var(--secondary-color);
    background: rgba(255, 255, 255, 0.07);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.slot-icon {
    width: 45px;
    height: 45px;
    background: var(--bg-card);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--secondary-color);
    margin-right: 15px;
}

.slot-info {
    flex: 1;
}

.slot-info label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.slot-info .form-control {
    background: transparent;
    border: none;
    padding: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
}

.slot-info .form-control::placeholder {
    color: #444;
    font-weight: 400;
}

.input-validation-msg {
    font-size: 0.7rem;
    font-weight: 500;
    margin-top: 2px;
}

/* Fix for footer buttons overlapping */
.wizard-footer {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

#wizard-error-msg {
    min-height: 1.5rem;
}

.wizard-footer .btn {
  margin: 0 !important;
}

/* GLOBAL LEADERBOARD ENHANCEMENTS */
#lb-section-overall .card {
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#lb-section-overall .card:hover {
    transform: translateY(-2px);
    border-color: var(--secondary-color);
}

.leaderboard-summary-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.leaderboard-summary-value {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-main);
}

/* 3-COLUMN SLAB LAYOUT */
.slab-scroll-wrapper {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 15px;
    padding-bottom: 10px;
    /* Hide scrollbar for clean look */
    -ms-overflow-style: none;  
    scrollbar-width: none;  
}

.slab-scroll-wrapper::-webkit-scrollbar {
    display: none;
}

.slab-card {
    flex: 0 0 88%; /* Mobile takes up most of screen, peaks next item */
    min-width: 280px;
    max-width: 400px;
    scroll-snap-align: center;
    background: var(--surface-light);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    border-top: 4px solid var(--border-color);
}

@media(min-width: 900px) {
    .slab-card { flex: 1; min-width: 0; }
    .slab-scroll-wrapper { justify-content: space-between; }
}

.global-tab {
    padding: 8px 16px;
    border-radius: 20px;
    border: none;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.weight-slider {
    height: 6px;
    background: #334155;
    border-radius: 5px;
    outline: none;
    -webkit-appearance: none;
}

.weight-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    background: var(--secondary-color);
    cursor: pointer;
    border-radius: 50%;
    border: 2px solid white;
}

.slab-header {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-color);
    background: rgba(0,0,0,0.2);
    border-top-left-radius: var(--radius-md);
    border-top-right-radius: var(--radius-md);
}

.slab-header h4 {
    margin: 0 0 2px 0;
    font-size: 1rem;
    color: var(--text-main);
}

.slab-subtitle {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
}

.slab-list {
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 450px;
    overflow-y: auto;
}

/* Tighter item padding for dense slabs */
.slab-list .list-item {
    padding: 8px 10px;
    margin-bottom: 0;
}

/* POINTS INFO BOX */
.scoring-rules-card {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 15px;
    margin-bottom: 25px;
    box-shadow: var(--shadow-md);
}

.scoring-rules-card h4 {
    font-size: 0.8rem;
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.rules-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.rule-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

/* CHAT INTERFACE STYLES */
.chat-message {
    padding: 10px 15px;
    border-radius: 12px;
    max-width: 85%;
    position: relative;
    word-wrap: break-word;
    font-size: 0.9rem;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.chat-name {
    font-size: 0.7rem;
    font-weight: 700;
    margin-bottom: 4px;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.chat-own {
    align-self: flex-end;
    background-color: var(--secondary-color);
    color: white;
    border-bottom-right-radius: 2px;
}

.chat-other {
    align-self: flex-start;
    background-color: white;
    color: #1a1a1a;
    border: 2px solid var(--secondary-color);
    border-bottom-left-radius: 2px;
}

/* Toast notification styling for 50-word max warning */
#chat-toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--secondary-color);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

.rule-label { color: var(--text-muted); }
.rule-value { color: var(--text-main); font-weight: 600; }

/* PLAYER PICKER MODAL */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: none;
    justify-content: center;
    align-items: flex-end; /* Mobile native feel */
    z-index: 9999;
}

.modal-content {
    background: var(--bg-color);
    width: 100%;
    max-width: 600px;
    height: 85vh;
    border-top-left-radius: var(--radius-lg);
    border-top-right-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.modal-header {
    background: var(--primary-color);
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    margin-bottom: 15px;
    text-align: center;
}

.search-container {
    position: relative;
    margin-top: 10px;
}

.search-input {
    width: 100%;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 15px;
    color: var(--text-main);
    font-size: 1rem;
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.picker-item {
    padding: 15px;
    margin-bottom: 8px;
    background: var(--surface-color);
    border-radius: var(--radius-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
}

.picker-item:hover {
    background: var(--surface-hover);
    transform: scale(0.98);
}

.picker-item .name {
    font-weight: 600;
}

.picker-item .team {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.modal-close-btn {
    width: 100%;
    padding: 15px;
    background: var(--primary-color);
    border: none;
    border-top: 1px solid var(--border-color);
    color: var(--text-main);
    font-weight: 600;
    cursor: pointer;
}

@media (min-width: 601px) {
    .modal-overlay { align-items: center; }
    .modal-content { 
        height: 600px; 
        border-radius: var(--radius-lg);
    }
}

/* PREMIUM RANK HIGHLIGHTS */
.list-item.rank-gold {
    background: linear-gradient(135deg, rgba(255, 107, 0, 0.45) 0%, rgba(251, 191, 36, 0.25) 100%) !important;
    border: 3px solid #facc15 !important;
    box-shadow: 0 0 30px rgba(251, 191, 36, 0.5), inset 0 0 15px rgba(255, 107, 0, 0.3);
    border-radius: var(--radius-md);
    margin: 12px 0;
    display: flex !important;
}
.list-item.rank-gold .rank { font-size: 1.8rem !important; text-shadow: 0 0 15px rgba(0,0,0,0.6); }

.list-item.rank-silver {
    background: linear-gradient(135deg, rgba(255, 107, 0, 0.25) 0%, rgba(203, 213, 225, 0.15) 100%) !important;
    border: 2px solid #e2e8f0 !important;
    border-radius: var(--radius-md);
    margin: 8px 0;
    display: flex !important;
}
.list-item.rank-silver .rank { font-size: 1.6rem !important; }

.list-item.rank-bronze {
    background: linear-gradient(135deg, rgba(217, 119, 6, 0.25) 0%, rgba(217, 119, 6, 0.1) 100%) !important;
    border: 2px solid #fb923c !important;
    border-radius: var(--radius-md);
    margin: 6px 0;
    display: flex !important;
}
.list-item.rank-bronze .rank { font-size: 1.4rem !important; }

.rank-badge-icon {
    font-size: 2rem;
    line-height: 1;
    display: inline-block;
    filter: drop-shadow(0 0 8px rgba(0,0,0,0.8));
    animation: crown-bounce 2s ease-in-out infinite;
}

@keyframes crown-bounce {
    0%, 100% { transform: translateY(0) scale(1.1); }
    50% { transform: translateY(-5px) scale(1.2); }
}

/* FINISHED BADGE */
.badge-finished {
    background: #334155;
    color: #94a3b8;
    border: 1px solid #475569;
}

/* ==========================================
   PREMIUM CHAT UI
   ========================================== */
.chat-message {
    padding: 12px 16px;
    border-radius: 18px;
    max-width: 85%;
    word-wrap: break-word;
    font-size: 0.95rem;
    box-shadow: var(--shadow-sm);
    line-height: 1.4;
    position: relative;
}

.chat-name {
    font-size: 0.70rem;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 5px;
    letter-spacing: 0.8px;
}

/* Other users (Purple theme) */
.chat-other {
    background: #4c1d95; /* Deep Purple */
    color: white;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}
.chat-other .chat-name {
    color: #e9d5ff; /* Light purple name */
}

/* You (Orange theme) */
.chat-own {
    background: var(--secondary-color); /* Vibrant Orange */
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}
.chat-own .chat-name {
    color: #ffedd5; /* Light orange name */
    text-align: right;
}

/* Floating Input Pill */
.chat-input-wrapper {
    position: fixed;
    bottom: calc(75px + env(safe-area-inset-bottom));
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 40px);
    max-width: 560px;
    background: #1e293b;
    border-radius: 30px;
    padding: 6px 6px 6px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), 0 0 15px rgba(255, 107, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 100;
}

.chat-input-wrapper input {
    flex: 1;
    background: transparent;
    border: none;
    color: white;
    font-size: 0.95rem;
    outline: none;
    box-shadow: none !important;
    padding: 5px 0;
}

.chat-input-wrapper .btn-send {
    background: var(--secondary-color);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(255, 107, 0, 0.4);
    flex-shrink: 0;
}

/* ==========================================
   NOTIFICATION BADGE
   ========================================== */
.nav-badge-dot {
    position: absolute;
    top: 5px;
    left: 50%;
    margin-left: 8px;
    width: 8px;
    height: 8px;
    background-color: #ef4444; /* Vibrant Red */
    border-radius: 50%;
    border: 2px solid var(--bg-color); /* Cut out from background */
    z-index: 10;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.6);
    animation: pulse-red 2s infinite;
}

@keyframes pulse-red {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}
