:root {
  --bg: #f3f7f0;
  --card: #ffffff;
  --primary: #2e7d32;
  --primary-light: #e8f5e9;
  --accent: #ffb300;
  --text: #1b1b1b;
  --muted: #6b7280;
  --border: #d1d5db;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Noto Naskh Arabic", "Traditional Arabic", serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.8;
  min-height: 100vh;
}

.app {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

.app-header {
  text-align: center;
  margin-bottom: 28px;
}

.app-header h1 {
  margin: 0;
  font-size: 1.9rem;
  color: var(--primary);
}

.subtitle {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 1rem;
}

.user-select {
  text-align: center;
}

.user-select h2 {
  margin-bottom: 18px;
  font-weight: 600;
  color: var(--text);
}

.users {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.user-card {
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 36px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  box-shadow: var(--shadow);
  min-width: 140px;
}

.user-card:hover {
  transform: translateY(-3px);
  border-color: var(--primary);
  box-shadow: 0 8px 28px rgba(46, 125, 50, 0.12);
}

.user-card .avatar {
  font-size: 2.6rem;
}

.user-card .name {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary);
}

.hidden {
  display: none !important;
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 10px;
}

.current-user {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-light);
  padding: 6px 14px;
  border-radius: 999px;
}

.period-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.tab {
  flex: 1;
  padding: 12px;
  border: 2px solid var(--border);
  background: var(--card);
  border-radius: var(--radius);
  cursor: pointer;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--muted);
  transition: all 0.15s ease;
}

.tab.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.progress-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.progress-card {
  flex: 1;
  background: var(--card);
  border-radius: var(--radius);
  padding: 14px 18px;
  box-shadow: var(--shadow);
  min-width: 220px;
}

.progress-label {
  display: block;
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 8px;
}

.progress-bar {
  height: 10px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), #66bb6a);
  border-radius: 999px;
  transition: width 0.3s ease;
}

.progress-text {
  font-size: 0.9rem;
  color: var(--muted);
}

.btn {
  border: none;
  border-radius: 12px;
  padding: 10px 16px;
  font-family: inherit;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn-ghost {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  background: var(--primary-light);
}

.btn-reset {
  background: #fff3e0;
  color: #e65100;
  border: 1px solid #ffcc80;
}

.btn-reset:hover {
  background: #ffe0b2;
}

.azkar-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.zikr-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  border-right: 5px solid var(--primary);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.zikr-card.done {
  border-right-color: var(--accent);
  background: #fffbf2;
}

.zikr-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}

.zikr-text {
  font-size: 1.25rem;
  line-height: 2;
  margin: 0;
  flex: 1;
}

.zikr-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.badge {
  background: var(--primary-light);
  color: var(--primary);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  white-space: nowrap;
}

.zikr-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
}

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

.counter button {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: var(--primary);
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}

.counter button:hover {
  background: #1b5e20;
}

.counter button:disabled {
  background: var(--border);
  cursor: not-allowed;
}

.count-display {
  min-width: 70px;
  text-align: center;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
}

.done-btn {
  background: var(--primary);
  color: #fff;
  padding: 10px 20px;
  border-radius: 12px;
  border: none;
  font-family: inherit;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.15s ease;
}

.done-btn:hover {
  background: #1b5e20;
}

.done-btn.completed {
  background: var(--accent);
  color: #3e2723;
}

@media (max-width: 480px) {
  .app-header h1 {
    font-size: 1.5rem;
  }

  .zikr-text {
    font-size: 1.1rem;
  }

  .user-card {
    padding: 20px 28px;
  }
}
