/* SEO and Accessibility Improvements */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: #00bfa5;
  color: white;
  padding: 8px;
  text-decoration: none;
  border-radius: 4px;
  z-index: 10000;
  font-weight: bold;
}

.skip-link:focus {
  top: 6px;
}

/* Focus styles for accessibility */
*:focus {
  outline: 2px solid #00bfa5;
  outline-offset: 2px;
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .modal-content {
    border: 2px solid #fff;
  }
  .modal-btn {
    border: 2px solid #fff;
  }
}

body, html {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: 'Cairo', sans-serif;
    background: #181818;
    overflow: hidden;
  }
  
  .background {
    position: relative;
    width: 100vw;
    height: 100vh;
    background: url('image_assets/background.png') center center/cover no-repeat;
  }
  
  .gradient-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 30%, #a80000 0%, transparent 60%), 
                radial-gradient(circle at 80% 80%, #a80000 0%, transparent 70%);
    opacity: 0.3; /* تم تقليل الشفافية من 0.6 إلى 0.3 */
    z-index: 1;
  }
  
  .content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100vh;
    justify-content: center;
    padding-top: 0;
    gap: 8px; /* تقليل المسافة بين العناصر العلوية */
  }
  
  .logo {
    width: 320px;
    margin-bottom: 12px;
  }
  
  .title {
    width: 540px;
    margin-bottom: 12px;
  }
  
  .download-btn {
    width: 100%;
    margin-bottom: 24px;
    font-size: 1.4rem;
    margin-top: 10px;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 8px;
  }
  
  .download-btn:focus,
  .download-btn:hover,
  .download-btn:active {
    outline: none;
    border: 0;
    background: transparent;
  }
  
  .centerpiece {
    position: relative;
    width: auto;
    height: 400px;
    margin-top: 0;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .center-glow {
    position: absolute;
    left: 50%; top: 60%;
    transform: translate(-50%, -50%);
    width: 350px; height: 180px;
    background: radial-gradient(circle, #a80000 0%, transparent 80%);
    filter: blur(40px);
    opacity: 0.7;
    z-index: 1;
  }
  
  .center-img {
    /* position: absolute; */
    left: auto;
    top: 0;
    transform: none;
    width: auto;
    height: auto;
    max-width: inherit;
    max-height: 470px;
    z-index: 2;
  }
  
  .triangle {
    position: absolute;
    z-index: 3;
  }
  
  .triangle-glow {
    position: absolute;
    width: 120%;
    height: 120%;
    left: -10%; top: -10%;
    background: radial-gradient(circle, #a80000 0%, transparent 80%);
    filter: blur(18px);
    opacity: 0.5;
    z-index: 1;
  }
  
  .triangle img {
    position: relative;
    width: 120px; /* تصغير المثلثات قليلاً */
    z-index: 2;
  }
  
  /* Position triangles */
  .triangle-left-top {
    left: 30px; top: 10px;
  }
  .triangle-right-top {
    right: 30px; top: 30px;
  }
  .triangle-left-bottom {
    left: 40px; bottom: 30px;
  }
  .triangle-right-bottom {
    right: 40px; bottom: 10px;
  }
  
  /* Responsive adjustments */
  @media (max-width: 900px) {
    .centerpiece {
      width: 350px;
      height: 250px;
    }
    /* .center-img {
      width: 150px;
    } */
    .triangle img {
      width: 70px;
    }
    .logo, .download-btn, .download-btn img, .title {
      max-width: 100%;
    }

    .download-btn img{
      max-width: 90% !important;
    }
  }

/* Performance optimizations */
.logo, .title, .download-btn img, .center-img {
  will-change: transform;
  backface-visibility: hidden;
  transform: translateZ(0);
}

/* Modal styles with dialog support */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.6);
  justify-content: center;
  align-items: center;
  animation: fadeInBg 0.4s;
}

/* Modern dialog element support */
.modal[open] {
  display: flex;
}

/* Fallback for browsers that don't support dialog */
.modal:not([open]) {
  display: none;
}
@keyframes fadeInBg {
  from { background: rgba(0,0,0,0); }
  to { background: rgba(0,0,0,0.6); }
}
.modal-content {
  background: #222;
  color: #fff;
  padding: 40px 32px 32px 32px;
  border-radius: 20px;
  min-width: 340px;
  max-width: 95vw;
  text-align: center;
  position: relative;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  animation: scaleIn 0.4s;
}
@keyframes scaleIn {
  from { transform: scale(0.7); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.close {
  position: absolute;
  top: 12px;
  left: 16px;
  width: 32px;
  height: 32px;
  background: #e0e0e0;
  border: none;
  border-radius: 6px;
  font-size: 1.5rem;
  color: #666;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.close:hover {
  background: #d0d0d0;
  color: #555;
}

.close:focus {
  outline: 2px solid #00bfa5;
  outline-offset: 2px;
}

.close:active {
  background: #c0c0c0;
  transform: scale(0.95);
}
.modal-buttons {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.modal-btn {
  background: linear-gradient(90deg, #e53935 60%, #ffb300 100%);
  color: #fff;
  padding: 16px 0;
  border-radius: 12px;
  text-decoration: none;
  font-size: 1.2rem;
  font-weight: bold;
  transition: background 0.2s, transform 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 2px 8px rgba(229,57,53,0.15);
}
.modal-btn.android-tv {
  background: linear-gradient(90deg, #1de9b6 60%, #00bfa5 100%);
  color: #fff;
  font-size: 1.25rem;
  letter-spacing: 1px;
  border: 2px solid #00bfa5;
}
.modal-btn:hover {
  background: linear-gradient(90deg, #b71c1c 60%, #ffb300 100%);
  transform: scale(1.04);
}
.modal-btn.android-tv:hover {
  background: linear-gradient(90deg, #00bfa5 60%, #1de9b6 100%);
  border-color: #1de9b6;
}