/* ═══════════════════════════════════════════
follow author di IG : @bgs_adityaa
═══════════════════════════════════════════ */

/* ── Home Card ─────────────────────────── */
.ramadan-card {
  background: linear-gradient(145deg, #0d1b2a 0%, #1b2d3e 40%, #0f3460 100%);
  border-radius: 20px;
  padding: 22px 20px;
  margin: 0 0 20px 0;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 8px 32px rgba(15, 52, 96, 0.45),
    inset 0 1px 0 rgba(255, 215, 0, 0.1);
  cursor: pointer;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  border: 1px solid rgba(255, 215, 0, 0.12);
}

.ramadan-card:hover {
  transform: translateY(-3px);
  box-shadow:
    0 14px 40px rgba(15, 52, 96, 0.6),
    inset 0 1px 0 rgba(255, 215, 0, 0.15);
}

/* Glow dekoratif atas kanan */
.ramadan-card::before {
  content: "";
  position: absolute;
  top: -20px;
  right: -20px;
  width: 100px;
  height: 100px;
  background: radial-gradient(
    circle,
    rgba(255, 215, 0, 0.12) 0%,
    transparent 70%
  );
  border-radius: 50%;
  pointer-events: none;
}

/* Glow besar di pojok kanan bawah */
.ramadan-card::after {
  content: "";
  position: absolute;
  bottom: -50px;
  right: -50px;
  width: 180px;
  height: 180px;
  background: radial-gradient(
    circle,
    rgba(255, 215, 0, 0.07) 0%,
    transparent 65%
  );
  border-radius: 50%;
  pointer-events: none;
}

.ramadan-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 18px;
  gap: 12px;
}

.ramadan-card-title {
  display: flex;
  align-items: center;
  gap: 11px;
}

.ramadan-moon-icon {
  width: 46px;
  height: 46px;
  background: rgba(255, 215, 0, 0.15);
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ramadan-moon-icon i {
  font-size: 1.3em;
  color: #ffd700;
  animation: moonFloat 4s ease-in-out infinite;
  filter: drop-shadow(0 0 6px rgba(255, 215, 0, 0.5));
}

@keyframes moonFloat {
  0%,
  100% {
    transform: translateY(0) rotate(-5deg);
    filter: drop-shadow(0 0 4px rgba(255, 215, 0, 0.4));
  }
  50% {
    transform: translateY(-4px) rotate(5deg);
    filter: drop-shadow(0 0 12px rgba(255, 215, 0, 0.8));
  }
}

.ramadan-card-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ramadan-label {
  font-size: 0.7em;
  color: rgba(255, 215, 0, 0.55);
  letter-spacing: 2.5px;
  text-transform: uppercase;
  font-weight: 600;
}

.ramadan-title-name {
  font-size: 1.05em;
  font-weight: 800;
  color: #ffd700;
  letter-spacing: 0.3px;
}

.ramadan-days-pill {
  background: rgba(255, 215, 0, 0.1);
  border: 1px solid rgba(255, 215, 0, 0.25);
  border-radius: 14px;
  padding: 8px 14px;
  text-align: center;
  min-width: 60px;
  flex-shrink: 0;
}

.ramadan-days-number {
  display: block;
  font-size: 1.5em;
  font-weight: 900;
  color: #ffd700;
  line-height: 1;
}

.ramadan-days-text {
  display: block;
  font-size: 0.65em;
  color: rgba(255, 215, 0, 0.6);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 2px;
}

/* Progress bar */
.ramadan-progress-wrap {
  margin-bottom: 16px;
}

.ramadan-progress-info {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 7px;
}

.ramadan-progress-info .pages-done {
  font-size: 1.1em;
  font-weight: 800;
  color: #fff;
}

.ramadan-progress-info .pages-total {
  font-size: 0.8em;
  color: rgba(255, 255, 255, 0.45);
}

.ramadan-progress-info .pct {
  font-size: 0.85em;
  font-weight: 700;
  color: #ffd700;
}

.ramadan-bar-track {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 99px;
  overflow: visible;
  position: relative;
}

.ramadan-bar-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #b8860b, #ffd700, #ffe55c);
  position: relative;
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 8px rgba(255, 215, 0, 0.4);
}

.ramadan-bar-fill::after {
  content: "";
  position: absolute;
  right: -1px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  background: #ffd700;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.25);
  animation: dotPulse 1.8s ease-in-out infinite;
}

@keyframes dotPulse {
  0%,
  100% {
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.25);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(255, 215, 0, 0.1);
  }
}

/* Stats 3 kolom */
.ramadan-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.ramadan-stat-box {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 10px 8px;
  text-align: center;
}

.ramadan-stat-val {
  display: block;
  font-size: 1.25em;
  font-weight: 800;
  color: #ffd700;
  line-height: 1;
  margin-bottom: 3px;
}

.ramadan-stat-lbl {
  font-size: 0.67em;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Alert status */
.ramadan-status-alert {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  border-radius: 10px;
  font-size: 0.82em;
  font-weight: 600;
}

.ramadan-status-alert.on-track {
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.25);
  color: #86efac;
}

.ramadan-status-alert.behind {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #fca5a5;
}

.ramadan-status-alert.not-started {
  background: rgba(255, 215, 0, 0.08);
  border: 1px solid rgba(255, 215, 0, 0.2);
  color: rgba(255, 215, 0, 0.8);
}

.ramadan-status-alert.done {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #4ade80;
  justify-content: center;
  font-size: 0.9em;
}

/* ── Settings Card ─────────────────────── */
.target-card.ramadan-settings-card {
  border-left: 4px solid #ffd700;
}

.ramadan-set-name {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  font-size: 0.95em;
  margin-bottom: 12px;
  transition: border-color 0.2s;
  color: #1a1a2e;
  font-weight: 600;
}

.ramadan-set-name:focus {
  border-color: #ffd700;
  outline: none;
}

.ramadan-preset-row {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.r-preset {
  padding: 6px 13px;
  border: 1.5px solid #e2e8f0;
  background: white;
  border-radius: 20px;
  font-size: 0.8em;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  color: #555;
}

.r-preset:hover {
  border-color: #ffd700;
  color: #92400e;
  background: #fffbeb;
}
.r-preset.active {
  background: #1a1a2e;
  color: #ffd700;
  border-color: #1a1a2e;
}

.ramadan-date-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.ramadan-date-row > div label,
.ramadan-pages-row label {
  display: block;
  font-size: 0.82em;
  font-weight: 700;
  color: #64748b;
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ramadan-date-row input,
.ramadan-pages-row input {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  font-size: 0.9em;
  transition: border-color 0.2s;
}

.ramadan-date-row input:focus,
.ramadan-pages-row input:focus {
  border-color: #ffd700;
  outline: none;
}

.ramadan-pages-row {
  margin-bottom: 14px;
}

.ramadan-pages-hint {
  font-size: 0.78em;
  color: #94a3b8;
  margin-top: 4px;
  display: block;
}

/* ── Detail Modal ──────────────────────── */
.ramadan-modal-hero {
  background: linear-gradient(145deg, #0d1b2a, #0f3460);
  border-radius: 16px;
  padding: 24px;
  text-align: center;
  margin-bottom: 20px;
  border: 1px solid rgba(255, 215, 0, 0.15);
  position: relative;
  overflow: hidden;
}

.ramadan-modal-hero::before {
  content: "";
  position: absolute;
  top: -30px;
  right: -30px;
  width: 120px;
  height: 120px;
  background: radial-gradient(
    circle,
    rgba(255, 215, 0, 0.1) 0%,
    transparent 70%
  );
  border-radius: 50%;
  pointer-events: none;
}

.ramadan-modal-hero h3 {
  color: #ffd700;
  font-size: 1.3em;
  margin: 0 0 5px;
}
.ramadan-modal-hero p {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.88em;
  margin: 0;
}

.ramadan-modal-hero-icon {
  width: 52px;
  height: 52px;
  background: rgba(255, 215, 0, 0.15);
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
}

.ramadan-modal-hero-icon i {
  font-size: 1.5em;
  color: #ffd700;
}

.ramadan-detail-4grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}

.rd-box {
  background: #f8fafc;
  border-radius: 12px;
  padding: 14px 12px;
  text-align: center;
  border-top: 3px solid #ffd700;
}

.rd-icon {
  font-size: 1em;
  color: #ffd700;
  display: block;
  margin-bottom: 6px;
}

.rp-icon {
  margin-right: 6px;
  color: #b45309;
  width: 14px;
  display: inline-block;
  text-align: center;
}

.ramadan-finish-icon {
  font-size: 2em;
  color: #16a34a;
  display: block;
  margin-bottom: 10px;
}

.rd-val {
  display: block;
  font-size: 1.5em;
  font-weight: 900;
  color: #1a1a2e;
  line-height: 1;
  margin-bottom: 4px;
}

.rd-lbl {
  font-size: 0.77em;
  color: #94a3b8;
}

.ramadan-plan-card {
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
  border: 2px solid #fcd34d;
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 14px;
}

.ramadan-plan-card h4 {
  color: #78350f;
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95em;
}

.rp-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 0;
  border-bottom: 1px dashed rgba(251, 191, 36, 0.4);
  font-size: 0.88em;
}

.rp-row:last-child {
  border-bottom: none;
}
.rp-row span {
  color: #92400e;
}
.rp-row strong {
  font-size: 1em;
}

.ramadan-finish-banner {
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  border: 2px solid #16a34a;
  border-radius: 14px;
  padding: 20px;
  text-align: center;
  margin-top: 16px;
}

.ramadan-finish-banner p {
  color: #15803d;
  font-size: 1.05em;
  font-weight: 800;
  margin: 0 0 4px;
}

.ramadan-finish-banner small {
  color: #16a34a;
  font-size: 0.85em;
}

/* Dark mode */
body.dark-mode .ramadan-set-name,
body.dark-mode .ramadan-date-row input,
body.dark-mode .ramadan-pages-row input {
  background: #1e293b;
  border-color: #334155;
  color: #e2e8f0;
}

body.dark-mode .r-preset {
  background: #1e293b;
  border-color: #334155;
  color: #cbd5e1;
}

body.dark-mode .r-preset.active {
  background: #ffd700;
  color: #1a1a2e;
  border-color: #ffd700;
}

body.dark-mode .rd-box {
  background: #0f172a;
}
body.dark-mode .rd-val {
  color: #f1f5f9;
}

body.dark-mode .ramadan-plan-card {
  background: linear-gradient(135deg, #1c1400, #2d1f00);
  border-color: #854d0e;
}

body.dark-mode .ramadan-plan-card h4 {
  color: #fde68a;
}
body.dark-mode .rp-row span {
  color: #fde68a;
}

@media (max-width: 380px) {
  .ramadan-date-row {
    grid-template-columns: 1fr;
  }
  .ramadan-detail-4grid {
    grid-template-columns: 1fr 1fr;
  }
}
