/* Gotham Vault - Responsive Styles */

/* Base styles */
* {
  box-sizing: border-box;
}

/* Override max-width constraints for larger screens */
@media (min-width: 768px) {
  /* Main container - override the 480px max-width */
  div[style*="maxWidth: 480px"],
  div[style*="max-width: 480px"] {
    max-width: 720px !important;
  }
}

@media (min-width: 1024px) {
  div[style*="maxWidth: 480px"],
  div[style*="max-width: 480px"] {
    max-width: 960px !important;
  }
}

@media (min-width: 1280px) {
  div[style*="maxWidth: 480px"],
  div[style*="max-width: 480px"] {
    max-width: 1200px !important;
  }
}

/* Comic cards grid layout for larger screens */
@media (min-width: 768px) {
  /* Make the comic list a grid */
  div[style*="display: flex"] > div[style*="background: #12122a"] {
    width: calc(50% - 8px) !important;
  }
}

@media (min-width: 1024px) {
  div[style*="display: flex"] > div[style*="background: #12122a"] {
    width: calc(33.333% - 14px) !important;
  }
}

@media (min-width: 1280px) {
  div[style*="display: flex"] > div[style*="background: #12122a"] {
    width: calc(25% - 18px) !important;
  }
}

/* Mobile adjustments */
@media (max-width: 767px) {
  /* Ensure content doesn't overflow */
  body {
    overflow-x: hidden;
  }
  
  /* Smaller padding on mobile */
  div[style*="padding: 16px 20px"] {
    padding: 12px 16px !important;
  }
  
  /* Stack filter buttons better */
  div[style*="flexWrap: wrap"] {
    gap: 8px !important;
  }
}

/* Better tab bar on larger screens */
@media (min-width: 768px) {
  button[style*="flex: 1"] {
    padding: 12px 16px !important;
    font-size: 12px !important;
  }
}

/* Character grid improvements */
@media (min-width: 768px) {
  div[style*="display: grid"] {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (min-width: 1024px) {
  div[style*="display: grid"] {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}

/* Improve readability on larger screens */
@media (min-width: 1024px) {
  div[style*="fontSize: 14px"] {
    font-size: 15px !important;
  }
  
  div[style*="fontSize: 12px"] {
    font-size: 13px !important;
  }
}

/* Touch-friendly targets on mobile */
@media (pointer: coarse) {
  button,
  input,
  div[style*="cursor: pointer"] {
    min-height: 44px;
  }
}

/* Prevent horizontal scroll */
html, body {
  overflow-x: hidden;
  max-width: 100%;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Better text rendering */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Fix for very large screens */
@media (min-width: 1600px) {
  div[style*="maxWidth: 480px"],
  div[style*="max-width: 480px"] {
    max-width: 1400px !important;
  }
}

/* Remove white border around the app */
html, body, #root {
  margin: 0 !important;
  padding: 0 !important;
  background: #0a0a14 !important;
  min-height: 100vh;
  width: 100%;
}

/* Ensure no border on main containers */
#root > div {
  border: none !important;
  box-shadow: none !important;
}

/* Fix for mobile browsers (iOS Safari, Chrome) */
body {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Remove any safe area insets that might cause borders */
@supports (padding: max(0px)) {
  body {
    padding-left: env(safe-area-inset-left, 0);
    padding-right: env(safe-area-inset-right, 0);
    padding-top: env(safe-area-inset-top, 0);
    padding-bottom: env(safe-area-inset-bottom, 0);
  }
}
