/* Basic styles for the Rubik's Cube game */
.rubiks-body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.game-shell {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
}

.shell-heading {
  text-align: center;
  margin-bottom: 20px;
}

.cube-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  width: 100%;
  max-width: 1200px;
}

#cube-canvas-container {
  width: 600px;
  height: 500px;
  background: #000; /* Fallback or background for canvas */
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  position: relative;
}

.view-indicator {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.7);
  padding: 8px 12px;
  border-radius: 6px;
  color: #fff;
  font-size: 0.85em;
  z-index: 10;
  backdrop-filter: blur(4px);
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
}

.view-label {
  font-weight: 600;
}

body.dark .view-indicator {
  background: rgba(255, 255, 255, 0.15);
  color: #f0f0f0;
}

.controls-container {
  flex: 1;
  min-width: 300px;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: rgba(255, 255, 255, 0.05);
  padding: 20px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.status-panel {
  display: flex;
  justify-content: space-between;
  padding: 10px;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 8px;
}

.action-group,
.solve-group {
  display: flex;
  gap: 10px;
}

button {
  padding: 8px 16px;
  border-radius: 6px;
  border: 1px solid #ccc;
  background: #fff;
  color: #222;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s;
}

button:hover {
  background: #f0f0f0;
}

.move-controls {
  display: grid;
  gap: 10px;
}

.move-row {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.move-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

.playback-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  padding: 10px;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 8px;
}

.speed-control {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.8em;
}

/* Dark mode adjustments */
body.dark {
  background: #181c1f;
  color: #f0f0f0;
}

body.light-mode {
  background: #f0f0f0;
  color: #222;
}

body.dark .rubiks-body {
  color: #f0f0f0;
}

body.dark #cube-canvas-container {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.7);
}

body.dark .controls-container {
  background: rgba(0, 0, 0, 0.2);
  border-color: rgba(255, 255, 255, 0.1);
}

body.dark button {
  background: #333;
  color: #fff;
  border-color: #555;
}

body.dark button:hover {
  background: #444;
}

body.dark .status-panel,
body.dark .playback-controls {
  background: rgba(255, 255, 255, 0.05);
}

@media (max-width: 768px) {
  .cube-container {
    flex-direction: column;
    align-items: center;
  }

  #cube-canvas-container {
    width: 100%;
    height: 400px;
  }

  .controls-container {
    width: 100%;
  }
}
