/* Critical path CSS - inline for instant render */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body { 
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: #181818;
  color: #fafafa;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
#root { min-height: 100%; display: flex; flex-direction: column; }

/* Layout */
.container { width: 100%; max-width: 1400px; margin: 0 auto; padding: 0 2rem; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-4 { gap: 1rem; }
.gap-2 { gap: 0.5rem; }
.p-4 { padding: 1rem; }
.p-2 { padding: 0.5rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mt-4 { margin-top: 1rem; }
.w-full { width: 100%; }
.h-full { height: 100%; }
.min-h-screen { min-height: 100vh; }

/* Header */
header { 
  background-color: #181818; 
  border-bottom: 1px solid #2a2a2a;
  position: sticky;
  top: 0;
  z-index: 50;
}
nav { display: flex; align-items: center; justify-content: space-between; padding: 1rem 0; }

/* Typography */
.text-sm { font-size: 0.875rem; }
.text-base { font-size: 1rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.text-center { text-align: center; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Button */
button, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.375rem;
  font-weight: 500;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
  padding: 0.5rem 1rem;
  background-color: #ff9900;
  color: #181818;
  font-size: 0.875rem;
  line-height: 1.25rem;
}
button:hover, .button:hover { opacity: 0.9; transform: translateY(-1px); }
button:active, .button:active { transform: translateY(0); }

/* Grid */
.grid { 
  display: grid; 
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

/* Mobile-optimized grid */
@media (max-width: 400px) {
  .grid { 
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

@media (min-width: 401px) and (max-width: 640px) {
  .grid { 
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
}

/* Card */
.card {
  background-color: #232323;
  border-radius: 0.5rem;
  overflow: hidden;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}
.card:hover { transform: translateY(-4px); box-shadow: 0 4px 12px rgba(0,0,0,0.25); }

/* Image */
img {
  display: block;
  max-width: 100%;
  height: auto;
}
.object-cover { object-fit: cover; }
.aspect-video { aspect-ratio: 16/9; }
.rounded { border-radius: 0.375rem; }
.rounded-lg { border-radius: 0.5rem; }

/* Skeleton loader */
.skeleton { 
  background: linear-gradient(90deg, #1a1a1a 25%, #2a2a2a 50%, #1a1a1a 75%); 
  background-size: 200% 100%; 
  animation: loading 1.5s ease-in-out infinite;
  border-radius: 0.375rem;
}
@keyframes loading { 
  0% { background-position: 200% 0; } 
  100% { background-position: -200% 0; } 
}

/* Spacing utilities */
.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-4 > * + * { margin-top: 1rem; }

/* Link */
a { color: inherit; text-decoration: none; }
a:hover { opacity: 0.8; }

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  background-color: #ff9900;
  color: #181818;
}

/* Responsive */
@media (max-width: 768px) {
  .container { padding: 0 0.75rem; }
  button, .button { 
    padding: 0.625rem 1rem; 
    min-height: 44px;
    min-width: 44px;
  }
}

@media (max-width: 640px) {
  .container { padding: 0 0.5rem; }
  header { padding: 0.75rem 0; }
}
