body {
  background: #111;
  color: #fff;
  font-family: sans-serif;
  margin: 0;
  padding: 0;
  overflow: hidden;
  user-select: none;
}

#three-container {
  width: 100vw;
  height: 100vh;
}

#game {
  display: none;
}

/* Loading Screen */
#loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  transition: opacity 0.5s ease;
}

#loading-bar-container {
  width: 200px;
  height: 10px;
  background: #333;
  border-radius: 5px;
  margin-top: 20px;
}

#loading-bar {
  width: 0%;
  height: 100%;
  background: #00ff00;
  border-radius: 5px;
  transition: width 0.1s;
}

#loading-text {
  color: #fff;
  font-size: 14px;
  margin-top: 10px;
}

/* Toasts */
#toast-container {
  position: fixed;
  top: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 500;
  pointer-events: none;
}

.toast {
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  padding: 14px 28px;
  border-radius: 40px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 15px;
  opacity: 0;
  transform: translateY(-20px);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 10px 20px rgba(0,0,0,0.3);
  font-weight: 500;
  text-align: center;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* Controls Panel */
#controls-panel {
  position: fixed;
  bottom: 25px;
  right: 25px;
  background: rgba(0, 0, 0, 0.7);
  color: #eee;
  padding: 20px;
  border-radius: 12px;
  backdrop-filter: blur(10px);
  font-size: 13px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
  width: 190px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

#controls-panel h4 {
  margin: 0 0 12px 0;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-size: 10px;
}

#controls-panel ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

#controls-panel li {
  margin-bottom: 6px;
  display: flex;
  justify-content: space-between;
}

#controls-panel .key {
  color: #00ff00;
  font-weight: 600;
  background: rgba(0, 255, 0, 0.1);
  padding: 1px 5px;
  border-radius: 3px;
}

#emulator-controls {
  display: none;
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Credits Button */
#credits-btn {
  position: fixed;
  bottom: 25px;
  left: 25px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 10px 20px;
  border-radius: 30px;
  cursor: pointer;
  z-index: 500;
  font-size: 12px;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}
#credits-btn:hover {
  background: rgba(0, 255, 0, 0.2);
  border-color: rgba(0, 255, 0, 0.4);
}

#download-btn {
  position: fixed;
  bottom: 25px;
  left: 125px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 10px 20px;
  border-radius: 30px;
  cursor: pointer;
  z-index: 500;
  font-size: 12px;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  text-decoration: none;
  display: flex;
  align-items: center;
}
#download-btn:hover {
  background: rgba(0, 255, 0, 0.2);
  border-color: rgba(0, 255, 0, 0.4);
}

/* Modal Styling */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.85);
  backdrop-filter: blur(8px);
}

.modal-content {
  background: #111;
  color: #eee;
  margin: 5% auto;
  padding: 30px;
  border: 1px solid #333;
  width: 90%;
  max-width: 600px;
  border-radius: 15px;
  box-shadow: 0 0 50px rgba(0,0,0,0.5);
  position: relative;
}

.close-modal {
  color: #888;
  position: absolute;
  top: 15px;
  right: 25px;
  font-size: 30px;
  font-weight: bold;
  cursor: pointer;
}
.close-modal:hover { color: #fff; }

.modal-content h2 {
  margin-top: 0;
  color: #00ff00;
  font-size: 24px;
  border-bottom: 2px solid #222;
  padding-bottom: 10px;
}

.table-container {
  overflow-x: auto;
  margin-top: 20px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th {
  text-align: left;
  padding: 12px;
  background: #1a1a1a;
  color: #888;
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 1px;
}

td {
  padding: 12px;
  border-bottom: 1px solid #222;
}

.section-header {
  background: rgba(0, 255, 0, 0.05);
  color: #00ff00;
  font-weight: bold;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.section-header td {
  padding: 6px 12px;
  border-bottom: 1px solid #333;
}

a {
  color: #00ff00;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

.tools-list {
  text-align: center;
  color: #888;
  font-style: italic;
  padding: 20px 0 !important;
}

.credits-section {
  margin-bottom: 20px;
  font-size: 14px;
  color: #bbb;
}
