.hg-app{ max-width: 1220px; margin: 0 auto; padding: 32px 20px 60px; color: var(--paper); }
.hg-title{ font-family: var(--font-display); font-size: 34px; margin-bottom: 20px; }
.hg-app.is-in-room .hg-title{ font-size: clamp(22px, 3vw, 30px); margin-bottom: 14px; }

/* ---- Διάταξη: εικόνα+περιγραφή αριστερά, sidebar δωματίου δεξιά ---- */
.hg-layout{
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-template-areas: "image room" "desc room";
  align-items: start;
  gap: 16px;
}
.hg-block-image{ grid-area: image; }
.hg-block-desc{ grid-area: desc; min-width: 0; }
.hg-block-room{ grid-area: room; min-width: 0; }

@media (max-width: 1100px){
  .hg-layout{ grid-template-columns: 1fr; grid-template-areas: "image" "room" "desc"; }
}

.hg-app.is-in-room .hg-block-image,
.hg-app.is-in-room .hg-block-desc{ display: none; }
.hg-app.is-in-room .hg-layout{ grid-template-columns: 1fr; grid-template-areas: "room"; justify-content: center; }
.hg-app.is-in-room .hg-block-room{ max-width: 980px; margin-inline: auto; width: 100%; }

.hg-game-image{ margin-bottom: 24px; max-width: 640px; }
.hg-game-image img{ width: 100%; height: auto; border-radius: 12px; display: block; }
.hg-game-image.is-vertical{ max-width: 340px; }

.hg-desc-heading{ font-family: var(--font-display); font-size: 30px; color: var(--paper); margin: 0 0 14px; }
.hg-subtitle{ color: var(--paper-dim); max-width: 60ch; }
.hg-game-description{ max-width: 70ch; line-height: 1.6; color: var(--paper-dim); }

/* ---- Στοιχεία lobby (κοινά με τα υπόλοιπα παιχνίδια -- κάθε παιχνίδι τα
   ορίζει ξεχωριστά στο δικό του CSS, δεν είναι καθολικά) ---- */
.tavli-card{ background: var(--ink-2); border: 1px solid var(--ink-3); border-radius: 10px; padding: 32px 36px; max-width: 640px; }
.tavli-card h2{ font-family: var(--font-display); font-size: 26px; color: var(--paper); margin-bottom: 10px; }
.tavli-card p{ color: var(--paper-dim); font-size: 15px; margin-bottom: 18px; }
.tavli-card-icon{ display:flex; align-items:center; justify-content:center; width:56px; height:56px; border-radius:50%; background:rgba(255,182,39,0.14); margin-bottom:16px; }
.tavli-card-icon svg{ width:28px; height:28px; display:block; }
.tavli-card-inviter{ color: var(--amber); font-weight:600; }
.tavli-field{ display:flex; flex-direction:column; gap:6px; margin-bottom:18px; }
.tavli-field label{ font-size: 13px; font-weight:600; color: var(--paper-dim); }
.tavli-field input[type="text"], .tavli-field select{
  background: var(--ink); border: 1px solid var(--ink-3); color: var(--paper);
  padding: 12px 14px; border-radius: 6px; font-size: 15px; font-family: var(--font-body);
}
.btn-sm{ padding: 8px 16px; font-size: 13px; flex-shrink: 0; }

/* ---- Overlays νίκης/αντίστροφης μέτρησης (κοινά) ---- */
.tavli-winner{
  position: fixed; inset: 0; background: rgba(10,14,28,.88);
  display:flex; align-items:center; justify-content:center; z-index: 999; padding: 20px;
}
.tavli-winner-card{
  background: var(--ink-2); border: 1px solid var(--ink-3); border-radius: 12px;
  padding: 40px; text-align: center; max-width: 380px; position: relative;
}
.tavli-winner-card p{ font-family: var(--font-display); font-size: 26px; color: var(--paper); margin-bottom: 22px; }
.tavli-winner-note{ font-family: var(--font-body); color: var(--paper-dim); font-size: 15px; margin: 0 0 18px; line-height: 1.5; }
.tavli-winner-actions{ display:flex; gap:12px; justify-content:center; flex-wrap:wrap; }
#hg-start-countdown-num{ color: var(--amber); font-weight: 800; font-size: 20px; }

.gamehub-ad-slot{ margin-top: 32px; display:flex; justify-content:center; overflow:hidden; }

@media (max-width: 900px){ .hg-app{ padding: 20px 16px 40px; } }
@media (max-width: 640px){ .tavli-card{ padding: 20px; } }

/* ---- Πάνω σειρά μέσα στο δωμάτιο: παίκτες + γύρος + αποχώρηση ---- */
.hg-top-row{
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.hg-players{ display: flex; gap: 8px; flex-wrap: wrap; flex: 1 1 auto; }
.hg-player-chip{
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  border: 2px solid transparent;
  color: var(--paper);
  background: var(--ink-2);
}
.hg-player-chip.is-me{ background: var(--ink-3); }
.hg-player-chip.is-setter{ box-shadow: 0 0 0 2px var(--amber) inset; }
.hg-player-score{ font-weight: 800; color: var(--amber); opacity: 0.9; }
.hg-vs{ color: var(--paper-dim); font-size: 13px; font-weight: 700; }
.hg-round-indicator{ font-weight: 700; font-size: 14px; opacity: .85; white-space: nowrap; }
.hg-status{ color: var(--paper-dim); font-size: 14px; margin: -8px 0 14px; }

/* ---- Το ίδιο το ταμπλό ---- */
.hg-board-wrap{
  background: var(--ink-2);
  border: 1px solid var(--ink-3);
  border-radius: 14px;
  padding: 28px 24px;
}
.hg-phase-label{ opacity: .85; margin-bottom: 16px; font-size: 15px; text-align: center; }

/* ---- Φάση: ο θέτης γράφει τη λέξη ---- */
.hg-setting-wrap{ text-align: center; padding: 24px 16px; }
.hg-waiting-demo{ text-align: center; padding: 24px 16px; opacity: .85; }
.hg-setter-input-wrap{ display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.hg-word-input{
  background: var(--ink); border: 2px solid var(--amber); color: var(--paper);
  padding: 14px 18px; border-radius: 8px; font-size: 22px; font-weight: 800;
  letter-spacing: 4px; text-transform: uppercase; text-align: center; font-family: var(--font-body);
  max-width: 320px;
}
.hg-waiting-setter{ opacity: .85; font-size: 16px; }

/* ---- Φάση μαντεψιάς ---- */
.hg-guessing-wrap{ padding: 4px 4px; }
.hg-activity{
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 8px;
  background: rgba(255,255,255,.06);
  margin-bottom: 14px;
}
.hg-activity.is-good{ background: rgba(46,158,79,.2); color: #7FE0A0; }
.hg-drawing-wrap{ display: flex; flex-direction: column; align-items: center; margin-bottom: 18px; }
.hg-drawing{ width: 140px; height: 154px; color: var(--paper); }
.hg-wrong-counter{ margin-top: 6px; font-size: 13px; opacity: .7; }

.hg-word-blanks{
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 16px;
}
.hg-blank{
  min-width: 34px; height: 44px; border-bottom: 3px solid var(--paper-dim);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 26px; font-weight: 800; color: var(--paper);
}
.hg-blank.is-filled{ border-color: var(--amber); }

.hg-setter-label{ text-align: center; font-size: 14px; opacity: .8; margin-bottom: 18px; }

.hg-keyboard{
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 8px;
  max-width: 560px;
  margin: 0 auto 20px;
}
.hg-key{
  padding: 12px 4px;
  border-radius: 8px;
  border: 2px solid rgba(255,255,255,.15);
  background: rgba(255,255,255,.06);
  color: var(--paper);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
.hg-key:hover:not(:disabled){ background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.3); }
.hg-key:disabled{ cursor: default; opacity: .4; }
.hg-key.is-used{ opacity: .3; }
.hg-key.hg-key-viewonly{ pointer-events: none; cursor: default; }

.hg-guess-word-wrap{ display: flex; gap: 10px; justify-content: center; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.hg-guess-word-input{
  background: var(--ink); border: 1px solid var(--ink-3); color: var(--paper);
  padding: 10px 14px; border-radius: 6px; font-size: 15px; font-family: var(--font-body);
  text-transform: uppercase; width: 180px; resize: none; line-height: 1.35;
  text-align: center; white-space: normal; overflow-wrap: break-word;
}

.hg-result-banner{
  margin-top: 12px;
  padding: 12px 16px;
  border-radius: 10px;
  font-weight: 700;
  background: rgba(255,255,255,.08);
  text-align: center;
}
.hg-result-banner.is-good{ background: rgba(46,158,79,.25); color: #7FE0A0; }

.hg-winner-scores{ list-style: none; padding: 0; margin: 12px 0 20px; font-size: 15px; }
.hg-winner-scores li{ padding: 4px 0; }

@media (max-width: 640px){
  .hg-board-wrap{ padding: 18px 14px; }
  .hg-keyboard{ grid-template-columns: repeat(6, 1fr); gap: 6px; }
  .hg-key{ padding: 10px 2px; font-size: 14px; }
  .hg-blank{ min-width: 26px; height: 36px; font-size: 20px; }
}

/* ---- Κουτί κοινοποίησης συνδέσμου ---- */
.hg-share{
  display:flex; gap: 10px; margin-bottom: 18px;
  background: var(--ink-2); border: 1px solid var(--ink-3); border-radius: 8px; padding: 14px; flex-wrap: wrap;
}
.hg-share input{ flex: 1 1 220px; background: var(--ink); border: 1px solid var(--ink-3); color: var(--paper-dim); padding: 10px 12px; border-radius: 6px; font-size: 13px; }
.hg-share-social{ display: flex; gap: 8px; align-items: center; }
.hg-share-icon{
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ink);
  border: 1px solid var(--ink-3);
  color: var(--paper-dim);
  flex-shrink: 0;
  transition: transform .12s ease, color .12s ease, border-color .12s ease;
}
.hg-share-icon:hover{ transform: translateY(-2px); border-color: currentColor; }
.hg-share-fb:hover{ color: #1877F2; }
.hg-share-x:hover{ color: var(--paper); }
.hg-share-viber:hover{ color: #7360F2; }
.hg-share-email:hover{ color: var(--amber); }

@media (max-width: 640px){
  .hg-share{ margin-bottom: 6px; padding: 6px; gap: 6px; }
  .hg-share input{ font-size: 11px; padding: 6px 8px; }
}

/* ---- Κουμπί πλήρους οθόνης (μόνο σε κάθετη προβολή κινητού) ---- */
#hg-view-game{ position: relative; }
.hg-fullscreen-btn{
  display: none;
  position: absolute;
  top: -40px;
  right: 10px;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 8px;
  color: var(--paper);
  cursor: pointer;
  z-index: 40;
  backdrop-filter: blur(2px);
}
.hg-fullscreen-btn.is-active{
  background: var(--amber);
  border-color: var(--amber);
  color: var(--ink);
}
@media (max-width: 640px) and (orientation: portrait){
  .hg-fullscreen-btn{ display: flex; }
}

/* ---- Πλήρης οθόνη / οριζόντια προβολή ---- */
body.hg-landscape-mode{
  overflow: hidden;
  position: fixed;
  width: 100%;
  height: 100%;
}
body.hg-landscape-mode .site-header,
body.hg-landscape-mode .site-footer{
  display: none !important;
}
body.hg-landscape-mode .hg-app{
  padding: 4px 10px;
  height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
body.hg-landscape-mode .hg-title,
body.hg-landscape-mode .hg-block-image,
body.hg-landscape-mode .hg-block-desc{
  display: none;
}
body.hg-landscape-mode .hg-board-wrap{
  width: min(100%, 640px, 80vh);
  margin: 0 auto;
}
body.hg-landscape-mode .hg-top-row{
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  margin: 0;
  width: auto;
  flex-direction: row;
  align-items: flex-start;
  gap: 8px;
}
body.hg-landscape-mode .hg-players{
  display: grid;
  grid-template-columns: repeat(2, max-content);
  justify-content: start;
  justify-items: start;
  gap: 4px;
  flex: 0 0 auto;
}
body.hg-landscape-mode .hg-players.hg-players-vs{
  display: flex;
  align-items: center;
  gap: 6px;
}
body.hg-landscape-mode .hg-round-indicator{
  margin-left: auto;
  font-size: 12px;
}
body.hg-landscape-mode .hg-player-chip{ font-size: 11px; padding: 5px 10px; }
body.hg-landscape-mode #hg-resign-btn{
  padding: 4px 10px !important;
  font-size: 11px !important;
}
body.hg-landscape-mode .hg-status{ display: none; }
body.hg-landscape-mode .hg-share{ margin-bottom: 6px; padding: 6px; gap: 6px; }
