.shuddha-deity-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 18px;
  margin: 30px auto;
  max-width: 1200px;
}

.shuddha-deity-card {
  background: var(--bg);
  border: 1px solid var(--accent-soft);
  border-radius: 18px;
  padding: 14px;
  text-align: center;
  cursor: pointer;
  transition: all .35s ease;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .08);
}

.shuddha-deity-card img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 50%;
  margin-bottom: 10px;
}

.shuddha-deity-card span {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  display: block;
}

.shuddha-deity-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(255, 106, 0, .25);
}

.shuddha-deity-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, .6);
  backdrop-filter: saturate(120%) blur(2px);
  overflow: auto;
}

.shuddha-deity-modal-inner {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--accent-soft);
  margin: 8% auto;
  padding: 20px;
  width: 92%;
  max-width: 560px;
  border-radius: 16px;
  position: relative;
  animation: fadeIn .3s ease;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .2);
  max-height: 84vh;
  overflow: auto;
}

#shuddha-deity-title {
  margin: 0 0 12px 0;
  font-size: 18px;
}

#shuddha-deity-posts {
  margin: 0;
  padding-left: 18px;
  list-style: none;
  background-image: url('images/deities/hanuman-mace120.png');
  background-repeat: no-repeat;
  background-size: 20px;
  background-position: left center;
  padding-left: 30px;
}

.shuddha-deity-close {
  position: absolute;
  right: 12px;
  top: 10px;
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
  color: var(--text);
  opacity: .75;
}

.shuddha-deity-close:hover {
  opacity: 1;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(.95)
  }

  to {
    opacity: 1;
    transform: scale(1)
  }
}

/* Dark mode specific refinements if needed */
body.dark-mode .shuddha-deity-card {
  box-shadow: 0 6px 18px rgba(0, 0, 0, .5);
}

body.dark-mode .shuddha-deity-card:hover {
  box-shadow: 0 12px 30px rgba(0, 0, 0, .7);
}

/* Responsive tweaks */
@media (max-width:600px) {
  .shuddha-deity-container {
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 12px;
  }

  .shuddha-deity-card img {
    width: 64px;
    height: 64px;
  }

  .shuddha-deity-modal-inner {
    margin: 12% auto;
    padding: 16px;
    max-width: 94%;
    border-radius: 12px;
    max-height: 88vh;
  }
}