:root {
  --accent: #7c5cff;
  --accent2: #441af0;
  --accent3: #2fdcff;
  --text: #cfd6ff;
  --text-muted: #5d6793;
  --bg-dark: #05060d;
  --bar-bg: rgba(10, 12, 30, 0.85); 
  --glow-purple: 0 0 15px rgba(124, 92, 255, 0.5);
  --glow-cyan: 0 0 15px rgba(0, 102, 255, 0.5);
  --text-glow-cyan: 0 0 10px rgba(47, 220, 255, 0.6);
  --text-glow-purple: 0 0 10px rgba(124, 92, 255, 0.6);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body { 
  width: 100vw; 
  height: 100vh; 
  overflow: hidden; 
  background: radial-gradient(circle at top, #0b0f2a, var(--bg-dark));
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  display: flex;
  flex-direction: column; 
  line-height: 1.5;
}

svg {
  fill: #ffffff !important;
  transition: filter 0.2s cubic-bezier(0.4, 0, 0.2, 1), transform 0.2s ease;
}

svg[stroke] {
  stroke: #ffffff !important;
}

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

::-webkit-scrollbar-track {
  background: rgba(5, 6, 13, 0.5);
}

::-webkit-scrollbar-thumb {
  background: rgba(124, 92, 255, 0.2);
  border-radius: 3px;
  transition: background 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
  box-shadow: var(--glow-purple);
}

#viewerBar {
  flex-shrink: 0; 
  width: 100%;
  height: 70px; 
  background: var(--bar-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(124, 92, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 100;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

#viewerBar p {
  font-size: 22px; 
  margin-block: 0;
  font-weight: 800;
  color: #fff;
  text-shadow: var(--text-glow-purple);
  letter-spacing: 0.5px;
}

#viewerTitle {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 40vw;
  opacity: 0.85;
}

#Btn-Group {
  display: flex;
  align-items: center;
  gap: 12px;
}


#iframe-container, #viewerFrame { 
  flex-grow: 1;    
  width: 100%; 
  height: 100%; 
  min-height: 0;   
  background: transparent;
  border: none;
  position: relative;
}

#iframe-container iframe, #viewerFrame iframe { 
  width: 100%; 
  height: 100%; 
  border: none; 
  background-color: #000; 
  display: block;
}


#settings-panel {
  display: none; 
  position: fixed;
  top: 85px; 
  right: 20px;
  z-index: 9999;
  background: linear-gradient(150deg, rgba(13, 16, 37, 0.95) 0%, rgba(5, 6, 13, 0.98) 100%);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 24px;
  border-radius: 16px; 
  border: 1px solid rgba(124, 92, 255, 0.3);
  border-top: 3px solid var(--accent2);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7), 0 0 40px rgba(124, 92, 255, 0.15);
  color: white;
  width: 260px;
}


#settings-panel.open { 
  display: block; 
  animation: modalScaleIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes modalScaleIn {
  from { opacity: 0; transform: scale(0.95) translateY(-10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.header { 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  margin-bottom: 16px; 
}

.header h3, .header span {
  font-size: 16px;
  font-weight: 800;
  color: #fff;
}

.close-x { 
  cursor: pointer; 
  font-size: 18px; 
  font-weight: bold; 
  padding: 0 5px; 
  color: var(--text-muted);
  transition: color 0.2s ease, transform 0.2s ease;
}

.close-x:hover {
  color: #ff6b6b;
  transform: scale(1.1);
}


select, input {
  width: 100%;
  background: rgba(18, 19, 24, 0.8);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 10px 14px;
  border-radius: 10px;
  margin-bottom: 12px;
  font-size: 13px;
  outline: none;
  box-sizing: border-box;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

select:focus, input:focus {
  border-color: var(--accent3);
  box-shadow: var(--glow-cyan);
  background: rgba(18, 19, 24, 0.95);
}


button.save-btn {
  width: 100%;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 12px;
  border-radius: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(124, 92, 255, 0.2);
  transition: all 0.2s ease;
  margin-top: 8px;
}

button.save-btn:hover {
  background: #8b6eff;
  box-shadow: var(--glow-purple);
  transform: translateY(-2px); 
}

button.save-btn:active {
  transform: translateY(0);
}

.bloxy-btn {
  position: relative;
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #fff;
  font-size: 12px; 
  font-weight: 700;
  text-transform: uppercase;
  text-decoration: none;
  letter-spacing: 1px;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-block;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.bloxy-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
  z-index: 1;
}

.bloxy-btn:hover::before {
  left: 100%;
}

.bloxy-btn:hover {
  background: var(--accent);
  border-color: #8b6eff;
  transform: translateY(-2px);
  box-shadow: var(--glow-purple);
}

.bloxy-btn:active {
  transform: translateY(0) scale(0.98);
}

.bloxy-orange-btn {
  background: rgba(255, 102, 0, 0.15);
  border-color: rgba(255, 102, 0, 0.3);
}

.bloxy-orange-btn:hover {
  background: #ff6600;
  border-color: #ff8533;
  box-shadow: 0 0 15px rgba(255, 102, 0, 0.6);
}

.bloxy-blue-btn {
  background: rgba(0, 102, 255, 0.15);
  border-color: rgba(0, 102, 255, 0.3);
}

.bloxy-blue-btn:hover {
  background: #0066ff;
  border-color: #3385ff;
  box-shadow: var(--glow-cyan);
}

.bloxy-grn-btn {
  background: rgba(34, 197, 94, 0.15);
  border-color: rgba(34, 197, 94, 0.3);
}

.bloxy-grn-btn:hover {
  background: #22c55e;
  border-color: #4ade80;
  box-shadow: 0 0 15px rgba(34, 197, 94, 0.6);
}

.bloxy-rainbow-btn {
  background: linear-gradient(135deg, rgba(255, 95, 109, 0.2), rgba(255, 195, 113, 0.2), rgba(71, 207, 115, 0.2), rgba(56, 249, 215, 0.2));
  border-color: rgba(255, 95, 109, 0.4);
  animation: rainbow-shift 4s infinite linear;
}

@keyframes rainbow-shift {
  0%, 100% { border-color: rgba(255, 95, 109, 0.5); }
  25% { border-color: rgba(255, 195, 113, 0.5); }
  50% { border-color: rgba(71, 207, 115, 0.5); }
  75% { border-color: rgba(56, 249, 215, 0.5); }
}

.bloxy-rainbow-btn:hover {
  background: linear-gradient(135deg, rgba(255, 95, 109, 0.4), rgba(255, 195, 113, 0.4), rgba(71, 207, 115, 0.4), rgba(56, 249, 215, 0.4));
  box-shadow: 0 0 25px rgba(255, 95, 109, 0.6), 0 0 40px rgba(71, 207, 115, 0.3);
}


.clog-btn {
  width: 28px;
  height: 28px;
  cursor: pointer;
  fill: #fff !important;
  filter: drop-shadow(0 0 8px rgba(124, 92, 255, 0.4));
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), filter 0.2s ease, opacity 0.2s ease;
  display: inline-block;
  vertical-align: middle;
  opacity: 0.85;
}

.clog-btn:hover { 
  opacity: 1;
  transform: rotate(90deg) scale(1.1); 
  filter: drop-shadow(0 0 15px var(--accent3));
}
