/* nep-cal · dark minimal (cg-cards tokens: #1a1a1a / #272727 / #333) */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  font-family: "Rubik", "Noto Sans Devanagari", sans-serif;
  background-color: #1a1a1a;
  color: #fff;
}

.container {
  width: 100%;
  min-height: 100%;
  padding-bottom: 4em;
}

/* ---------- nav ---------- */

nav {
  width: 30%;
  min-width: 660px;
  margin: 2em auto 0 auto;
  padding: 2em 0.25em;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-items {
  display: flex;
  gap: 0.5em;
}

nav a {
  text-decoration: none;
  color: #fff;
}

.nav-link {
  border: 1px solid #333;
  background: transparent;
  color: #fff;
  border-radius: 4em;
  font-family: inherit;
  padding: 0.5em 1em;
  cursor: pointer;
  font-size: 13px;
}

.nav-link:hover {
  background: #333;
}

/* ---------- month card ---------- */

.card {
  position: relative;
  width: 660px;
  margin: 1em auto;
  padding: 2.25em;
  border-radius: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.9em;
  background-color: #272727;
  overflow: hidden;
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1em;
  padding-bottom: 0.5em;
}

.card-title p {
  font-size: 28px;
  font-weight: 500;
}

.card-title span {
  display: block;
  margin-top: 0.25em;
  font-size: 13px;
  color: #b5b5b5;
}

/* Skeleton bars while titles are still empty (replaced by app.js). */
.card-title p:empty {
  height: 32px;
  width: 70%;
  border-radius: 8px;
  background: #333;
  animation: shimmer 1.2s infinite ease-in-out;
}

.card-title span:empty {
  height: 14px;
  width: 55%;
  border-radius: 6px;
  background: #333;
  margin-top: 0.5em;
  animation: shimmer 1.2s infinite ease-in-out;
}

.month-nav {
  display: flex;
  gap: 0.4em;
  flex-shrink: 0;
}

.month-nav button {
  border: none;
  outline: none;
  border-radius: 4em;
  font-family: inherit;
  padding: 0.5em 0.9em;
  background-color: #333;
  color: #fff;
  cursor: pointer;
  font-size: 13px;
}

.month-nav button:hover {
  background-color: #3f3f3f;
}

/* ---------- weekday header ---------- */

.weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.6em;
  text-align: center;
  font-size: 13px;
  color: #8a8a8a;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.weekdays span:first-child,
.weekdays span:last-child {
  color: #e5484d;
}

/* Skeleton bars while weekday labels are still empty. */
.weekdays span:empty {
  height: 12px;
  border-radius: 6px;
  background: #333;
  animation: shimmer 1.2s infinite ease-in-out;
}

/* ---------- date grid ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.6em;
}

.pad {
  position: relative;
  width: 100%;
  min-height: 74px;
  padding: 0.55em 0.25em;
  border-radius: 0.6rem;
  background-color: #333333;
  z-index: 0;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.15;
  overflow: hidden;
}

.pad.ghost {
  opacity: 0.35;
}

.pad.active {
  pointer-events: all;
  cursor: pointer;
}

.pad .bs {
  font-size: 23px;
  font-weight: 500;
}

.pad .ad {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.65);
  margin-top: 3px;
}

.pad.holiday .bs {
  color: #fff;
}

.pad.today {
  background: linear-gradient(135deg, #2563eb, #7c3aed);
}

.pad.today .bs,
.pad.today .ad {
  color: #fff;
}

.pad .ev-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  margin-top: 4px;
}

.pad.loading {
  animation: shimmer 1.2s infinite ease-in-out;
}

@keyframes shimmer {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 0.7; }
}

.load-error {
  grid-column: 1 / -1;
  text-align: center;
  padding: 2em;
  font-size: 13px;
  color: #999;
}

.load-error button {
  border: none;
  border-radius: 4em;
  font-family: inherit;
  padding: 0.5em 1.2em;
  margin-top: 1em;
  background: #fff;
  color: #000;
  cursor: pointer;
}

/* ---------- day detail overlay ---------- */

.card-content {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 2em;
  color: #fff;
  overflow-y: auto;
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  scrollbar-width: thin;
  scrollbar-color: #555 transparent;
}

.card-content::-webkit-scrollbar {
  width: 8px;
}

.card-content::-webkit-scrollbar-track {
  background: transparent;
}

.card-content::-webkit-scrollbar-thumb {
  background: #555;
  border-radius: 8px;
  border: 2px solid #272727;
}

.card-content::-webkit-scrollbar-thumb:hover {
  background: #777;
}

.card-content button {
  border: none;
  outline: none;
  border-radius: 4em;
  font-family: inherit;
  padding: 0.5em 1em;
  background-color: #fff;
  color: #000;
  cursor: pointer;
  margin-bottom: 1em;
}

.card-item {
  position: relative;
}

.detail-head {
  margin-bottom: 1em;
}

.detail-head .big {
  font-size: 40px;
  font-weight: 600;
  line-height: 1.1;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
}

.detail-head .sub {
  margin-top: 0.4em;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45);
}

.badge {
  display: inline-block;
  margin-top: 0.6em;
  font-size: 11px;
  padding: 0.3em 0.8em;
  border-radius: 4em;
  background: #e5484d;
  color: #fff;
}

/* ---------- white content cards ---------- */

.copy {
  margin: 0.5em 0;
  padding: 1.25em;
  border-radius: 1em;
  background: #fff;
  color: #000;
}

.copy h1 {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 0.5em;
}

.copy p {
  font-size: 13px;
  line-height: 160%;
  color: #444;
}

.copy ul {
  list-style: none;
}

.copy li {
  font-size: 13px;
  line-height: 160%;
  color: #444;
  padding: 0.3em 0;
  border-bottom: 1px solid #eee;
}

.copy li:last-child {
  border-bottom: none;
}

.copy .meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5em 1em;
  margin-top: 0.5em;
}

.copy .meta-grid div span {
  display: block;
  font-size: 11px;
  color: gray;
}

.copy .meta-grid div strong {
  font-size: 13px;
  font-weight: 500;
}

.copy.meta-line {
  font-size: 12px;
  color: #666;
}

.copy.muhurat-block li {
  color: #141414;
  font-size: 14px;
  padding: 0.45em 0;
}

.copy.muhurat-block li.muh {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1em;
}

.copy.muhurat-block li.muh strong {
  font-weight: 600;
  white-space: nowrap;
  color: #000;
}

/* ---------- footer ---------- */

.card-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: #8a8a8a;
  padding-top: 0.5em;
}

.card-foot .dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  vertical-align: middle;
}

.card-foot .dot.holiday {
  background: #e5484d;
}

.card-foot .ring {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  vertical-align: middle;
}

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  nav {
    width: 100%;
    min-width: 0;
    padding: 1.5em;
  }
  .card {
    width: calc(100% - 2em);
    max-width: 440px;
    padding: 1.25em;
    gap: 0.5em;
  }
  .grid,
  .weekdays {
    gap: 0.3em;
  }
  .pad {
    min-height: 54px;
  }
  .pad .bs {
    font-size: 17px;
  }
  .pad .ad {
    font-size: 10px;
  }
  .card-content {
    padding: 1.25em;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pad.loading,
  .card-title p:empty,
  .card-title span:empty,
  .weekdays span:empty {
    animation: none;
  }
}
