/* ============================================
   VARIABLES & RESET
============================================ */
:root {
  /* Color Palette - Islami & Elegant */
  --primary-color: #0f766e;
  --primary-dark: #0d554f;
  --primary-light: #14b8a6;
  --gold: #d4af37;
  --gold-light: #f4e4a6;
  --gold-dark: #b8941f;
  --white: #f9fafb;
  --off-white: #f0f3f5;
  --dark-bg: #020617;
  --card-bg: rgba(255, 255, 255, 0.08);
  --shadow: rgba(0, 0, 0, 0.25);
  --shadow-light: rgba(255, 255, 255, 0.05);
  
  /* Typography */
  --font-primary: 'Poppins', sans-serif;
  --font-arabic: 'Amiri', 'Scheherazade', serif;
  
  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-round: 50%;
  
  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  
  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
  
  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #0f766e 0%, #020617 100%);
  --gradient-gold: linear-gradient(135deg, #d4af37 0%, #f4e4a6 100%);
  --gradient-gold-reverse: linear-gradient(135deg, #f4e4a6 0%, #d4af37 100%);
  --gradient-card: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
  --gradient-clock: linear-gradient(135deg, rgba(20, 184, 166, 0.1) 0%, rgba(212, 175, 55, 0.1) 100%);
}

/* ============================================
   BASE STYLES & RESET
============================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  background: radial-gradient(ellipse at center, var(--primary-dark) 0%, var(--dark-bg) 70%);
  color: var(--white);
  min-height: 100vh;
  line-height: 1.6;
  padding-bottom: env(safe-area-inset-bottom);
  padding-top: env(safe-area-inset-top);
  touch-action: manipulation;
  overflow-x: hidden;
  position: relative;
}

/* Islamic Pattern Overlay */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(212, 175, 55, 0.03) 0%, transparent 25%),
    radial-gradient(circle at 90% 30%, rgba(212, 175, 55, 0.02) 0%, transparent 25%),
    radial-gradient(circle at 50% 85%, rgba(20, 184, 166, 0.02) 0%, transparent 25%);
  pointer-events: none;
  z-index: -1;
}

/* ============================================
   TYPOGRAPHY
============================================ */
h1, h2, h3, h4 {
  font-weight: 600;
  line-height: 1.3;
}

.arabic-text {
  font-family: var(--font-arabic);
  font-size: 1.4em;
  letter-spacing: 0;
}

/* ============================================
   HEADER STYLES
============================================ */
header {
  text-align: center;
  padding: var(--space-xl) var(--space-md);
  position: relative;
  background: rgba(2, 6, 23, 0.7);
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
  box-shadow: 0 4px 20px var(--shadow);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  overflow: hidden;
}

/* Header Background Pattern */
header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(circle at 20% 80%, rgba(212, 175, 55, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(20, 184, 166, 0.05) 0%, transparent 50%);
  z-index: -1;
}

.logo-container {
  position: relative;
  display: inline-block;
  margin-bottom: var(--space-xl);
}

/* Logo Frame yang Simetris */
.logo-frame {
  width: 140px;
  height: 140px;
  margin: 0 auto var(--space-lg);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: float 6s ease-in-out infinite;
}

.logo-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius-round);
  padding: 2px;
  background: linear-gradient(135deg, var(--gold), var(--primary-light), var(--gold));
  -webkit-mask: 
    linear-gradient(#fff 0 0) content-box, 
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: rotate 20s linear infinite;
}

.logo-frame::after {
  content: "";
  font-family: "Font Awesome 6 Free";
  position: absolute;
  bottom: -10px;
  right: -10px;
  background: var(--gradient-gold);
  color: var(--dark-bg);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 18px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  z-index: 2;
}

/* Logo yang Simetris */
.logo {
  width: 100px;
  height: 100px;
  object-fit: contain;
  border-radius: var(--radius-round);
  filter: 
    drop-shadow(0 0 15px rgba(212, 175, 55, 0.5))
    drop-shadow(0 0 30px rgba(212, 175, 55, 0.2));
  position: relative;
  z-index: 1;
  transition: transform var(--transition-normal);
}

.logo:hover {
  transform: scale(1.05);
}

header h1 {
  font-size: 1.8rem;
  margin-bottom: var(--space-lg);
  background: linear-gradient(to right, var(--gold), var(--primary-light), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  display: inline-block;
  padding-bottom: var(--space-sm);
}

header h1::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: var(--gradient-gold);
  border-radius: 2px;
}

/* Clock & Date Container */
.time-container {
  display: inline-block;
  position: relative;
  margin: var(--space-lg) auto;
  padding: var(--space-lg);
  background: var(--gradient-clock);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(212, 175, 55, 0.3);
  box-shadow: 
    0 10px 30px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 0 0 1px rgba(20, 184, 166, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  min-width: 300px;
  animation: glow 3s ease-in-out infinite;
}

.time-container::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: calc(var(--radius-xl) + 2px);
  padding: 2px;
  background: linear-gradient(45deg, 
    transparent 30%, 
    rgba(212, 175, 55, 0.3) 50%, 
    transparent 70%);
  -webkit-mask: 
    linear-gradient(#fff 0 0) content-box, 
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: shine 4s linear infinite;
}

#clock {
  font-size: 3.2rem;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--gold-light);
  text-shadow: 
    0 2px 10px rgba(0, 0, 0, 0.5),
    0 0 20px rgba(212, 175, 55, 0.3);
  font-feature-settings: "tnum";
  position: relative;
  display: inline-block;
}

/* Digital Clock Effect */
#clock::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 10%;
  width: 80%;
  height: 2px;
  background: linear-gradient(90deg, 
    transparent, 
    var(--gold), 
    var(--primary-light), 
    transparent);
  border-radius: 1px;
  opacity: 0.7;
}

.date-container {
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid rgba(212, 175, 55, 0.2);
  position: relative;
}

#date {
  font-size: 1.2rem;
  color: var(--off-white);
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

#date::before {
  content: "📅";
  font-size: 1.1rem;
  opacity: 0.8;
}

.hijri-date {
  font-size: 1rem;
  color: var(--gold-light);
  font-style: italic;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  background: rgba(212, 175, 55, 0.1);
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-md);
  margin-top: var(--space-sm);
}

.hijri-date::before {
  content: "";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 0.9rem;
}

/* ============================================
   COUNTDOWN SECTION
============================================ */
#countdown {
  background: var(--gradient-card);
  margin: var(--space-xl) auto;
  padding: var(--space-xl);
  border-radius: var(--radius-xl);
  text-align: center;
  max-width: 90%;
  border: 1px solid rgba(212, 175, 55, 0.2);
  box-shadow: 
    0 15px 40px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
  animation: slideUp 0.8s ease-out;
}

#countdown::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, 
    var(--primary-light), 
    var(--gold), 
    var(--primary-light));
  background-size: 200% 100%;
  animation: shimmer 3s linear infinite;
}

#countdown span {
  display: block;
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--gold-light);
  margin-top: var(--space-md);
  direction: ltr;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  position: relative;
  display: inline-block;
  padding: var(--space-sm) var(--space-lg);
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(212, 175, 55, 0.3);
}

/* ============================================
   TODAY SCHEDULE GRID
============================================ */
#todaySchedule {
  display: grid;
  gap: var(--space-lg);
  padding: var(--space-xl);
  max-width: 1400px;
  margin: 0 auto;
  animation: fadeIn 1s ease-out;
}

.card {
  background: var(--gradient-card);
  border-radius: var(--radius-xl);
  padding: var(--space-lg);
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: cardAppear 0.6s ease-out;
  animation-fill-mode: backwards;
}

/* Stagger animation untuk card */
.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }
.card:nth-child(4) { animation-delay: 0.4s; }
.card:nth-child(5) { animation-delay: 0.5s; }
.card:nth-child(6) { animation-delay: 0.6s; }

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(255, 255, 255, 0.1), 
    transparent);
  transition: left 0.7s ease;
}

.card:hover::before {
  left: 100%;
}

.card:hover {
  transform: translateY(-10px) scale(1.02);
  border-color: rgba(212, 175, 55, 0.5);
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.4),
    0 0 30px rgba(212, 175, 55, 0.2);
}

.card.active {
  border: 2px solid var(--gold);
  box-shadow: 
    0 0 40px rgba(212, 175, 55, 0.6),
    inset 0 0 25px rgba(212, 175, 55, 0.15);
  background: linear-gradient(135deg, 
    rgba(212, 175, 55, 0.2) 0%, 
    rgba(20, 184, 166, 0.15) 100%);
  animation: pulse-gold 2s ease-in-out infinite;
  position: relative;
}

.card.active::after {
  content: "🕌";
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 1.2rem;
  opacity: 0.8;
  animation: bounce 2s ease-in-out infinite;
}

.prayer-name {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: var(--space-md);
  color: var(--gold-light);
  position: relative;
  display: inline-block;
  padding-bottom: var(--space-sm);
}

.prayer-name::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 3px;
  background: var(--gradient-gold);
  border-radius: 2px;
}

.prayer-time {
  font-size: 2rem;
  font-weight: 800;
  color: var(--white);
  margin: var(--space-md) 0;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  font-feature-settings: "tnum";
  position: relative;
}

.prayer-time::after {
  content: "🕋";
  position: absolute;
  right: -25px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2rem;
  opacity: 0.7;
}

.prayer-icon {
  font-size: 1.8rem;
  margin-bottom: var(--space-md);
  color: var(--primary-light);
  filter: drop-shadow(0 0 5px rgba(20, 184, 166, 0.5));
}

/* ============================================
   ACTIONS SECTION
============================================ */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  justify-content: center;
  padding: var(--space-xl);
  background: rgba(0, 0, 0, 0.25);
  margin: var(--space-xl) auto;
  border-radius: var(--radius-xl);
  max-width: 95%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: slideUp 0.8s ease-out 0.3s backwards;
}

select {
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
  border: 1px solid rgba(212, 175, 55, 0.4);
  border-radius: var(--radius-lg);
  padding: var(--space-md) var(--space-lg);
  font-size: 1rem;
  min-width: 160px;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  transition: all var(--transition-normal);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23d4af37' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-md) center;
  background-size: 16px;
  padding-right: var(--space-2xl);
}

select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 
    0 0 15px rgba(212, 175, 55, 0.4),
    inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

select option {
  background: var(--dark-bg);
  color: var(--white);
  padding: var(--space-md);
}

button {
  background: var(--gradient-gold);
  color: var(--dark-bg);
  border: none;
  border-radius: var(--radius-lg);
  padding: var(--space-md) var(--space-xl);
  font-size: 1rem;
  font-weight: 700;
  min-height: 52px;
  cursor: pointer;
  transition: all var(--transition-normal);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  position: relative;
  overflow: hidden;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-size: 0.9rem;
}

button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(255, 255, 255, 0.4), 
    transparent);
  transition: left 0.7s ease;
}

button:hover::before {
  left: 100%;
}

button:hover {
  transform: translateY(-4px);
  box-shadow: 
    0 15px 30px rgba(212, 175, 55, 0.4),
    0 5px 15px rgba(0, 0, 0, 0.2);
}

button:active {
  transform: translateY(-2px);
  transition: transform 0.1s;
}

.loading-box {
  padding: 40px;
  text-align: center;
  font-weight: 600;
  animation: pulse 1.2s infinite;
}

@keyframes pulse {
  0% { opacity: .4 }
  50% { opacity: 1 }
  100% { opacity: .4 }
}

.fade-in {
  animation: fadeIn .6s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   MONTHLY TABLE
============================================ */
#monthlyTable {
  padding: var(--space-xl);
  max-width: 95%;
  margin: 0 auto;
  animation: fadeIn 1s ease-out 0.5s backwards;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 
    0 20px 50px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  position: relative;
}

table::before {
  content: "";
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  bottom: -1px;
  background: linear-gradient(45deg, 
    transparent 30%, 
    rgba(212, 175, 55, 0.1) 50%, 
    transparent 70%);
  border-radius: calc(var(--radius-xl) + 1px);
  z-index: -1;
  animation: shimmer 6s linear infinite;
}

th {
  background: linear-gradient(to bottom, 
    rgba(15, 118, 110, 0.9), 
    rgba(13, 85, 79, 0.9));
  color: var(--white);
  font-weight: 700;
  padding: var(--space-lg);
  text-align: center;
  border-bottom: 3px solid var(--gold);
  position: sticky;
  top: 0;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.9rem;
}

td {
  padding: var(--space-md);
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: all var(--transition-fast);
  position: relative;
}

td:hover {
  background-color: rgba(212, 175, 55, 0.15);
  transform: scale(1.05);
  z-index: 1;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

tr:last-child td {
  border-bottom: none;
}

.current-day {
  background: linear-gradient(135deg, 
    rgba(212, 175, 55, 0.25), 
    rgba(20, 184, 166, 0.15)) !important;
  font-weight: 800;
  color: var(--gold-light);
  position: relative;
}

.current-day::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  right: 2px;
  bottom: 2px;
  border: 2px solid var(--gold);
  border-radius: var(--radius-sm);
  pointer-events: none;
}

.current-day::after {
  content: "✨";
  position: absolute;
  top: -8px;
  right: -8px;
  font-size: 12px;
  animation: sparkle 2s ease-in-out infinite;
}

/* ============================================
   MODAL STYLES
============================================ */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.modal.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: linear-gradient(135deg, 
    rgba(2, 6, 23, 0.95), 
    rgba(13, 85, 79, 0.95));
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  max-width: 90vw;
  max-height: 90vh;
  overflow: auto;
  border: 1px solid rgba(212, 175, 55, 0.4);
  box-shadow: 
    0 30px 80px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(212, 175, 55, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transform: scale(0.9) translateY(20px);
  transition: transform var(--transition-normal);
  position: relative;
}

.modal.active .modal-content {
  transform: scale(1) translateY(0);
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(212, 175, 55, 0.2);
  border: 1px solid rgba(212, 175, 55, 0.4);
  color: var(--gold-light);
  font-size: 1.5rem;
  cursor: pointer;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-round);
  transition: all var(--transition-normal);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.modal-close:hover {
  background: rgba(212, 175, 55, 0.4);
  transform: rotate(90deg);
  box-shadow: 0 5px 15px rgba(212, 175, 55, 0.3);
}

/* ============================================
   ANIMATIONS
============================================ */
@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-15px);
  }
}

@keyframes rotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes glow {
  0%, 100% {
    box-shadow: 
      0 10px 30px rgba(0, 0, 0, 0.3),
      inset 0 1px 0 rgba(255, 255, 255, 0.1),
      0 0 0 1px rgba(20, 184, 166, 0.1);
  }
  50% {
    box-shadow: 
      0 10px 40px rgba(0, 0, 0, 0.4),
      inset 0 1px 0 rgba(255, 255, 255, 0.15),
      0 0 0 1px rgba(212, 175, 55, 0.2),
      0 0 30px rgba(212, 175, 55, 0.1);
  }
}

@keyframes shine {
  0% {
    background-position: -200% center;
  }
  100% {
    background-position: 200% center;
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% center;
  }
  100% {
    background-position: 200% center;
  }
}

@keyframes pulse-gold {
  0%, 100% {
    box-shadow: 
      0 0 40px rgba(212, 175, 55, 0.6),
      inset 0 0 25px rgba(212, 175, 55, 0.15);
  }
  50% {
    box-shadow: 
      0 0 60px rgba(212, 175, 55, 0.8),
      inset 0 0 35px rgba(212, 175, 55, 0.25);
  }
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes cardAppear {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes sparkle {
  0%, 100% {
    opacity: 0.5;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.3);
  }
}

.export-force table,
.export-force th,
.export-force td {
  color: #000 !important;
  opacity: 1 !important;
}

.export-force th {
  background: #0f766e !important;
  color: #ffffff !important;
}

.export-force tr {
  background: #ffffff !important;
}

/* ============================================
   RESPONSIVE DESIGN
============================================ */
@media (max-width: 768px) {
  #todaySchedule {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
    padding: var(--space-md);
  }
  
  #clock {
    font-size: 2.5rem;
    letter-spacing: 1px;
  }
  
  .time-container {
    min-width: 280px;
    padding: var(--space-md);
  }
  
  .actions {
    flex-direction: column;
    align-items: center;
    padding: var(--space-lg);
  }
  
  select, button {
    width: 100%;
    max-width: 320px;
  }
  
  table {
    font-size: 0.85rem;
  }
  
  th, td {
    padding: var(--space-sm);
  }
  
  .logo-frame {
    width: 120px;
    height: 120px;
  }
  
  .logo {
    width: 85px;
    height: 85px;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  #todaySchedule {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .card:nth-child(6) {
    grid-column: span 1;
  }
}

@media (min-width: 1025px) {
  #todaySchedule {
    grid-template-columns: repeat(5, 1fr);
  }
}

/* Untuk tampilan sangat kecil (mobile portrait) */
@media (max-width: 480px) {
  #todaySchedule {
    grid-template-columns: 1fr;
    padding: var(--space-md);
  }
  
  header {
    padding: var(--space-lg) var(--space-md);
  }
  
  .logo-frame {
    width: 100px;
    height: 100px;
  }
  
  .logo {
    width: 70px;
    height: 70px;
  }
  
  #clock {
    font-size: 2rem;
  }
  
  .time-container {
    min-width: 260px;
  }
  
  .prayer-time {
    font-size: 1.6rem;
  }
}

/* Untuk landscape mobile */
@media (max-height: 600px) and (orientation: landscape) {
  header {
    padding: var(--space-md);
  }
  
  .logo-frame {
    width: 90px;
    height: 90px;
    margin-bottom: var(--space-md);
  }
  
  .logo {
    width: 65px;
    height: 65px;
  }
  
  #clock {
    font-size: 2rem;
  }
  
  #todaySchedule {
    grid-template-columns: repeat(3, 1fr);
    padding: var(--space-md);
    gap: var(--space-sm);
  }
  
  .card {
    padding: var(--space-md);
  }
}

/* Dark mode preference */
@media (prefers-color-scheme: dark) {
  :root {
    --card-bg: rgba(0, 0, 0, 0.4);
  }
}

/* Reduce motion preference */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Print styles */
@media print {
  body {
    background: white !important;
    color: black !important;
  }
  
  .actions, #countdown, header::before, .time-container::before {
    display: none !important;
  }
  
  .logo-frame {
    filter: none !important;
  }
  
  table {
    box-shadow: none !important;
    border: 1px solid #ccc !important;
    background: white !important;
    color: black !important;
  }
  
  .current-day {
    background: #f0f0f0 !important;
    color: black !important;
  }
}
