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

body {
  background: #0a0a0f;
  color: #e0e0e0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  min-height: 100vh;
}

#app {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px;
}

header {
  text-align: center;
  padding: 20px 0;
}

header h1 {
  font-size: 2em;
  color: #00d4ff;
  letter-spacing: -1px;
}

.subtitle {
  color: #666;
  font-size: 0.9em;
  margin-top: 4px;
}

/* Player Container */
#player-container {
  position: relative;
  background: #111118;
  border-radius: 12px;
  overflow: hidden;
  min-height: 400px;
  border: 1px solid #1a1a25;
}

/* Drop Zone */
#drop-zone {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  border: 2px dashed #2a2a3a;
  border-radius: 12px;
  margin: 20px;
  transition: all 0.3s ease;
}

#drop-zone.drag-over {
  border-color: #00d4ff;
  background: rgba(0, 212, 255, 0.05);
}

.drop-content {
  text-align: center;
  padding: 40px;
}

.drop-icon {
  font-size: 3em;
  margin-bottom: 16px;
}

.drop-or {
  color: #444;
  margin: 16px 0;
  font-size: 0.85em;
}

.input-row {
  margin: 12px 0;
  display: flex;
  gap: 8px;
  justify-content: center;
}

#url-input {
  width: 380px;
  padding: 10px 16px;
  background: #1a1a25;
  border: 1px solid #2a2a3a;
  border-radius: 8px;
  color: #e0e0e0;
  font-size: 0.9em;
  outline: none;
  transition: border-color 0.2s;
}

#url-input:focus {
  border-color: #00d4ff;
}

#url-load-btn {
  padding: 10px 20px;
  background: #00d4ff;
  color: #000;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}

#url-load-btn:hover {
  opacity: 0.85;
}

.file-btn {
  display: inline-block;
  padding: 10px 24px;
  background: #1a1a25;
  border: 1px solid #2a2a3a;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.file-btn:hover {
  border-color: #00d4ff;
  color: #00d4ff;
}

.file-btn input {
  display: none;
}

.supported-formats {
  color: #444;
  font-size: 0.8em;
  margin-top: 20px;
}

/* Video Area */
#video-area {
  position: relative;
}

#canvas-container {
  display: flex;
  justify-content: center;
  align-items: center;
  background: #000;
  min-height: 360px;
}

#canvas-container canvas {
  max-width: 100%;
  max-height: 70vh;
  display: block;
}

/* Controls */
#controls {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.7);
}

#play-btn, #back-btn {
  background: none;
  border: none;
  color: #e0e0e0;
  font-size: 1.4em;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s;
}

#play-btn:hover, #back-btn:hover {
  background: rgba(255,255,255,0.1);
  color: #00d4ff;
}

#progress-container {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
}

#progress-bar {
  flex: 1;
  height: 6px;
  background: #2a2a3a;
  border-radius: 3px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

#progress-fill {
  height: 100%;
  background: #00d4ff;
  border-radius: 3px;
  width: 0%;
  transition: width 0.1s linear;
}

#time-display {
  font-size: 0.8em;
  color: #888;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  min-width: 90px;
}

/* Loading */
#loading {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(10, 10, 15, 0.9);
  z-index: 10;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #2a2a3a;
  border-top-color: #00d4ff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

#loading-text {
  margin-top: 16px;
  color: #888;
  font-size: 0.9em;
}

/* Info Panel */
#info-panel {
  margin-top: 20px;
  background: #111118;
  border-radius: 12px;
  padding: 20px;
  border: 1px solid #1a1a25;
}

#info-panel h3 {
  color: #00d4ff;
  font-size: 0.85em;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
  margin-top: 16px;
}

#info-panel h3:first-child {
  margin-top: 0;
}

.info-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid #1a1a25;
  font-size: 0.85em;
}

.info-label {
  color: #666;
}

.info-value {
  color: #ccc;
  font-family: 'SF Mono', 'Fira Code', monospace;
}

.info-value.ok { color: #4caf50; }
.info-value.warn { color: #ff9800; }
.info-value.fail { color: #f44336; }

/* Visibility helpers */
.hidden { display: none !important; }
.visible { display: flex !important; }

/* Footer */
footer {
  text-align: center;
  padding: 24px 0;
  color: #333;
  font-size: 0.8em;
  line-height: 1.6;
}

/* Responsive */
@media (max-width: 600px) {
  #url-input { width: 200px; }
  #app { padding: 12px; }
  header h1 { font-size: 1.5em; }
}
