/* Base styles and reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  transition: all 0.3s ease;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(270deg,  #007EA4, #F7931F);
  color: #333;
  line-height: 1.6;
  overflow-x: hidden;
  overflow-y: hidden;
  min-height: 100vh;
  position: relative;
}

/* Modern subtle background pattern */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 25%, transparent 25%) -20px 0,
    linear-gradient(225deg, rgba(255, 255, 255, 0.1) 25%, transparent 25%) -20px 0,
    linear-gradient(315deg, rgba(255, 255, 255, 0.1) 25%, transparent 25%),
    linear-gradient(45deg, rgba(255, 255, 255, 0.1) 25%, transparent 25%);
  background-size: 40px 40px;
  background-color: #f5f7fa;
  z-index: -1;
}

/* Logo container */
.logo-container {
  text-align: center;
  padding: 2rem 0;
  width: 100%;
  max-width: 300px;
  margin: 0 auto;
  position: relative;
  z-index: 5;
}

.logo-container img {
  width: 70%;
  max-width: 250px;
  height: auto;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

/* App grid */
.app-grid {
  display: grid;
  width: 90%;
  max-width: 1200px;
  margin: 2rem auto 2rem;
  margin-top: 4rem;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
  position: relative;
  z-index: 5;
}

/* App card styling */
.app {
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  transform: translateY(0);
}

.app:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.app::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(90deg, #3498db, #2980b9);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.app:hover::after {
  transform: scaleX(1);
}

.app-content {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  padding: 5px;
}

.img_c {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 5px;
}

.app img {
  width: 80%;
  height: auto;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.app:hover img {
  transform: scale(1.1);
}

.txt {
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  color: #007EA4;
  padding: 12px 0;
  border-top: 1px solid #edf2f7;
  letter-spacing: 0.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* WebView container */
.webview-container {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  z-index: 100;
  padding: 20px;
  backdrop-filter: blur(5px);
}

iframe {
  width: 95%;
  height: 90%;
  border: none;
  border-radius: 12px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  background: white;
  animation: slideUp 0.5s ease;
}
/* Image container - new addition */
.image-container {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  z-index: 100;
  padding: 20px;
  backdrop-filter: blur(5px);
  justify-content: center;
  align-items: center;
}

.image-wrapper {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  animation: slideUp 0.5s ease;
  background: white;
}

#fullImage {
  display: block;
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
}

.image-caption {
  position: relative;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 15px;
  background: white;
  color: #333;
  font-weight: 600;
  text-align: center;
}
.back-button {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #F7931F;
  color: white;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  z-index: 101;
}

.back-button:hover {
  background: #ff9317;
  transform: scale(1.1);
}

/* Animations */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive adjustments */
@media (max-width: 1200px) {
  .app-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 992px) {
  .app-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .app-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }

  .logo-container {
    padding: 1.5rem 0;
  }
}

@media (max-width: 480px) {
  .app-grid {
    width: 95%;
    gap: 10px;
  }

  .txt {
    font-size: 12px;
  }

  .logo-container img {
    max-width: 200px;
  }
}

/* Particles background styling */
#particles-background,
#particles-foreground {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

#particles-background {
  background: linear-gradient(135deg, #f5f7fa 0%, #e4eaf1 100%);
  z-index: 0;
}

#particles-foreground {
  z-index: 1;
}

.vertical-centered-box {
  position: fixed;
  width: 100%;
  height: 100%;
  text-align: center;
  z-index: 1;
  pointer-events: none;
}

.vertical-centered-box:after {
  content: "";
  display: inline-block;
  height: 100%;
  vertical-align: middle;
  margin-right: -0.25em;
}

/* Adjust body to work better with particles */
body::before {
  z-index: 0;
  opacity: 0.4;
}

/* Ensure content stays above particles */
.logo-container {
  z-index: 10;
  position: relative;
}

.app-grid {
  z-index: 10;
  position: relative;
}
