/*fonts import*/
@font-face {
  font-family: 'Rodondo';
  src: url('../font/Rodondo.otf');
}
@font-face {
  font-family: 'rain_world_menu_font_Webfont';
  src: url('../font/rain-world-menu-font-webfont/rain-world-menu-font-webfont.ttf');
}
@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&display=swap');


html, body {
    margin: 0;
    overflow: hidden;
    width: 100%; height: 100%;
    background: #000000;
}

#canvas-wrapper {
    position: relative;
    width: 100vw;
    height: 100vh;
}

#canvas, #canvas-connections, #canvas-overlay {
    position: absolute;
    top: 0; left: 0;
}
#canvas-connections, #canvas-overlay {
    pointer-events: none;
    z-index: 1;
}

#canvas-overlay { z-index: 2; }

#btn-toggle-game {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 101;
    pointer-events: all;
    cursor: pointer;
    font-size: 11px;
    color : white;
}

#room-tooltip {
    display: none;
    position: fixed;
    z-index: 999;
    background: rgba(0,0,0,0.75);
    color: #00ff00;
    font-family: 'Share Tech Mono', monospace;
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 4px;
    border: 1px solid #00ff00;
    pointer-events: none;
    white-space: nowrap;
}

#game-panel {
    position: fixed;
    top: 20px;
    left: 90%;
    transform: translateX(-50%);
    z-index: 100;
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.82);
    color: rgba(255,255,255,0.4);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    padding: 14px 18px;
    font-family: 'Share Tech Mono', monospace;
    pointer-events: none;
    min-width: 280px;
}

#game-panel.visible {
    display: flex;
}

#challenge-image {
    width: 256px;
    height: 256px;
    object-fit: cover;
    border-radius: 4px;
    pointer-events: none;
}

#challenge-image.loading {
    opacity: 0.3;
}

#selection-row {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

#selection-label #answer-label {
    color: rgba(255,255,255,0.4);
    font-size: 11px;
    letter-spacing: 1px;
    white-space: nowrap;
}

#selected-room-name #answer-room-name {
    flex: 1;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#btn-validate {
    pointer-events: all;
    cursor: pointer;
    padding: 7px 20px;
    background: transparent;
    border: 1px solid #9b9a99;
    font-size: 12px;
    letter-spacing: 2px;
    border-radius: 4px;
    width: 100%;
    color : white;
}

#btn-mode {
    pointer-events: all;
    cursor: pointer;
    padding: 5px 12px;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.25);
    color: rgba(255,255,255,0.6);
    font-family: 'Share Tech Mono', monospace;
    font-size: 11px;
    letter-spacing: 2px;
    border-radius: 4px;
    width: 100%;
}

#btn-mode.hard {
    border-color: #ff4444;
    color: #ff4444;
}

#btn-validate:disabled {
    cursor: not-allowed;
}

#loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    font-family: 'Share Tech Mono', monospace;
    color: rgba(255,255,255,0.6);
    font-size: 13px;
    letter-spacing: 2px;
    pointer-events: none;
    transition: opacity 0.3s;
}

#loading-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.top-bar {
  display: flex;
  position: relative;
  align-items: left;
  justify-content: center;
  flex-direction: column;
  margin: 0px;
  padding: 0px;
  width: 100%;
  height: 10%;
  z-index: 10;
  background-color: #1D9543;
}

button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2% 3%;
    width: fit-content;
    height: fit-content;
    border-radius: 12px;
    border: 3px solid;
    border-color: #fff;
    background-color: rgba(0, 0, 0, 0.3);
}

a {
  color: #fff;;
  font-size: 15px;
  font-weight: bold;
  margin: 0px;
  margin-top: 5%;
  vertical-align: top;
  text-decoration: none;
  font-family: rain_world_menu_font_Webfont;
}

/* Le navigateur ne doit pas scroller ni zoomer la page quand on touche la carte */
#canvas-wrapper, #canvas-wrapper canvas { touch-action: none; }
body { overscroll-behavior: none; -webkit-tap-highlight-color: transparent; user-select: none; }

/* Boutons assez grands pour un doigt */
button { min-height: 44px; min-width: 44px; }

@media (max-width: 700px) {
    #game-panel { max-width: 100vw; }
    #challenge-image { max-width: 100%; height: auto; }
}