/* CSS Variables */
:root {
  /* Colors */
  --primary-color: #007bff;
  --bg-primary: #ffffff;
  --bg-secondary: #f5f5f5;
  --text-primary: #1a1a1a;
  --text-secondary: #666666;
  --border-color: #e0e0e0;
  --overlay-bg: rgba(0, 0, 0, 0.05);
  --progress-bg: rgba(255, 255, 255, 0.3);
  --progress-fill: #A020F0;
  --thumbnail-bg: #ffffff;
  --thumbnail-shadow: rgba(0, 0, 0, 0.1);

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s ease;

  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;

  /* Z-index */
  --z-controls: 10;
  --z-progress: 20;
  --z-thumbnail: 30;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  transition: background-color var(--transition-normal), color var(--transition-normal);
  overflow: hidden;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

/* Utility classes */
.hidden {
  display: none !important;
}

.fade-in {
  opacity: 0;
  animation: fadeIn var(--transition-normal) forwards;
}

.fade-out {
  opacity: 1;
  animation: fadeOut var(--transition-normal) forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

@keyframes fadeOut {
  to {
    opacity: 0;
  }
}
