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

:root {
  /* ألوان أساسية */
  --primary-color: #00f0ff; /* لون التوهج الرئيسي والأزرق النيون */
  --secondary-color: #0099cc; /* لون ثانوي للأزرار */
  --background-dark: #0b0c10; /* خلفية داكنة جداً */
  --card-background-light: rgba(255, 255, 255, 0.08); /* خلفية البطاقات الشفافة */
  --text-light: #e0e0e0;
  --text-accent: #ffb703; /* لون التنبيهات والتحذيرات (أصفر ذهبي جديد) */
  --footer-bg: rgba(0, 0, 0, 0.3);
  --footer-text: rgba(255, 255, 255, 0.6);
}

body {
  font-family: 'Cairo', sans-serif;
  background-color: var(--background-dark);
  color: var(--text-light);
  direction: rtl;
  text-align: center;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

canvas#stars {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  opacity: 0.8;
}

header {
  position: relative;
  width: 100%;
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.3); /* خلفية أغمق للهيدر */
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.5);
}

.logo {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--primary-color);
  text-shadow:
    0 0 10px var(--primary-color),
    0 0 20px var(--primary-color),
    0 0 40px var(--primary-color),
    0 0 80px var(--primary-color);
  user-select: none;
  animation: pulse 2s infinite alternate;
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(1.03); opacity: 0.95; }
}

/* Social Icons */
.social-icons {
  display: flex;
  gap: 15px; /* مسافة بين الأيقونات */
}

.social-icons a {
  color: var(--primary-color);
  font-size: 1.8rem; /* حجم الأيقونات */
  transition: transform 0.2s ease, color 0.2s ease;
  text-shadow: 0 0 8px var(--primary-color); /* توهج للأيقونات */
}

.social-icons a:hover {
  color: var(--secondary-color); /* يتغير اللون عند التحويم */
  transform: translateY(-3px) scale(1.1); /* تأثير رفع وتكبير */
  text-shadow: 0 0 12px var(--secondary-color);
}

/* شريط الأخبار العاجلة - لون متوافق */
.ticker-tape {
  background: rgba(0, 240, 255, 0.1); /* لون أزرق نيون شفاف */
  color: var(--primary-color); /* لون النص بنفس لون النيون */
  padding: 8px 0;
  overflow: hidden;
  white-space: nowrap;
  position: relative;
  border-bottom: 1px solid rgba(0, 240, 255, 0.3);
  font-weight: 600;
}

.ticker-tape span {
  display: inline-block;
  padding-right: 100%;
  animation: ticker 25s linear infinite; /* سرعة أبطأ قليلاً */
}

@keyframes ticker {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

main {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 40px 20px;
  max-width: 900px;
  margin: 0 auto;
}

.hero-section {
    background: var(--card-background-light);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 0 25px var(--primary-color)aa, 0 0 50px var(--primary-color)33 inset;
    width: 100%;
    margin-bottom: 30px;
    border: 1px solid rgba(0, 240, 255, 0.2);
}

h1 {
  font-weight: 700;
  margin-bottom: 25px;
  font-size: 2.8rem;
  color: var(--primary-color);
  text-shadow: 0 0 10px var(--primary-color);
}

.input-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.input-box input {
  width: 80%;
  padding: 15px 20px;
  border-radius: 15px;
  border: 2px solid var(--primary-color);
  background-color: rgba(255, 255, 255, 0.1);
  font-size: 1.4rem;
  outline: none;
  text-align: center;
  margin-bottom: 25px;
  color: var(--text-light);
  transition: all 0.3s ease;
}

.input-box input:focus {
  box-shadow: 0 0 15px var(--primary-color);
  background-color: rgba(255, 255, 255, 0.15);
}

.input-box input::placeholder {
  color: rgba(255, 255, 255, 0.6);
  animation: none; /* إزالة الوميض */
}

.input-box button {
  width: 90%;
  padding: 18px;
  font-size: 1.6rem;
  border-radius: 15px;
  border: none;
  background-color: var(--primary-color);
  font-weight: 700;
  cursor: pointer;
  color: var(--background-dark);
  transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.input-box button:hover {
  background-color: var(--secondary-color);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 240, 255, 0.4);
}

.input-box button:active {
  transform: translateY(0);
  box-shadow: none;
}

.reminder {
  margin-top: 20px;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-accent);
  text-shadow: 0 0 5px var(--text-accent);
}

.loading-spinner {
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top: 4px solid var(--primary-color);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 25px auto 0 auto;
}

/* أقسام المحتوى الإضافية */
.hero-section {
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.15), rgba(0, 153, 204, 0.1));
  border-radius: 25px;
  padding: 50px 40px;
  margin-bottom: 40px;
  box-shadow: 0 15px 40px rgba(0, 240, 255, 0.3);
  backdrop-filter: blur(15px);
  border: 2px solid rgba(0, 240, 255, 0.3);
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(0, 240, 255, 0.1), transparent);
  animation: rotate 10s linear infinite;
  pointer-events: none;
}

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

.content-section {
  background: var(--card-background-light);
  border-radius: 20px;
  padding: 25px;
  margin-top: 30px;
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.4);
  width: 100%;
  text-align: right;
  border: 1px solid rgba(0, 240, 255, 0.2);
}

.content-section h2 {
  color: var(--primary-color);
  font-size: 2rem;
  margin-bottom: 20px;
  text-align: center;
}

.content-section p, .content-section ul {
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 15px;
  padding-right: 10px;
}

.content-section ul {
  list-style-type: none;
  padding: 0;
}

.content-section ul li {
  margin-bottom: 10px;
  position: relative;
  padding-right: 25px;
  color: var(--text-light);
}

.content-section ul li strong {
    color: var(--primary-color);
}

.content-section ul li::before {
  content: '✓';
  color: var(--primary-color);
  font-weight: bold;
  position: absolute;
  right: 0;
  top: 0;
}

.countdown-timer {
  font-size: 3rem;
  font-weight: bold;
  color: var(--text-accent);
  margin-top: 20px;
  text-align: center;
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}
.countdown-timer span {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: linear-gradient(135deg, rgba(255, 183, 3, 0.2), rgba(255, 183, 3, 0.1));
  border: 2px solid var(--text-accent);
  border-radius: 15px;
  padding: 15px 20px;
  min-width: 80px;
  box-shadow: 0 0 20px rgba(255, 183, 3, 0.3);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.countdown-timer span:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(255, 183, 3, 0.5);
}

.countdown-timer .label {
  display: block;
  font-size: 0.9rem;
  color: var(--text-light);
  margin-top: 5px;
  opacity: 0.7;
}

footer {
  margin-top: 50px;
  padding: 30px;
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.1), rgba(0, 153, 204, 0.1));
  color: var(--primary-color);
  font-size: 1.4rem;
  font-weight: 700;
  border-top: 2px solid var(--primary-color);
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
  backdrop-filter: blur(10px);
  position: relative;
}

footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, transparent, rgba(0, 240, 255, 0.1), transparent);
  animation: shimmer 3s ease-in-out infinite;
  pointer-events: none;
}

@keyframes shimmer {
  0%, 100% { opacity: 0; }
  50% { opacity: 1; }
}


/* Responsive */
@media (max-width: 768px) {
  .logo {
    font-size: 1.8rem;
  }
  .social-icons {
    gap: 10px;
  }
  .social-icons a {
    font-size: 1.5rem;
  }
  h1 {
    font-size: 2.2rem;
  }
  .input-box input {
    width: 90%;
    font-size: 1.1rem;
  }
  .input-box button {
    width: 95%;
    font-size: 1.4rem;
    padding: 15px;
  }
  .reminder {
    font-size: 1.1rem;
  }
  .content-section {
    padding: 20px;
    margin-top: 20px;
  }
  .content-section h2 {
    font-size: 1.8rem;
  }
  .content-section p, .content-section ul {
    font-size: 1rem;
  }
  .countdown-timer {
    font-size: 1.8rem;
  }
  .countdown-timer span {
    margin: 0 5px;
    padding: 8px 12px;
    min-width: 60px;
  }
}

@media (max-width: 450px) {
  header {
    flex-direction: column;
    padding: 10px;
  }
  .logo {
    margin-bottom: 10px;
  }
  .social-icons {
    margin-top: 10px;
    font-size: 1.3rem;
  }
  main {
    padding: 20px 10px;
  }
  .hero-section {
    padding: 20px;
  }
  h1 {
    font-size: 1.8rem;
  }
  .input-box input {
    width: 100%;
  }
  .input-box button {
    width: 100%;
  }
  .countdown-timer {
    gap: 10px;
  }
  .countdown-timer span {
    min-width: 50px;
    font-size: 1.5rem;
  }
}


.result-box {
  max-width: 600px;
  margin: 50px auto;
  background-color: #1e1e1e;
  padding: 20px;
  border-radius: 12px;
  color: white;
  box-shadow: 0 0 20px rgba(0,255,255,0.2);
  text-align: center;
}

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

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.hidden {
  display: none;
}
