:root {
  --primary: #047857;
  --primary-light: #10b981;
  --primary-dark: #065f46;
  --accent: #f59e0b;
  --text-dark: #0f172a;
  --text-muted: #475569;
  --bg: #ecfdf5;
  --card-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.4);
}

* { 
  box-sizing: border-box; 
  margin: 0; 
  padding: 0; 
}

body {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text-dark);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px;
}

/* Background Blobs for Glassmorphism */
.background-blobs {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  overflow: hidden;
}

.blob {
  position: absolute;
  filter: blur(80px);
  border-radius: 50%;
  opacity: 0.6;
  animation: float 20s infinite ease-in-out alternate;
}

.blob-1 {
  background: var(--primary-light);
  width: 400px;
  height: 400px;
  top: -100px;
  left: -100px;
  animation-delay: 0s;
}

.blob-2 {
  background: #a7f3d0;
  width: 500px;
  height: 500px;
  bottom: -150px;
  right: -100px;
  animation-delay: -5s;
}

@keyframes float {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(50px, 30px) scale(1.05); }
  100% { transform: translate(-20px, 60px) scale(0.95); }
}

.container {
  width: 100%;
  max-width: 840px;
  margin: 0 auto;
  z-index: 10;
  padding: 20px 0;
}

/* Typography & Header */
header {
  text-align: center;
  margin-bottom: 48px;
}

.logo {
  width: 100px;
  height: 100px;
  margin: 0 auto 16px;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.logo:hover {
  transform: scale(1.05) rotate(-3deg);
}

.modern-logo {
  width: 100%;
  height: 100%;
}

h1 {
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--primary-dark);
  letter-spacing: -0.03em;
  margin-bottom: 4px;
}

h1 .ar {
  font-family: 'Amiri', serif;
  color: var(--primary-light);
  font-size: 2.4rem;
  font-weight: 700;
  margin-left: 12px;
}

.subtitle {
  color: var(--text-muted);
  font-size: 1.15rem;
  font-weight: 400;
  letter-spacing: 0.01em;
}

/* Glassmorphism Cards */
.glass-card {
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 40px;
  box-shadow: 0 10px 40px rgba(4, 120, 87, 0.08);
  margin-bottom: 32px;
}

/* Hadith Container */
.hadith-container {
  display: flex;
  flex-direction: column;
  position: relative;
  min-height: 380px;
  justify-content: space-between;
}

.hadith-content {
  text-align: center;
  transition: opacity 0.4s ease, transform 0.4s ease;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hadith-ar {
  font-family: 'Amiri', serif;
  font-size: 2.2rem;
  line-height: 1.6;
  color: var(--primary-dark);
  font-weight: 700;
  text-align: center;
  direction: rtl;
  margin-bottom: 16px;
}

.hadith-separator {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 20px 0;
  opacity: 0.6;
}

.hadith-separator span {
  display: inline-block;
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary-light), transparent);
}

.hadith-separator svg {
  margin: 0 12px;
}

.hadith-fr {
  font-size: 1.2rem;
  line-height: 1.7;
  color: var(--text-dark);
  font-weight: 400;
  margin-bottom: 24px;
}

.hadith-source {
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Slider Controls */
.slider-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 32px;
  gap: 16px;
}

.icon-btn {
  background: white;
  border: 1px solid var(--glass-border);
  color: var(--primary);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(4, 120, 87, 0.05);
}

.icon-btn:hover {
  background: var(--primary-light);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.2);
}

.icon-btn:active {
  transform: translateY(0);
}

.progress-bar {
  flex-grow: 1;
  height: 6px;
  background: rgba(16, 185, 129, 0.15);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: var(--primary);
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

/* Subscription Card */
.subscription-card {
  text-align: center;
  padding: 32px;
}

.subscription-header h2 {
  font-size: 1.6rem;
  color: var(--primary-dark);
  margin-bottom: 8px;
}

.subscription-header p {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 24px;
}

.subscription-form {
  max-width: 500px;
  margin: 0 auto;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.input-group input {
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.8);
  font-family: inherit;
  font-size: 1rem;
  color: var(--text-dark);
  transition: all 0.2s;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

.input-group input:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
  background: #fff;
}

.primary-btn {
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  color: white;
  border: none;
  border-radius: 12px;
  padding: 14px 24px;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.3);
}

.primary-btn:active {
  transform: translateY(0);
}

.primary-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.msg {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 500;
}

.msg.success { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.msg.error   { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.msg.hidden  { display: none; }

/* About Card */
.about-card {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  padding: 32px;
  background: linear-gradient(135deg, rgba(255,255,255,0.8), rgba(240, 253, 244, 0.7));
}

.about-icon {
  font-size: 2.5rem;
  background: white;
  min-width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.about-text h2 {
  font-size: 1.4rem;
  color: var(--primary-dark);
  margin-bottom: 12px;
}

.about-text p {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.6;
  margin-bottom: 12px;
}

.about-text p:last-child {
  margin-bottom: 0;
}

/* Animations */
.fade-in-up {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive */
@media (max-width: 768px) {
  h1 { font-size: 2.2rem; }
  h1 .ar { font-size: 2rem; }
  .hadith-ar { font-size: 1.8rem; }
  .hadith-fr { font-size: 1.1rem; }
  .glass-card { padding: 24px; }
  .about-card { flex-direction: column; align-items: center; text-align: center; }
  .about-icon { margin-bottom: 8px; }
}

@media (max-width: 480px) {
  .logo { width: 80px; height: 80px; }
  h1 { font-size: 1.8rem; }
  .hadith-ar { font-size: 1.5rem; }
  .hadith-fr { font-size: 1rem; }
}

/* Footer & Legal */
.site-footer {
  text-align: center;
  padding: 24px 0;
  margin-top: 16px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.footer-links {
  margin-top: 8px;
}

.footer-links a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.footer-links a:hover {
  text-decoration: underline;
  color: var(--primary-dark);
}

.footer-links .separator {
  margin: 0 10px;
  opacity: 0.5;
}

/* Legal Pages */
.legal-content {
  text-align: left;
}

.legal-content h2 {
  font-size: 1.8rem;
  color: var(--primary-dark);
  margin-bottom: 24px;
}

.legal-content h3 {
  font-size: 1.2rem;
  color: var(--primary);
  margin-top: 24px;
  margin-bottom: 12px;
}

.legal-content p, .legal-content li {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.6;
  margin-bottom: 16px;
}

.legal-content ul {
  padding-left: 20px;
  margin-bottom: 16px;
}

.back-link {
  display: inline-block;
  margin-bottom: 24px;
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
}

.back-link:hover {
  text-decoration: underline;
}
