:root {
  --ambient-color: #000;
  --neon-primary: #00ffcc;
  --neon-secondary: #00ddaa;
  --bg-dark: #0a0a0f;
  --bg-darker: #090913;
  --bg-light: #1d1d27;
  --border-color: #2a2a3d;
  --text-light: #e0e0e0;
  --error-color: #ff4c4c;
}

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

body {
  min-height: 100vh;
  font-family: 'Arial', sans-serif;
  background: linear-gradient(145deg, var(--bg-dark), var(--bg-light));
  color: var(--text-light);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-x: hidden;
  padding: 20px;
}

.container {
  text-align: center;
  background: rgba(10, 10, 15, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 0 20px 4px var(--bg-darker);
  max-width: 800px;
  width: 90%;
  transition: all 0.3s ease;
}

.title {
  font-size: 1.8rem;
  margin-bottom: 25px;
  color: var(--text-light);
  text-shadow: 
    0 0 10px cyan,
    0 0 20px blue,
    0 0 30px rgba(0, 255, 255, 0.3);
  letter-spacing: 1px;
}

.input-group {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
  padding: 0 20px;
}

.input {
  flex: 1;
  min-width: 200px;
  padding: 12px 15px;
  font-size: 1rem;
  color: var(--text-light);
  background: rgba(15, 15, 25, 0.95);
  border: 1px solid #444;
  border-radius: 5px;
  outline: none;
  transition: all 0.3s ease;
}

.input:focus {
  border-color: var(--neon-primary);
  box-shadow: 
    0 0 10px var(--neon-primary),
    0 0 20px rgba(0, 255, 204, 0.3);
}

.button {
  padding: 12px 25px;
  font-size: 1rem;
  color: var(--bg-dark);
  background: var(--neon-primary);
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 
    0 0 10px var(--neon-primary),
    0 0 20px var(--neon-primary) inset;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.button:hover {
  background: var(--neon-secondary);
  box-shadow: 
    0 0 15px var(--neon-secondary),
    0 0 30px var(--neon-secondary) inset;
  transform: translateY(-2px);
}

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

.error {
  margin: 15px 0;
  color: var(--error-color);
  text-shadow: 
    0 0 10px var(--error-color),
    0 0 20px rgba(255, 76, 76, 0.5);
  min-height: 20px;
  font-size: 0.9rem;
}

.loading {
  margin: 15px 0;
  color: var(--neon-primary);
  font-size: 1.2rem;
  text-shadow: 
    0 0 10px var(--neon-primary),
    0 0 20px rgba(0, 255, 204, 0.5);
  display: none;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { opacity: 0.6; }
  50% { opacity: 1; }
  100% { opacity: 0.6; }
}

.output {
  margin-top: 25px;
  width: 100%;
  min-height: 50px;
  position: relative;
}

.output img,
.output video,
.output audio,
.output iframe,
.output pre {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--neon-primary);
  border-radius: 10px;
  box-shadow: 
    0 0 15px var(--neon-primary),
    0 0 30px rgba(0, 255, 204, 0.2);
  transition: all 0.3s ease;
}

.output pre {
  text-align: left;
  background: rgba(15, 15, 25, 0.95);
  padding: 20px;
  overflow-x: auto;
  white-space: pre-wrap;
  font-family: monospace;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text-light);
}

.player-wrapper {
  position: relative;
  display: inline-block;
  overflow: hidden;
  border-radius: 10px;
  width: 100%;
  transition: all 0.3s ease;
  background: var(--bg-dark);
}

.player-wrapper.paused {
  box-shadow: 
    0 0 30px var(--bg-dark),
    0 0 60px rgba(10, 10, 15, 0.3);
}

.player-wrapper:not(.paused) {
  box-shadow: 
    0 0 30px var(--ambient-color),
    0 0 60px var(--ambient-color);
}

#player {
  width: 100%;
  height: auto;
  background: var(--bg-dark);
  outline: none;
  display: block;
}

#ambient-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
}

.plyr {
  width: 100%;
  --plyr-color-main: var(--neon-primary);
  --plyr-video-background: var(--bg-dark);
  --plyr-menu-background: rgba(10, 10, 15, 0.95);
  --plyr-menu-color: var(--text-light);
  --plyr-tooltip-background: rgba(10, 10, 15, 0.95);
  --plyr-tooltip-color: var(--text-light);
}

.plyr--video {
  border-radius: 10px;
  overflow: hidden;
}

@media (max-width: 768px) {
  .container {
    padding: 20px;
    width: 95%;
  }

  .title {
    font-size: 1.5rem;
    margin-bottom: 20px;
  }
}

@media (max-width: 480px) {
  .input-group {
    flex-direction: column;
    gap: 10px;
    padding: 0 10px;
  }

  .input {
    width: 100%;
    min-width: unset;
  }

  .button {
    width: 100%;
    padding: 10px 20px;
  }

  .title {
    font-size: 1.3rem;
  }
}

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

::-webkit-scrollbar-track {
  background: var(--bg-dark);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: var(--neon-primary);
  border-radius: 4px;
  transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--neon-secondary);
}

::selection {
  background: var(--neon-primary);
  color: var(--bg-dark);
}
