/* Animatics Player Styles */
:root {
  --animatics-bg: #1a1a1a;
  --animatics-controls-bg: #2d2d2d;
  --animatics-text: #ffffff;
  --animatics-muted: #a0a0a0;
  --animatics-primary: #007bff;
  --animatics-secondary: #6c757d;
  --animatics-border: #404040;
  --animatics-shadow: rgba(0, 0, 0, 0.3);
}

.animatics-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
}

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

.animatics-title-group h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0 0 8px 0;
  color: var(--color-text);
}

.animatics-title-group h2 {
  font-size: 1.25rem;
  font-weight: 400;
  margin: 0;
  color: var(--color-text-muted);
}

.animatics-main {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
  align-items: start;
}

.animatics-player {
  background: var(--animatics-bg);
  border-radius: 12px;
  box-shadow: 0 8px 32px var(--animatics-shadow);
  overflow: hidden;
}

.animatics-video-area {
  position: relative;
  aspect-ratio: 16/9;
  background: #000;
}

.animatic-shot {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.animatics-shot-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.animatics-shot-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.animatics-shot-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.animatics-shot-placeholder {
  width: 100%;
  height: 100%;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.animatics-placeholder-text {
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
  font-size: 1.125rem;
  line-height: 1.6;
  max-width: 80%;
}

.animatics-subtitle-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px;
  text-align: center;
  color: var(--animatics-text);
}

.animatics-character-name {
  font-weight: 700;
  color: #ffc107;
}

.animatics-dialogue-text {
  font-size: 1rem;
  background: rgba(0, 0, 0, 0.75);
  padding: 10px 16px;
  border-radius: 8px;
  display: inline-block;
  max-width: 80%;
  line-height: 1.4;
}

.animatics-loading {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  color: var(--animatics-text);
}

.animatics-loading-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top: 4px solid var(--animatics-text);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.animatics-controls {
  background: var(--animatics-controls-bg);
  padding: 20px;
}

.animatics-progress-section {
  margin-bottom: 20px;
}

.animatics-progress-bar {
  position: relative;
  height: 8px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  cursor: pointer;
  overflow: hidden;
}

.animatics-progress-fill {
  height: 100%;
  background: var(--animatics-primary);
  width: 0%;
  transition: width 0.1s ease;
}

.animatics-progress-handle {
  position: absolute;
  top: -4px;
  left: 0%;
  transform: translateX(-50%);
  width: 16px;
  height: 16px;
  background: var(--animatics-text);
  border-radius: 50%;
  cursor: pointer;
  transition: left 0.1s ease;
}

.animatics-time-display {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 0.875rem;
  color: var(--animatics-muted);
}

.animatics-playback-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.animatics-control-btn {
  padding: 12px 16px;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--animatics-text);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.animatics-control-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.animatics-control-btn:active {
  transform: translateY(0);
}

.animatics-play-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--animatics-primary);
  font-size: 1.5rem;
}

.animatics-play-btn:hover {
  background: #0056b3;
}

.animatics-play-btn i {
  font-size: 1.5rem;
}

.animatics-scene-info {
  margin-top: 20px;
  text-align: center;
  color: var(--animatics-text);
}

.animatics-scene-info-text {
  font-size: 0.875rem;
  opacity: 0.75;
}

.animatics-sidebar {
  background: var(--bg-white);
  border-radius: 12px;
  box-shadow: 0 4px 16px var(--shadow);
  overflow: hidden;
}

.animatics-sidebar-header {
  padding: 20px;
  background: var(--bg-light-gray);
  border-bottom: 1px solid var(--border-color);
}

.animatics-sidebar-header h5 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-text);
}

.animatics-timeline {
  max-height: 600px;
  overflow-y: auto;
}

.animatics-scene-item {
  display: block;
  width: 100%;
  padding: 16px 20px;
  border: none;
  border-bottom: 1px solid var(--border-color);
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.animatics-scene-item:hover {
  background: var(--bg-light-gray);
}

.animatics-scene-item:active,
.animatics-scene-item.active {
  background: rgba(var(--color-primary-rgb), 0.1);
}

.animatics-scene-item:last-child {
  border-bottom: none;
}

.animatics-scene-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.animatics-scene-badge {
  flex-shrink: 0;
  padding: 0.4em 0.8em;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 0.375rem;
  background: var(--color-secondary);
  color: var(--color-white);
}

.animatics-scene-details {
  flex: 1;
  min-width: 0;
}

.animatics-scene-title {
  font-weight: 600;
  margin: 0 0 4px 0;
  color: var(--color-text);
  font-size: 0.95rem;
}

.animatics-scene-meta {
  font-size: 0.825rem;
  color: var(--color-text-muted);
  margin: 0;
}

.animatics-scene-duration {
  flex-shrink: 0;
  font-size: 0.825rem;
  color: var(--color-text-muted);
}

/* Responsive design */
@media (max-width: 768px) {
  .animatics-main {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .animatics-container {
    padding: 16px;
  }
  
  .animatics-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  
  .animatics-title-group h1 {
    font-size: 2rem;
  }
  
  .animatics-controls {
    padding: 16px;
  }
  
  .animatics-playback-controls {
    gap: 8px;
  }
  
  .animatics-control-btn {
    padding: 10px 12px;
  }
  
  .animatics-play-btn {
    width: 50px;
    height: 50px;
  }
}

/* Utility classes for visibility */
.animatics-hidden {
  display: none !important;
}

.animatics-visible {
  display: block !important;
}