/* Improved Color Palette */
:root {
  --color-primary: #FACC15;
  --color-primary-dark: #F59E0B;
  --color-success: #10B981;
  --color-info: #3B82F6;
  --color-warning: #F59E0B;
  --color-danger: #EF4444;
  --color-background: #0A0A0A;
  --color-surface: #1A1A1A;
  --color-surface-light: #262626;
  --color-text-primary: #FFFFFF;
  --color-text-secondary: #D4D4D4;
  --color-text-muted: #A3A3A3;
}

/* Better Background Colors */
.bg-gray-950 {
  background-color: #0A0A0A;
}

/* Animations */
@keyframes slide-in {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.animate-slide-in {
  animation: slide-in 0.3s ease-out;
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fade-in 0.3s ease-out;
}

/* Improved Text Colors */
.text-gray-400 {
  color: var(--color-text-secondary);
}

.text-gray-500 {
  color: var(--color-text-muted);
}

/* Better Card Styling */
.bg-gray-900 {
  background-color: var(--color-surface);
}

.bg-gray-800 {
  background-color: var(--color-surface-light);
}

/* Focus States */
button:focus,
a:focus,
input:focus,
textarea:focus,
select:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Loading Skeleton */
.skeleton {
  background: linear-gradient(90deg, #1A1A1A 25%, #262626 50%, #1A1A1A 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Loading Bar Animation */
@keyframes loading-bar {
  0% {
    width: 0%;
  }
  50% {
    width: 70%;
  }
  100% {
    width: 100%;
  }
}

/* Progress Ring */
.progress-ring {
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
}

.progress-ring__circle {
  stroke: var(--color-primary);
  stroke-dasharray: 251.2;
  stroke-dashoffset: 251.2;
  transition: stroke-dashoffset 0.6s ease;
}

/* Mobile Touch Targets */
@media (max-width: 768px) {
  button,
  a,
  input,
  textarea,
  select {
    min-height: 44px;
  }
  
  .touch-target {
    position: relative;
  }
  
  .touch-target::before {
    content: '';
    position: absolute;
    top: -8px;
    right: -8px;
    bottom: -8px;
    left: -8px;
  }
}

/* Improved Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-surface);
}

::-webkit-scrollbar-thumb {
  background: var(--color-surface-light);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #404040;
}

/* Better Form Styling */
input,
textarea,
select {
  background-color: var(--color-background) !important;
  border-color: #404040 !important;
  color: var(--color-text-primary) !important;
}

input::placeholder,
textarea::placeholder {
  color: var(--color-text-muted) !important;
}

/* Improved Button Styles */
.btn-primary {
  background-color: var(--color-primary);
  color: black;
  font-weight: bold;
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  transition: all 0.2s;
}

.btn-primary:hover {
  background-color: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(250, 204, 21, 0.3);
}

.btn-secondary {
  background-color: transparent;
  color: var(--color-text-secondary);
  border: 1px solid #404040;
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background-color: var(--color-surface);
  border-color: #525252;
  color: var(--color-text-primary);
}

/* Video Player Improvements */
.video-container {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
}

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

/* Card Hover Effects */
.card-hover {
  transition: all 0.3s ease;
}

.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.5);
}

/* Success Animation */
@keyframes success-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

.success-pulse {
  animation: success-pulse 2s infinite;
}

/* Tracking UI Color Variables */
:root {
  --tracking-active: #10B981;
  --tracking-paused: #6B7280;
  --tracking-hover: #059669;
  --tracking-panel-bg: rgba(26, 26, 26, 0.95);
  --tracking-glass-effect: blur(12px);
}

/* Emerald color utilities for tracking UI */
.text-emerald-400 {
  color: #34D399;
}

.text-emerald-500 {
  color: #10B981;
}

.text-emerald-600 {
  color: #059669;
}

.bg-emerald-500 {
  background-color: #10B981;
}

.bg-emerald-600 {
  background-color: #059669;
}

.border-emerald-500 {
  border-color: #10B981;
}

/* Cloudflare Video Player Styles */
.cloudflare-stream-iframe {
  width: 100%;
  height: 100%;
  border: none;
  outline: none;
  display: block;
}

.video-main-container {
  width: 100%;
  position: relative;
}

/* Ensure proper aspect ratio is maintained */
.aspect-video {
  aspect-ratio: 16 / 9;
}

/* Loading state for video */
.video-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-surface);
  color: var(--color-text-secondary);
}