/* === Reset & Base === */
* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', sans-serif;
  background-color: #1e1e2f;
  color: #fff;
  user-select: none;
  overflow-x: hidden;
}

img {
  pointer-events: none;
  user-drag: none;
  -webkit-user-drag: none;
  max-width: 100%;
  height: auto;
}

/* === Layout === */
.main-container {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: flex-start;
  gap: 40px;
  padding: 20px;
  max-width: 1400px;
  margin: 0 auto;
  flex-wrap: wrap;
}

.left-panel, .right-panel {
  background-color: #2b2b3d;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 0 15px rgba(0,0,0,0.3);
  width: 100%;
  max-width: 800px;
}

.right-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

h1, h2 {
  text-align: center;
  color: #ffd700;
}

.sprite {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.sprite img {
  width: 96px;
}

.stats {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

button {
  background-color: #444;
  color: #fff;
  border: none;
  padding: 10px 14px;
  margin: 5px 3px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease;
  width: 100%;
}

button:hover {
  background-color: #666;
}

#swingBlade {
  font-size: 20px;
  padding: 14px 28px;
  margin-top: 15px;
  width: auto;
}

#swingBlade:hover {
  background-color: #888;
  box-shadow: 0 0 10px #ffd700;
}

.upgrades {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.utility-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
  justify-content: center;
  width: 100%;
}

.utility-buttons button {
  flex: 1;
  min-width: 80px;
}

/* === Responsive Mobile Styles === */
@media (max-width: 768px) {
  body {
    background-color: #1e1e2f;
    color: #fff;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', sans-serif;
    overflow-x: hidden;
  }

  .main-container {
    flex-direction: column;
    padding: 10px;
    gap: 20px;
  }

  .left-panel,
  .right-panel {
    width: 100%;
    max-width: 100%;
    background-color: #2b2b3d;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
  }

  .right-panel {
    order: 2;
    align-items: stretch;
  }

  .sprite img {
    width: 96px;
    max-width: 100%;
    height: auto;
  }

  button {
    width: 100%;
    background-color: #444;
    color: #fff;
    border: none;
    padding: 12px;
    margin: 5px 0;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
  }

  button:hover {
    background-color: #666;
  }

  .upgrades {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .utility-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
}

@media (max-width: 768px) {
  body {
    background-color: #ff0077 !important;
  }
}
