:root {
  --primary-bg: #FF6B35;
  --secondary-bg: #1a1a1a;
  --third-bg: #2a2a2a;
  --screen-bg: #000000;
  --button-text: #ffffff;
  --text: #e0e0e0;
  --text-muted: #999999;
  --border-radius: 12px;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  --border: 1px solid #333;
  --h1: 28px;
  --h2: 24px;
  --h3: 20px;
  --h4: 18px;
  --h5: 16px;
  --h6: 14px;
  --card-bg: #1a1a1a;
  --card-padding: 16px;

  --spacing: 16px;
  --base-font-size: 16px;


  --cat-yogic: #9333ea;
  --cat-yogic-bg: rgba(147, 51, 234, 0.15);
  --cat-bhakti: #ec4899;
  --cat-bhakti-bg: rgba(236, 72, 153, 0.15);
  --cat-work: #3b82f6;
  --cat-work-bg: rgba(59, 130, 246, 0.15);
  --cat-kutumba: #10b981;
  --cat-kutumba-bg: rgba(16, 185, 129, 0.15);
  --cat-study: #f59e0b;
  --cat-study-bg: rgba(245, 158, 11, 0.15);
  --cat-health: #ef4444;
  --cat-health-bg: rgba(239, 68, 68, 0.15);
}

[data-theme="minimal"] {
  --primary-bg: #000000;
  --secondary-bg: #ffffff;
  --third-bg: #f5f5f5;
  --screen-bg: #ffffff;
  --text: #000000 !important;
  --text-muted: #666666;
  --card-bg: #ffffff;
  --border: 1px solid #e0e0e0;
}

[data-theme="dark"] {
  --primary-bg: #6366f1;
  --secondary-bg: #1a1a1a;
  --third-bg: #2a2a2a;
  --screen-bg: #000000;
}

[data-theme="sepia"] {
  --primary-bg: #d4a574;
  --secondary-bg: #3a3226;
  --third-bg: #4a4236;
  --screen-bg: #2a251e;
  --text: #f5deb3;
  --card-bg: #3a3226;
  filter: sepia(0.2);
}

[data-theme="sanatana"] {
  --primary-bg: #FF6B35;
  --secondary-bg: #1a1a1a;
}

[data-fontsize="small"] {
  font-size: 14px;
}

[data-fontsize="medium"] {
  font-size: 16px;
}

[data-fontsize="large"] {
  font-size: 18px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}


html {
  font-size: var(--base-font-size);
  font-family: var(--font-family);
}


body {
  background: var(--screen-bg);
  color: var(--text);
  font-family: var(--font-family);
  line-height: 1.6;
  transition: background 0.3s ease, color 0.3s ease;
}

input,
p,
h1,
h2,
h3,
h4,
h5,
h6,
span {
  font-family: var(--font-family);
  font-size: calc(100% * var(--base-font-size))
}

p,
span,
a,
input {
  font-size: var(--base-font-size);
}

app,
appcontent {
  display: block;
}

app {
  padding: 72px 5% 80px 5%;
  min-height: 100vh;
}

h1 {
  font-size: var(--h1);
  font-weight: 700;
  margin-bottom: 12px;
}

h2 {
  font-size: var(--h2);
  font-weight: 600;
  margin-bottom: 10px;
}

h3 {
  font-size: var(--h3);
  font-weight: 600;
  margin-bottom: 8px;
}

h4 {
  font-size: var(--h4);
  font-weight: 500;
}

h5 {
  font-size: var(--h5);
  font-weight: 500;
}

h6 {
  font-size: var(--h6);
  font-weight: 500;
}

.card {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: var(--card-padding);
  box-shadow: var(--shadow);
  margin-bottom: var(--spacing);
  border: var(--border);
}

a:hover,
a:focus,
a {
  text-decoration: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--primary-bg);
  color: var(--button-text);
  border: none;
  border-radius: var(--border-radius);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--third-bg);
  color: var(--text);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary-bg);
  color: var(--primary-bg);
}

input,
textarea,
select {
  width: 100%;
  padding: 12px 16px;
  background: var(--third-bg);
  border: var(--border);
  border-radius: var(--border-radius);
  color: var(--text);
  font-size: 16px;
  margin-bottom: 12px;
  transition: all 0.2s;
}

select {
  padding: 12px 16px !important;
  margin: 10px 0px;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary-bg);
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: var(--screen-bg);
  border-bottom: var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5%;
  z-index: 100;
}

.header-left,
.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-center {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary-bg);
}

.footer-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 70px;
  background: var(--secondary-bg);
  border-top: var(--border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 100;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 12px;
  transition: color 0.2s;
}

.nav-item.active,
.nav-item:hover {
  color: var(--primary-bg);
}

.nav-item i {
  font-size: 24px;
}

.grid {
  display: grid;
  gap: var(--spacing);
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.slider {
  display: flex;
  overflow-x: auto;
  gap: 16px;
  padding: 16px 0;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.slider::-webkit-scrollbar {
  display: none;
}

.slider-item {
  min-width: 85%;
  scroll-snap-align: center;
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 20px;
  text-align: center;
}

.deity-card {
  min-width: 140px;
  padding: 16px;
  text-align: center;
  background: var(--card-bg);
  border-radius: var(--border-radius);
  border: var(--border);
}

.deity-card img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin-bottom: 8px;
  object-fit: cover;
}

.streak-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--third-bg);
  border-radius: var(--border-radius);
  margin-bottom: 8px;
}

.streak-icon {
  font-size: 32px;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-bg);
  border-radius: 50%;
}

.level-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--primary-bg);
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
}

.profile-header {
  text-align: center;
  padding: 24px;
  background: var(--card-bg);
  border-radius: var(--border-radius);
  margin-bottom: 16px;
}

.profile-pic {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  margin: 0 auto 12px;
  border: 3px solid var(--primary-bg);
}

.stats-row {
  display: flex;
  justify-content: space-around;
  margin-top: 16px;
}

.stat-item {
  text-align: center;
}

.stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary-bg);
}

.tabs {
  display: flex;
  gap: 8px;
  border-bottom: var(--border);
  margin-bottom: 16px;
  overflow-x: auto;
}

.tab {
  padding: 12px 20px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all 0.2s;
  white-space: nowrap;
}

.tab.active {
  color: var(--primary-bg);
  border-bottom-color: var(--primary-bg);
}

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal.show {
  display: flex;
}

.modal-content {
  background: var(--secondary-bg);
  border-radius: var(--border-radius);
  padding: 24px;
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}

.alert {
  position: fixed;
  top: 80px;
  right: 20px;
  padding: 16px 24px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  z-index: 9999;
  font-weight: 500;
  max-width: 400px;
}

.alert-success {
  background: #10b981;
  color: #ffffff;
}

.alert-error {
  background: #ef4444;
  color: #ffffff;
}

.alert-info {
  background: #3b82f6;
  color: #ffffff;
}

.alert-warning {
  background: #f59e0b;
  color: #ffffff;
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}

deskonly {
  display: none
}

@media (min-width: 768px) {
  .footer-nav {
    width: 18%;
    height: 100vh;
    top: 0;
    bottom: auto;
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 40px;
    border-top: none;
    border-right: var(--border);
  }

  .header {
    display: none
  }

  deskonly {
    display: block !important;
    width: -webkit-fill-available;
    padding: 0px 30px;
  }

  mobileonly {
    display: none !important;
  }

  .nav-item {
    flex-direction: row;
    gap: 18px;
    font-size: 21px;
    width: 100%;
    padding: 14px 21px;
    transform: scale(0.9);
  }

  .nav-item span {
    font-size: 18px;
  }

  .nav-item:hover,
  .nav-item:focus {
    border-radius: 11px;
    background: #11111150 !important;
  }

  .nav-item.active {
    font-weight: 600;
    border-radius: 11px;
    background: #11111199 !important;
  }

  app {
    padding-left: calc(18% + 10%);
    padding-right: 10%;
    padding-top: 21px;
  }

  .header {
    left: 18%;
  }

  .grid-md-2 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-md-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

mobileonly {
  display: block;
  pointer-events: none;
}

.tab i {
  font-size: 21px
}

.fade-in {
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid var(--text-muted);
  border-top-color: var(--primary-bg);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}


.radiolabel {
  display: block;
  padding: 12px 14px;
  margin: 8px 0;
  background: var(--third-bg);
  border-radius: 8px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: 0.18s ease;
  position: relative;
}

/* hide radio but keep it focusable */
.radiolabel>input[type="radio"] {
  position: absolute;
  inset: 0;
  /* full clickable area */
  opacity: 0;
  pointer-events: none;
}

/* selected state: style the LABEL itself */
.radiolabel:has(> input[type="radio"]:checked) {
  background: var(--primary-bg);
  color: var(--primary-text, #fff);
  border-color: var(--primary-bg);
  transform: translateY(-1px);
}

/* keyboard focus hint */
.radiolabel:has(> input[type="radio"]:focus-visible) {
  outline: 2px solid var(--primary-bg);
  outline-offset: 3px;
}

/* base label */
.checklabel {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  position: relative;
  line-height: 1.2;
}

/* hide the native control but keep it focusable */
.checklabel>input[type="checkbox"] {
  position: absolute;
  inset: 0;
  opacity: 0;
}

/* track */
.checklabel:has(> input[type="checkbox"])::before {
  content: "";
  width: 42px;
  height: 24px;
  background: #d1d1d6;
  border-radius: 999px;
  display: inline-block;
  box-shadow: inset 0 0 2px rgba(0, 0, 0, .35);
  transition: background .25s ease;
}

/* knob */
.checklabel:has(> input[type="checkbox"])::after {
  content: "";
  position: relative;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  left: -50px;
  /* sits on the track */
  box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
  transition: transform .25s ease;
}

/* on */
.checklabel:has(> input[type="checkbox"]:checked)::before {
  background: var(--primary-bg, #34c759);
}

.checklabel:has(> input[type="checkbox"]:checked)::after {
  transform: translateX(18px);
}

/* focus and disabled */
.checklabel:has(> input[type="checkbox"]:focus-visible)::before {
  outline: 2px solid var(--primary-bg, #34c759);
  outline-offset: 2px;
}

.checklabel:has(> input[type="checkbox"]:disabled) {
  opacity: .6;
  cursor: not-allowed;
}

.cat-yogic {
  color: var(--cat-yogic);
  background: var(--cat-yogic-bg);
}

.cat-bhakti {
  color: var(--cat-bhakti);
  background: var(--cat-bhakti-bg);
}

.cat-work {
  color: var(--cat-work);
  background: var(--cat-work-bg);
}

.cat-kutumba {
  color: var(--cat-kutumba);
  background: var(--cat-kutumba-bg);
}

.cat-study {
  color: var(--cat-study);
  background: var(--cat-study-bg);
}

.cat-health {
  color: var(--cat-health);
  background: var(--cat-health-bg);
}

.activity-card {
  position: relative;
  overflow: hidden;
}

.activity-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
}