/* =======================================
   GLASSMORPHISM CSS GENERATOR STYLESHEET
   ======================================= */

.glass-generator-tool {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin: 1.5rem 0 3rem;
}

.glass-generator-tool .tool-layout {
  display: flex;
  flex-direction: row;
  gap: 2.5rem;
  align-items: flex-start;
}

@media (max-width: 1024px) {
  .glass-generator-tool .tool-layout {
    flex-direction: column;
    align-items: stretch;
  }
}

/* Controls Panel */
.glass-generator-tool .tool-controls {
  background: rgba(10, 15, 30, 0.6);
  border: 1px solid rgba(0, 240, 255, 0.15);
  border-radius: 16px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  flex: 0 0 380px;
  max-width: 100%;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
}

.glass-generator-tool .tool-controls h2 {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.25rem;
  color: var(--accent, #00f0ff);
  margin-top: 0;
  margin-bottom: 0.5rem;
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
  border-bottom: 1px solid rgba(0, 240, 255, 0.2);
  padding-bottom: 0.75rem;
}

.glass-generator-tool .control-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.glass-generator-tool .control-group label {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-primary, #ffffff);
  display: flex;
  justify-content: space-between;
}

.glass-generator-tool .control-group label span {
  color: var(--accent, #00f0ff);
  font-family: monospace;
  font-weight: bold;
}

/* Color Picker & Preset Row */
.glass-generator-tool .color-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.glass-generator-tool input[type="color"] {
  -webkit-appearance: none;
  border: none;
  width: 42px;
  height: 38px;
  border-radius: 8px;
  cursor: pointer;
  background: transparent;
  padding: 0;
}

.glass-generator-tool input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

.glass-generator-tool input[type="color"]::-webkit-color-swatch {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.5);
}

.glass-generator-tool .preset-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary, #cccccc);
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
  flex: 1;
  text-align: center;
}

.glass-generator-tool .preset-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.glass-generator-tool .preset-btn.active {
  background: rgba(0, 240, 255, 0.1);
  border-color: var(--accent, #00f0ff);
  color: var(--accent, #00f0ff);
  box-shadow: 0 0 8px rgba(0, 240, 255, 0.2);
}

/* Background Selector */
.glass-generator-tool .bg-selector {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}

.glass-generator-tool .bg-preset-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary, #cccccc);
  padding: 0.5rem;
  border-radius: 8px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.glass-generator-tool .bg-preset-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.glass-generator-tool .bg-preset-btn.active {
  background: rgba(0, 240, 255, 0.15);
  border-color: var(--accent, #00f0ff);
  color: var(--accent, #00f0ff);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.2);
}

/* Range Input styling overrides */
.glass-generator-tool input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.1);
  outline: none;
  margin: 10px 0;
}

.glass-generator-tool input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent, #00f0ff);
  cursor: pointer;
  box-shadow: 0 0 8px rgba(0, 240, 255, 0.6);
  transition: transform 0.1s ease;
}

.glass-generator-tool input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

/* Preview Stage Container */
.preview-stage-container {
  flex: 1;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  align-self: stretch;
}

.preview-stage {
  width: 100%;
  height: 480px;
  min-height: 480px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.6);
  transition: background 0.4s ease;
}

/* Preview Background Options */
.preview-stage[data-bg="blobs"] {
  background: #070913;
}

.preview-stage[data-bg="solid"] {
  background: #0f131a;
  border-color: rgba(255, 255, 255, 0.05);
}

.preview-stage[data-bg="gradient"] {
  background: linear-gradient(135deg, #1b0a2a 0%, #031e24 100%);
}

.preview-stage[data-bg="grid"] {
  background-color: #070913;
  background-image: 
    linear-gradient(rgba(0, 240, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 240, 255, 0.04) 1px, transparent 1px);
  background-size: 24px 24px;
  background-position: center;
}

.preview-stage[data-bg="grid"]::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at center, transparent 30%, rgba(7, 9, 19, 0.85) 100%);
  pointer-events: none;
}

/* Drifting Blobs elements */
.preview-stage .blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(50px);
  opacity: 0.55;
  pointer-events: none;
  mix-blend-mode: screen;
}

.preview-stage .blob-1 {
  width: 160px;
  height: 160px;
  background: radial-gradient(circle, #ff007f 0%, transparent 70%);
  top: 15%;
  left: 20%;
  animation: drift-1 16s infinite alternate ease-in-out;
}

.preview-stage .blob-2 {
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, #00f0ff 0%, transparent 70%);
  bottom: 15%;
  right: 20%;
  animation: drift-2 20s infinite alternate ease-in-out;
}

.preview-stage .blob-3 {
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, #9d4edd 0%, transparent 70%);
  top: 50%;
  left: 45%;
  animation: drift-3 12s infinite alternate ease-in-out;
}

@keyframes drift-1 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(60px, 40px) scale(1.2); }
}

@keyframes drift-2 {
  0% { transform: translate(0, 0) scale(1.1); }
  100% { transform: translate(-80px, -30px) scale(0.9); }
}

@keyframes drift-3 {
  0% { transform: translate(0, 0) scale(0.9); }
  100% { transform: translate(-30px, 50px) scale(1.2); }
}

/* Accessiblity: Stop drifting if reduced-motion active */
@media (prefers-reduced-motion: reduce) {
  .preview-stage .blob {
    animation: none !important;
  }
}
.reduced-motion .preview-stage .blob {
  animation: none !important;
}

/* Glass Card */
.glass-card {
  width: 320px;
  max-width: 90%;
  padding: 1.75rem;
  z-index: 5;
  position: relative;
  box-sizing: border-box;
}

.card-glow {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0.15;
  background: radial-gradient(800px circle at var(--x, 0px) var(--y, 0px), rgba(255, 255, 255, 0.4), transparent 40%);
}

.glass-card .card-content {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.glass-card .card-badge {
  font-family: 'Orbitron', sans-serif;
  align-self: flex-start;
  background: rgba(0, 240, 255, 0.15);
  border: 1px solid rgba(0, 240, 255, 0.4);
  color: var(--accent, #00f0ff);
  font-size: 0.7rem;
  font-weight: bold;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  letter-spacing: 1.5px;
}

.glass-card h3 {
  font-family: 'Orbitron', sans-serif;
  margin: 0;
  font-size: 1.4rem;
  color: #ffffff;
  letter-spacing: 0.5px;
}

.glass-card p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.8);
}

.glass-card .card-mock-field {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.glass-card .mock-label {
  font-size: 0.65rem;
  font-weight: bold;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.5);
}

.glass-card .mock-value {
  font-family: monospace;
  font-size: 0.85rem;
  color: var(--accent, #00f0ff);
}

.glass-card .mock-btn {
  background: var(--accent, #00f0ff);
  color: #070913;
  border: none;
  font-family: 'Orbitron', sans-serif;
  font-weight: bold;
  font-size: 0.85rem;
  padding: 0.8rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
  letter-spacing: 1px;
}

.glass-card .mock-btn:hover {
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.4);
  transform: translateY(-1px);
}

/* Code Exporters Grid Layout */
.exporters-layout {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-top: 1rem;
}

@media (max-width: 768px) {
  .exporters-layout {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

.exporter-panel {
  background: rgba(10, 15, 30, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.exporter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.exporter-header h3 {
  font-family: 'Orbitron', sans-serif;
  font-size: 1rem;
  color: var(--accent, #00f0ff);
  margin: 0;
}

.copy-btn {
  background: transparent;
  color: var(--accent, #00f0ff);
  border: 1px solid var(--accent, #00f0ff);
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  font-size: 0.8rem;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s ease;
}

.copy-btn:hover {
  background: rgba(0, 240, 255, 0.1);
  box-shadow: 0 0 8px rgba(0, 240, 255, 0.2);
}

.copy-btn.copied {
  color: #00ff66;
  border-color: #00ff66;
  background: rgba(0, 255, 102, 0.1);
}

.exporter-panel pre {
  margin: 0;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 1rem;
  overflow-x: auto;
}

.exporter-panel code {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.9rem;
  color: #eceff4;
  line-height: 1.6;
}

/* Info Section Styling */
.info-section {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 2rem;
  margin-top: 2rem;
}

.info-section h2 {
  font-family: 'Orbitron', sans-serif;
  color: #ffffff;
  font-size: 1.4rem;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.info-section p {
  color: var(--text-secondary, #cccccc);
  line-height: 1.7;
}

.info-section code {
  background: rgba(255, 255, 255, 0.06);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-family: monospace;
  color: var(--accent, #00f0ff);
}
