:root {
  --cream: #faf6ef;
  --gold: #c9963a;
  --gold-light: #e8c16e;
  --gold-dark: #8a6420;
  --green: #1a3d2b;
  --green-mid: #2d6148;
  --green-light: #4a8f6a;
  --white: #fffdf8;
  --text-dark: #1c1208;
  --text-mid: #3d2f10;
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Lora', Georgia, serif;
  background-color: var(--cream);
  color: var(--text-dark);
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(ellipse at 20% 50%, rgba(201,150,58,0.07) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(26,61,43,0.08) 0%, transparent 55%),
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23c9963a' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-18px); }
  to { opacity: 1; transform: translateY(0); }
}

/* HEADER */
header {
  position: relative;
  background: linear-gradient(-45deg, #0f2318, var(--green), #1a3d2b, #0a1a11);
  background-size: 400% 400%;
  animation: gradientBG 15s ease infinite;
  padding: 70px 20px 80px;
  text-align: center;
  overflow: hidden;
  z-index: 1;
  border-bottom: 3px solid var(--gold);
}

.header-ornament {
  font-size: clamp(2.5rem, 8vw, 3.5rem);
  color: var(--gold-light);
  filter: drop-shadow(0 0 15px rgba(232, 193, 110, 0.4));
  margin-bottom: 16px;
  animation: fadeDown 0.8s ease forwards 0.2s;
  opacity: 0;
  display: block;
}

header h1 {
  font-family: 'Cinzel Decorative', serif;
  font-size: clamp(1.5rem, 4vw, 2.6rem);
  background: linear-gradient(to bottom, var(--gold-light), var(--gold), var(--gold-dark));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 0.1em;
  font-weight: 700;
  animation: fadeDown 0.8s ease forwards 0.4s;
  opacity: 0;
}

/* NAVIGATION */
.nav-tabs {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  justify-content: center;
  background: rgba(26, 61, 43, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 2px solid var(--gold-dark);
}

.nav-tabs a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 25px;
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  font-family: 'Cinzel Decorative', serif;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.nav-tabs a i { color: var(--gold-light); }

.nav-tabs a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

/* TO DO LIST */
.nav-item-dropdown {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 15px 25px;
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  font-family: 'Cinzel Decorative', serif;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.nav-item-dropdown i {
    color: var(--gold-light);
}

.nav-item-dropdown.active {
  color: #fff;
  border-bottom: 2px solid var(--gold-dark);
}

.nav-item-dropdown:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

/* Container Dropdown */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-content {
  display: none;
  position: absolute;
  background: rgba(26, 61, 43, 0.98);
  min-width: 160px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
  z-index: 1000;
  border: 1px solid var(--gold-dark);
  border-radius: 8px;
  top: 100%;
  left: 0;
}

.dropdown-content button {
  width: 100%;
  padding: 12px 15px;
  background: none;
  border: none;
  color: var(--white);
  text-align: left;
  font-family: 'Lora', serif;
  cursor: pointer;
  transition: 0.3s;
}

.dropdown-content button:hover {
  background: rgba(201, 150, 58, 0.2);
  color: var(--gold-light);
}

.dropdown:hover .dropdown-content {
  display: block;
  animation: fadeUp 0.3s ease;
}

.dropdown-item:first-child { border-radius: 8px 8px 0 0; }
.dropdown-item:last-child { border-radius: 0 0 8px 8px; }

@media (max-width: 768px) {
  .dropdown-content {
    position: fixed;
    left: 0;
    right: 0;
    transform: one;
    width: 100%;
    border-radius: 0;
  }

  .nav-tabs{
    justify-content: flex-start; /* mulai dari kiri */
    overflow-x: auto;
    white-space: nowrap;
  }
}

.overall-bar {
  position: relative; z-index: 10;
  background: var(--white);
  padding: 16px 20px;
  box-shadow: 0 2px 12px rgba(26,61,43,0.06);
}

.overall-inner {
  max-width: 700px; margin: 0 auto;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}

.overall-label { font-size: .8rem; color: #888; white-space: nowrap; }
.bar-track { flex: 1; height: 8px; background: #eee; border-radius: 99px; overflow: hidden; min-width: 100px; }
.bar-fill {
  height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold-light));
  transition: width .6s ease;
}

.overall-pct {
  font-size: 1.1rem; font-weight: 700; color: var(--gold-dark); min-width: 48px; text-align: right;
}

.motivasi-badge {
  padding: 4px 14px; border-radius: 99px; font-size: .75rem;
  background: rgba(26,61,43,0.1); color: var(--green); border: 1px solid rgba(26,61,43,0.2);
}

main {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  padding: 30px 20px 100px;
}

.card {
  background: rgba(255, 253, 248, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(201, 150, 58, 0.25);
  border-radius: 24px;
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: 0 10px 30px rgba(26, 61, 43, 0.05), 0 1px 2px rgba(201, 150, 58, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 45px rgba(26, 61, 43, 0.1);
  border-color: var(--gold);
}

.section-title {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 25px;
  font-weight: 700;
  color: var(--green);
  font-size: 1.5rem;
  font-family: 'Cinzel Decorative', serif;
  border-left: 5px solid var(--gold);
  padding-left: 15px;
}

.icon-circle {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--green), var(--green-mid));
  color: white;
  font-size: 1.2rem;
  box-shadow: 0 4px 15px rgba(26, 61, 43, 0.2);
}

/* SHALAT */
.shalat-item {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 24px;
  background: var(--white);
  border: 1px solid #f0e6d2;
  border-radius: 18px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  margin-bottom: 12px;
}

.shalat-item:hover {
  background: #fff;
  border-color: var(--gold-light);
  transform: scale(1.02);
}

.shalat-item.checked {
  background: linear-gradient(to right, rgba(74, 143, 106, 0.1), transparent);
  border-color: var(--green-light);
}

.check-box {
  width: 28px;
  height: 28px;
  border: 2.5px solid #d4c4a8;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  transition: 0.3s;
  font-size: 0.9rem;
}

.shalat-item.checked .check-box {
  background: var(--green-mid);
  border-color: var(--green-mid);
  color: white;
  box-shadow: 0 0 10px rgba(45, 97, 72, 0.3);
}

.shalat-name { font-weight: 600; color: var(--text-dark); flex: 1; }
.input-field {
  width: 100%;
  padding: 14px 18px;
  background: #ffffff;
  border: 2px solid #eeebe3;
  border-radius: 15px;
  font-size: 1rem;
  color: var(--text-dark);
  transition: 0.3s;
}

.input-field:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(201, 150, 58, 0.1);
}

.input-label {
  cursor: default;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--green-mid);
  margin-bottom: 8px;
  display: block;
}

/* PUASA */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
}

.cal-day {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: white;
  border: 1px solid #eee;
  border-radius: 12px;
  font-weight: 600;
  transition: 0.3s;
  cursor: pointer;
}

.cal-day:hover:not(.future) {
  border-color: var(--gold);
  background: var(--cream);
}

.cal-day.done {
  background-color: var(--gold-light);
  color: var(--gold-dark);
  border-color: var(--gold-dark);
  font-size: 1.2rem;
}

.cal-day.today {
  border: 2px solid var(--gold-dark);
  font-weight: bold;
}

.mini-track {
  height: 12px;
  background: #ede9e0;
  border-radius: 20px;
  margin: 15px 0;
}

.mini-fill {
  height: 100%;
  border-radius: 20px;
  background: linear-gradient(90deg, var(--green-mid), var(--green-light));
  transition: width 0.8s cubic-bezier(0.17, 0.67, 0.83, 0.67);
}

.gold-fill {
  background: linear-gradient(90deg, var(--gold-dark), var(--gold-light));
}

.btn {
  padding: 14px 28px;
  border-radius: 15px;
  font-weight: 700;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.3s;
  border: none;
  font-family: 'Lora', serif;
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: white;
  box-shadow: 0 4px 15px rgba(138, 100, 32, 0.3);
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(138, 100, 32, 0.4);
  filter: brightness(1.1);
}

.status-text {
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  margin: 15px 0;
}

.status-warn { background: #fff8e6; color: #856404; border: 1px solid #ffeeba; }
.status-mid { background: #e7f3ed; color: #155724; border: 1px solid #d4edda; }
.status-good { background: #f0f9ff; color: #004085; border: 1px solid #b8daff; }

/* FOOTER */
footer {
  background: #0a1a11;
  padding: 25px 20px;
  color: #fff;
  text-align: center;
}

footer p {
  font-family: 'Cinzel Decorative', serif;
  color: var(--gold-light);
  letter-spacing: 2px;
  font-size: 0.9rem;
}