/* Worm Game Styles */

html, body {
  height: 100%;
  margin: 0;
  background: #000;
  color: #ff0;
  font-family: monospace;
  overflow: hidden; /* Prevent scrolling on mobile */
}

#gameWrap {
  display: flex;
  flex-direction: column;
  height: 100vh;
  align-items: center;
  justify-content: center;
  padding: 10px;
  box-sizing: border-box;
}

canvas {
  background: #000;
  border: 6px solid #cfc000;
  box-sizing: content-box;
  outline: none;
  max-width: 100%;
  max-height: 60vh;
}

.hud {
  width: 100%;
  max-width: 820px;
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  flex-wrap: wrap;
  gap: 5px;
}

.hud div {
  padding: 6px 10px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid #333;
  flex: 1;
  min-width: 120px;
  text-align: center;
}

#overlay {
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

#overlay .panel {
  background: rgba(0, 0, 0, 0.85);
  color: #ff0;
  padding: 18px;
  border: 3px solid #cfc000;
  text-align: center;
}

button {
  background: #222;
  color: #ff0;
  border: 1px solid #666;
  padding: 8px 12px;
  margin-top: 10px;
  cursor: pointer;
}

button:hover {
  background: #333;
}

.small {
  font-size: 14px;
  color: #ccc;
}

.social-links {
  margin-top: 15px;
  padding-top: 10px;
  border-top: 1px solid #333;
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

.social-links a {
  color: #ff0;
  text-decoration: none;
  padding: 4px 8px;
  border: 1px solid #666;
  background: rgba(34, 34, 34, 0.8);
  font-size: 12px;
  transition: all 0.2s ease;
}

.social-links a:hover {
  background: #333;
  border-color: #cfc000;
  color: #cfc000;
}

/* Mobile Full-Screen - All orientations */
@media (max-width: 768px), (max-height: 768px) {
  html, body {
    width: 100vw;
    height: 100vh;
    margin: 0;
    padding: 0;
    overflow: hidden;
    position: fixed;
    top: 0;
    left: 0;
  }
  
  #gameWrap {
    padding: 0 !important;
    margin: 0 !important;
    height: 100vh !important;
    width: 100vw !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    justify-content: flex-start !important;
    align-items: flex-start !important;
  }
  
  canvas {
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
    max-width: none !important;
    max-height: none !important;
  }
  
  .hud {
    display: none !important;
  }
  
  #overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 1000 !important;
    background: rgba(0, 0, 0, 0.8) !important;
  }
  
  #overlay .panel {
    padding: 15px !important;
    margin: 10px !important;
    max-width: calc(100vw - 20px) !important;
    max-height: calc(100vh - 20px) !important;
    box-sizing: border-box !important;
    overflow: auto !important;
  }
  
  #overlay .panel h2 {
    margin-top: 0 !important;
    font-size: 18px !important;
  }
  
  #overlay .panel p {
    font-size: 14px !important;
    margin: 10px 0 !important;
  }
  
  #overlay .panel button {
    font-size: 16px !important;
    padding: 10px 20px !important;
    margin: 10px 5px !important;
  }
  
  #overlay .panel .small {
    font-size: 12px !important;
  }
  
  .social-links {
    gap: 8px !important;
    margin-top: 10px !important;
  }
  
  .social-links a {
    font-size: 11px !important;
    padding: 3px 6px !important;
  }
}