/* ===== MINDS EYE - STYLES ===== */

/* ===== BASE STYLES ===== */
html, body {
  margin: 0;
  padding: 0;
  overflow: hidden;
  background-color: black;
  font-family: sans-serif;
}

/* ===== TOOLBAR STYLES ===== */
#toolbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: #111;
  opacity: 0.7;
  color: white;
  padding: 10px;
  display: flex;
  justify-content: space-between;
  z-index: 10001;
  transition: opacity 0.5s ease;
}

#toolbar button {
  background-color: rgba(0, 0, 0, 0.7);
  color: gold;
  border: none;
  font-family: 'Monaco', serif;
  border-radius: 6px;
  padding: 0;
  margin: 0;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 80px;
  height: 80px;
}

#toolbar button:hover {
  background-color: rgba(0, 0, 0, 0.9);
  transform: scale(1.05);
}

.toolbar-btn {
  background-image: none;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  color: transparent;
  font-size: 0;
  width: 80px;
  height: 80px;
  margin: 0;
  padding: 0;
}

.toolbar-btn.has-png {
  background-image: var(--png-url);
}

.toolbar-btn[data-icon="dice"] {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  font-size: 0;
  font-weight: bold;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
  transition: all 0.3s ease;
}

/* ===== CANVAS STYLES ===== */
#canvas {
  display: block;
  z-index: -1;
}

/* ===== PANEL STYLES ===== */
.panel {
  position: fixed;
  top: 130px;
  left: 15px;
  transform: none;
  width: 300px;
  min-width: 250px;
  max-width: 1000px;
  background: rgba(34, 34, 34, 0.90);
  color: white;
  padding: 40px 20px 20px 20px;
  border-radius: 16px;
  z-index: 999;
  display: none;
  resize: both;
  overflow: auto;
  transition: all 0.3s ease;
}

.panel.minimized {
  width: 15px !important;
  min-width: 15px !important;
  height: 200px;
  overflow: hidden;
  padding: 2px;
  cursor: pointer;
}

.panel.minimized input,
.panel.minimized textarea,
.panel.minimized div:not(:first-child),
.panel.minimized label,
.panel.minimized button,
.panel.minimized .panel-close-btn {
  display: none;
}

.panel-close-btn {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 12px;
  height: 12px;
  background: rgba(255, 0, 0, 0.8);
  color: white;
  border: 2px solid #ff4444;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: bold;
  font-size: 14px;
  transition: all 0.3s ease;
  z-index: 1000;
}

.panel.minimized .panel-close-btn {
  display: none;
}

.panel-close-btn:hover {
  background: rgba(255, 0, 0, 1);
  transform: scale(1.1);
  box-shadow: 0 0 8px rgba(255, 0, 0, 0.5);
}

.resize-handle {
  position: absolute;
  bottom: 5px;
  right: 5px;
  width: 20px;
  height: 20px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
  cursor: se-resize;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.panel input, .panel textarea {
  width: 100%;
  margin: 5px 0;
  background: #333;
  border: none;
  color: white;
  padding: 5px;
}

.panel button {
  margin-right: 10px;
  padding: 6px 12px;
  background-color: rgba(0, 0, 0, 0.7);
  color: gold;
  border: 2px solid darkgreen;
  font-family: 'Monaco', serif;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.panel button:hover {
  background-color: rgba(0, 0, 0, 0.9);
  transform: scale(1.05);
}

/* ===== DICE OVERLAY STYLES ===== */
.dice-overlay {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.8);
  color: gold;
  font-size: 120px;
  font-weight: bold;
  padding: 40px;
  border-radius: 20px;
  border: 3px solid darkgreen;
  z-index: 2000;
  display: none;
  animation: diceFadeIn 0.3s ease-in;
}

@keyframes diceFadeIn {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.5); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* ===== DICE SLIDER STYLES ===== */
#diceSlider {
  animation: diceFadeIn 0.3s ease-in;
}

#diceSlider input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  background: rgba(0, 0, 0, 0.6);
  border: 2px solid darkgreen;
  border-radius: 5px;
  outline: none;
  margin: 10px 0;
}

#diceSlider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: gold;
  cursor: pointer;
  border: 2px solid darkgreen;
  box-shadow: 0 0 4px gold;
}

#diceSlider input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: gold;
  cursor: pointer;
  border: 2px solid darkgreen;
  box-shadow: 0 0 4px gold;
}

/* ===== MUSIC PANEL STYLES ===== */
.music-panel {
  position: fixed;
  top: 130px;
  right: 15px;
  width: 300px;
  background: rgba(34, 34, 34, 0.90);
  color: white;
  padding: 20px;
  border-radius: 16px;
  z-index: 999;
  display: none;
  max-height: 70vh;
  overflow-y: auto;
}

.music-panel h3 {
  color: gold;
  margin-top: 0;
  text-align: center;
}

.music-item {
  background: rgba(0, 0, 0, 0.6);
  color: white;
  border: 1px solid darkgreen;
  padding: 8px 12px;
  margin: 5px 0;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.music-item:hover {
  background: rgba(0, 0, 0, 0.8);
  color: gold;
}

.music-item.playing {
  background: rgba(0, 100, 0, 0.6);
  color: gold;
  border-color: gold;
}

/* ===== VIDEO PLAYER STYLES ===== */
#videoPlayer {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60%;
  height: 42%;
  z-index: 1000;
  display: none;
  background: rgba(0, 0, 0, 0.9);
  transition: all 0.5s ease;
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  opacity: 0.5;
  overflow: hidden;
}

#videoPlayer.fullscreen {
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: none;
  border-radius: 0;
  z-index: 1000;
}

#videoPlayer.centered {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 50%;
  height: 50%;
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
  z-index: 1000;
}

#videoPlayer iframe {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: inherit;
  display: block !important;
  position: relative;
  z-index: 1;
  opacity: 1;
  visibility: visible;
}

#videoControls {
  position: fixed;
  bottom: 50px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20001 !important;
  display: none;
  background: rgba(0, 0, 0, 0.8);
  padding: 10px 30px;
  border-radius: 10px;
  border: 2px solid #4CAF50;
  box-shadow: 0 0 0 2px white;
  transition: opacity 0.5s ease;
  opacity: 1;
  pointer-events: auto;
  text-align: center;
  font-size: 0;
}



#videoControls {
  white-space: nowrap;
  letter-spacing: 0;
  word-spacing: 0;
}

#videoControls button {
  background: black;
  border: none;
  color: white;
  padding: 0;
  margin: 0 1px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s ease;
  width: 60px;
  height: 60px;
  display: inline-block;
  align-items: center;
  justify-content: center;
  vertical-align: top;
  position: relative;
  font-size: 0;
  box-sizing: border-box;
}

#videoControls button:hover {
  border: 1px solid green;
}

/* Line indents removed - no borders between buttons */

/* Timeline markers for animation recording */
.timeline-marker {
  position: absolute;
  top: -5px;
  width: 12px;
  height: 24px;
  border-radius: 3px;
  cursor: pointer;
  z-index: 10;
  border: 2px solid white;
  box-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.timeline-control {
  position: relative;
  margin: 10px 0;
}

.timeline-control input[type="range"] {
  width: 100%;
  position: relative;
}

/* Animation recording buttons */
.record-btn {
  background: linear-gradient(45deg, #ff6b6b, #ee5a52) !important;
  color: white !important;
  font-weight: bold !important;
}

.record-btn:hover {
  background: linear-gradient(45deg, #ff5252, #d32f2f) !important;
}

.play-btn {
  background: linear-gradient(45deg, #4CAF50, #45a049) !important;
  color: white !important;
  font-weight: bold !important;
}

.play-btn:hover {
  background: linear-gradient(45deg, #388E3C, #2E7D32) !important;
}

/* PNG button overrides */
.has-png {
  background-image: var(--png-url) !important;
  background-size: cover !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  color: transparent !important;
  font-size: 0 !important;
}

#videoControls button:hover {
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* Video control button icons - fallback to emoji if PNG not available */
.video-control-btn {
  background-image: none;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  position: relative;
  border: none;
  outline: none;
  width: 60px;
  height: 60px;
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

/* When PNG images are available, these classes will be used */
.video-control-btn[data-icon="prev"] {
  background-image: url('images/previous.png');
}

.video-control-btn[data-icon="play"] {
  background-image: url('images/play.png');
}

.video-control-btn[data-icon="pause"] {
  background-image: url('images/stop.png');
}

.video-control-btn[data-icon="next"] {
  background-image: url('images/next.png');
}

.video-control-btn[data-icon="playlist"] {
  background-image: url('images/playlist.png');
}

.video-control-btn[data-icon="fullscreen"] {
  background-image: url('images/fullscreen.png');
}

.video-control-btn[data-icon="close"] {
  background-image: url('images/stop.png');
}

/* Hide text when PNG is loaded */
.video-control-btn.has-png {
  color: transparent !important;
  font-size: 0 !important;
}

/* Ensure buttons are clickable even with PNG */
.video-control-btn {
  pointer-events: auto;
  cursor: pointer;
}

/* PNG images will be applied via JavaScript */

#videoPlaylist {
  position: fixed;
  top: 130px;
  left: 20px;
  width: 300px;
  height: 400px;
  max-height: 400px;
  background: rgba(0, 0, 0, 0.9);
  color: white;
  padding: 15px;
  border-radius: 10px;
  border: 2px solid #4CAF50;
  z-index: -1;
  display: none;
  overflow-y: auto;
  transition: all 0.3s ease;
  opacity: 1;
  pointer-events: none;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

#videoPlaylist.minimized {
  width: 30px;
  height: 200px;
  overflow: hidden;
  padding: 5px;
  cursor: pointer;
}

#videoPlaylist.minimized h3,
#videoPlaylist.minimized div:not(:first-child) {
  display: none;
}

#videoPlaylist.minimized::before {
  content: '▶️';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 16px;
  color: #4CAF50;
}

#videoPlaylist h3 {
  color: #4CAF50;
  margin-top: 0;
  text-align: center;
}

.playlist-item {
  background: rgba(255, 255, 255, 0.1);
  color: #4CAF50;
  border: 1px solid #4CAF50;
  padding: 6px 10px;
  margin: 3px 0;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  font-size: 12px;
  line-height: 1.2;
}

.playlist-item:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #4CAF50;
}

.playlist-item.playing {
  background: rgba(76, 175, 80, 0.6);
  color: white;
  border-color: #4CAF50;
}

/* ===== PLAYBACK TOOLBAR STYLES ===== */
#playbackToolbar {
  position: fixed;
  bottom: 0;
  width: 100%;
  background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
  color: white;
  display: flex;
  justify-content: center; 
  align-items: center;
  gap: 15px;
  padding: 15px;
  z-index: 1000;
  display: none;
  flex-wrap: wrap;
  border-top: 2px solid #333;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.3);
}

#playbackToolbar .record-btn,
#playbackToolbar .play-btn,
#playbackToolbar .snapshot-btn {
  background: linear-gradient(45deg, #4CAF50, #45a049);
  border: none;
  color: white;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s ease;
}

#playbackToolbar .record-btn:hover,
#playbackToolbar .play-btn:hover,
#playbackToolbar .snapshot-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

#playbackToolbar .end-btn {
  background: linear-gradient(45deg, #f44336, #da190b);
}

#playbackToolbar .play-btn {
  background: linear-gradient(45deg, #2196F3, #1976D2);
}

#playbackToolbar .snapshot-btn {
  background: linear-gradient(45deg, #FF9800, #F57C00);
}

#playbackToolbar .timeline-control,
#playbackToolbar .duration-control {
  display: flex;
  align-items: center;
  gap: 10px;
}

#playbackToolbar .timeline-control span,
#playbackToolbar .duration-control span {
  color: #ccc;
  font-size: 12px;
}

#playbackToolbar #playbackSlider {
  width: 250px;
  height: 6px;
  border-radius: 3px;
  background: #333;
  outline: none;
}

#playbackToolbar #playbackDuration {
  background: #333;
  color: white;
  border: 1px solid #555;
  padding: 6px;
  border-radius: 4px;
  outline: none;
}

/* ===== MEDIA TOOLBAR STYLES ===== */
#mediaToolbar {
  position: fixed;
  bottom: 0;
  width: 100%;
  background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  padding: 15px;
  z-index: 1000;
  display: none;
  border-top: 2px solid #333;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.3);
  flex-wrap: wrap;
  overflow-x: auto;
}

#mediaToolbar label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #ccc;
}

#mediaToolbar input[type="file"],
#mediaToolbar input[type="text"] {
  background: #333;
  color: white;
  border: 1px solid #555;
  padding: 6px;
  border-radius: 4px;
  outline: none;
}

#mediaToolbar button {
  background: linear-gradient(45deg, #2196F3, #1976D2);
  border: none;
  color: white;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s ease;
  margin: 0;
}

/* Override for PNG buttons */
#mediaToolbar button.has-png,
#toolbar button.has-png,
.video-control-btn.has-png {
  background: none !important;
  background-image: var(--png-url, none) !important;
  background-size: cover !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  color: transparent !important;
  font-size: 0 !important;
}

/* Special override for dice button when showing number */
#toolbar button.has-png[data-icon="dice"].showing-number {
  color: gold !important;
  font-size: 24px !important;
  font-weight: bold !important;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.8) !important;
  z-index: 10 !important;
}

#mediaToolbar button:hover {
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

#mediaToolbar .media-separator {
  width: 1px;
  height: 30px;
  background: #555;
  margin: 0 10px;
}

#mediaToolbar .record-btn,
#mediaToolbar .play-btn,
#mediaToolbar .snapshot-btn {
  background: linear-gradient(45deg, #4CAF50, #45a049);
  border: none;
  color: white;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s ease;
}

#mediaToolbar .record-btn:hover,
#mediaToolbar .play-btn:hover,
#mediaToolbar .snapshot-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

#mediaToolbar .end-btn {
  background: linear-gradient(45deg, #f44336, #da190b);
}

#mediaToolbar .play-btn {
  background: linear-gradient(45deg, #2196F3, #1976D2);
}

#mediaToolbar .snapshot-btn {
  background: linear-gradient(45deg, #FF9800, #F57C00);
}

#mediaToolbar .timeline-control,
#mediaToolbar .duration-control {
  display: flex;
  align-items: center;
  gap: 10px;
}

#mediaToolbar .timeline-control span,
#mediaToolbar .duration-control span {
  color: #ccc;
  font-size: 12px;
}

#mediaToolbar #mediaPlaybackSlider {
  width: 200px;
  height: 6px;
  border-radius: 3px;
  background: #333;
  outline: none;
}

#mediaToolbar #mediaPlaybackDuration {
  background: #333;
  color: white;
  border: 1px solid #555;
  padding: 6px;
  border-radius: 4px;
  outline: none;
}

/* ===== FORM ELEMENT STYLES ===== */
#themeSelector, #presetSelector {
  background-color: rgba(0, 0, 0, 0.7);
  color: gold;
  border: 2px solid darkgreen;
  font-family: 'Monaco', serif;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  appearance: none;
}

#themeSelector:hover, #presetSelector:hover {
  background-color: rgba(0, 0, 0, 0.9);
}

input[type="range"] {
  -webkit-appearance: none;
  width: 150px;
  height: 8px;
  background: rgba(0, 0, 0, 0.6);
  border: 2px solid darkgreen;
  border-radius: 5px;
  outline: none;
  margin-left: 10px;
}

/* Video control sliders with enhanced hover titles */
#videoControls input[type="range"] {
  position: relative;
}

#videoControls input[type="range"]:hover::after {
  content: attr(title);
  position: absolute;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.9);
  color: white;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 12px;
  white-space: nowrap;
  z-index: 10000;
  pointer-events: none;
  border: 1px solid #4CAF50;
  box-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: gold;
  cursor: pointer;
  border: 2px solid darkgreen;
  box-shadow: 0 0 4px gold;
  transition: background-color 0.3s ease;
}

input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: gold;
  cursor: pointer;
  border: 2px solid darkgreen;
  box-shadow: 0 0 4px gold;
  transition: background-color 0.3s ease;
}

/* Red thumb when paused */
input[type="range"].paused::-webkit-slider-thumb {
  background: red;
  box-shadow: 0 0 4px red;
}

input[type="range"].paused::-moz-range-thumb {
  background: red;
  box-shadow: 0 0 4px red;
}

input[type="file"] {
  background-color: rgba(0, 0, 0, 0.6);
  color: gold;
  border: 2px solid darkgreen;
  font-family: 'Monaco', serif;
  padding: 6px;
  border-radius: 6px;
  cursor: pointer;
}

input[type="text"] {
  background-color: rgba(0, 0, 0, 0.6);
  color: gold;
  border: 2px solid darkgreen;
  font-family: 'Monaco', serif;
  padding: 6px;
  border-radius: 6px;
  width: 120px;
}

/* ===== BUBBLE STYLES ===== */
.bubble {
  position: absolute;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  text-align: center;
  padding: 5px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.bubble img {
  position: absolute;
  width: 90%;
  height: 90%;
  border-radius: 50%;
  object-fit: cover;
  z-index: 0;
}

.bubble span {
  position: relative;
  z-index: 1;
}

.glow {
  box-shadow: 0 0 20px 5px white;
}

.flash {
  animation: flash 0.5s infinite alternate;
}

@keyframes flash {
  from { opacity: 1; }
  to { opacity: 0.5; }
}

.animate-colors {
  animation: colorCycle 5s infinite linear;
}

@keyframes colorCycle {
  0% { background-color: red; }
  25% { background-color: yellow; }
  50% { background-color: green; }
  75% { background-color: blue; }
  100% { background-color: red; }
}

.transparent {
  background-color: rgba(255, 255, 255, 0.1);
}

/* ===== MEDIA ELEMENT STYLES ===== */
#bgVideo {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  z-index: -2;
  pointer-events: none;
  display: none;
  background: black;
}

#bubblePanel {
  resize: both;
  overflow: auto;
  min-width: 200px;
  min-height: 150px;
} 