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

/* Ensure mobile-first design */
body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #ddd;
    background-color: #1e1e1e;
    max-width: 100%;
    overflow-x: hidden;
    height:100vh;
    display:flex;
    align-items:center;
    justify-content:center;
}

#box {
    width:360px;
    height:100%;
    background-color:#1e1e1e;
    overflow:scroll;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    scroll-behavior: smooth; /* Smooth scroll behavior */
}

/* Header styles */
h1 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    text-align:center;
    color:#dd3333;
    margin-top:0.5rem;

}

#box2 {
    width:100%;
    display:flex;
    justify-content:space-around;
    flex-wrap:wrap;
    padding:20px 0px;
}

.container {
  display: flex;
  flex-direction: column;
  align-items: center; /* Center horizontally */
  justify-content: center; /* Center vertically, if needed */
  width: 40%; /* 40% of parent div */
  height: 160px; /* Adjust as needed */
  overflow: hidden; /* Handle overflow */
  text-decoration: none; /* Remove underline from link */
  color: inherit; /* Inherit text color */
  margin: 0px 0px 25px 0px;
  transition: transform 0.2s ease-in-out, opacity 0.2s ease-in-out; /* Smooth hover/tap effects */
}

.container:hover,
.container:active {
  transform: scale(1.05); /* Slight zoom on interaction */
  opacity: 0.9; /* Slight fade */
}

.container img {
  max-width: 100%; /* Ensure image fits container width */
  max-height: 80%; /* Limit image height for text */
  object-fit: cover; /* Scale image to cover area */
}

.container p {
  margin: 5px 0 0 0; /* Space between image and text */
  text-align: left;
  white-space: nowrap; /* Keep text in one line */
  overflow: hidden; /* Hide overflow text */
  text-overflow: ellipsis; /* Add ellipsis if text is too long */
  width: 100%; /* Ensure p tag takes full container width */
  box-sizing: border-box; /* Prevent padding/margin issues */
}

/* Mobile-specific optimizations */
@media (max-width: 600px) {
    body {
        font-size: 16px;
    }

    h1 {
        font-size: 1.2rem;
    }
}

/* Disable desktop-specific styles */
@media (min-width: 601px) {
    body {
        display: none; /* Hide content on larger screens */
    }
}
