@font-face {
    font-family: 'riogrande-striped';
    src: url('riogrande.ttf') format('truetype');
}

@font-face {
    font-family: 'marlboro';
    src: url('Marlboro.ttf') format('truetype');
}

@media (max-width: 1200px) {
  .wasd-icon, .enter-icon {
    height: 60px !important;
  }
  .wasd-text, .enter-text {
    display: none !important;
  }
}

@media (max-width: 800px) {
  .wasd-container, .enter-container {
    display: none !important;
  }
}

body {
  background-color: burlywood;
  margin: 0;
  overflow: hidden;
}

.sub-text {
  position: fixed;
  top: 110px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'marlboro' !important;
  color: #4a2c1d;
  z-index: 1000;
  font-size: clamp(20px, 8vw, 30px) !important;
  margin: 0 !important;
  white-space: nowrap !important;
  width: auto !important;
  max-width: 80vw !important;
  text-align: center !important;
  pointer-events: none;
}

.game-title {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 250px;
  width: 100%;
  margin-top: 20px;
}

.game-title h1 {
  position: fixed;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'riogrande-striped', sans-serif !important;
  color: #4a2c1d;
  z-index: 999;
  font-size: clamp(30px, 8vw, 120px) !important;
  margin: 0 !important;
  white-space: nowrap !important;
  width: auto !important;
  max-width: 80vw !important;
  text-align: center !important;
  pointer-events: none;
  display: flex;
}

.title-sign {
  display: none;
}

.wasd-container, .enter-container {
  position: fixed !important;
  top: 20px !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 15px !important;
  z-index: 1000;
  pointer-events: none;
}

.wasd-container { left: 20px !important; }
.enter-container { right: 20px !important; }

.wasd-icon, .enter-icon {
  height: clamp(50px, 10vw, 100px) !important;
  width: auto !important;
  display: block;
}

.wasd-text, .enter-text {
  font-family: 'riogrande-striped', sans-serif !important;
  font-size: clamp(20px, 3vw, 40px) !important;
  color: burlywood !important;
  margin-top: 0px !important;
  line-height: 1;
}

footer {
    position: fixed;
    bottom: -75px;
    left: 0;
    width: 100%;
    height: 300px !important; 
    z-index: 1;
    display: block !important;
}

.footer-plank {
    width: 100%;
    height: 390px;
    display: block !important;
    background-image: url('graphics/plank1.png');
    background-repeat: repeat-x; 
    background-size: auto 100%; 
    image-rendering: pixelated;
}

.head-plank {
    position: fixed;
    top: -120px;
    left: 0;
    width: 100%;
    height: 390px;
    display: block !important;
    z-index: 998;
    background-image: url('graphics/plank1.png');
    background-repeat: repeat-x; 
    background-size: auto 100%; 
    image-rendering: pixelated;
    pointer-events: none;
}

.player {
    position: absolute;
    width: 80px;
    height: 80px;
    background-image: url('graphics/cowboy1.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    image-rendering: pixelated;
    transition: left 0.1s linear, top 0.1s linear;
}

.player-name {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'marlboro';
    font-size: 15px;
    color: #4a2c1d;
    white-space: nowrap;
    pointer-events: none;
}

.chat-bubble {
    position: absolute !important;
    bottom: 110px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    background-color: white !important;
    color: black !important;
    padding: 8px 12px !important;
    border-radius: 15px !important;
    font-family: 'marlboro' !important;
    font-size: 14px !important;
    width: max-content !important;
    min-width: 50px !important;
    word-wrap: break-word !important;
    text-align: center !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3) !important;
    z-index: 9999 !important;
}

#chat-container {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000;
    width: 90%;
    max-width: 500px;
    display: flex;
    justify-content: center;
}

#chat-input {
    position: fixed;
    bottom: 10px; 
    left: 50%;
    transform: translateX(-50%);
    z-index: 2001;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #5d3a23;
    border-radius: 20px;
    padding: 8px 15px;
    width: 80%;
    max-width: 600px;
    outline: none;
    font-family: 'marlboro' !important;
    font-size: 15px;
}

#chat-input:focus {
    border-color: gold;
    background: white;
}

#game-world {
    z-index: 5;
}

#name-popup {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 4000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.name-box {
    background-image: url('graphics/plank_board1.png');
    background-repeat: no-repeat;
    background-size: 100% 100%;
    background-position: center;
    width: 90%;
    max-width: 450px;
    padding: 60px 20px;
    border: none;
    border-radius: 5px;
    text-align: center;
    image-rendering: pixelated;
    box-shadow: 0 0 50px rgba(0,0,0,0.8);
    background-color: #5d3a23 !important; 
}

.name-box h2 {
  margin-top: 0;
  font-size: 50px;
  color: #f5deb3 !important;
  text-shadow: 3px 3px 0px #4a2c1d;
}

#name-input {
    width: 70%;
    padding: 12px;
    border-radius: 10px;
    border: 3px solid #5d3a23;
    margin: 25px 0;
    font-size: 18px;
    outline: none;
    text-align: center;
    font-family: 'marlboro' !important;
}

#start-btn {
    background: #4a2c1d;
    color: #f5deb3;
    border: none;
    padding: 12px 40px;
    border-radius: 10px;
    font-family: 'marlboro';
    font-size: 24px;
    cursor: pointer;
    transition: transform 0.2s;
}

#start-btn:hover {
    transform: scale(1.1);
    background: #5d3a23;
}
