:root {
  --primary: #2563eb;
  --light-bg: #f0f4f8;
  --card-bg: #ffffff;
  --text-color: #333;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding: 0rem 2rem 2rem 2rem;
  background: linear-gradient(to right, #e0f2fe, #f8fafc);
  color: var(--text-color);
}

h1 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 2rem;
  color: var(--primary);
}

/* Header and logo */
header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding-bottom: 2rem;
}

header img {
  height: 50px;
}

/* Main grid layout */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  padding: 1rem;
}

/* Card styles */
.card {
  min-height: 280px;
  background: var(--card-bg);
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 8px 16px rgba(0,0,0,0.05);
  transition: all 0.3s ease-in-out;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.1);
}

.card * {
  text-decoration: none; /* Prevent all content inside the card from being underlined */
}

.card img {
  height: 48px;
  margin-bottom: 1rem;
}

.card h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  color: var(--primary);
}

.card .category a {
  color: #fff;
  text-decoration: none;
}

.card .category {
  margin-top: 0.5rem;
  margin-bottom: 1rem;
  background: var(--primary);
  color: #fff;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
}

.card p {
  font-size: 0.95rem;
  line-height: 1.5;
  color: #555;
}

/* Footer styling */
footer {
  text-align: center;
  padding: 2rem 0 1rem;
  color: #888;
  font-size: 0.9rem;
}

 #share-container {
  background: linear-gradient(135deg, #0077b6, #00b4d8);
  text-align: center;
}

.share-text {
  margin: 0 0 8px 0;
  font-size: 14px;
  color: #333;
  font-weight: 500;
}

#share-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

#share-bar a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  font-size: 13px;
  font-weight: 500;
  border-radius: 6px;
  color: white;
  text-decoration: none;
  transition: background 0.2s ease-in-out;
}

/* Brand Colors */
.fb { background: #3b5998; }
.wa { background: #25D366; }
.tw { background: #000000; }
.tg { background: #0088cc; }
.li { background: #0077b5; }
.em { background: #7a7a7a; }
.cp { background: #6c757d; }

#share-bar a img {
  width: 16px;
  height: 16px;
  vertical-align: middle;
}

/* Hover effect */
#share-bar a:hover {
  opacity: 0.85;
}


/* Popup overlay */
 #installPopupOverlay {
 display: none;
 position: fixed;
 top: 0; left: 0; right: 0; bottom: 0;
 background: rgba(0,0,0,0.5);
 z-index: 9999;
 }
 /* Popup box */
 #installPopup {
 background: white;
 max-width: 400px;
 margin: 80px auto;
 padding: 20px 30px;
 border-radius: 8px;
 position: relative;
 font-family: Arial, sans-serif;
 }
 /* Close button */
 #installPopupClose {
 position: absolute;
 top: 10px; right: 15px;
 font-size: 22px;
 font-weight: bold;
 color: #888;
 cursor: pointer;
 }
 #installPopupClose:hover {
 color: #000;
 }
 /* Install button */
 #installBtn {
 padding: 12px 24px;
 font-size: 16px;
 background-color: #0078d7;
 color: white;
 border: none;
 border-radius: 5px;
 cursor: pointer;
 margin-top: 15px;
 display: none;
 }
 #installMessage {
 margin-top: 15px;
 color: green;
 font-weight: bold;
 }
 #manualInstructions {
 margin-top: 15px;
 color: red;
 font-size: 1rem;
 }

/* Mobile responsiveness */
@media (max-width: 600px) {
  body {
   padding: 0rem 1rem 1rem 1rem;
  }
  
  #share-container {
      margin-bottom: 15px;
  }

  h1 {
    font-size: 1rem;
  }

  header {
    flex-direction: column;
    text-align: center;
  }
}