/* AMRI.TECH STREAM TERMINAL - MATRIX/HACKER THEME */
@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;500;600;700&family=VT323&display=swap');

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Fira Code', 'Courier New', monospace;
  background: #000000;
  color: #00ff00;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* CRT Overlay Effects */
.crt-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 0%, rgba(0,0,0,0.3) 100%);
  z-index: 1000;
}

.scanlines {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.15),
    rgba(0, 0, 0, 0.15) 1px,
    transparent 1px,
    transparent 2px
  );
  z-index: 999;
}

/* Terminal Header */
.terminal-header {
  background: linear-gradient(180deg, #0a0a0a 0%, #0d0d0d 100%);
  border-bottom: 2px solid #00ff00;
  padding: 20px;
  text-align: center;
  position: relative;
}

.ascii-logo {
  color: #00ff00;
  font-family: 'VT323', monospace;
  font-size: 14px;
  line-height: 1.2;
  margin: 0;
  text-shadow: 0 0 10px #00ff00, 0 0 20px #00ff00;
  animation: glow 2s ease-in-out infinite alternate, glitch 4s infinite;
}

@keyframes glow {
  from { text-shadow: 0 0 10px #00ff00, 0 0 20px #00ff00; }
  to { text-shadow: 0 0 20px #00ff00, 0 0 30px #00ff00, 0 0 40px #00ff00; }
}

@keyframes glitch {
  0%, 90%, 100% { transform: translate(0); filter: none; }
  91% { transform: translate(-2px, 1px); filter: hue-rotate(90deg); }
  92% { transform: translate(2px, -1px); filter: hue-rotate(-90deg); }
  93% { transform: translate(-1px, 2px); filter: none; }
  94% { transform: translate(1px, -2px); filter: hue-rotate(45deg); }
}

.terminal-status {
  margin-top: 15px;
  font-size: 12px;
  color: #00ff00;
}

.status-blink {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: #00ff00;
  border-radius: 50%;
  margin-right: 8px;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

.ip {
  color: #00ffff;
  font-family: 'Fira Code', monospace;
}

.terminal-info {
  margin-top: 10px;
  font-size: 11px;
  color: #00ff00;
  letter-spacing: 2px;
  text-shadow: 0 0 5px #00ff00;
}

/* Terminal Layout */
.terminal-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  padding: 16px;
  max-width: 1400px;
  margin: 0 auto;
}

/* Terminal Window */
.terminal-window {
  background: #0a0a0a;
  border: 2px solid #00ff00;
  border-radius: 0;
  box-shadow: 0 0 20px rgba(0, 255, 0, 0.3), inset 0 0 50px rgba(0, 255, 0, 0.05);
  overflow: hidden;
}

.window-bar {
  background: linear-gradient(90deg, #1a1a1a 0%, #0d0d0d 100%);
  border-bottom: 1px solid #00ff00;
  padding: 8px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.window-title {
  color: #00ff00;
  font-size: 12px;
  font-family: 'Fira Code', monospace;
  text-shadow: 0 0 5px #00ff00;
}

.window-controls {
  display: flex;
  gap: 8px;
}

.control {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  cursor: pointer;
}

.control.close {
  background: #ff0000;
  box-shadow: 0 0 5px #ff0000;
}

.control.minimize {
  background: #ffff00;
  box-shadow: 0 0 5px #ffff00;
}

.control.maximize {
  background: #00ff00;
  box-shadow: 0 0 5px #00ff00;
}

.window-content {
  padding: 16px;
}

/* Command Line */
.command-line {
  background: #0d0d0d;
  border: 1px solid #00ff00;
  padding: 12px;
  margin-bottom: 12px;
  font-family: 'Fira Code', monospace;
}

.prompt {
  color: #00ffff;
  margin-right: 8px;
  font-weight: 600;
}

.kind-row {
  display: flex;
  gap: 20px;
  margin: 12px 0;
  flex-wrap: wrap;
}

.kind-row label {
  color: #00ff00;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}

.kind-row input[type="radio"] {
  accent-color: #00ff00;
  background: #0a0a0a;
  border: 1px solid #00ff00;
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.search-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
}

.search-row input {
  flex: 1;
  background: #0a0a0a;
  border: 1px solid #00ff00;
  color: #00ff00;
  font-family: 'Fira Code', monospace;
  padding: 10px 12px;
  font-size: 13px;
  outline: none;
  transition: all 0.3s;
}

.search-row input:focus {
  box-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
  border-color: #00ffff;
}

.search-row input::placeholder {
  color: #008800;
}

.search-row button {
  background: #00ff00;
  border: 1px solid #00ff00;
  color: #000;
  font-family: 'Fira Code', monospace;
  font-weight: 600;
  padding: 10px 20px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s;
}

.search-row button:hover {
  background: #00ffff;
  border-color: #00ffff;
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.5);
}

/* Terminal Output */
.terminal-output {
  background: #0d0d0d;
  border: 1px solid #003300;
  min-height: 200px;
  padding: 12px;
}

.status {
  min-height: 24px;
  color: #00ff00;
  font-size: 13px;
  font-family: 'Fira Code', monospace;
  margin-bottom: 12px;
}

.status.error {
  color: #ff0000;
  text-shadow: 0 0 5px #ff0000;
}

/* Results Grid */
.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.result-item {
  border: 1px solid #00ff00;
  overflow: hidden;
  background: #0a0a0a;
  cursor: pointer;
  transition: all 0.3s;
}

.result-item:hover {
  border-color: #00ffff;
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
  transform: translateY(-2px);
}

.result-item img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  display: block;
  background: #050505;
  filter: grayscale(20%) contrast(1.1);
}

.result-meta {
  padding: 10px;
  background: #0d0d0d;
  border-top: 1px solid #00ff00;
}

.result-title {
  font-size: 13px;
  font-weight: 600;
  color: #00ff00;
  margin-bottom: 4px;
}

.result-year {
  color: #008800;
  font-size: 12px;
  font-family: 'Fira Code', monospace;
}

.hidden {
  display: none !important;
}

/* Detail Panel */
.detail-panel {
  margin-top: 16px;
}

.detail-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #00ff00;
}

.detail-head h2 {
  margin: 0;
  font-size: 16px;
  color: #00ff00;
  font-family: 'Fira Code', monospace;
}

.code-tag {
  color: #00ffff;
  font-weight: 600;
}

/* TV Controls */
.tv-controls {
  display: flex;
  gap: 12px;
  margin: 12px 0;
  flex-wrap: wrap;
}

.tv-controls label {
  color: #00ff00;
  font-size: 12px;
  font-family: 'Fira Code', monospace;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tv-controls select {
  background: #0a0a0a;
  border: 1px solid #00ff00;
  color: #00ff00;
  font-family: 'Fira Code', monospace;
  padding: 8px 12px;
  font-size: 12px;
  outline: none;
  cursor: pointer;
  min-width: 150px;
}

.tv-controls select:focus {
  border-color: #00ffff;
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

/* Provider Filters */
.provider-filters {
  display: flex;
  gap: 8px;
  margin: 12px 0;
  flex-wrap: wrap;
}

.provider-filter {
  background: #0a0a0a;
  border: 1px solid #00ff00;
  color: #00ff00;
  font-family: 'Fira Code', monospace;
  font-size: 12px;
  padding: 8px 16px;
  cursor: pointer;
  transition: all 0.3s;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.provider-filter:hover {
  border-color: #00ffff;
  color: #00ffff;
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

.provider-filter.active {
  background: #00ff00;
  color: #000;
  border-color: #00ff00;
  box-shadow: 0 0 15px rgba(0, 255, 0, 0.5);
}

/* Audio Track Controls */
.audio-track-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 0;
}

.audio-track-controls label {
  color: #00ff00;
  font-size: 12px;
  font-family: 'Fira Code', monospace;
}

.audio-track-controls select {
  background: #0a0a0a;
  border: 1px solid #00ff00;
  color: #00ff00;
  font-family: 'Fira Code', monospace;
  padding: 8px 12px;
  font-size: 12px;
  outline: none;
  cursor: pointer;
}

/* Video */
.video {
  width: 100%;
  margin: 12px 0;
  background: #000;
  border: 1px solid #00ff00;
  box-shadow: 0 0 20px rgba(0, 255, 0, 0.2);
}

/* iFrame Player */
.iframe-player {
  width: 100%;
  height: 500px;
  margin: 12px 0;
  background: #000;
  border: 1px solid #00ff00;
  box-shadow: 0 0 20px rgba(0, 255, 0, 0.2);
}

/* Streams List */
.streams-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stream-item {
  border: 1px solid #00ff00;
  padding: 12px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  background: #0a0a0a;
  transition: all 0.3s;
}

.stream-item:hover {
  border-color: #00ffff;
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

.stream-info {
  min-width: 0;
  flex: 1;
}

.stream-title {
  font-size: 13px;
  font-weight: 600;
  color: #00ff00;
  margin-bottom: 4px;
}

.stream-lang {
  font-size: 11px;
  color: #00ffff;
  font-family: 'Fira Code', monospace;
  margin-top: 4px;
}

.stream-sub {
  font-size: 11px;
  color: #ff00ff;
  font-family: 'Fira Code', monospace;
  margin-top: 2px;
}

.stream-url {
  font-size: 10px;
  color: #008800;
  font-family: 'Fira Code', monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 500px;
  margin-top: 4px;
  word-break: break-all;
}

.stream-actions {
  display: flex;
  gap: 8px;
}

.stream-actions button {
  background: #0a0a0a;
  border: 1px solid #00ff00;
  color: #00ff00;
  font-family: 'Fira Code', monospace;
  font-size: 11px;
  padding: 8px 16px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s;
}

.stream-actions button:hover {
  background: #00ff00;
  color: #000;
  box-shadow: 0 0 15px rgba(0, 255, 0, 0.5);
}

/* Terminal Footer */
.terminal-footer {
  background: #0a0a0a;
  border-top: 2px solid #00ff00;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Fira Code', monospace;
  font-size: 12px;
}

.footer-line {
  color: #00ff00;
}

.typing-cursor {
  width: 10px;
  height: 18px;
  background: #00ff00;
  animation: blink-cursor 0.7s step-end infinite;
}

@keyframes blink-cursor {
  50% { opacity: 0; }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: #0a0a0a;
  border: 1px solid #003300;
}

::-webkit-scrollbar-thumb {
  background: #00ff00;
  border: 1px solid #00ff00;
}

::-webkit-scrollbar-thumb:hover {
  background: #00ffff;
  border-color: #00ffff;
}
