/* MyAvatar Network - Hlavní styly */

:root {
  --primary: #6366F1;
  --primary-hover: #4F46E5;
  --primary-light: #EEF2FF;
  --bg-page: #F8FAFC;
  --bg-card: #FFFFFF;
  --bg-subtle: #F1F5F9;
  --text-main: #0F172A;
  --text-muted: #64748B;
  --border: #E2E8F0;
  --success: #10B981;
  --danger: #EF4444;
  --radius: 16px;
  --shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.06);
}

/* Tmavý režim (Dark Mode) */
html.dark-mode,
body.dark-mode {
  --primary: #818CF8;
  --primary-hover: #6366F1;
  --primary-light: #312E81;
  --bg-page: #0B1120;
  --bg-card: #1E293B;
  --bg-subtle: #0F172A;
  --text-main: #F8FAFC;
  --text-muted: #94A3B8;
  --border: #334155;
  --shadow: 0 4px 24px -2px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

html {
  height: 100%;
}

body {
  background-color: var(--bg-page);
  color: var(--text-main);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  padding: 0;
  padding-bottom: 0 !important; /* Odstraněno volné místo pod patičkou */
  display: flex;
  flex-direction: column;
  transition: background-color 0.25s ease, color 0.25s ease;
}

/* Hlavička aplikace */
.app-header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 40;
  padding: 12px 16px;
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

.header-container {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #6366F1, #EC4899);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
  font-weight: bold;
}

.logo-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}

.logo-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.user-badge-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Hlavní kontejner */
.main-layout {
  max-width: 1080px;
  margin: 16px auto;
  padding: 0 16px;
  width: 100%;
  flex: 1 0 auto; /* Roztáhne obsah, takže patička je vždy spolehlivě na spodní hraně */
}

/* Taby a obrazovky */
.tab-content {
  display: none;
}
.tab-content.active {
  display: block;
}

/* Karty */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}

/* Hero karta přihlášeného uživatele */
.my-avatar-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  padding: 28px 20px;
  background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg-subtle) 100%);
}

.avatar-wrapper {
  position: relative;
  margin-bottom: 14px;
}

.my-avatar-hero .avatar-wrapper {
  margin-bottom: 16px;
  display: flex;
  justify-content: center;
  align-items: center;
}

#myAvatarContainer svg {
  width: 270px;
  height: 270px;
  max-width: min(290px, 82vw);
  max-height: min(290px, 82vw);
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.08));
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.35s ease;
  cursor: pointer;
}

#myAvatarContainer svg:hover {
  transform: scale(1.035);
  filter: drop-shadow(0 14px 28px rgba(0, 0, 0, 0.12));
}

@media (max-width: 480px) {
  #myAvatarContainer svg {
    width: 230px;
    height: 230px;
  }
}

/* Řečová bublina se statusem */
.speech-bubble {
  position: relative;
  background: #1E293B;
  color: #FFFFFF;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.88rem;
  font-weight: 500;
  margin-bottom: 12px;
  max-width: 280px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  animation: floatBubble 3s ease-in-out infinite alternate;
}

.speech-bubble::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px 6px 0;
  border-style: solid;
  border-color: #1E293B transparent;
  display: block;
  width: 0;
}

@keyframes floatBubble {
  0% { transform: translateY(0px); }
  100% { transform: translateY(-4px); }
}

/* Zájmy avatara na domovské kartě Můj Avatar */
.hero-tags-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px;
  max-width: 440px;
  margin: 0 auto 12px;
}

.hero-tag-chip {
  display: inline-flex;
  align-items: center;
  background: var(--primary-light, #EEF2FF);
  border: 1px solid var(--border, #C7D2FE);
  color: var(--primary, #4338CA);
  font-size: 0.76rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  user-select: none;
}

.hero-tag-chip:hover {
  transform: translateY(-1px);
  background: var(--primary);
  color: #FFFFFF;
  border-color: var(--primary);
}

.hero-tag-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(99, 102, 241, 0.08);
  border: 1px dashed var(--primary);
  color: var(--primary);
  font-size: 0.74rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.hero-tag-add-btn:hover {
  background: var(--primary);
  color: #FFFFFF;
  border-style: solid;
}

.hero-tag-edit-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.hero-tag-edit-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* Tamagotchi stavové ukazatele */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  width: 100%;
  max-width: 520px;
  margin: 16px 0;
}

.stat-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 4px;
  text-align: center;
  transition: all 0.2s ease;
}

.stat-box.stat-box-clickable {
  cursor: pointer;
}

.stat-box.stat-box-clickable:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.12);
}

.stat-box.has-unread {
  border-color: rgba(239, 68, 68, 0.5) !important;
  background: rgba(239, 68, 68, 0.08) !important;
}

.stat-box.has-unread .stat-value {
  color: var(--danger, #EF4444) !important;
  font-weight: 800;
}

.stat-icon {
  font-size: 1.3rem;
  margin-bottom: 2px;
}

.stat-value {
  font-weight: 700;
  font-size: 1rem;
}

.stat-label {
  font-size: 0.72rem;
  color: var(--text-muted);
}

@media (max-width: 440px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
}

/* Tlačítko pro tajná srdíčka */
.btn-heart {
  background: #FFF1F2;
  color: #E11D48;
  border: 1px solid #FECDD3;
  font-weight: 700;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-heart:hover {
  background: #FFE4E6;
  border-color: #FDA4AF;
  color: #BE123C;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(225, 29, 72, 0.15);
}

.btn-heart:active {
  transform: translateY(0);
}

.btn-heart.sent-today {
  opacity: 0.88;
  background: #FDF2F8;
  border-color: #FBCFE8;
  color: #DB2777;
}

html.dark-mode .btn-heart,
body.dark-mode .btn-heart {
  background: rgba(225, 29, 72, 0.18);
  color: #FDA4AF;
  border-color: rgba(225, 29, 72, 0.35);
}

html.dark-mode .btn-heart:hover,
body.dark-mode .btn-heart:hover {
  background: rgba(225, 29, 72, 0.28);
  border-color: rgba(225, 29, 72, 0.55);
  color: #FFFFFF;
}

/* Plovoucí srdíčka při odeslání */
.floating-hearts-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 99999;
}

.floating-heart-particle {
  position: absolute;
  user-select: none;
  pointer-events: none;
  animation: floatHeartUp ease-out forwards;
}

@keyframes floatHeartUp {
  0% {
    opacity: 1;
    transform: translate(0, 0) scale(0.6);
  }
  50% {
    opacity: 0.9;
    transform: translate(-10px, -60px) scale(1.2);
  }
  100% {
    opacity: 0;
    transform: translate(15px, -130px) scale(0.9);
  }
}

/* Odznáčky nepřečtených zpráv v navigaci */
.nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--danger, #EF4444);
  color: #FFFFFF;
  border-radius: 9999px;
  padding: 0 6px;
  font-size: 0.7rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  margin-left: 4px;
  vertical-align: middle;
}

.nav-badge-pill {
  position: absolute;
  top: -4px;
  right: -9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--danger, #EF4444);
  color: #FFFFFF;
  border-radius: 9999px;
  padding: 0 4px;
  font-size: 0.65rem;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  box-shadow: 0 0 0 2px var(--bg-card);
}

/* Rychlé akce pod avatarem */
.action-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: #FFFFFF;
}
.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-secondary {
  background: var(--bg-subtle);
  color: var(--text-main);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  background: var(--border);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
  border-radius: 8px;
}

/* ŠKOLNÍ CHODBA */
.hallway-toolbar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.search-input {
  width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  font-size: 0.95rem;
  outline: none;
  background: var(--bg-card);
  color: var(--text-main);
}

.filter-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  align-items: center;
}

.filter-pill {
  padding: 6px 14px;
  border-radius: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.filter-pill:hover {
  color: var(--text-main);
  border-color: var(--primary);
}

.filter-pill.active {
  background: var(--primary);
  color: #FFFFFF;
  border-color: var(--primary);
}

/* Výrazné tlačítko Společný chat - umístěné na pravé straně (bez záře) */
.filter-pill.filter-pill-chat,
#hallwayPillChat {
  margin-left: auto;
  background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 45%, #EC4899 100%) !important;
  color: #FFFFFF !important;
  font-weight: 800 !important;
  border: 1.5px solid rgba(255, 255, 255, 0.45) !important;
  box-shadow: none !important;
  letter-spacing: 0.3px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.filter-pill.filter-pill-chat:hover,
#hallwayPillChat:hover {
  transform: translateY(-2px);
  box-shadow: none !important;
  filter: brightness(1.1);
}

.filter-pill.filter-pill-chat.active,
#hallwayPillChat.active {
  background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 45%, #DB2777 100%) !important;
  color: #FFFFFF !important;
  border: 2px solid #FDE047 !important;
  box-shadow: none !important;
  transform: translateY(-1px);
}

/* Tmavý režim pro tlačítko Společný chat (bez záře) */
html.dark-mode .filter-pill.filter-pill-chat,
body.dark-mode .filter-pill.filter-pill-chat,
html.dark-mode #hallwayPillChat,
body.dark-mode #hallwayPillChat {
  background: linear-gradient(135deg, #6366F1 0%, #9333EA 45%, #F43F5E 100%) !important;
  color: #FFFFFF !important;
  border: 1.5px solid rgba(255, 255, 255, 0.3) !important;
  box-shadow: none !important;
}

html.dark-mode .filter-pill.filter-pill-chat:hover,
body.dark-mode .filter-pill.filter-pill-chat:hover,
html.dark-mode #hallwayPillChat:hover,
body.dark-mode #hallwayPillChat:hover {
  transform: translateY(-2px);
  box-shadow: none !important;
  filter: brightness(1.15);
}

html.dark-mode .filter-pill.filter-pill-chat.active,
body.dark-mode .filter-pill.filter-pill-chat.active,
html.dark-mode #hallwayPillChat.active,
body.dark-mode #hallwayPillChat.active {
  background: linear-gradient(135deg, #4F46E5 0%, #7E22CE 45%, #E11D48 100%) !important;
  border: 2px solid #FDE047 !important;
  box-shadow: none !important;
}

/* Mřížka avatarů na chodbě */
.hallway-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
}

.hallway-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
}

.hallway-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.online-dot {
  width: 10px;
  height: 10px;
  background: var(--success);
  border-radius: 50%;
  border: 2px solid white;
  position: absolute;
  top: 10px;
  right: 10px;
}

.hallway-name {
  font-weight: 700;
  font-size: 0.92rem;
  margin-top: 8px;
}

.hallway-role {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.hallway-status-bubble {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 4px 8px;
  font-size: 0.75rem;
  color: var(--text-main);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Společný chat na školní chodbě */
.hallway-chat-container {
  display: none;
  flex-direction: column;
  height: 560px;
  border-radius: 16px;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  overflow: hidden;
  margin-top: 10px;
}

.hallway-chat-header {
  padding: 12px 18px;
  background: linear-gradient(135deg, #EEF2FF 0%, #E0E7FF 100%);
  border-bottom: 1px solid #C7D2FE;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

html.dark-mode .hallway-chat-header,
body.dark-mode .hallway-chat-header {
  background: linear-gradient(135deg, #1E1B4B 0%, #312E81 100%) !important;
  border-bottom-color: #4338CA !important;
}

.hallway-chat-title {
  font-weight: 800;
  font-size: 0.98rem;
  color: #3730A3;
}

html.dark-mode .hallway-chat-title,
body.dark-mode .hallway-chat-title {
  color: #E0E7FF !important;
}

.hallway-chat-subtitle {
  font-size: 0.74rem;
  color: #4F46E5;
}

html.dark-mode .hallway-chat-subtitle,
body.dark-mode .hallway-chat-subtitle {
  color: #A5B4FC !important;
}

/* Ranní hlášení školního rozhlasu ve společném chatu (na pravé straně) */
.hallway-chat-briefing-msg {
  background: linear-gradient(135deg, #FFFBEB 0%, #FEF3C7 35%, #F0FDF4 100%) !important;
  border: 1.5px solid #FCD34D !important;
  border-radius: 16px !important;
  box-shadow: 0 4px 18px rgba(245, 158, 11, 0.16) !important;
  padding: 12px 14px !important;
  align-self: flex-end !important;
  margin-left: auto !important;
  width: 100%;
  max-width: 480px;
}

html.dark-mode .hallway-chat-briefing-msg,
body.dark-mode .hallway-chat-briefing-msg {
  background: linear-gradient(135deg, #1E1B4B 0%, #172554 45%, #0F172A 100%) !important;
  border: 1.5px solid #6366F1 !important;
  box-shadow: 0 4px 22px rgba(99, 102, 241, 0.22) !important;
}

.briefing-system-pill {
  background: linear-gradient(135deg, #F59E0B, #D97706);
  color: #FFFFFF;
  font-size: 0.66rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 6px;
  letter-spacing: 0.4px;
  display: inline-block;
}

.briefing-content-box {
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.briefing-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 12px;
  padding: 10px 12px;
}

html.dark-mode .briefing-grid,
body.dark-mode .briefing-grid {
  background: rgba(15, 23, 42, 0.65) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

.briefing-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
}

.briefing-icon {
  font-size: 1.35rem;
  line-height: 1;
  width: 26px;
  text-align: center;
  flex-shrink: 0;
}

.briefing-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.4px;
  line-height: 1.2;
}

.briefing-val {
  font-size: 0.88rem;
  color: var(--text-main);
}

.briefing-temp-range {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-left: 4px;
}

.briefing-footer-wish {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: right;
  margin-top: 2px;
}

/* Spodní mobilní navigační lišta */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-around;
  padding: 8px 0;
  z-index: 50;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.05);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  flex: 1;
  gap: 3px;
}

.nav-item.active {
  color: var(--primary);
}

.nav-icon {
  font-size: 1.3rem;
}

/* Modální okna */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-overlay.active {
  display: flex;
}

.modal-box {
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-width: 480px;
  width: 100%;
  padding: 24px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.2);
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--text-muted);
}

/* Lístečky pod lavicí (Soukromý chat 1v1) */
.chat-messages-container {
  height: 240px;
  overflow-y: auto;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chat-bubble {
  max-width: 80%;
  padding: 9px 13px;
  border-radius: 14px;
  font-size: 0.88rem;
  line-height: 1.4;
  word-break: break-word;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.chat-bubble-me {
  align-self: flex-end;
  background: var(--primary);
  color: #FFFFFF;
  border-bottom-right-radius: 3px;
}

.chat-bubble-partner {
  align-self: flex-start;
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border);
  border-bottom-left-radius: 3px;
}

.chat-bubble-time {
  font-size: 0.68rem;
  margin-top: 3px;
  text-align: right;
  opacity: 0.75;
}

.chat-bubble-partner .chat-bubble-time {
  color: var(--text-muted);
}

.chat-bubble-me .chat-bubble-time {
  color: rgba(255, 255, 255, 0.85);
}

/* Štítky zájmů (Tags) */
.tag-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  background: #EEF2FF;
  color: #4F46E5;
  font-size: 0.78rem;
  font-weight: 600;
  margin: 3px;
}

/* Interaktivní hashtagy a správa */
.interactive-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 20px;
  background: #EEF2FF;
  color: #4338CA;
  border: 1px solid #C7D2FE;
  font-size: 0.8rem;
  font-weight: 600;
  transition: all 0.15s ease;
  user-select: none;
}

.interactive-tag:hover {
  background: #E0E7FF;
  border-color: #A5B4FC;
}

.interactive-tag .tag-delete-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(67, 56, 202, 0.15);
  color: #4338CA;
  border: none;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
  padding: 0;
  margin-left: 2px;
  transition: all 0.15s;
}

.interactive-tag .tag-delete-btn:hover {
  background: #EF4444;
  color: #FFFFFF;
}

/* Štítky pro porovnávání v Vibe Match */
.tag-pill-clickable {
  cursor: pointer;
}
.tag-pill-clickable:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.tag-pill-shared {
  background: #DCFCE7 !important;
  color: #15803D !important;
  border-color: #86EFAC !important;
}
.tag-pill-shared:hover {
  background: #BBF7D0 !important;
}

.tag-pill-other {
  background: #F1F5F9 !important;
  color: #475569 !important;
  border-color: #CBD5E1 !important;
}
.tag-pill-other:hover {
  background: #E2E8F0 !important;
}

/* Návrhy tagů (chips) */
.tag-suggestion-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 16px;
  background: #FFFFFF;
  border: 1px dashed #CBD5E1;
  color: #64748B;
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.tag-suggestion-chip:hover {
  background: #EEF2FF;
  border-color: #6366F1;
  color: #4338CA;
  border-style: solid;
}

.tag-suggestion-chip.active {
  background: #EEF2FF;
  border-color: #6366F1;
  border-style: solid;
  color: #4338CA;
  font-weight: 600;
}

/* ZÁLOŽKA ZÁJMY & HASHTAGY */
.vibe-manage-card {
  margin-bottom: 14px;
  border: 1.5px solid #E0E7FF;
  background: linear-gradient(180deg, #FFFFFF 0%, #F8FAFC 100%);
}

.vibe-tags-count-badge {
  background: #EEF2FF;
  color: #4338CA;
  font-weight: 700;
  font-size: 0.8rem;
  padding: 4px 10px;
  border-radius: 20px;
}

.vibe-my-tags-box {
  margin-bottom: 12px;
  min-height: 42px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  padding: 10px;
  background: #FFFFFF;
  border: 1px dashed var(--border);
  border-radius: 12px;
}

.vibe-active-filter-bar {
  display: none;
  align-items: center;
  justify-content: space-between;
  background: #EEF2FF;
  border: 1px solid #C7D2FE;
  border-radius: 10px;
  padding: 8px 14px;
  margin-bottom: 12px;
}

.vibe-active-filter-text {
  font-size: 0.85rem;
  color: #3730A3;
}

.vibe-match-badge {
  padding: 3px 9px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.vibe-badge-high {
  background: #DCFCE7;
  color: #15803D;
  border: 1px solid #86EFAC;
}

.vibe-badge-medium {
  background: #FEF3C7;
  color: #B45309;
  border: 1px solid #FDE68A;
}

.vibe-badge-none {
  background: #F1F5F9;
  color: #64748B;
  border: 1px solid #E2E8F0;
}

.vibe-section-label-shared {
  color: #15803D;
  font-size: 0.76rem;
  text-transform: uppercase;
}

.hallway-mini-tag {
  background: #EEF2FF;
  border: 1px solid #C7D2FE;
  color: #4338CA;
  font-size: 0.68rem;
  padding: 1px 6px;
  border-radius: 10px;
  font-weight: 600;
}

/* Formuláře */
.form-group {
  margin-bottom: 14px;
}

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

.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.92rem;
  outline: none;
  background: var(--bg-card);
  color: var(--text-main);
}

.form-control:focus {
  border-color: var(--primary);
}

/* Specifické úpravy komponent pro tmavý režim */
html.dark-mode .speech-bubble,
body.dark-mode .speech-bubble {
  background: #312E81;
  color: #EEF2FF;
}
html.dark-mode .speech-bubble::after,
body.dark-mode .speech-bubble::after {
  border-color: #312E81 transparent;
}

html.dark-mode .tag-badge,
body.dark-mode .tag-badge {
  background: #312E81;
  color: #C7D2FE;
}

/* Tmavý režim pro zájmy, hashtagy a vibe match */
html.dark-mode .vibe-manage-card,
body.dark-mode .vibe-manage-card {
  background: linear-gradient(180deg, #1E293B 0%, #0F172A 100%) !important;
  border-color: #334155 !important;
}

html.dark-mode .vibe-tags-count-badge,
body.dark-mode .vibe-tags-count-badge {
  background: #312E81 !important;
  color: #C7D2FE !important;
}

html.dark-mode .vibe-my-tags-box,
body.dark-mode .vibe-my-tags-box {
  background: #0B1120 !important;
  border-color: #334155 !important;
}

html.dark-mode .vibe-active-filter-bar,
body.dark-mode .vibe-active-filter-bar {
  background: rgba(99, 102, 241, 0.18) !important;
  border-color: #4338CA !important;
}

html.dark-mode .vibe-active-filter-text,
body.dark-mode .vibe-active-filter-text {
  color: #C7D2FE !important;
}

html.dark-mode .vibe-badge-high,
body.dark-mode .vibe-badge-high {
  background: rgba(22, 163, 74, 0.22) !important;
  color: #86EFAC !important;
  border-color: rgba(134, 239, 172, 0.35) !important;
}

html.dark-mode .vibe-badge-medium,
body.dark-mode .vibe-badge-medium {
  background: rgba(245, 158, 11, 0.22) !important;
  color: #FDE68A !important;
  border-color: rgba(245, 158, 11, 0.35) !important;
}

html.dark-mode .vibe-badge-none,
body.dark-mode .vibe-badge-none {
  background: rgba(148, 163, 184, 0.15) !important;
  color: #94A3B8 !important;
  border-color: rgba(148, 163, 184, 0.25) !important;
}

html.dark-mode .vibe-section-label-shared,
body.dark-mode .vibe-section-label-shared {
  color: #4ADE80 !important;
}

html.dark-mode .hallway-mini-tag,
body.dark-mode .hallway-mini-tag {
  background: #1E1B4B !important;
  border-color: #3730A3 !important;
  color: #A5B4FC !important;
}

html.dark-mode .interactive-tag,
body.dark-mode .interactive-tag {
  background: #1E1B4B;
  color: #A5B4FC;
  border-color: #3730A3;
}
html.dark-mode .interactive-tag:hover,
body.dark-mode .interactive-tag:hover {
  background: #312E81;
  border-color: #6366F1;
}

html.dark-mode .interactive-tag .tag-delete-btn,
body.dark-mode .interactive-tag .tag-delete-btn {
  background: rgba(165, 180, 252, 0.2) !important;
  color: #C7D2FE !important;
}

html.dark-mode .interactive-tag .tag-delete-btn:hover,
body.dark-mode .interactive-tag .tag-delete-btn:hover {
  background: #EF4444 !important;
  color: #FFFFFF !important;
}

html.dark-mode .tag-suggestion-chip,
body.dark-mode .tag-suggestion-chip {
  background: #0F172A !important;
  border-color: #475569 !important;
  color: #94A3B8 !important;
}
html.dark-mode .tag-suggestion-chip:hover,
body.dark-mode .tag-suggestion-chip:hover {
  background: #1E1B4B !important;
  border-color: #818CF8 !important;
  color: #C7D2FE !important;
}
html.dark-mode .tag-suggestion-chip.active,
body.dark-mode .tag-suggestion-chip.active {
  background: #312E81 !important;
  border-color: #818CF8 !important;
  color: #E0E7FF !important;
  font-weight: 700 !important;
}

html.dark-mode .tag-pill-shared,
body.dark-mode .tag-pill-shared {
  background: #064E3B !important;
  color: #A7F3D0 !important;
  border-color: #059669 !important;
}
html.dark-mode .tag-pill-shared:hover,
body.dark-mode .tag-pill-shared:hover {
  background: #065F46 !important;
  border-color: #10B981 !important;
}

html.dark-mode .tag-pill-other,
body.dark-mode .tag-pill-other {
  background: #1E293B !important;
  color: #CBD5E1 !important;
  border-color: #475569 !important;
}
html.dark-mode .tag-pill-other:hover,
body.dark-mode .tag-pill-other:hover {
  background: #334155 !important;
  border-color: #64748B !important;
}

html.dark-mode .admin-table th,
body.dark-mode .admin-table th {
  background: #0F172A;
  color: #94A3B8;
}
html.dark-mode .admin-table td,
body.dark-mode .admin-table td {
  border-bottom-color: #334155;
}

html.dark-mode .chat-messages-container,
body.dark-mode .chat-messages-container {
  background: #0B1120;
  border-color: #334155;
}

html.dark-mode .chat-bubble-partner,
body.dark-mode .chat-bubble-partner {
  background: #1E293B;
  color: #F8FAFC;
  border-color: #334155;
}

/* Přepínač světlého / tmavého režimu */
.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 8px;
  transition: all 0.2s ease;
  user-select: none;
}
.theme-toggle-btn:hover {
  transform: translateY(-1px);
}
.theme-icon {
  font-size: 0.95rem;
  line-height: 1;
}
.theme-text {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Tlačítko odhlášení */
.logout-btn {
  font-weight: 700;
  letter-spacing: 0.4px;
}

/* Jednořádková patička webu - vždy přilepená k dolní hraně bez mezery */
.app-footer {
  width: 100%;
  border-top: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 0.78rem;
  text-align: center;
  padding: 16px;
  margin-top: auto; /* Přitlačí patičku přímo na spodní hranu */
  margin-bottom: 0 !important;
  line-height: 1.4;
  flex-shrink: 0;
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

.footer-container {
  max-width: 1080px;
  margin: 0 auto;
}

@media (max-width: 859px) {
  .app-footer {
    padding-bottom: 80px; /* Vnitřní rezerva pro mobilní lištu, pozadí patičky dosahuje až dolů */
  }
}

/* Responzivní chování na PC */
@media (min-width: 860px) {
  .desktop-grid {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 20px;
  }
  
  .bottom-nav {
    display: none; /* Na PC je navigace přímo v horní liště */
  }

  body {
    padding-bottom: 0 !important;
  }

  .app-footer {
    padding-bottom: 16px;
  }

  .desktop-nav {
    display: flex !important;
    gap: 8px;
  }
}

.desktop-nav {
  display: none;
}

/* ========================================================
   LANDING / PŘIHLAŠOVACÍ STRÁNKA (PLNÁ WEBOVÁ STRÁNKA)
   ======================================================== */

body.landing-mode {
  padding-bottom: 0 !important;
  background-color: var(--bg-page);
  overflow-x: hidden;
}

.landing-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  background: 
    radial-gradient(circle at 12% 18%, rgba(99, 102, 241, 0.16) 0%, transparent 40%),
    radial-gradient(circle at 88% 82%, rgba(236, 72, 153, 0.14) 0%, transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(56, 189, 248, 0.10) 0%, transparent 55%),
    linear-gradient(135deg, #F8FAFC 0%, #EEF2FF 50%, #F1F5F9 100%);
  background-attachment: fixed;
  transition: background 0.3s ease;
}

html.dark-mode .landing-wrapper,
body.dark-mode .landing-wrapper {
  background: 
    radial-gradient(circle at 12% 18%, rgba(99, 102, 241, 0.30) 0%, transparent 45%),
    radial-gradient(circle at 88% 82%, rgba(236, 72, 153, 0.24) 0%, transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(56, 189, 248, 0.16) 0%, transparent 55%),
    linear-gradient(135deg, #0B1120 0%, #111827 50%, #1E1B4B 100%);
  background-attachment: fixed;
}

/* Jemná dekorativní mřížka v pozadí (školní sešit / síť) */
.landing-wrapper::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: 
    radial-gradient(rgba(99, 102, 241, 0.16) 1.5px, transparent 1.5px),
    linear-gradient(to right, rgba(99, 102, 241, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(99, 102, 241, 0.04) 1px, transparent 1px);
  background-size: 32px 32px, 64px 64px, 64px 64px;
  pointer-events: none;
  opacity: 0.85;
}

html.dark-mode .landing-wrapper::before,
body.dark-mode .landing-wrapper::before {
  background-image: 
    radial-gradient(rgba(129, 140, 248, 0.22) 1.5px, transparent 1.5px),
    linear-gradient(to right, rgba(129, 140, 248, 0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(129, 140, 248, 0.06) 1px, transparent 1px);
  opacity: 0.65;
}

/* Plovoucí dekorativní prvky v pozadí */
.landing-decor-badge {
  position: absolute;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  font-size: 0.80rem;
  font-weight: 700;
  color: var(--text-muted);
  user-select: none;
  pointer-events: none;
  animation: floatDecor 8s ease-in-out infinite alternate;
  z-index: 1;
}

html.dark-mode .landing-decor-badge,
body.dark-mode .landing-decor-badge {
  background: rgba(30, 41, 59, 0.75);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.35);
}

.decor-1 { top: 10%; left: 3%; animation-duration: 8.5s; }
.decor-2 { top: 22%; right: 4%; animation-duration: 9.5s; animation-delay: -2s; }
.decor-3 { bottom: 16%; left: 5%; animation-duration: 7.5s; animation-delay: -4s; }
.decor-4 { bottom: 20%; right: 6%; animation-duration: 8s; animation-delay: -1s; }

@keyframes floatDecor {
  0% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-14px) rotate(1.5deg); }
  100% { transform: translateY(6px) rotate(-1.5deg); }
}

/* Navigace na úvodní stránce */
.landing-nav {
  position: relative;
  z-index: 10;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Hlavní obsah landing stránky (dvousloupcový layout) */
.landing-main {
  position: relative;
  z-index: 10;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 20px 24px 48px;
  flex: 1;
  display: grid;
  grid-template-columns: 1.15fr 0.95fr;
  gap: 48px;
  align-items: center;
}

/* Hero část (vlevo) */
.landing-hero {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.landing-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 700;
  width: fit-content;
  border: 1px solid rgba(99, 102, 241, 0.25);
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.1);
}

.landing-title {
  font-size: 2.35rem;
  font-weight: 850;
  line-height: 1.18;
  color: var(--text-main);
  letter-spacing: -0.5px;
}

.landing-title span {
  background: linear-gradient(135deg, #6366F1 0%, #EC4899 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.landing-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.55;
  max-width: 540px;
}

/* Showcase avatarů na úvodní stránce */
.landing-avatar-showcase {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 8px 0;
}

.landing-avatar-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  position: relative;
}

.landing-avatar-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px -6px rgba(0, 0, 0, 0.12);
}

.landing-avatar-bubble {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 6px 10px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 8px;
  position: relative;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1.3;
}

.landing-avatar-bubble::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px 5px 0 5px;
  border-style: solid;
  border-color: var(--border) transparent transparent transparent;
}

.landing-avatar-svg-wrap {
  width: 100px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.landing-avatar-svg-wrap svg {
  width: 100px;
  height: 100px;
  border-radius: 50%;
}

.landing-avatar-name {
  font-size: 0.88rem;
  font-weight: 800;
  margin-top: 6px;
  color: var(--text-main);
}

.landing-avatar-role {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Feature body / pilulky */
.landing-features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 4px;
}

.landing-feature-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-main);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

html.dark-mode .landing-feature-chip,
body.dark-mode .landing-feature-chip {
  background: rgba(30, 41, 59, 0.65);
}

.landing-about-text {
  font-size: 0.90rem;
  color: var(--text-muted);
  line-height: 1.6;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 18px;
  margin-top: 8px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}

html.dark-mode .landing-about-text,
body.dark-mode .landing-about-text,
html.dark-mode .landing-about-banner,
body.dark-mode .landing-about-banner {
  background: rgba(30, 41, 59, 0.75) !important;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.3) !important;
}

/* Karta přihlášení a registrace (vpravo) */
.landing-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 32px 28px;
  box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  position: relative;
}

html.dark-mode .landing-card,
body.dark-mode .landing-card {
  box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.55);
}

.landing-card-header {
  text-align: center;
  margin-bottom: 22px;
}

.landing-card-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 4px;
}

.landing-card-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.landing-tabs {
  display: flex;
  gap: 6px;
  background: var(--bg-subtle);
  padding: 5px;
  border-radius: 14px;
  margin-bottom: 22px;
  border: 1px solid var(--border);
}

.landing-tab-btn {
  flex: 1;
  padding: 10px 12px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.landing-tab-btn.active {
  background: var(--primary);
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

.landing-footer {
  position: relative;
  z-index: 10;
  width: 100%;
  border-top: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 0.8rem;
  text-align: center;
  padding: 18px 16px;
  line-height: 1.4;
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

/* Responzivita pro landing */
@media (max-width: 960px) {
  .landing-main {
    grid-template-columns: 1fr;
    gap: 36px;
    padding: 16px 16px 36px;
  }

  .landing-title {
    font-size: 1.85rem;
  }

  .landing-avatar-showcase {
    grid-template-columns: repeat(3, 1fr);
  }

  .landing-card {
    padding: 24px 20px;
  }

  .landing-decor-badge {
    display: none; /* Skrýt létající odznáčky na mobilu pro čistotu */
  }
}

@media (max-width: 600px) {
  .landing-avatar-showcase {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .landing-avatar-card {
    flex-direction: row;
    text-align: left;
    gap: 12px;
    padding: 12px;
  }

  .landing-avatar-bubble {
    order: 2;
    margin-bottom: 0;
    flex: 1;
  }

  .landing-avatar-bubble::after {
    left: -6px;
    bottom: 50%;
    transform: translateY(50%);
    border-width: 5px 6px 5px 0;
    border-color: transparent var(--border) transparent transparent;
  }

  .landing-avatar-svg-wrap {
    width: 64px;
    height: 64px;
  }

  .landing-avatar-svg-wrap svg {
    width: 64px;
    height: 64px;
  }

  .landing-features-grid {
    grid-template-columns: 1fr;
  }
}

/* ========================================== */
/* HRA KOSTKY (DICE ARENA) STYLY & ANIMACE    */
/* ========================================== */

.game-modal-box {
  max-width: 480px;
  width: 95%;
  position: relative;
  overflow: hidden;
}

.game-vs-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 16px;
  position: relative;
}

.game-player-card {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.game-player-card.reverse {
  flex-direction: row-reverse;
  text-align: right;
}

.game-player-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--border);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

.game-player-info {
  min-width: 0;
}

.game-player-name {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}

.game-player-tokens {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  color: #D97706;
  font-weight: 700;
  background: #FEF3C7;
  padding: 1px 7px;
  border-radius: 10px;
  margin-top: 2px;
}

html.dark-mode .game-player-tokens {
  background: #78350F;
  color: #FDE68A;
}

.game-vs-badge {
  font-weight: 900;
  font-size: 0.95rem;
  color: #EF4444;
  background: #FEE2E2;
  border: 1.5px solid #FCA5A5;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.25);
  margin: 0 8px;
  flex-shrink: 0;
  animation: pulse-vs 2s infinite ease-in-out;
}

@keyframes pulse-vs {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

.game-arena-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 16px;
}

.dice-column {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: all 0.2s ease;
  min-height: 190px;
  position: relative;
}

.dice-column.highlight-me {
  border-color: var(--primary);
  background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg-subtle) 100%);
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.12);
}

.dice-column-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.dice-wrapper {
  width: 104px;
  height: 104px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 8px 0;
  perspective: 600px;
}

/* Styl a animace samotné kostky */
.dice-face-svg {
  width: 96px;
  height: 96px;
  filter: drop-shadow(0 6px 12px rgba(46, 28, 12, 0.22));
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.dice-face-svg:hover {
  transform: translateY(-2px) scale(1.03);
}

.dice-rolling {
  animation: dice-roll-spin 0.6s infinite linear;
}

@keyframes dice-roll-spin {
  0% { transform: scale(0.98) rotate(0deg); }
  25% { transform: scale(1.12) rotate(20deg) translateY(-8px); }
  50% { transform: scale(0.92) rotate(-22deg) translateY(4px); }
  75% { transform: scale(1.08) rotate(14deg) translateY(-4px); }
  100% { transform: scale(0.98) rotate(0deg); }
}

.dice-landed {
  animation: dice-land-bounce 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes dice-land-bounce {
  0% { transform: scale(0.75) rotate(-15deg); opacity: 0.7; }
  60% { transform: scale(1.16) rotate(6deg); opacity: 1; }
  100% { transform: scale(1) rotate(0deg); }
}

.dice-placeholder-mystery {
  width: 92px;
  height: 92px;
  background: #F8FAFC;
  border: 3px dashed var(--border);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  color: var(--text-muted);
  animation: mystery-pulse 1.8s infinite ease-in-out;
}

html.dark-mode .dice-placeholder-mystery {
  background: #0F172A;
  border-color: #334155;
}

@keyframes mystery-pulse {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  50% { transform: scale(1.06); opacity: 1; }
}

.dice-status-pill {
  font-size: 0.76rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 12px;
  background: var(--bg-subtle);
  color: var(--text-muted);
  margin-top: 6px;
}

.dice-status-pill.ready {
  background: #DCFCE7;
  color: #15803D;
}

.dice-status-pill.waiting {
  background: #FEF3C7;
  color: #B45309;
}

.dice-round-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--bg-subtle);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  padding: 5px 16px;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-main);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

/* Banner výsledku hry */
.game-result-banner {
  border-radius: 14px;
  padding: 14px 16px;
  text-align: center;
  margin-bottom: 14px;
  animation: result-appear 0.4s ease;
}

@keyframes result-appear {
  0% { transform: translateY(10px) scale(0.95); opacity: 0; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

.game-result-banner.win {
  background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
  border: 2px solid #F59E0B;
  color: #92400E;
  box-shadow: 0 4px 18px rgba(245, 158, 11, 0.3);
}

.game-result-banner.lose {
  background: linear-gradient(135deg, #FEE2E2 0%, #FECACA 100%);
  border: 2px solid #EF4444;
  color: #991B1B;
}

.game-result-banner.draw {
  background: linear-gradient(135deg, #EEF2FF 0%, #E0E7FF 100%);
  border: 2px solid #6366F1;
  color: #3730A3;
}

html.dark-mode .game-result-banner.win {
  background: linear-gradient(135deg, #78350F 0%, #451A03 100%);
  border-color: #F59E0B;
  color: #FEF3C7;
}

html.dark-mode .game-result-banner.lose {
  background: linear-gradient(135deg, #7F1D1D 0%, #450A0A 100%);
  border-color: #EF4444;
  color: #FEE2E2;
}

html.dark-mode .game-result-banner.draw {
  background: linear-gradient(135deg, #312E81 0%, #1E1B4B 100%);
  border-color: #818CF8;
  color: #E0E7FF;
}

.game-result-title {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.game-result-desc {
  font-size: 0.86rem;
  font-weight: 600;
}

/* Plovoucí toast notifikace výzvy ke hře */
.dice-invite-toast {
  position: fixed;
  bottom: 84px;
  right: 18px;
  max-width: 360px;
  width: calc(100% - 36px);
  background: var(--bg-card);
  border: 2px solid #F59E0B;
  border-radius: 16px;
  padding: 14px 16px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.22);
  z-index: 1000;
  animation: slide-up-toast 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes slide-up-toast {
  0% { transform: translateY(40px) scale(0.9); opacity: 0; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

.dice-invite-countdown {
  height: 4px;
  background: #E2E8F0;
  border-radius: 2px;
  margin-top: 10px;
  overflow: hidden;
}

.dice-invite-progress {
  height: 100%;
  background: #F59E0B;
  width: 100%;
  transition: width 1s linear;
}

/* Konfetový efekt */
.confetti-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  z-index: 50;
}

.confetti-particle {
  position: absolute;
  font-size: 1.2rem;
  animation: confetti-fall 2.2s forwards cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes confetti-fall {
  0% { transform: translateY(-20px) rotate(0deg) scale(0.5); opacity: 1; }
  50% { opacity: 1; }
  100% { transform: translateY(320px) rotate(360deg) scale(1.1); opacity: 0; }
}

/* ========================================================
   HRA HÁDEJ ČÍSLO 1-20 (GUESS NUMBER ARENA) STYLY
   ======================================================== */

.secret-number-card-container {
  display: flex;
  justify-content: center;
  margin: 8px 0 14px 0;
}

.secret-card-inner {
  width: 100%;
  max-width: 320px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(99, 102, 241, 0.06) 100%);
  border: 2px dashed #8B5CF6;
  border-radius: 18px;
  padding: 14px 18px;
  text-align: center;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.secret-card-inner.revealed {
  background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
  border: 2px solid #F59E0B;
  box-shadow: 0 6px 24px rgba(245, 158, 11, 0.35);
  transform: scale(1.03);
}

html.dark-mode .secret-card-inner {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.18) 0%, rgba(30, 27, 75, 0.5) 100%);
  border-color: #A78BFA;
}

html.dark-mode .secret-card-inner.revealed {
  background: linear-gradient(135deg, #78350F 0%, #451A03 100%);
  border-color: #F59E0B;
  color: #FEF3C7;
}

.secret-card-caption {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.secret-card-inner.revealed .secret-card-caption {
  color: #92400E;
}

html.dark-mode .secret-card-inner.revealed .secret-card-caption {
  color: #FDE68A;
}

.secret-card-number {
  font-size: 3.2rem;
  font-weight: 900;
  line-height: 1.1;
  color: #7C3AED;
  text-shadow: 0 2px 8px rgba(124, 58, 237, 0.2);
  margin: 2px 0;
}

.secret-card-inner:not(.revealed) .secret-card-number {
  animation: mystery-pulse 1.8s infinite ease-in-out;
}

.secret-card-inner.revealed .secret-card-number {
  color: #B45309;
  text-shadow: 0 2px 10px rgba(180, 83, 9, 0.3);
  animation: result-appear 0.4s ease;
}

html.dark-mode .secret-card-number {
  color: #C4B5FD;
}

html.dark-mode .secret-card-inner.revealed .secret-card-number {
  color: #FDE68A;
}

.secret-card-hint {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

.secret-card-inner.revealed .secret-card-hint {
  color: #92400E;
  font-weight: 700;
}

html.dark-mode .secret-card-inner.revealed .secret-card-hint {
  color: #FEF3C7;
}

/* Herní mřížka a sloupce tipů */
.guess-arena-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.guess-column {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: 16px;
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: all 0.2s ease;
}

.guess-column.highlight-me {
  border-color: #8B5CF6;
  background: rgba(139, 92, 246, 0.05);
}

html.dark-mode .guess-column.highlight-me {
  border-color: #A78BFA;
  background: rgba(139, 92, 246, 0.12);
}

.guess-column-title {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.guess-display-badge {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: var(--bg-subtle);
  border: 2.5px dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.85rem;
  font-weight: 900;
  color: var(--text-main);
  margin-bottom: 6px;
  transition: all 0.25s ease;
}

.guess-display-badge.locked {
  border-style: solid;
  border-color: #8B5CF6;
  color: #7C3AED;
  background: rgba(139, 92, 246, 0.1);
}

.guess-display-badge.winner {
  border-style: solid;
  border-color: #10B981 !important;
  background: #DCFCE7 !important;
  color: #15803D !important;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
  transform: scale(1.08);
}

.guess-display-badge.loser {
  border-style: solid;
  border-color: #EF4444 !important;
  background: #FEE2E2 !important;
  color: #991B1B !important;
  opacity: 0.88;
}

.guess-display-badge.draw {
  border-style: solid;
  border-color: #6366F1 !important;
  background: #EEF2FF !important;
  color: #3730A3 !important;
}

html.dark-mode .guess-display-badge.locked {
  background: rgba(139, 92, 246, 0.22);
  color: #DDD6FE;
  border-color: #A78BFA;
}

html.dark-mode .guess-display-badge.winner {
  background: #064E3B !important;
  border-color: #10B981 !important;
  color: #A7F3D0 !important;
}

html.dark-mode .guess-display-badge.loser {
  background: #7F1D1D !important;
  border-color: #EF4444 !important;
  color: #FECACA !important;
}

html.dark-mode .guess-display-badge.draw {
  background: #312E81 !important;
  border-color: #818CF8 !important;
  color: #E0E7FF !important;
}

/* 20-číslicový výběrový grid */
.number-grid-20 {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 7px;
}

@media (max-width: 360px) {
  .number-grid-20 {
    gap: 5px;
  }
}

.num-pill-btn {
  padding: 10px 0;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  color: var(--text-main);
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}

.num-pill-btn:hover:not(:disabled) {
  border-color: #8B5CF6;
  background: rgba(139, 92, 246, 0.1);
  transform: translateY(-2px);
}

.num-pill-btn.selected {
  background: linear-gradient(135deg, #8B5CF6 0%, #6D28D9 100%) !important;
  color: #FFFFFF !important;
  border-color: #6D28D9 !important;
  transform: scale(1.08);
  box-shadow: 0 4px 12px rgba(109, 40, 217, 0.4);
}

.num-pill-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
}

html.dark-mode .num-pill-btn {
  background: #1E293B;
  border-color: #334155;
  color: #F8FAFC;
}

html.dark-mode .num-pill-btn:hover:not(:disabled) {
  background: #334155;
  border-color: #A78BFA;
}

/* ========================================================
   HRA KÁMEN, NŮŽKY, PAPÍR (RPS ARENA) STYLY
   ======================================================== */

.rps-choices-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 12px 0 16px 0;
}

.rps-choice-btn {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: 16px;
  padding: 14px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  user-select: none;
}

.rps-choice-btn .rps-icon {
  font-size: 2.2rem;
  line-height: 1;
  transition: transform 0.2s ease;
}

.rps-choice-btn .rps-label {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--text-main);
}

.rps-choice-btn:hover:not(:disabled) {
  border-color: #10B981;
  background: rgba(16, 185, 129, 0.08);
  transform: translateY(-3px);
}

.rps-choice-btn:hover:not(:disabled) .rps-icon {
  transform: scale(1.18);
}

.rps-choice-btn.selected {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%) !important;
  border-color: #059669 !important;
  color: #FFFFFF !important;
  transform: scale(1.06);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.rps-choice-btn.selected .rps-label {
  color: #FFFFFF !important;
}

.rps-choice-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

html.dark-mode .rps-choice-btn {
  background: #1E293B;
  border-color: #334155;
}

html.dark-mode .rps-choice-btn:hover:not(:disabled) {
  background: #334155;
  border-color: #34D399;
}

.rps-display-badge {
  width: 80px;
  height: 80px;
  border-radius: 20px;
  background: var(--bg-subtle);
  border: 2.5px dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--text-main);
  margin-bottom: 8px;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.rps-display-badge.locked {
  border-style: solid;
  border-color: #10B981;
  background: rgba(16, 185, 129, 0.1);
  color: #10B981;
}

.rps-display-badge.winner {
  border-style: solid;
  border-color: #10B981 !important;
  background: #DCFCE7 !important;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4);
  transform: scale(1.12);
}

.rps-display-badge.loser {
  border-style: solid;
  border-color: #EF4444 !important;
  background: #FEE2E2 !important;
  opacity: 0.85;
}

.rps-display-badge.draw {
  border-style: solid;
  border-color: #6366F1 !important;
  background: #EEF2FF !important;
}

html.dark-mode .rps-display-badge.winner {
  background: #064E3B !important;
  border-color: #10B981 !important;
}

html.dark-mode .rps-display-badge.loser {
  background: #7F1D1D !important;
  border-color: #EF4444 !important;
}

html.dark-mode .rps-display-badge.draw {
  background: #312E81 !important;
  border-color: #818CF8 !important;
}

/* ========================================================
   HRA PRÁSKNI BALÓNEK (BALLOON POP ARENA) STYLY
   ======================================================== */

.balloon-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px 10px;
  min-height: 190px;
  position: relative;
  overflow: hidden;
}

.balloon-svg-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transform-origin: center bottom;
  margin-bottom: 10px;
}

.balloon-shake-low {
  animation: balloon-wobble-low 1.4s infinite ease-in-out;
}

.balloon-shake-medium {
  animation: balloon-wobble-medium 0.8s infinite ease-in-out;
}

.balloon-shake-high {
  animation: balloon-wobble-high 0.25s infinite ease-in-out;
}

@keyframes balloon-wobble-low {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(3deg); }
}

@keyframes balloon-wobble-medium {
  0%, 100% { transform: rotate(-4deg) translateY(0); }
  50% { transform: rotate(4deg) translateY(-4px); }
}

@keyframes balloon-wobble-high {
  0% { transform: translate(-3px, 1px) rotate(-5deg); }
  25% { transform: translate(3px, -2px) rotate(5deg); }
  50% { transform: translate(-2px, -3px) rotate(-4deg); }
  75% { transform: translate(2px, 3px) rotate(4deg); }
  100% { transform: translate(-3px, 1px) rotate(-5deg); }
}

.balloon-pop-animation {
  animation: balloon-explode 0.4s forwards cubic-bezier(0.1, 0.9, 0.2, 1);
}

@keyframes balloon-explode {
  0% { transform: scale(1.6); opacity: 1; }
  50% { transform: scale(2.2); opacity: 0.8; filter: brightness(2); }
  100% { transform: scale(2.6); opacity: 0; }
}

.balloon-tension-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-subtle);
  border: 1.5px solid var(--border);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 12px;
}

.balloon-turn-banner {
  padding: 10px 14px;
  border-radius: 12px;
  text-align: center;
  font-weight: 800;
  font-size: 0.92rem;
  margin-bottom: 12px;
  transition: all 0.25s ease;
}

.balloon-turn-banner.my-turn {
  background: linear-gradient(135deg, #FEE2E2 0%, #FECDD3 100%);
  border: 2px solid #F43F5E;
  color: #9F1239;
  animation: pulse-turn 1.2s infinite ease-in-out;
}

.balloon-turn-banner.opp-turn {
  background: var(--bg-subtle);
  border: 1.5px solid var(--border);
  color: var(--text-muted);
}

html.dark-mode .balloon-turn-banner.my-turn {
  background: linear-gradient(135deg, #881337 0%, #4C0519 100%);
  border-color: #FB7185;
  color: #FFE4E6;
}

@keyframes pulse-turn {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 rgba(244, 63, 94, 0); }
  50% { transform: scale(1.02); box-shadow: 0 0 12px rgba(244, 63, 94, 0.35); }
}

.balloon-pump-btn {
  width: 100%;
  padding: 14px;
  font-size: 1.1rem;
  font-weight: 900;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, #F43F5E 0%, #E11D48 100%);
  color: #FFFFFF;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(244, 63, 94, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.15s ease;
  user-select: none;
}

.balloon-pump-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(244, 63, 94, 0.5);
}

.balloon-pump-btn:active:not(:disabled) {
  transform: translateY(2px) scale(0.98);
}

.balloon-pump-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* =========================================================
   MODERNÍ EMOJI PICKER PRO CHATY
   ========================================================= */

.chat-emoji-toggle-btn {
  background: var(--bg-subtle);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  width: 42px;
  height: 42px;
  font-size: 1.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  user-select: none;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.chat-emoji-toggle-btn:hover {
  transform: scale(1.08);
  background: #EEF2FF;
  border-color: #A5B4FC;
}

.chat-emoji-toggle-btn:active {
  transform: scale(0.95);
}

html.dark-mode .chat-emoji-toggle-btn,
body.dark-mode .chat-emoji-toggle-btn {
  background: #1E293B;
  border-color: #334155;
}

html.dark-mode .chat-emoji-toggle-btn:hover,
body.dark-mode .chat-emoji-toggle-btn:hover {
  background: #312E81;
  border-color: #6366F1;
}

/* Modál soukromého chatu a zamezení ořezání emoji pickeru */
#modalChat .modal-box {
  overflow: visible !important;
  position: relative;
  max-width: 440px;
}

.modern-emoji-picker {
  position: absolute;
  bottom: calc(100% + 10px); /* VŽDY směrem NAHORU nad řádek pro psaní */
  left: 0;
  width: 350px;
  max-width: min(350px, calc(100vw - 32px));
  box-sizing: border-box;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.28);
  padding: 12px 14px;
  z-index: 1050;
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: emojiPickerIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overscroll-behavior: contain;
}

@keyframes emojiPickerIn {
  0% { opacity: 0; transform: translateY(8px) scale(0.96); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

html.dark-mode .modern-emoji-picker,
body.dark-mode .modern-emoji-picker {
  background: rgba(30, 41, 59, 0.98) !important;
  border-color: #475569 !important;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.6) !important;
}

.emoji-picker-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.emoji-picker-search-wrap {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}

.emoji-picker-search-icon {
  position: absolute;
  left: 10px;
  font-size: 0.82rem;
  opacity: 0.55;
  pointer-events: none;
}

.emoji-picker-search-input {
  width: 100%;
  padding: 7px 10px 7px 30px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  color: var(--text-main);
  font-size: 0.82rem;
  outline: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.emoji-picker-search-input:focus {
  border-color: var(--primary);
  background: var(--bg-card);
}

html.dark-mode .emoji-picker-search-input,
body.dark-mode .emoji-picker-search-input {
  background: #0F172A !important;
  border-color: #334155 !important;
  color: #F8FAFC !important;
}

.emoji-picker-close-btn {
  background: none;
  border: none;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0 4px;
  border-radius: 6px;
  transition: color 0.15s ease;
}

.emoji-picker-close-btn:hover {
  color: var(--danger);
}

.emoji-quick-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  box-sizing: border-box;
  width: 100%;
}

html.dark-mode .emoji-quick-bar,
body.dark-mode .emoji-quick-bar {
  background: #0F172A !important;
  border-color: #334155 !important;
}

.emoji-quick-label {
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  flex-shrink: 0;
}

.emoji-quick-items {
  display: flex;
  gap: 3px;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  align-items: center;
  justify-content: flex-start;
}

.emoji-quick-items::-webkit-scrollbar {
  display: none;
}

.emoji-quick-btn {
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  padding: 2px 3px;
  border-radius: 6px;
  transition: transform 0.12s ease, background 0.12s ease;
  line-height: 1;
  user-select: none;
  flex-shrink: 0;
}

.emoji-quick-btn:hover {
  transform: scale(1.3);
  background: rgba(99, 102, 241, 0.16);
}

.emoji-category-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.emoji-category-tabs::-webkit-scrollbar {
  display: none;
}

.emoji-cat-tab {
  background: none;
  border: none;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-muted);
  padding: 5px 9px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  user-select: none;
}

.emoji-cat-tab:hover {
  color: var(--text-main);
  background: var(--bg-subtle);
}

.emoji-cat-tab.active {
  color: var(--primary);
  background: #EEF2FF;
}

html.dark-mode .emoji-cat-tab.active,
body.dark-mode .emoji-cat-tab.active {
  background: #312E81 !important;
  color: #C7D2FE !important;
}

.emoji-grid-container {
  height: 200px;
  max-height: 200px;
  overflow-y: scroll !important;
  overflow-x: hidden;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 3px;
  padding: 4px 8px 8px 4px;
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: var(--primary) var(--bg-subtle);
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

/* Stylový a jasně viditelný posuvník pro scrollování smajlíků dolů */
.emoji-grid-container::-webkit-scrollbar {
  width: 6px;
  display: block;
}

.emoji-grid-container::-webkit-scrollbar-track {
  background: var(--bg-subtle);
  border-radius: 6px;
}

.emoji-grid-container::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #6366F1, #8B5CF6);
  border-radius: 6px;
}

.emoji-grid-container::-webkit-scrollbar-thumb:hover {
  background: #4F46E5;
}

html.dark-mode .emoji-grid-container::-webkit-scrollbar-track {
  background: #0F172A;
}

html.dark-mode .emoji-grid-container::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #818CF8, #A78BFA);
}

.emoji-item-btn,
.emoji-btn {
  background: none;
  border: none;
  font-size: 1.35rem;
  line-height: 1;
  width: 100%;
  max-width: 40px;
  height: 38px;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 8px;
  transition: transform 0.12s cubic-bezier(0.16, 1, 0.3, 1), background 0.12s ease;
  user-select: none;
  box-sizing: border-box;
}

.emoji-item-btn:hover,
.emoji-btn:hover {
  transform: scale(1.22);
  background: rgba(99, 102, 241, 0.15);
  z-index: 2;
}

.emoji-item-btn:active,
.emoji-btn:active {
  transform: scale(0.95);
}

html.dark-mode .emoji-item-btn:hover,
html.dark-mode .emoji-btn:hover {
  background: rgba(129, 140, 248, 0.25);
}

/* Velké moderní emoji v chatu (Jumbomoji pro 1-4 samotné emoji) */
.jumbo-emoji-msg {
  font-size: 2.3rem !important;
  line-height: 1.25 !important;
  padding: 4px 0 !important;
  letter-spacing: 4px !important;
}

/* ============================================================ */
/* ŠKOLNÍ OBCHOD (SHOP) & PRÉMIOVÉ POLOŽKY                     */
/* ============================================================ */

/* Animované rámečky karet na chodbě a v profilu */
.card-frame-gold,
.hallway-card.card-frame-gold {
  border: 2px solid #F59E0B !important;
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.45), 0 0 25px rgba(251, 191, 36, 0.25) !important;
  position: relative;
  animation: goldPulse 3s ease-in-out infinite alternate;
}

@keyframes goldPulse {
  0% {
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.35), 0 0 20px rgba(251, 191, 36, 0.2);
    border-color: #F59E0B;
  }
  100% {
    box-shadow: 0 0 22px rgba(245, 158, 11, 0.7), 0 0 35px rgba(251, 191, 36, 0.4);
    border-color: #FDE047;
  }
}

.card-frame-neon,
.hallway-card.card-frame-neon {
  border: 2px solid #06B6D4 !important;
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.5), 0 0 30px rgba(168, 85, 247, 0.35) !important;
  position: relative;
  animation: neonPulse 2.5s ease-in-out infinite alternate;
}

@keyframes neonPulse {
  0% {
    box-shadow: 0 0 12px rgba(6, 182, 212, 0.4), 0 0 24px rgba(168, 85, 247, 0.3);
    border-color: #06B6D4;
  }
  100% {
    box-shadow: 0 0 22px rgba(236, 72, 153, 0.65), 0 0 38px rgba(139, 92, 246, 0.5);
    border-color: #EC4899;
  }
}

/* Shop Hero Banner */
.shop-hero-card {
  background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 50%, #EC4899 100%);
  color: #FFFFFF;
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 20px;
  box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.shop-balance-badge {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  padding: 10px 20px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.25rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.shop-balance-coin {
  display: inline-block;
  font-size: 1.6rem;
  animation: coinBounce 2s ease-in-out infinite;
}

@keyframes coinBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px) rotate(10deg); }
}

/* Kontejner záložek obchodu s ovládáním posunu */
.shop-tabs-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 18px;
  width: 100%;
}

.shop-tabs-scroll-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 800;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  transition: all 0.15s ease;
  user-select: none;
  z-index: 2;
  line-height: 1;
}

.shop-tabs-scroll-btn:hover {
  background: var(--primary);
  color: #FFFFFF;
  border-color: var(--primary);
  transform: scale(1.1);
}

.shop-tabs-scroll-btn:active {
  transform: scale(0.95);
}

html.dark-mode .shop-tabs-scroll-btn {
  background: #1E293B;
  border-color: #334155;
  color: #F8FAFC;
}

html.dark-mode .shop-tabs-scroll-btn:hover {
  background: #6366F1;
  border-color: #818CF8;
}

/* Shop záložky / kategorie */
.shop-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px 2px 8px 2px;
  flex: 1;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  cursor: grab;
  scrollbar-width: thin;
  scrollbar-color: rgba(99, 102, 241, 0.5) rgba(0, 0, 0, 0.04);
}

.shop-tabs.is-dragging {
  cursor: grabbing;
  user-select: none;
}

/* Stylový scrollbar pro WebKit prohlížeče (Chrome, Edge, Opera, Safari) */
.shop-tabs::-webkit-scrollbar {
  height: 6px;
  display: block;
}

.shop-tabs::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 10px;
}

.shop-tabs::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, #6366F1, #8B5CF6);
  border-radius: 10px;
  transition: background 0.2s ease;
}

.shop-tabs::-webkit-scrollbar-thumb:hover {
  background: #4F46E5;
}

html.dark-mode .shop-tabs {
  scrollbar-color: rgba(129, 140, 248, 0.5) rgba(255, 255, 255, 0.05);
}

html.dark-mode .shop-tabs::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.06);
}

html.dark-mode .shop-tabs::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, #818CF8, #A78BFA);
}

.shop-tab-btn {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  color: var(--text-main);
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.shop-tab-btn:hover {
  border-color: var(--primary);
  background: var(--bg-subtle);
  transform: translateY(-1px);
}

.shop-tab-btn.active {
  background: var(--primary);
  color: #FFFFFF;
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

/* Mřížka zboží v obchodě */
.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 16px;
}

/* Karta položky v obchodě */
.shop-item-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: center;
  position: relative;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.shop-item-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
  border-color: var(--primary);
}

.shop-item-card.equipped {
  border-color: #10B981;
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.06) 0%, var(--bg-card) 100%);
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.15);
}

.shop-item-preview {
  width: 90px;
  height: 90px;
  margin: 0 auto 12px;
  background: var(--bg-subtle);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.8rem;
  border: 1px solid var(--border);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.03);
  transition: transform 0.2s ease;
}

.shop-item-card:hover .shop-item-preview {
  transform: scale(1.08);
}

.shop-item-title {
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--text-main);
  margin-bottom: 4px;
}

.shop-item-desc {
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.35;
  margin-bottom: 12px;
  flex: 1;
}

.shop-item-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.shop-price-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-weight: 800;
  font-size: 0.88rem;
  color: #D97706;
  background: #FEF3C7;
  padding: 4px 10px;
  border-radius: 10px;
  margin-bottom: 4px;
  align-self: center;
}

html.dark-mode .shop-price-tag,
body.dark-mode .shop-price-tag {
  background: rgba(245, 158, 11, 0.2);
  color: #FDE047;
}

.shop-btn {
  width: 100%;
  padding: 9px 12px;
  border-radius: 10px;
  font-weight: 800;
  font-size: 0.84rem;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.shop-btn-buy {
  background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.3);
}

.shop-btn-buy:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(217, 119, 6, 0.45);
}

.shop-btn-disabled {
  background: var(--bg-subtle);
  color: var(--text-muted);
  border: 1px solid var(--border);
  cursor: not-allowed;
  opacity: 0.7;
}

.shop-btn-equip {
  background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%);
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.shop-btn-equip:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.45);
}

.shop-btn-unequip {
  background: #DCFCE7;
  color: #15803D;
  border: 1.5px solid #86EFAC;
}

.shop-btn-unequip:hover {
  background: #FEE2E2;
  color: #B91C1C;
  border-color: #FCA5A5;
}

.shop-badge-status {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.shop-badge-equipped {
  background: #10B981;
  color: #FFFFFF;
}

.shop-badge-owned {
  background: #E0E7FF;
  color: #4338CA;
}

html.dark-mode .shop-badge-owned,
body.dark-mode .shop-badge-owned {
  background: rgba(99, 102, 241, 0.25);
  color: #A5B4FC;
}

/* ==========================================
   ŠKOLNÍ RÁDIO (RADIO)
   ========================================== */
.messages-subnav {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  background: var(--bg-card);
  padding: 6px;
  border-radius: 14px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.messages-subtab-btn {
  flex: 1;
  font-weight: 800;
  font-size: 0.88rem;
  border-radius: 10px;
  padding: 10px 14px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.15s ease;
}

.messages-subtab-btn:hover {
  background: var(--bg-subtle);
  color: var(--text-main);
}

.messages-subtab-btn.active {
  background: var(--primary);
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.radio-hero-banner {
  background: linear-gradient(135deg, #7C3AED 0%, #EC4899 100%);
  color: #FFFFFF;
  border-radius: 18px;
  padding: 24px 20px;
  margin-bottom: 18px;
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.25);
  display: flex;
  align-items: center;
  gap: 16px;
}

.radio-hero-icon {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.radio-history-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.radio-history-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.radio-history-card:hover {
  border-color: #C7D2FE;
  transform: translateY(-1px);
}

html.dark-mode .radio-history-card:hover,
body.dark-mode .radio-history-card:hover {
  border-color: #4F46E5;
}

.radio-song-box {
  background: #EEF2FF;
  border-left: 3.5px solid #6366F1;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #3730A3;
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

html.dark-mode .radio-song-box,
body.dark-mode .radio-song-box {
  background: rgba(99, 102, 241, 0.15);
  color: #C7D2FE;
  border-left-color: #818CF8;
}

.radio-badge-email {
  background: #DCFCE7;
  color: #15803D;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

html.dark-mode .radio-badge-email,
body.dark-mode .radio-badge-email {
  background: rgba(22, 163, 74, 0.2);
  color: #86EFAC;
}

/* ============================================================ */
/* MĚSÍČNÍ LIGA TŘÍD (ŠKOLNÍ CHODBA)                            */
/* ============================================================ */

.class-league-card {
  margin-bottom: 16px;
  border: 1.5px solid #C7D2FE;
  background: linear-gradient(135deg, #FFFFFF 0%, #F8FAFC 50%, #EEF2FF 100%);
  position: relative;
  overflow: hidden;
}

html.dark-mode .class-league-card,
body.dark-mode .class-league-card {
  background: linear-gradient(135deg, #1E1B4B 0%, #111827 60%, #1E293B 100%);
  border-color: #4338CA;
}

.class-league-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}

.class-league-trophy-icon {
  font-size: 2.2rem;
  line-height: 1;
  filter: drop-shadow(0 2px 6px rgba(245, 158, 11, 0.3));
}

.class-league-title {
  font-size: 1.15rem;
  font-weight: 800;
  margin: 0;
  color: var(--text-main);
}

.class-league-subtitle {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 2px 0 0 0;
}

.class-league-month-tag {
  background: #FEF3C7;
  color: #92400E;
  border: 1px solid #FCD34D;
  font-size: 0.74rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 12px;
}

html.dark-mode .class-league-month-tag,
body.dark-mode .class-league-month-tag {
  background: rgba(245, 158, 11, 0.2);
  color: #FDE68A;
  border-color: rgba(245, 158, 11, 0.4);
}

.class-league-reward-banner {
  background: linear-gradient(135deg, #FFFBEB 0%, #FEF3C7 100%);
  border: 1.5px dashed #F59E0B;
  color: #92400E;
  padding: 8px 14px;
  border-radius: 12px;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.12);
  max-width: 440px;
}

html.dark-mode .class-league-reward-banner,
body.dark-mode .class-league-reward-banner {
  background: rgba(245, 158, 11, 0.15);
  border-color: #F59E0B;
  color: #FDE68A;
}

/* Spotlight: Nejaktivnější Avatar & Nejbohatší Avatar */
.hallway-spotlight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  margin-top: 14px;
  margin-bottom: 14px;
}

.hallway-spotlight-card {
  position: relative;
  background: var(--bg-card);
  border-radius: 16px;
  padding: 14px 16px;
  border: 1.5px solid var(--border);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  overflow: hidden;
}

.hallway-spotlight-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.hallway-spotlight-card.spotlight-active {
  border-color: #A78BFA;
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.1) 0%, var(--bg-card) 100%);
}

.hallway-spotlight-card.spotlight-wealth {
  border-color: #FCD34D;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.12) 0%, var(--bg-card) 100%);
}

html.dark-mode .hallway-spotlight-card.spotlight-active,
body.dark-mode .hallway-spotlight-card.spotlight-active {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.2) 0%, #1E1B4B 100%) !important;
  border-color: #7C3AED !important;
}

html.dark-mode .hallway-spotlight-card.spotlight-wealth,
body.dark-mode .hallway-spotlight-card.spotlight-wealth {
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.2) 0%, #1E1B4B 100%) !important;
  border-color: #D97706 !important;
}

.spotlight-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 8px;
  margin-bottom: 8px;
}

.spotlight-badge.badge-active {
  background: #EDE9FE;
  color: #6D28D9;
  border: 1px solid #DDD6FE;
}

.spotlight-badge.badge-wealth {
  background: #FEF3C7;
  color: #B45309;
  border: 1px solid #FDE68A;
}

html.dark-mode .spotlight-badge.badge-active,
body.dark-mode .spotlight-badge.badge-active {
  background: rgba(109, 40, 217, 0.25) !important;
  color: #C4B5FD !important;
  border-color: rgba(109, 40, 217, 0.4) !important;
}

html.dark-mode .spotlight-badge.badge-wealth,
body.dark-mode .spotlight-badge.badge-wealth {
  background: rgba(245, 158, 11, 0.2) !important;
  color: #FDE68A !important;
  border-color: rgba(245, 158, 11, 0.4) !important;
}

.spotlight-body {
  display: flex;
  align-items: center;
  gap: 12px;
}

.spotlight-avatar-wrap {
  width: 68px;
  height: 68px;
  border-radius: 14px;
  background: var(--bg-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid var(--border);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.spotlight-info {
  flex: 1;
  min-width: 0;
}

.spotlight-name {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-main);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.spotlight-stat {
  font-size: 0.88rem;
  font-weight: 800;
  color: #4F46E5;
  margin-top: 2px;
}

.spotlight-active .spotlight-stat {
  color: #7C3AED;
}

.spotlight-wealth .spotlight-stat {
  color: #D97706;
}

.spotlight-substat {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.class-league-nav-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
  margin-bottom: 14px;
}

.class-league-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.class-league-pill {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.class-league-pill:hover {
  border-color: var(--primary);
  color: var(--text-main);
}

.class-league-pill.active {
  background: var(--primary);
  color: #FFFFFF;
  border-color: var(--primary);
  box-shadow: 0 3px 10px rgba(99, 102, 241, 0.35);
}

.class-league-countdown {
  font-size: 0.78rem;
  font-weight: 600;
  color: #4F46E5;
  background: #EEF2FF;
  border: 1px solid #C7D2FE;
  padding: 4px 10px;
  border-radius: 12px;
}

html.dark-mode .class-league-countdown,
body.dark-mode .class-league-countdown {
  background: rgba(99, 102, 241, 0.2);
  color: #A5B4FC;
  border-color: rgba(99, 102, 241, 0.4);
}

/* Podium TOP 3 */
.class-league-podium {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 12px;
  padding: 16px 8px 10px 8px;
  margin-bottom: 14px;
  border-bottom: 1px dashed var(--border);
}

.podium-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  max-width: 140px;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.podium-col:hover {
  transform: translateY(-2px);
}

.podium-col.first {
  order: 2;
}

.podium-col.second {
  order: 1;
}

.podium-col.third {
  order: 3;
}

.podium-badge-icon {
  font-size: 1.8rem;
  line-height: 1;
  margin-bottom: 4px;
}

.podium-col.first .podium-badge-icon {
  font-size: 2.4rem;
  animation: bounceTrophy 2s ease-in-out infinite;
}

@keyframes bounceTrophy {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.podium-class-name {
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--text-main);
  margin-bottom: 2px;
}

.podium-score-val {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.podium-pedestal {
  width: 100%;
  border-radius: 12px 12px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.podium-col.first .podium-pedestal {
  height: 80px;
  background: linear-gradient(180deg, #F59E0B 0%, #D97706 100%);
  border: 2px solid #FDE68A;
  border-bottom: none;
}

.podium-col.second .podium-pedestal {
  height: 60px;
  background: linear-gradient(180deg, #94A3B8 0%, #64748B 100%);
  border: 2px solid #E2E8F0;
  border-bottom: none;
}

.podium-col.third .podium-pedestal {
  height: 44px;
  background: linear-gradient(180deg, #D97706 0%, #B45309 100%);
  border: 2px solid #FDE68A;
  border-bottom: none;
}

/* Seznam tříd */
.class-league-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.class-rank-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: all 0.12s ease;
}

.class-rank-row:hover {
  border-color: #C7D2FE;
  background: var(--bg-subtle);
}

.class-rank-row.is-my-class {
  border: 2px solid #6366F1 !important;
  background: #EEF2FF !important;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.15);
}

html.dark-mode .class-rank-row.is-my-class,
body.dark-mode .class-rank-row.is-my-class {
  background: rgba(99, 102, 241, 0.2) !important;
  border-color: #818CF8 !important;
}

.class-rank-pos {
  width: 32px;
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--text-muted);
  text-align: center;
}

.class-rank-pos.gold { color: #D97706; font-size: 1.1rem; }
.class-rank-pos.silver { color: #64748B; font-size: 1.05rem; }
.class-rank-pos.bronze { color: #B45309; font-size: 1.05rem; }

.class-rank-name {
  flex: 1;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.my-class-pill {
  background: #6366F1;
  color: #FFFFFF;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  letter-spacing: 0.5px;
}

.class-rank-stats {
  display: flex;
  align-items: center;
  gap: 8px;
}

.class-rank-badge {
  font-weight: 800;
  font-size: 0.85rem;
  padding: 4px 10px;
  border-radius: 14px;
}

.badge-pts {
  background: #FEF3C7;
  color: #92400E;
  border: 1px solid #FDE68A;
}

html.dark-mode .badge-pts,
body.dark-mode .badge-pts {
  background: rgba(245, 158, 11, 0.2);
  color: #FDE68A;
  border-color: rgba(245, 158, 11, 0.4);
}

.badge-active {
  background: #EDE9FE;
  color: #6D28D9;
  border: 1px solid #DDD6FE;
}

html.dark-mode .badge-active,
body.dark-mode .badge-active {
  background: rgba(109, 40, 217, 0.25);
  color: #C4B5FD;
  border-color: rgba(109, 40, 217, 0.4);
}

.badge-logins {
  background: #ECFDF5;
  color: #065F46;
  border: 1px solid #A7F3D0;
}

html.dark-mode .badge-logins,
body.dark-mode .badge-logins {
  background: rgba(16, 185, 129, 0.2);
  color: #6EE7B7;
  border-color: rgba(16, 185, 129, 0.4);
}

/* ============================================================ */
/* DENNÍ ZÍSKANÉ ŠKOLNÍ BODY (MŮJ AVATAR)                        */
/* ============================================================ */

.daily-points-timeline {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.daily-point-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: transform 0.12s ease;
}

.daily-point-item:hover {
  transform: translateX(2px);
  border-color: #C7D2FE;
}

.daily-point-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.daily-point-icon {
  font-size: 1.25rem;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.daily-point-info {
  display: flex;
  flex-direction: column;
}

.daily-point-reason {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.25;
}

.daily-point-time {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.daily-point-amount {
  font-weight: 800;
  font-size: 0.86rem;
  color: #B45309;
  background: #FEF3C7;
  border: 1px solid #FDE68A;
  padding: 3px 9px;
  border-radius: 12px;
  white-space: nowrap;
}

html.dark-mode .daily-point-amount,
body.dark-mode .daily-point-amount {
  background: rgba(245, 158, 11, 0.2);
  color: #FDE68A;
  border-color: rgba(245, 158, 11, 0.4);
}

/* ============================================================ */
/* ŠKOLNÍ MAZLÍČEK (MŮJ AVATAR & MODÁL PÉČE)                   */
/* ============================================================ */

/* Rychlý status mazlíčka pod avatarem na hlavní stránce */
.pet-home-card {
  width: 100%;
  margin-top: 14px;
  background: linear-gradient(135deg, #F8FAFC 0%, #EEF2FF 100%);
  border: 1.5px solid #C7D2FE;
  border-radius: 14px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, background 0.2s ease;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.06);
}

.pet-home-card:hover {
  transform: translateY(-1px);
  border-color: #818CF8;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.12);
}

.pet-home-svg-wrap {
  width: 44px;
  height: 44px;
  background: #FFFFFF;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  border: 1px solid #E0E7FF;
  flex-shrink: 0;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.pet-home-name {
  font-weight: 700;
  font-size: 0.88rem;
  color: #1E293B;
  transition: color 0.2s ease;
}

.pet-home-desc {
  font-size: 0.74rem;
  color: #4338CA;
  transition: color 0.2s ease;
}

/* Karta péče o mazlíčka v modálu Nálady (Tamagoči) */
.pet-mood-card {
  margin-top: 14px;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #F8FAFC 0%, #EEF2FF 100%) !important;
  border: 1.5px solid #C7D2FE !important;
  border-radius: 14px;
  padding: 14px;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.pet-mood-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #3730A3;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s ease;
}

.pet-mood-badge {
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
  background: #E0E7FF;
  color: #4338CA;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.pet-mood-svg-wrap {
  width: 70px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #FFFFFF;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  border: 1px solid #E0E7FF;
  flex-shrink: 0;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.pet-progress-track {
  height: 7px;
  background: #E2E8F0;
  border-radius: 4px;
  overflow: hidden;
  transition: background-color 0.2s ease;
}

.pet-poop-alert-box {
  background: #FEF3C7;
  border: 1.5px solid #F59E0B;
  border-radius: 12px;
  padding: 10px 12px;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.15);
}
.pet-poop-title { color: #92400E; }
.pet-poop-desc { color: #B45309; }

/* TMAVÝ REŽIM (DARK MODE) PRO ŠKOLNÍHO MAZLÍČKA */
html.dark-mode .pet-home-card,
body.dark-mode .pet-home-card {
  background: linear-gradient(135deg, #1E1B4B 0%, #0F172A 100%) !important;
  border-color: #4338CA !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45) !important;
}

html.dark-mode .pet-home-card:hover,
body.dark-mode .pet-home-card:hover {
  border-color: #6366F1 !important;
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.25) !important;
}

html.dark-mode .pet-home-svg-wrap,
body.dark-mode .pet-home-svg-wrap {
  background: #1E293B !important;
  border-color: #3730A3 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5) !important;
}

html.dark-mode .pet-home-name,
body.dark-mode .pet-home-name {
  color: #F8FAFC !important;
}

html.dark-mode .pet-home-desc,
body.dark-mode .pet-home-desc {
  color: #A5B4FC !important;
}

html.dark-mode .pet-mood-card,
body.dark-mode .pet-mood-card {
  background: linear-gradient(135deg, #1E1B4B 0%, #0F172A 100%) !important;
  border-color: #4338CA !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4) !important;
}

html.dark-mode .pet-mood-title,
body.dark-mode .pet-mood-title {
  color: #E0E7FF !important;
}

html.dark-mode .pet-mood-badge,
body.dark-mode .pet-mood-badge {
  background: rgba(99, 102, 241, 0.25) !important;
  color: #C7D2FE !important;
  border-color: rgba(99, 102, 241, 0.4) !important;
}

html.dark-mode .pet-mood-svg-wrap,
body.dark-mode .pet-mood-svg-wrap {
  background: #1E293B !important;
  border-color: #3730A3 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5) !important;
}

html.dark-mode .pet-progress-track,
body.dark-mode .pet-progress-track {
  background: #334155 !important;
}

html.dark-mode .pet-poop-alert-box,
body.dark-mode .pet-poop-alert-box {
  background: rgba(245, 158, 11, 0.15) !important;
  border-color: #F59E0B !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4) !important;
}

html.dark-mode .pet-poop-title,
body.dark-mode .pet-poop-title {
  color: #FDE68A !important;
}

html.dark-mode .pet-poop-desc,
body.dark-mode .pet-poop-desc {
  color: #FCD34D !important;
}

html.dark-mode .pet-action-cost,
body.dark-mode .pet-action-cost {
  color: #A5B4FC !important;
}

html.dark-mode .pet-action-bonus,
body.dark-mode .pet-action-bonus {
  color: #6EE7B7 !important;
}

/* ========================================== */
/* EMOJI REAKCE NA SPOLEČNÉM CHATU CHODBY     */
/* ========================================== */

.btn-msg-react {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  padding: 2px 6px;
  font-size: 0.88rem;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: var(--text-muted);
  transition: all 0.15s ease;
  line-height: 1;
}

.btn-msg-react:hover {
  background: var(--bg-subtle);
  border-color: var(--border);
  color: var(--text-main);
  transform: scale(1.1);
}

.btn-msg-react:active {
  transform: scale(0.95);
}

.hallway-reactions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  align-items: center;
}

.reaction-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 3px 9px;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  color: var(--text-main);
  line-height: 1.2;
}

.reaction-pill:hover {
  background: var(--border);
  transform: translateY(-1px);
}

.reaction-pill.active {
  background: rgba(99, 102, 241, 0.14);
  border-color: var(--primary);
  color: var(--primary);
  font-weight: 700;
  box-shadow: 0 1px 4px rgba(99, 102, 241, 0.2);
}

.reaction-pill .reaction-count {
  font-size: 0.74rem;
  font-weight: 700;
  opacity: 0.9;
}

.reaction-pill-add {
  padding: 3px 8px;
  color: var(--text-muted);
  opacity: 0.8;
  font-size: 0.75rem;
}

.reaction-pill-add:hover {
  opacity: 1;
  color: var(--primary);
  border-color: var(--primary);
}

/* Plovoucí popover s rychlými smajlíky */
.quick-reaction-popover {
  position: fixed;
  z-index: 10500;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 5px 8px;
  display: flex;
  align-items: center;
  gap: 3px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2), 0 2px 8px rgba(0, 0, 0, 0.1);
  animation: reactionPopoverPop 0.16s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes reactionPopoverPop {
  0% {
    opacity: 0;
    transform: scale(0.8) translateY(6px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.quick-react-btn {
  background: none;
  border: none;
  font-size: 1.35rem;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 50%;
  transition: transform 0.12s ease, background 0.12s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.quick-react-btn:hover {
  transform: scale(1.35);
  background: var(--bg-subtle);
}

.quick-react-btn:active {
  transform: scale(1.1);
}

.quick-react-divider {
  width: 1px;
  height: 20px;
  background: var(--border);
  margin: 0 3px;
}

.quick-react-more {
  font-size: 1rem;
  color: var(--text-muted);
}

.quick-react-more:hover {
  color: var(--primary);
}

html.dark-mode .quick-reaction-popover,
body.dark-mode .quick-reaction-popover {
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.08);
}





