:root {
  --bg-color: #0f172a;
  --card: #0b1220cc;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --accent: #a78bfa;
  --accent-2: #60a5fa;
  --font-size: 14px;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg-color);
  font-family: "Noto Sans Devanagari", "Mangal", "Nirmala UI", sans-serif;
  line-height: 1.8;
  font-size: var(--font-size);
  transition: background 0.3s ease, color 0.3s ease;
  min-height: 100vh;
}

.header {
  text-align: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.header h1 {
  margin: 0;
  font-size: clamp(1.2rem, 2.4vw, 1.8rem);
  font-weight: 700;
  background: transparent !important;
  box-shadow: none !important;
  border: 0 !important;
  padding: 0 !important;
  color: var(--text) !important;
}

.header .home-link {
  position: absolute;
  left: 16px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.header .home-link:hover {
  background: rgba(255, 255, 255, 0.12);
}

@media (max-width: 480px) {
  .header .home-link {
    left: 10px;
    padding: 6px 8px;
    font-size: 0.85rem;
  }
}

.hero {
  text-align: center;
  margin: 22px 0 10px;
}

.hero img {
  width: min(80vw, 360px);
  max-width: 100%;
  border-radius: 16px;
  box-shadow: none;
}

.subtitle {
  text-align: center;
  margin: 14px 0 6px;
  color: var(--accent-2);
  font-weight: 700;
  letter-spacing: 0.5px;
}

.subpage-content {
  max-width: min(980px, 92vw);
  margin: 24px auto 48px;
  padding: clamp(18px, 2.4vw, 28px);
  background: var(--card);
  border-radius: 14px;
  box-shadow: none;
  font-size: inherit;
  overflow-y: auto;
}

.content {
  max-width: min(980px, 92vw);
  margin: 24px auto 48px;
  padding: clamp(18px, 2.4vw, 28px);
  background: var(--card);
  border-radius: 14px;
  box-shadow: none;
  font-size: inherit;
  overflow-y: auto;
  text-align: center;
}

.content h1,
.content h2,
.content h3 {
  text-align: center;
  color: var(--accent-2);
  margin-top: 10px;
}

.content p {
  margin: 14px 0;
  text-align: center;
}

.content * {
  text-shadow: none !important;
  background: transparent !important;
  color: inherit !important;
}

.subpage-content h1,
.subpage-content h2,
.subpage-content h3 {
  text-align: center;
  color: var(--accent-2);
  margin-top: 10px;
}

.subpage-content p {
  margin: 14px 0;
}

.subpage-content * {
  text-shadow: none !important;
}

.header,
.header h1,
.subtitle,
.subpage-footer,
.hero {
  text-shadow: none !important;
}

.subpage-content p,
.subpage-content b,
.subpage-content strong,
.subpage-content span,
.subpage-content font,
.subpage-content center,
.subpage-content div {
  background: transparent !important;
  color: inherit !important;
}

.subpage-footer {
  text-align: center;
  padding: 16px 12px 28px;
  color: var(--muted);
  font-size: 1rem;
  letter-spacing: 0.2px;
}

.subpage-content img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: none !important;
}

/* Hamburger button */
.hamburger {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 120;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 6px;
  background: transparent;
  border-radius: 10px;
  border: none;
  backdrop-filter: none;
  box-shadow: none;
}

.hamburger div {
  width: 26px;
  height: 3px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 2px;
}

/* Settings Panel */
.settings-panel {
  position: fixed;
  top: 0;
  right: -100%;
  width: 300px;
  height: 100%;
  background: var(--bg-color);
  color: var(--text);
  padding: 22px;
  transition: right 0.32s cubic-bezier(0.2, 0.9, 0.2, 1);
  z-index: 110;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.settings-panel.open {
  right: 0;
}

.settings-panel h3 {
  margin: 0 0 12px;
  font-size: 1.2rem;
}

.settings-panel label {
  display: block;
  margin: 12px 0 6px;
  color: var(--muted);
  font-size: 0.95rem;
}

.settings-panel input[type="color"],
.settings-panel select,
.settings-panel input[type="range"] {
  width: 100%;
  padding: 6px;
  margin-bottom: 12px;
  box-sizing: border-box;
}

.settings-panel .panel-note {
  margin-top: 20px;
  color: var(--muted);
  font-size: 0.9rem;
}

.about-section {
  margin-top: 8px;
}

.about-button,
.email-button,
.modal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  font-size: 0.95rem;
}

.about-button:hover,
.email-button:hover,
.modal-close:hover {
  background: rgba(255, 255, 255, 0.14);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 140;
}

.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.98);
  width: min(90vw, 360px);
  background: #0f172a;
  color: #e5e7eb;
  border-radius: 12px;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  z-index: 150;
  box-sizing: border-box;
}

.modal h4 {
  margin: 0 0 8px;
  font-size: 1.1rem;
}

.modal p {
  margin: 0 0 12px;
  color: #cbd5f5;
  font-size: 0.95rem;
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.modal.is-open,
.modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.modal.is-open {
  transform: translate(-50%, -50%) scale(1);
}

@media (max-width: 600px) {
  .subpage-content {
    margin: 16px 12px 32px;
    padding: 16px;
  }
}

@media (max-width: 420px) {
  .header h1 {
    font-size: 1.05rem;
  }

  .content {
    margin: 16px 10px 28px;
    padding: 14px 12px;
  }

  .hero img {
    width: min(86vw, 320px);
  }

  .content font[size="8"] {
    font-size: clamp(1.2rem, 5.5vw, 1.6rem) !important;
  }

  .content font[size="4"] {
    font-size: clamp(1rem, 4.2vw, 1.2rem) !important;
  }
}
