:root {
  --primary: #0f766e;
  --primary-dark: #0b5a52;
  --accent: #dc2626;
  --white: #ffffff;
  --glass: rgba(255, 255, 255, 0.08);
  --glass-hover: rgba(255, 255, 255, 0.15);
  --gold: #f59e0b;
  --gold-light: #fbbf24;
  --text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.4);
}

* {
  margin: 0; padding: 0; box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: 'Tajawal', sans-serif;
  background: linear-gradient(135deg, var(--primary), #0d5f58);
  color: var(--white);
  min-height: 100vh;
  padding-bottom: 20px;
  direction: rtl;
}

/* === Splash === */
.splash {
  position: fixed; inset: 0; z-index: 2000;
  background: var(--primary);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  transition: opacity 0.4s;
}
.splash.hidden { opacity: 0; pointer-events: none; }
.logo-wrapper {
  position: relative;
  margin-bottom: 20px;
}
.shimmer-logo {
  width: 90px;
  height: 90px;
  border-radius: 20px;
  background: url('https://yt3.googleusercontent.com/CpOOBxMhonYadk0crxo9wSGrRR9vd3FHBzi5FF24gX-qdYpLawhtWJeeasAlFtQxWM6y5d3RwUQ=s160-c-k-c0x00ffffff-no-rj') center/cover;
  box-shadow: 0 10px 30px rgba(245, 158, 11, 0.4);
  position: relative;
  overflow: hidden;
}
.shimmer-logo::after {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: linear-gradient(
    45deg,
    transparent,
    rgba(255,255,255,0.3),
    transparent
  );
  transform: rotate(30deg);
  animation: logoShimmer 3s ease-in-out;
}
.loading-spinner {
  width: 28px; height: 28px;
  border: 3px solid rgba(245,158,11,0.3);
  border-top: 3px solid var(--gold);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* === Header === */
.app-header {
  background: rgba(11, 90, 82, 0.8);
  backdrop-filter: blur(8px);
  padding: 10px 16px;
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}
.header-content {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 500px;
  margin: 0 auto;
}
.header-logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: url('https://yt3.googleusercontent.com/CpOOBxMhonYadk0crxo9wSGrRR9vd3FHBzi5FF24gX-qdYpLawhtWJeeasAlFtQxWM6y5d3RwUQ=s160-c-k-c0x00ffffff-no-rj') center/cover;
  flex-shrink: 0;
}
.header-logo::after {
  content: '';
  position: absolute;
  top: -30%; left: -30%;
  width: 160%; height: 160%;
  background: linear-gradient(
    45deg,
    transparent,
    rgba(255,255,255,0.15),
    transparent
  );
  transform: rotate(30deg);
  animation: logoShimmer 4s ease-in-out infinite;
}
.app-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--gold-light);
  text-shadow: var(--text-shadow);
  margin: 0;
}

.app-container {
  max-width: 500px;
  margin: 0 auto;
  padding: 20px 16px 0;
}

/* === Live Section === */
.section-title {
  text-align: center;
  margin-bottom: 16px;
}
.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gold-light);
  font-weight: 600;
  font-size: 1.15rem;
}
.live-dot {
  width: 10px; height: 10px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent);
  animation: pulseGlow 1.8s infinite alternate;
}

.video-container {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 18px;
  overflow: hidden;
  border: 2px solid var(--gold);
  box-shadow: 0 6px 18px rgba(0,0,0,0.3);
  position: relative;
}
.video-container video,
.video-container iframe {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.fallback-overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.25rem;
  font-weight: 700;
  text-shadow: var(--text-shadow);
  background: rgba(0,0,0,0.45);
  z-index: 1;
}

/* === Broadcast Times - أصغر وأكثر نعومة === */
.broadcast-note {
  margin: 14px 0;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(6px);
  border-radius: 14px;
  padding: 12px;
  border: 1px solid rgba(245,158,11,0.15);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.broadcast-content {
  text-align: center;
}
.broadcast-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 8px;
}
.broadcast-header i {
  color: var(--gold);
  font-size: 1.1rem;
}
.broadcast-header h3 {
  font-size: 0.9rem;
  color: var(--gold-light);
  font-weight: 600;
  margin: 0;
}
.broadcast-times {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.time-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px;
  border-radius: 10px;
  background: rgba(0,0,0,0.08);
}
.time-item .day {
  color: rgba(255,255,255,0.85);
  font-size: 0.85rem;
  font-weight: 500;
}
.time-item .time {
  color: var(--gold-light);
  font-size: 0.95rem;
  font-weight: 700;
}

.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 24px 0;
}

/* === Programs Section - صور ممتلئة ومتجاورة === */
.programs-section {
  background: var(--glass);
  border: 2px solid var(--gold);
  border-radius: 18px;
  padding: 16px;
  position: relative;
  overflow: hidden;
}
.programs-grid-container {
  position: relative;
  height: 190px;
}
.programs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px; /* مسافة صغيرة بين الصور */
  height: 100%;
  opacity: 0.85;
  filter: blur(2px);
}
@media (min-width: 480px) {
  .programs-grid { grid-template-columns: repeat(3, 1fr); }
}
.program-card {
  aspect-ratio: 16/9;
  border-radius: 8px; /* أقل استدارة */
  overflow: hidden;
  position: relative;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}
.program-thumb {
  width: 100%; height: 100%; 
  object-fit: cover; /* يجعل الصورة تملأ المربع تماماً */
  display: block;
  transition: transform 0.3s ease;
}
.program-card:hover .program-thumb {
  transform: scale(1.03);
}
/* اللمعان على الصور فقط */
.program-card::after {
  content: '';
  position: absolute;
  top: -40%; left: -40%;
  width: 180%; height: 180%;
  background: linear-gradient(
    45deg,
    transparent,
    rgba(255,255,255,0.15),
    transparent
  );
  transform: rotate(30deg);
  animation: shimmer 3s ease-in-out infinite;
}

.programs-overlay {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 2;
  text-align: center;
  pointer-events: none;
}
.programs-overlay * { pointer-events: auto; }
.programs-title {
  color: var(--gold-light);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 12px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8); /* ظل أسود واضح */
  background: rgba(0,0,0,0.3); /* خلفية شفافة */
  padding: 4px 12px;
  border-radius: 12px;
  backdrop-filter: blur(4px);
}

/* زر التشغيل زجاجي بدون لمعان */
.play-button {
  text-decoration: none;
  color: var(--primary);
}
.glass-button {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.2);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: var(--gold-light);
  font-size: 1.2rem;
  font-weight: bold;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 12px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
}
.glass-button:hover {
  background: rgba(245, 158, 11, 0.3);
  transform: scale(1.05);
  box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}
.glass-button i {
  position: relative;
  z-index: 2;
}

/* === Quick Actions === */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 14px 0;
}
.icon-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 4px;
  border-radius: 14px;
  background: var(--glass);
  color: var(--gold);
  font-size: 0.8rem;
  text-decoration: none;
  transition: all 0.25s ease;
  text-align: center;
  position: relative;
  overflow: hidden;
  height: 76px;
}
.icon-item:hover {
  background: var(--glass-hover);
  color: var(--white);
  transform: translateY(-2px);
}
.icon-item i {
  font-size: 1.5rem;
  margin-bottom: 4px;
}
.icon-item span {
  display: block;
  line-height: 1.2;
  font-weight: 500;
}
.icon-item::after {
  content: '';
  position: absolute;
  top: -30%; left: -30%;
  width: 160%; height: 160%;
  background: linear-gradient(
    45deg,
    transparent,
    rgba(255,255,255,0.25),
    transparent
  );
  transform: rotate(30deg);
  animation: logoShimmer 4s ease-in-out infinite;
}

/* === Social Section - تأثير زجاجي متطور === */
.social-section {
  text-align: center;
  padding: 14px 0;
}
.social-title {
  font-size: 0.95rem;
  color: var(--gold-light);
  font-weight: 600;
  margin-bottom: 16px;
}
.social-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.social-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 0;
  border-radius: 16px;
  text-decoration: none;
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 500;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}
.social-icon i {
  font-size: 1.7rem;
  margin-bottom: 6px;
}
.social-icon:hover {
  color: var(--white);
  transform: translateY(-2px);
}
.glassy-icon {
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(245,158,11,0.15);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.glassy-icon:hover {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245,158,11,0.3);
  box-shadow: 0 4px 12px rgba(245,158,11,0.2);
}
.glassy-icon span {
  font-weight: 500;
  font-size: 0.85rem;
}

/* === Animations === */
@keyframes logoShimmer {
  0% { transform: rotate(30deg) translateX(-100%); }
  100% { transform: rotate(30deg) translateX(100%); }
}
@keyframes shimmer {
  0% { transform: rotate(30deg) translateX(-120%); }
  100% { transform: rotate(30deg) translateX(120%); }
}
@keyframes pulseGlow {
  from { box-shadow: 0 0 8px var(--accent), 0 0 16px rgba(220,38,38,0.5); }
  to { box-shadow: 0 0 16px #ff5252, 0 0 32px rgba(255,82,82,0.8); }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* === Responsive === */
@media (max-width: 375px) {
  .header-content { gap: 8px; }
  .header-logo { width: 36px; height: 36px; }
  .app-title { font-size: 1.05rem; }
  .quick-actions { grid-template-columns: repeat(2, 1fr); }
  .broadcast-times { gap: 6px; }
  .time-item { padding: 5px; }
  .time-item .time { font-size: 0.9rem; }
  .social-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 768px) {
  .social-grid { grid-template-columns: repeat(4, 1fr); }
}
/* ========== Toast Message ========== */
/* ========== تطبيق Tajawal كخط أساسي ========== */
body {
  font-family: 'Tajawal', -apple-system, system-ui, sans-serif;
}

/* ========== تأثير البلور على الخلفية عند ظهور الرسالة ========== */
.blur-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 19999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.22s ease;
}

.blur-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* ========== نافذة الرسالة مع سهم ========== */
.pro-toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  background: rgba(15, 118, 110, 0.28); /* #0f766e */
  border-radius: 18px;
  padding: 24px 28px 22px;
  width: 84%;
  max-width: 310px;
  text-align: center;
  z-index: 20000;
  opacity: 0;
  visibility: hidden;
  transition: 
    opacity 0.24s cubic-bezier(0.22, 0.61, 0.36, 1),
    transform 0.24s cubic-bezier(0.22, 0.61, 0.36, 1);
  
  /* زجاج متقدم */
  backdrop-filter: blur(38px) saturate(160%);
  -webkit-backdrop-filter: blur(38px) saturate(160%);
  
  /* إطار ذهبي */
  border: 2px solid #f59e0b;
  box-shadow: 
    0 10px 34px rgba(0, 0, 0, 0.28),
    0 0 0 1px rgba(245, 158, 11, 0.26);
  
  direction: rtl;
  user-select: none;
}

.pro-toast.show {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

/* السهم الذهبي */
.toast-arrow {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-bottom: 12px solid #f59e0b;
}

.toast-message {
  color: #f0fdfa;
  font-size: 0.9rem; /* حجم نص صغير جدًّا */
  line-height: 1.55;
  margin: 0;
  font-weight: 200; /* نعومة قصوى */
  letter-spacing: -0.01em;
  font-family: 'Tajawal', -apple-system, system-ui, sans-serif;
  text-shadow: 0 0.5px 1px rgba(0, 0, 0, 0.18);
}