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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.container {
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  width: 100%;
  max-width: min(90vw, calc(90vh * 9 / 16)); /* Maintain 9:16 ratio */
  aspect-ratio: 9 / 16; /* 9:16 aspect ratio (portrait) */
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
}

header {
  background: linear-gradient(135deg, #000000 0%, #333333 100%);
  color: white;
  padding: 15px 20px;
  text-align: center;
  flex-shrink: 0;
  min-height: fit-content;
}

header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: 2px;
}

main {
  padding: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0; /* Important for flex children */
}

.image-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  flex: 1;
  overflow: hidden;
  min-height: 0; /* Important for flex children */
  padding: 15px;
  box-sizing: border-box;
}

#camaro-image {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
}

#camaro-image:hover {
  transform: scale(1.02);
}

.error-message {
  text-align: center;
  padding: 40px;
  color: #666;
}

.error-message p {
  margin: 15px 0;
  font-size: 1.1rem;
}

.error-message p:first-child {
  font-size: 1.5rem;
  font-weight: bold;
  color: #e74c3c;
}

.error-message code {
  background: #f4f4f4;
  padding: 4px 8px;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  color: #333;
}

@media (max-width: 768px) {
  .container {
    max-width: 100vw; /* Full width on mobile */
    max-height: 100vh; /* Full height on mobile */
    aspect-ratio: 9 / 16; /* Maintain ratio on mobile too */
  }
  
  header {
    padding: 12px 15px;
  }
  
  header h1 {
    font-size: 1.5rem;
  }
  
  .image-container {
    padding: 10px;
  }
  
  .error-message {
    padding: 20px;
  }
  
  .error-message p {
    font-size: 1rem;
  }
}

/* Fallback for browsers that don't support aspect-ratio */
@supports not (aspect-ratio: 9 / 16) {
  .container {
    max-width: min(90vw, calc(90vh * 9 / 16));
    height: calc(min(90vw, calc(90vh * 9 / 16)) * 16 / 9); /* Maintain 9:16 ratio */
  }
}
