@font-face {
    font-family: 'abeezeeitalic';
    src: url('../fonts/abeezee/abeezee-italic-webfont.eot');
    src: url('../fonts/abeezee/abeezee-italic-webfont.eot?#iefix') format('embedded-opentype'),
         url('../fonts/abeezee/abeezee-italic-webfont.woff') format('woff'),
         url('../fonts/abeezee/abeezee-italic-webfont.ttf') format('truetype'),
         url('../fonts/abeezee/abeezee-italic-webfont.svg#abeezeeitalic') format('svg');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'abeezeeregular';
    src: url('../fonts/abeezee/abeezee-regular-webfont.eot');
    src: url('../fonts/abeezee/abeezee-regular-webfont.eot?#iefix') format('embedded-opentype'),
         url('../fonts/abeezee/abeezee-regular-webfont.woff') format('woff'),
         url('../fonts/abeezee/abeezee-regular-webfont.ttf') format('truetype'),
         url('../fonts/abeezee/abeezee-regular-webfont.svg#abeezeeregular') format('svg');
    font-weight: normal;
    font-style: normal;
}

@font-face {
  font-family: 'icomoon';
  src: url('../fonts/icomoon/icomoon.eot?-1ef6fq');
  src: url('../fonts/icomoon/icomoon.eot?#iefix-1ef6fq') format('embedded-opentype'),
       url('../fonts/icomoon/icomoon.woff?-1ef6fq') format('woff'),
       url('../fonts/icomoon/icomoon.ttf?-1ef6fq') format('truetype'),
       url('../fonts/icomoon/icomoon.svg?-1ef6fq#icomoon') format('svg');
  font-weight: normal;
  font-style: normal;
}

/*===============*\
|                 |
|   RESET RULES   |
|                 |
\*===============*/
html, body, div, section, article, h1, h3, strong {
	margin: 0;
	padding: 0;
}

html, body {
  position: relative;

  width: 100%;
  height: 100%;

  font-size: 16px;
  font-family: 'abeezeeregular', helvetica;
  color: #231806;

  overflow: hidden;
}


/*===============*\
|                 |
|     UI PANELS   |
|                 |
\*===============*/

/* General */
.ui {
  position: absolute;
  bottom: -100%;

  width: 100%;
  height: 100%;

  background-color: #ecf0f1;

  -webkit-transition: bottom 600ms ease;
  transition: bottom 600ms ease;
}

.ui-displayed {
  bottom: 0;
}

/* Error panel */
#error-panel {
  text-align: center;
}



/*===============*\
|                 |
|   LOGIN PANEL   |
|                 |
\*===============*/
#login-panel { background-image: url('../images/green-bg.png'); }

#login-panel > header {
  margin: 10%;
  text-align: center;
}

#lp-infos { text-align: center; }

.lp-case {
  display: inline-block;
  
  text-align: center;
  color: #2f2526;

  background-color: #FFF6F0;
  border-radius: 5px;
  border: 1px solid rgba(127, 140, 141, 0.2);
  outline: none;
  -webkit-box-sizing: border-box;
}
.lp-case:nth-child(1) { color : #27A096; }
.lp-case:nth-child(2) { color : #D7446C; }
.lp-case:nth-child(3) { color : #EC9900; }
.lp-case:nth-child(4) { color : #CD6437; }
.lp-case:nth-child(5) { color : #678E23; }
.lp-case:nth-child(6) { color : #E94928; }
.lp-case:nth-child(7) { color : #7B7270; }

.lp-title {
  width: 80px;
  height: 80px;

  line-height: 80px;
  font-size: 60px;
}
#lp-nick {
  display: inline-block;
  
  width: 200px;
  margin-bottom: 35px;
  
  border: 0;
  border-bottom: 4px solid gray;
  
  font-size: 28px;
  color: #ecf0f1;
  text-align: center;
  background: transparent;
  outline: none;
  -webkit-transition: border-color 300ms ease;
}
#lp-nick:focus { border-color: #16a085; }

.lp-desc {
  line-height: 20px;
  font-size: 13px;
  letter-spacing: -1px;

  background-color: rgba(246, 161, 0, 0.5);
}

#lp-start-btn {
  margin-top: 40px;
  padding: 10px 30px;

  font-family: 'abeezeeregular';
  font-size: 15px;
  color: #444;

  border: 2px solid grey;
  border-radius: 3px;
  box-shadow: 0px 2px 10px 0px rgb(127, 140, 141);
  background-image: url('../images/grey.png');
}


/* Player Logos */
#lp-logos {
  height: 128px;

  line-height: 128px;
  text-align: center;
}
#lp-logos img:first-child { border-radius: 5px 0 0 5px; }
#lp-logos img:last-child { border-radius: 0 5px 5px 0; }


#lp-logos img {
  width: 100px;

  border: 0px solid;
  border-radius: 0;
  -webkit-transition: all 200ms ease;

}
#lp-logos img:hover,
#lp-logos img.myMonster {
  width: 128px;
  border: 5px solid;
  border-radius: 50%;
}


/*===============*\
|                 |
|   ERROR PANEL   |
|                 |
\*===============*/

#error-panel { background-image: url('../images/pink-bg.png'); }

#error-panel > h1 {
  margin: 6% 0;

  font-size: 6em;
  color: #e74c3c;

  text-shadow: 1px 1px 2px rgba(86, 53, 34, 0.5);
}

#error-panel > strong {
  display: block;
  margin-top: 5%;

  font-size: 1.5em;
  color: #563522;
  text-align: center;
}


/*===============*\
|                 |
|   GAME PANEL    |
|                 |
\*===============*/
#game-panel { background-image: url('../images/grey-bg.png'); }

/* Chat part */
#gs-chat {
  position: relative;
  float: left;
  width: 300px;
  height: 100%;

  background-image: url('../images/grey.png');
}

#gsc-messages {
  height: -webkit-calc(100% - 80px);
  height: -moz-calc(100% - 80px);
  height: calc(100% - 80px);

  color: #2c3e50;
  
  overflow-y: auto;
}
#gsc-messages article {
  padding: 5px 10px;
}
#gsc-messages article > strong {
  display: block;
}
.server-message { font-family: 'abeezeeitalic'; }

#gsc-write {
  position: absolute;
  bottom: 0;
  
  padding: 8px;

  /*width: 94%;*/
  width: -webkit-calc(100% - 68px);
  width: -moz-calc(100% - 68px);
  width: calc(100% - 68px);

  height: 60px;

  color: #ecf0f1;
  font-family: 'abeezeeitalic';
  background-color: rgba(149, 165, 166, 0.6);
}
::-webkit-input-placeholder { color: rgba(236, 240, 241, 0.5); }
::-moz-placeholder { color: rgba(236, 240, 241, 0.5); }
:-moz-placeholder { color: rgba(236, 240, 241, 0.5); }

.gsc-button {
  position: absolute;
  right: 0;

  height: 36px;
  width: 60px;

  font-family: 'abeezeeregular';
  color: #444;
  font-size: 13px;
  line-height: 36px;
  text-align: center;

  border: 2px solid grey;
  border-radius: 3px;
  background-image: url('../images/grey.png');
  box-shadow: none;
  overflow: hidden;
  cursor: pointer;

  -webkit-transition: box-shadow 200ms ease;
  -moz-transition: box-shadow 200ms ease;
  transition: box-shadow 200ms ease;
}
.gsc-button:hover { box-shadow: 0px 2px 10px 0px rgb(127, 140, 141); }
#gsc-command-start { bottom: 38px; }
#gsc-command-grid { bottom: 0; }

/* Game grid part */
#gs-grid-container {
  position: relative;
  float: left;
  width: 900px;
  height: 100%;

  -webkit-perspective: 1200;
  -moz-perspective: 1200;
  perspective: 1200;
}

/* Grid info bar below the grid */
#gs-grid-infos {
  position: absolute;
  left: 0;
  display: flex;
  justify-content: center;
  gap: 18px;
  width: 100%;
  padding: 6px 0;
  font-family: 'abeezeeregular', sans-serif;
  font-size: 13px;
  color: #333;
  background: rgba(255,255,255,0.85);
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
#gs-grid-infos .grid-info-date { text-transform: capitalize; }
#gs-grid-infos .grid-info-level { color: #c0392b; }

/* Score part */
#gs-scores {
  float: left;

  width: -webkit-calc(100% - 1200px);
  width: -moz-calc(100% - 1200px);
  width: calc(100% - 1200px);
  height: 100%;

  background-image: url('../images/green-bg.png');
}

/* Word tags in score panel */
.player-word-list {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-top: 4px;
}
.word-tag {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: bold;
  color: #111;
  font-family: 'abeezeeregular', sans-serif;
}


/* Responsive grid */
@media screen and (max-width: 1599px) {
  #gs-chat {
    float: left;
    width: -webkit-calc(100% - 900px);
    width: -moz-calc(100% - 900px);
    width: calc(100% - 900px);
    height: 30%;
  }

  /* Game grid part */
  #gs-grid-container {
    float: right;
  }

  /* Score part */
  #gs-scores {
    position: relative;

    float: left;
    
    width: -webkit-calc(100% - 900px);
    width: -moz-calc(100% - 900px);
    width: calc(100% - 900px);
    height: 70%;
  }
}

/* grid part */
.frame {
  position: absolute;
  display: inline-block;

  box-sizing: border-box;
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
  border: 1px solid rgba(127, 140, 141, 0.2);

  outline: none;
}
.frame::selection { background: transparent; }
.frame::-moz-selection { background: transparent; }

.description {
  background: #1d3557;
  color: #ecf0f1;
}

.description span {
  position: relative;
  display: inline-block;
  width: 100%;

  text-align: center;
  box-sizing: border-box;
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
  border-top: 1px solid transparent;
  word-break: break-word;
  hyphens: auto;
}

.description span:not(:first-child) {
  border-top: 1.5px solid rgba(255, 255, 255, 0.863);
  padding-top: 5px;
}

/* Grid arrow elements — positioned on the container, at cell boundaries */
.grid-arrow {
  position: absolute;
  width: 0;
  height: 0;
  display: block;
  pointer-events: none;
  z-index: 10;
  font-style: normal;
}

.letter {
  text-align: center;
  background-color: rgba(236, 240, 241, 0.4);

  -webkit-transition: -webkit-transform 350ms ease;
  transition: transform 350ms ease;
}

/* Letter animation */
.reveal0 { 
  -webkit-transform: rotateY(360deg);
  transform: rotateY(360deg);
}
.reveal1 { 
  -webkit-transform: rotateX(360deg);
  transform: rotateX(360deg);
}



/* When the TOP span of a 2-definition cell has a downward arrow, anchor it to the cell bottom */
.description span.arrow-cell-bottom {
  position: static;
}

.dash1 { border-bottom: 1px dashed rgba(127, 140, 141, 0.2); }
.dash2 { border-right: 1px dashed rgba(127, 140, 141, 0.2); }

.empty {
  border: none;
}

.focusCell {
  -webkit-box-shadow: inset 0px 0px 30px 4px rgba(231,166,26,0.4);
  -moz-box-shadow: inset 0px 0px 30px 4px rgba(231,166,26,0.4);
  box-shadow: inset 0px 0px 30px 4px rgba(231,166,26,0.4);

  border-color: rgba(231,166,26,0.4);
}
.goRight:before {
  position: absolute;
  right: -0.2em;
  
  content: "\e605";
  font-family: 'icomoon';
  font-size: 0.7em;
  
  opacity: 0.4;
}
.goDown:before {
  position: absolute;
  bottom: -0.8em;
  left: 31%;
  
  content: "\e604";
  font-family: 'icomoon';
  font-size: 0.7em;
  
  opacity: 0.4;
}


/* Scores */
#scores {

}

.playerScore {
  position: relative;
  float: left;
  height: 100%;

  text-align: center;
}

/* Set container sizes */
.bloc1, .bloc2 { width: 50%; }
.bloc3 { width: 33.33%; }
.bloc4 { width: 25%; }
.bloc5 { width: 20%; }
.bloc6 { width: 16.66%; }
.bloc7 { width: 14.28%; }
.bloc8 { width: 12.5%; }
.bloc9 { width: 11.11%; }

.bloc1 > .score-bar, .bloc2 > .score-bar { width: 50%; left: 25%; }
.bloc3 > .score-bar { width: 66%; left: 17%; }
.bloc4 > .score-bar { width: 90%; left: 5%; }
.bloc5 > .score-bar, .bloc6 > .score-bar,
.bloc7 > .score-bar, .bloc8 > .score-bar,
.bloc9 > .score-bar { width: 96%; left: 2%; }


.score-bar {
  position: absolute;
  bottom: 85px;

  display: inline-block;
  height: 0%;

  -moz-box-shadow: 7px 7px 10px 0px rgba(127, 140, 141, 1);
  box-shadow:      7px 7px 10px 0px rgba(127, 140, 141, 1);
  border-radius: 3px;

  -webkit-transition: height 0.3s ease-out;
  transition: height 0.3s ease-out;
}

.score-bar > img {
  width: 80px;
  border-radius: 50%;
  margin-top: -50px;

  -moz-box-shadow: 0px 2px 10px 0px rgba(127, 140, 141, 0.5);
  box-shadow: 0px 2px 10px 0px rgba(127, 140, 141, 0.5);
}



.playerScore > footer {
  position: absolute;
  bottom: 0;

  width: 100%;
  height: 70px;

  color: #ecf0f1;
  text-shadow: 2px 2px 5px #2c3e50;
}

.playerScore > footer > h3 {
  font-size: 1.1em;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}
.playerScore > footer > strong {
  display: block;
}
.playerScore > footer > span {
  display: block;
  font-size: 0.95em;
}

.bonus {
  position: absolute;
  left: 0;
  bottom: 70px;
  
  width: 100%;
  
  color: #ecf0f1;
  
  font-size: 1.05em;
  text-shadow: 1px 1px 3px rgb(93, 180, 89);
  font-weight: bold;
  line-height: 1em;

  opacity: 0;

  -webkit-animation: onBonusDisplay 600ms ease;
  animation: onBonusDisplay 600ms ease;
}


/*================*\
|                  |
|   INFO TOOLTIP   |
|                  |
\*================*/
#info-tooltip {
  position: absolute;
  top: -100px;
  left: 0;
  padding: 20px 0;

  width: 100%;

  color: #7f8c8d;
  font-size: 1.2em;
  text-align: center;

  background: url('../images/pink-bg.png');
  -webkit-transition: top 300ms ease-in;
  transition: top 300ms ease-in;
}
#info-tooltip strong {
  color: #e74c3c;
}
#info-tooltip.showTopBar { top: 0; }


/*=====================*\
|                       |
|   INGAME INFO PANEL   |
|                       |
\*=====================*/
#ig-infos {
  position: absolute;

  color: #ecf0f1;
  text-shadow: 2px 2px 5px #2c3e50;
  text-align: center;

  background-image: url('../images/green-bg.png');
  overflow: hidden;
}
#ig-infos > header {
  position: relative;
  height: 50%;
  
  font-size: 1.3em;
  line-height: 75px;

  -webkit-transition: top 0.8s ease, height 0.8s ease;
  transition: top 0.8s ease, height 0.8s ease;
}
#ig-infos > header.game-over {
  top: -5%;
  height: 30%;
}

#ig-infos > time {
  font-size: 2em;
  font-weight: bold;
  color: rgb(192, 57, 43);
  text-shadow: 1px 1px 3px #e74c3c;

  opacity: 0.7;
}


#ig-infos > footer {
  position: absolute;
  bottom: 0;

  width: 100%;
}

/* Winner */
#winner-pic {
  display: inline-block;
  margin-bottom: -100px;
  
  width: 80px;
  
  border-radius: 50%;
  
  -moz-box-shadow: 0px 2px 10px 0px rgba(127, 140, 141, 0.5);
  box-shadow: 0px 2px 10px 0px rgba(127, 140, 141, 0.5);

  -webkit-animation: winnerAnimation 500ms ease infinite alternate;
  animation: winnerAnimation 500ms ease infinite alternate;

  -webkit-transition: margin-bottom 400ms ease;
  transition: margin-bottom 400ms ease;
}
#winner-pic.winner-pic-reveal { margin-bottom: 10px; }



/*==============*\
|                |
|   ANIMATIONS   |
|                |
\*==============*/
/* Bonus animation */
@-webkit-keyframes onBonusDisplay {
  0% {
    bottom: 70px;
    font-size: 1.05em;
    opacity: 0;
  }
  25% { opacity: 1; }
  50% { font-size: 1.2em; }
  75% { opacity: 1; }
  100% {
    bottom: 100px;
    font-size: 1.05em;
    opacity: 0;
  }
}
@keyframes onBonusDisplay {
  0% {
    bottom: 70px;
    font-size: 1.05em;
    opacity: 0;
  }
  25% { opacity: 1; }
  50% { font-size: 1.2em; }
  75% { opacity: 1; }
  100% {
    bottom: 100px;
    font-size: 1.05em;
    opacity: 0;
  }
}

/* Winner animation */
@-webkit-keyframes winnerAnimation {
  0% { -webkit-transform: rotateZ(-10deg); }
  100% { -webkit-transform: rotateZ(10deg); }
}
@keyframes winnerAnimation {
  0% { -webkit-transform: rotateZ(-10deg); }
  100% { -webkit-transform: rotateZ(10deg); }
}


/*==============*\
|                |
|   LOBBY PANEL  |
|                |
\*==============*/

#lobby-panel {
  background-image: url('../images/green-bg.png');
  overflow-y: auto;
}

#lobby-panel > header {
  margin: 5% auto;
  text-align: center;
}

#lobby-section {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: flex-start;
  gap: 40px;
  padding: 0 5% 40px;
  flex-wrap: wrap;
}

/* ─ Room list ─────────────────────────────────────────────────────────── */
#lobby-rooms {
  flex: 1 1 400px;
  max-width: 600px;
}

#lobby-room-list {
  min-height: 60px;
}

.lobby-connecting,
.lobby-empty {
  color: rgba(236,240,241,0.7);
  font-family: 'abeezeeitalic';
  font-size: 0.95em;
}

.lobby-room-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  padding: 10px 14px;
  background: rgba(255,255,255,0.12);
  border-radius: 6px;
  flex-wrap: wrap;
}

.room-code {
  font-size: 1.3em;
  font-weight: bold;
  color: #ecf0f1;
  letter-spacing: 3px;
  min-width: 60px;
}

.room-grid {
  flex: 1;
  color: rgba(236,240,241,0.85);
  font-size: 0.85em;
}

.room-status {
  font-size: 0.8em;
  padding: 3px 8px;
  border-radius: 10px;
}
.room-waiting  { background: rgba(39,160,150,0.5); color: #ecf0f1; }
.room-in-game  { background: rgba(231,76,60,0.5);  color: #ecf0f1; }

.room-players {
  font-size: 0.8em;
  color: rgba(236,240,241,0.7);
}

.room-join-btn {
  padding: 5px 14px;
  font-family: 'abeezeeregular';
  font-size: 0.85em;
  color: #444;
  border: 2px solid grey;
  border-radius: 4px;
  background-image: url('../images/grey.png');
  cursor: pointer;
}
.room-join-btn:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.2); }

/* ─ Action panel ──────────────────────────────────────────────────────── */
#lobby-actions {
  flex: 0 1 320px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: stretch;
}

.lobby-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.lobby-group input[type="text"],
.lobby-group input[type="number"] {
  flex: 1;
  min-width: 0;
  padding: 8px 12px;
  font-family: 'abeezeeregular';
  font-size: 0.95em;
  color: #ecf0f1;
  background: rgba(255,255,255,0.12);
  border: 0;
  border-bottom: 3px solid rgba(255,255,255,0.4);
  outline: none;
  border-radius: 3px 3px 0 0;
  -webkit-transition: border-color 200ms ease;
  transition: border-color 200ms ease;
}
.lobby-group input[type="text"]:focus,
.lobby-group input[type="number"]:focus {
  border-bottom-color: #27A096;
}

.lobby-group input[type="button"],
#lobby-solo-btn {
  padding: 9px 18px;
  font-family: 'abeezeeregular';
  font-size: 0.95em;
  color: #444;
  border: 2px solid grey;
  border-radius: 4px;
  background-image: url('../images/grey.png');
  box-shadow: 0 2px 6px rgba(127,140,141,0.4);
  cursor: pointer;
  white-space: nowrap;
  -webkit-transition: box-shadow 200ms ease;
  transition: box-shadow 200ms ease;
}
.lobby-group input[type="button"]:hover,
#lobby-solo-btn:hover {
  box-shadow: 0 4px 12px rgba(127,140,141,0.7);
}

#lobby-solo-btn {
  margin-top: 4px;
}

.lobby-sep {
  color: rgba(236,240,241,0.5);
  text-align: center;
  font-size: 0.85em;
  margin: 4px 0 2px;
}


/*==========================*\
|                            |
|   SOLO SCORE               |
|                            |
\*==========================*/

#solo-score {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #ecf0f1;
  text-shadow: 2px 2px 5px #2c3e50;
}
.solo-label {
  font-size: 1.1em;
  opacity: 0.7;
}
.solo-value {
  font-size: 3em;
  font-weight: bold;
}


/*===================*\
|                     |
|   MOBILE / TABLET   |
|                     |
\*===================*/

/* Grid container must scroll when frame size hits the 30px minimum */
#gs-grid-container {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

/* Increase tap target sizes on touch devices */
@media (hover: none) and (pointer: coarse) {
  .letter {
    min-width: 30px;
    min-height: 30px;
  }
  .gsc-button {
    height: 44px;
    line-height: 44px;
  }
  #gsc-command-start { bottom: 46px; }
  #gsc-command-grid  { bottom: 0; }
}

/* Tab bar — hidden on desktop, shown via mobile media query */
#tab-bar { display: none; }

/* Stack layout on small screens */
@media screen and (max-width: 768px) {
  /* Game panel: vertical stack */
  #game-panel {
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  /* Chat: thin strip at the top */
  #gs-chat {
    float: none !important;
    width: 100% !important;
    height: 160px !important;
    flex-shrink: 0;
    border-bottom: 2px solid rgba(127,140,141,0.2);
  }

  #gsc-messages { height: calc(100% - 50px); }

  /* Grid: fills remaining space, scrollable */
  #gs-grid-container {
    float: none !important;
    width: 100% !important;
    flex: 1 1 auto;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Scores: hidden by default on very small screens to give grid more room */
  #gs-scores {
    display: none;
  }

  /* Solo score stays visible */
  #solo-score { display: flex; }

  /* Lobby: single column */
  #lobby-section {
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
    padding: 0 4% 30px;
  }

  #lobby-panel > header { margin: 4% auto 2%; }

  .lp-title {
    width: 40px;
    height: 40px;
    line-height: 40px;
    font-size: 30px;
  }

  /* Login panel: smaller title on mobile */
  #login-panel > header { margin: 5% auto; }

  /* Tab bar */
  #tab-bar {
    display: flex;
    flex-shrink: 0;
    height: 50px;
    background: #1a1a2e;
    border-top: 1px solid rgba(127,140,141,0.3);
    order: 10;
  }
  .tab-btn {
    flex: 1;
    height: 100%;
    background: none;
    border: none;
    border-top: 3px solid transparent;
    color: #aaa;
    font-family: 'abeezeeregular', sans-serif;
    font-size: 13px;
    cursor: pointer;
    position: relative;
  }
  .tab-btn.active {
    color: #7ec87e;
    border-top-color: #7ec87e;
  }
  .chat-badge {
    display: none;
    position: absolute;
    top: 8px;
    right: calc(50% - 18px);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #e74c3c;
  }
  .chat-badge.visible { display: block; }

  /* Hide all panels by default — tab-active shows the right one */
  #gs-chat, #gs-grid-container, #gs-scores {
    display: none !important;
    float: none !important;
    width: 100% !important;
  }
  #gs-chat.tab-active,
  #gs-grid-container.tab-active,
  #gs-scores.tab-active {
    display: flex !important;
    flex-direction: column;
    flex: 1 1 auto;
    overflow: auto;
  }
  #gs-chat.tab-active {
    display: block !important;
    height: calc(100% - 50px) !important;
    border-bottom: none;
  }
  #gs-scores.tab-active {
    display: block !important;
    overflow-y: auto;
  }
}
