:root{
  --primary:#144207;
  --primary-light:#37f103;
  --accent:#ffd700;
  --bg1:#f5f7fa;
  --bg2:#e8ecef;
  --card:#ffffff;
  --muted:#6b7280;
  --success:#2b9348;
  --danger:#ef476f;
  --radius:20px;
}

.azkar-page {
  background: linear-gradient(135deg, var(--bg1) 0%, var(--bg2) 100%);
  min-height: 100vh;
  padding-bottom: 40px;
}

.azkar-controls{
  background: white;
  padding: 20px;
  border-radius: var(--radius);
  margin: 30px auto;
  max-width: 1200px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  display: flex;
  gap: 15px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}

.search-box {
  flex: 1;
  min-width: 250px;
  padding: 12px 18px;
  border: 2px solid rgba(20, 66, 7, 0.1);
  border-radius: 12px;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.search-box:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(20, 66, 7, 0.1);
}

.switch-btn{
  background: transparent;
  border: 2px solid var(--primary);
  padding: 12px 20px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  color: var(--primary);
  transition: all 0.3s ease;
  font-size: 1rem;
}
.switch-btn:hover{
  background: rgba(20, 66, 7, 0.05);
  transform: translateY(-2px);
}
.switch-btn.active{
  background: linear-gradient(135deg, var(--primary) 0%, #0d4535 100%);
  color: white;
  box-shadow: 0 5px 15px rgba(20, 66, 7, 0.3);
}
.reset-btn{
  background: linear-gradient(135deg, #ef476f 0%, #c91840 100%);
  border: none;
  padding: 12px 20px;
  border-radius: 12px;
  cursor: pointer;
  color: white;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.3s ease;
}
.reset-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(239, 71, 111, 0.4);
}

.azkar-main{
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Profile Card */
.azkar-profile-card {
  background: white;
  border-radius: var(--radius);
  padding: 30px;
  margin: 30px auto 20px;
  max-width: 1200px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  gap: 30px;
  animation: fadeIn 0.5s ease;
}

.profile-image-wrapper {
  position: relative;
  flex-shrink: 0;
}

.azkar-profile-img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 5px solid transparent;
  background: linear-gradient(white, white) padding-box,
              linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%) border-box;
  box-shadow: 0 8px 20px rgba(20, 66, 7, 0.2);
  animation: rotateBorderSlow 4s linear infinite;
}

@keyframes rotateBorderSlow {
  0% {
    background: linear-gradient(white, white) padding-box,
                linear-gradient(0deg, var(--primary), var(--primary-light)) border-box;
  }
  50% {
    background: linear-gradient(white, white) padding-box,
                linear-gradient(180deg, var(--primary), var(--primary-light)) border-box;
  }
  100% {
    background: linear-gradient(white, white) padding-box,
                linear-gradient(360deg, var(--primary), var(--primary-light)) border-box;
  }
}

.profile-info {
  flex: 1;
}

.profile-maghfor {
  font-size: 1rem;
  color: var(--muted);
  margin: 0 0 8px 0;
  font-weight: 500;
}

.profile-name-azkar {
  font-size: 2rem;
  color: var(--primary);
  margin: 0 0 12px 0;
  font-weight: 700;
}

.profile-from {
  font-size: 1.1rem;
  color: #333;
  margin: 0 0 15px 0;
}

.profile-stats {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, rgba(20, 66, 7, 0.05) 0%, rgba(20, 66, 7, 0.1) 100%);
  padding: 10px 18px;
  border-radius: 25px;
  font-weight: 600;
  color: var(--primary);
  border: 2px solid rgba(20, 66, 7, 0.1);
}

.stat-item i {
  font-size: 1.1rem;
}

.panel{
  background: white;
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  animation: fadeIn 0.5s ease;
}

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

.section-header{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid rgba(20, 66, 7, 0.1);
}
.section-title h2{
  margin: 0;
  font-size: 1.8rem;
  color: var(--primary);
  font-weight: 700;
}
.section-title small{
  color: var(--muted);
  font-size: 1rem;
  display: block;
  margin-top: 5px;
}

.cards{
  display: grid;
  gap: 20px;
}

.card{
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border-radius: 15px;
  padding: 25px;
  box-shadow: 0 3px 15px rgba(0, 0, 0, 0.05);
  border: 2px solid rgba(20, 66, 7, 0.05);
  transition: all 0.3s ease;
  animation: cardSlideIn 0.4s ease;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  user-select: none;
}

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

.card::after {
  content: '👆 اضغط للتسبيح';
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 0.75rem;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.9);
  padding: 4px 10px;
  border-radius: 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.card:hover::after {
  opacity: 1;
}

.card.completed::after {
  content: '✅ مكتمل';
  opacity: 1;
  background: rgba(43, 147, 72, 0.1);
  color: var(--success);
}

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

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(20, 66, 7, 0.15);
  border-color: var(--primary);
}

.card:active {
  transform: scale(0.99);
  box-shadow: 0 2px 10px rgba(20, 66, 7, 0.15);
}

.card.completed {
  background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
  border-color: var(--success);
  cursor: default;
}

.card.completed:hover {
  transform: translateY(-2px);
}

.card.completed:active {
  transform: translateY(-1px);
}

@keyframes cardSlideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.card .text{
  white-space: pre-line;
  font-size: 1.15rem;
  line-height: 2;
  color: #1a1a1a;
  font-weight: 500;
  margin-bottom: 20px;
}
.meta{
  margin-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
  padding-top: 20px;
  border-top: 1px solid rgba(0,0,0,0.05);
}

.times{
  color: var(--muted);
  font-size: 0.95rem;
  flex: 1;
}

.counter-wrap{
  display: flex;
  gap: 12px;
  align-items: center;
}

.btn-decr{
  width: 60px;
  height: 60px;
  border-radius: 15px;
  border: 0;
  background: linear-gradient(135deg, var(--primary) 0%, #0d4535 100%);
  color: white;
  font-weight: 700;
  font-size: 1.3rem;
  cursor: pointer;
  box-shadow: 0 5px 15px rgba(20, 66, 7, 0.3);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-decr::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transform: translate(-50%, -50%);
  transition: width 0.5s, height 0.5s;
}

.btn-decr:active::after {
  width: 200px;
  height: 200px;
}

.btn-decr:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 18px rgba(20, 66, 7, 0.35);
}

.btn-decr.done{
  background: linear-gradient(135deg, var(--success) 0%, #1f7a34 100%);
  animation: successPulse 0.4s ease;
}

@keyframes successPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.counter-display{
  min-width: 80px;
  height: 60px;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(20, 66, 7, 0.05) 0%, rgba(20, 66, 7, 0.1) 100%);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--primary);
  padding: 10px 15px;
  border: 2px solid rgba(20, 66, 7, 0.1);
}

/* Completion Animation */
@keyframes celebrate {
  0% { transform: scale(1); }
  50% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

.celebration {
  animation: celebrate 0.3s ease;
}

/* Confetti effect */
.confetti {
  position: fixed;
  width: 10px;
  height: 10px;
  background: var(--primary-light);
  position: fixed;
  top: 0;
  animation: confettiFall 3s ease-out forwards;
  z-index: 9999;
}

@keyframes confettiFall {
  to {
    transform: translateY(100vh) rotate(360deg);
    opacity: 0;
  }
}

.long { font-size: 1.1rem; }

.progress-indicator {
  margin-top: 20px;
  padding: 15px;
  background: rgba(20, 66, 7, 0.05);
  border-radius: 10px;
  text-align: center;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(0,0,0,0.1);
  border-radius: 10px;
  overflow: hidden;
  margin-top: 10px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%);
  transition: width 0.5s ease;
  border-radius: 10px;
}

@media (max-width:900px){
  .azkar-controls {padding: 15px; gap: 10px;}
  .search-box {min-width: 100%;}
}

@media (max-width:768px){
  .azkar-profile-card {
    flex-direction: column;
    text-align: center;
    padding: 25px 20px;
  }
  
  .azkar-profile-img {
    width: 100px;
    height: 100px;
  }
  
  .profile-name-azkar {
    font-size: 1.5rem;
  }
  
  .profile-stats {
    justify-content: center;
  }
  
  .card { padding: 20px; }
  .card .text { font-size: 1.05rem; }
  .btn-decr, .counter-display { width: 50px; height: 50px; font-size: 1.1rem; }
  .card::after { font-size: 0.7rem; padding: 3px 8px; }
}

@media (max-width:480px){
  .azkar-profile-img {
    width: 80px;
    height: 80px;
  }
  
  .profile-name-azkar {
    font-size: 1.3rem;
  }
  
  .stat-item {
    font-size: 0.9rem;
    padding: 8px 14px;
  }
  
  .card::after { display: none; }
}
