/* 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;
  height: 100vh;
  text-transform: uppercase; /* Capitalize everything */
  overflow: hidden; /* Prevent scrolling on desktop */
}

/* Main Container */
.main-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 20px;
  gap: 10px; /* Reduced gap slightly */
  box-sizing: border-box;
  margin-top: -100px; /* Adjusted for better alignment */
}

/* Logo Section */
.logo-container {
  margin-bottom: 50px; /* Adjusted spacing for better alignment */
}

.logo-image {
  width: 300px; /* Adjust size as needed */
  height: auto;
}

/* Description Section */
.description-container {
  text-align: center;
  position: relative; /* Allows custom positioning */
  margin-bottom: 10px; /* Adjusted to reduce unnecessary spacing */
  top: -80px; /* Moved slightly upwards for alignment */
}

.description-text {
  font-size: 20px;
  font-weight: 400; /* Normal font weight */
  color: white; /* Standard text color */
  line-height: 1.8; /* Ensure proper line spacing */
  text-transform: none;
  margin: 0;
}

/* Text Section */
.text-container {
  text-align: center;
  margin-bottom: 15px; /* Reduced margin for better alignment */
  line-height: 1.8;
}

.text-container h1 {
  font-size: 50px; /* Slightly bigger */
  font-weight: 700;
  background: linear-gradient(to right, #a1887f, #d7ccc8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0;
}

.text-container p {
  font-size: 26px;
  font-weight: 700;
  background: linear-gradient(to right, #795548, #a1887f);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 10px 0 0;
}

/* Rectangles Section */
.rectangles {
  display: flex;
  justify-content: center;
  gap: 40px; /* Adjusted for better spacing */
  flex-wrap: wrap; /* Allows wrapping on smaller screens */
}

.rectangle-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px; /* Maintain spacing between rectangle and label */
}

.rectangle {
  position: relative;
  width: 220px; /* Adjusted slightly */
  height: 270px; /* Adjusted slightly */
  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 */
@media (max-width: 768px) {
  body {
    overflow-y: auto; /* Enable scrolling for mobile */
  }

  .rectangles {
    flex-direction: column;
    align-items: center;
    gap: 20px; /* Reduced gap for smaller screens */
  }

  .rectangle {
    width: 180px;
    height: 220px;
  }

  .logo-image {
    width: 200px; /* Smaller logo for mobile */
  }

  .description-text {
    font-size: 16px;
  }

  .random-button {
    font-size: 16px;
    padding: 10px 20px;
  }
}
