/* WebBlox: A Web-Based 3D Creation & Gaming Platform - style.css */

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  background-color: #1a1a1a;
  color: #e0e0e0;
  display: flex;
  font-size: 14px;
  line-height: 1.6;
}

#editor-panel {
  width: 280px;
  background-color: #2a2a2a;
  border-right: 1px solid #3a3a3a;
  padding: 15px;
  box-sizing: border-box;
  overflow-y: auto;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

#editor-panel h2 {
  font-size: 1.4em;
  color: #f0f0f0;
  margin-top: 0;
  margin-bottom: 10px;
  text-align: center;
}

#editor-panel h3 {
  font-size: 1.2em;
  color: #f0f0f0;
  margin-top: 15px;
  margin-bottom: 5px;
  border-bottom: 1px solid #3a3a3a;
  padding-bottom: 5px;
}

#editor-panel h4 {
  font-size: 1.1em;
  color: #f0f0f0;
  margin-top: 15px;
  margin-bottom: 10px;
}

#toolbar {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

button,
input[type="button"],
input[type="submit"] {
  background-color: #007bff;
  color: #ffffff;
  border: none;
  padding: 8px 15px;
  margin: 0;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  transition: background-color 0.2s ease, transform 0.1s ease;
}

button:hover,
input[type="button"]:hover,
input[type="submit"]:hover {
  background-color: #0056b3;
  transform: translateY(-1px);
}

button:active,
input[type="button"]:active,
input[type="submit"]:active {
  background-color: #004085;
  transform: translateY(0);
}

button:focus-visible,
input[type="button"]:focus-visible,
input[type="submit"]:focus-visible {
  outline: 2px solid #66b3ff;
  outline-offset: 2px;
}

#editor-panel button {
  width: 100%;
  box-sizing: border-box;
}

#toggle-mode-btn {
  background-color: #28a745;
  color: #ffffff;
  font-weight: bold;
  padding: 10px 15px;
  margin-bottom: 15px;
}

#toggle-mode-btn:hover {
  background-color: #218838;
}

#toggle-mode-btn:active {
  background-color: #1e7e34;
}

#toggle-mode-btn:focus-visible {
  outline: 2px solid #77dd77;
  outline-offset: 2px;
}

#properties-panel {
  flex-grow: 1;
}

#properties-panel p {
  color: #aaaaaa;
  font-style: italic;
  text-align: center;
  margin-top: 20px;
}

#object-props {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

#viewport-container {
  flex: 1;
  position: relative;
  background-color: #000;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

#render-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.hidden {
  display: none !important;
}

input[type="text"],
input[type="number"],
input[type="color"],
select {
  background-color: #3a3a3a;
  color: #e0e0e0;
  border: 1px solid #555555;
  padding: 8px;
  margin: 0;
  border-radius: 4px;
  width: 100%;
  box-sizing: border-box;
  font-size: 13px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input[type="color"] {
  padding: 4px;
  height: 30px;
  width: 100%;
  vertical-align: middle;
}

input[type="text"]:focus-visible,
input[type="number"]:focus-visible,
select:focus-visible {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.5);
}

input[type="color"]:focus-visible {
  outline: 2px solid #007bff;
  outline-offset: 2px;
}

label {
  display: block;
  margin-top: 10px;
  margin-bottom: 3px;
  color: #bbbbbb;
  font-size: 13px;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #3a3a3a;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: #555555;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: #777777;
}

@media (max-width: 768px) {
  body {
    flex-direction: column;
  }

  #editor-panel {
    width: 100%;
    height: 250px;
    border-right: none;
    border-bottom: 1px solid #3a3a3a;
    order: 2;
    padding: 10px;
  }

  #viewport-container {
    height: calc(100vh - 250px);
    order: 1;
  }

  #editor-panel button {
    width: 100%;
  }
}