/* General Styles */
body {
  margin: 0;
  font-family: 'Consolas', sans-serif;
  background: radial-gradient(circle at 30% 50%, #4e342e, #6d4c41 40%, #8d6e63 70%, #3e2723 100%);
  background-size: cover;
  color: #fff;
  text-transform: uppercase; /* Capitalize everything */
  overflow-x: hidden; /* Prevent horizontal scrolling */
}

/* Main Container */
.main-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  gap: 10px;
  box-sizing: border-box;
}

/* Hide layouts based on screen size */
.desktop-layout {
  display: flex;
}

.mobile-layout {
  display: none;
}

/* Logo Section */
.logo-container {
  margin-bottom: 30px; /* Adjusted spacing */
}

.logo-image {
  width: 300px; /* Adjust size for desktop */
  height: auto;
}

/* Description Section */
.description-container {
  text-align: center;
  position: relative;
  margin-bottom: 20px;
  top: -50px; /* Adjust alignment */
}

.description-text {
  font-size: 20px;
  font-weight: 400;
  color: white;
  line-height: 1.8;
  text-transform: none;
  margin: 0;
}

/* Rectangles Section */
.rectangles {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}

.rectangle-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.rectangle {
  position: relative;
  width: 220px;
  height: 270px;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transform-style: preserve-3d;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.rectangle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 15px;
}

/* 3D Tilt Effect */
.rectangle:hover {
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.rectangle[data-tilt] {
  transform-style: preserve-3d;
  transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.rectangle[data-tilt]:hover {
  transform: perspective(1000px)
    rotateX(calc((var(--mouse-y, 0) - 0.5) * 25deg))
    rotateY(calc((var(--mouse-x, 0) - 0.5) * -25deg));
}

/* Rectangle Label */
.rectangle-label {
  font-family: 'Consolas', sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  position: relative;
  display: inline-block;
  cursor: pointer;
  z-index: 1;
}

/* Marker Highlight Effect */
.rectangle-label::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #ff0000;
  transform: scaleX(0);
  transform-origin: left;
  z-index: -1;
  transition: transform 0.3s ease-in-out;
}

.rectangle-label:hover::before,
.rectangle-label:focus::before {
  transform: scaleX(1);
}

.rectangle-label:hover,
.rectangle-label:focus {
  color: white;
}

/* OR Section */
.or-section {
  margin: 20px 0;
}

.or-text {
  font-family: 'Consolas', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: rgb(119, 255, 0);
}

/* Generate Random Ayah Button */
.random-button {
  font-family: 'Consolas', sans-serif;
  font-size: 20px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 12px 24px;
  border: none;
  background-color: transparent;
  color: white;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  display: inline-block;
}

.random-button:hover {
  color: white;
}

.random-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0%;
  height: 100%;
  background: #ff0000;
  z-index: -1;
  transition: width 0.4s ease-in-out;
}

.random-button:hover::before {
  width: 100%;
}

/* Responsive Design for Smaller Screens */
@media (max-width: 768px) {
  body {
    overflow-y: auto; /* Enable scrolling for mobile */
  }

  .desktop-layout {
    display: none; /* Hide desktop layout on mobile */
  }

  .mobile-layout {
    display: block; /* Enable mobile layout */
  }

  .logo-image {
    width: 120px; /* Smaller logo for mobile */
  }

  .description-container {
    top: -20px; /* Slight adjustment for alignment */
  }

  .description-text {
    font-size: 14px; /* Smaller font for mobile */
  }

  .rectangles {
    display: grid; /* Two-column layout */
    grid-template-columns: repeat(2, 1fr);
    gap: 15px; /* Horizontal and vertical gap for mobile */
    justify-content: center;
  }

  .rectangle {
    width: 140px; /* Smaller size for mobile */
    height: 180px;
  }

  .rectangle-label {
    font-size: 12px; /* Adjusted font size for labels */
  }

  .random-button {
    font-size: 14px;
    padding: 8px 16px; /* Adjusted button size */
    margin-top: 20px; /* Ensure visibility */
  }
}
