@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@200;400;600;800&display=swap');

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

html, body {
  max-width: 100%;
  overflow-x: hidden;
  background-color: #222831;
  animation: fadeInUp 1s ease-out;
  color: #eeeeee;
  font-family: 'Cairo', serif;
  scroll-behavior: smooth;
}

img, iframe, video {
  max-width: 100%;
  height: auto;
  display: block;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 2rem auto;
  padding: 0 0.5rem;
  max-width: 1200px;
}

.navigation ul {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.navigation a {
  text-decoration: none;
  color: #eeeeee;
  transition: color 0.3s ease;
}

.navigation a:hover {
  color: #00adb5;
}

hr {
  opacity: 0.1;
  border: none;
  border-top: 1px solid #eeeeee;
  margin: 1rem 0;
}

.hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 5rem auto;
  max-width: 1200px;
}

.heroSub {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.name {
  font-size: 3rem;
  color: #eeeeee;
}

.title {
  font-size: 4rem;
  color: #00adb5;
}

.heroBtns {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.hireMe {
  background-color: #00adb5;
  color: #eeeeee;
  border-radius: 24px;
  text-decoration: none;
  padding: 0.5rem 1.5rem;
  text-shadow: 0 4px 4px rgba(0, 0, 0, 0.5);
  transition: background-color 0.3s ease;
}

.hireMe:hover {
  background-color: #009ca8;
}

.cv {
  background-color: rgba(0, 0, 0, 0.5);
  color: #eeeeee;
  border-radius: 24px;
  text-decoration: none;
  padding: 0.5rem 1.5rem;
  text-shadow: 0 4px 4px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  backdrop-filter: blur(4px);
  transition: background-color 0.3s ease;
}

.cv:hover {
  background-color: rgba(0, 0, 0, 0.7);
}

.aboutMe {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 5rem auto;
  max-width: 1200px;
  gap: 10rem;
}

.textContainer {
  display: flex;
  flex-direction: column;
}

.textTitle {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 2rem;
}

.aboutName {
  color: #eeeeee;
}

.aboutTitle {
  color: #00adb5;
}

.aboutMePar {
  text-align: justify;
  color: #eeeeee;
}

.works {
  background-image: url("pixel.png");
  padding: 5rem 10rem;
  margin: 5rem 0;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
}

.worksContainer {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: flex-start;
  margin: 5rem auto;
  max-width: 1200px;
}

.projectTitle {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 5px;
  font-size: 2rem;
  color: #eeeeee;
}

.works ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-left: 0;
}

.works li {
  border-radius: 16px;
  background-color: rgba(57, 62, 70, 0.5);
  backdrop-filter: blur(4px);
  padding: 1rem 4rem;
  transition: background-color 0.3s ease;
}

.works li:hover {
  background-color: rgba(57, 62, 70, 0.7);
}

.works li img {
  width: 200px;
  height: 200px;
  object-fit: contain;
  transition: transform 0.2s ease-in-out;
  cursor: pointer;
}

.works li img:hover {
  transform: scale(1.5);
}

.contactContainer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  margin: 2rem auto;
  max-width: 1200px;
}

.contactTitle {
  font-size: 2rem;
  text-align: center;
  color: #eeeeee;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.contact {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 5rem;
  gap: 20rem;
  flex-wrap: wrap;
}

.contact h3,
.contact a {
  color: #eeeeee;
  text-decoration: none;
}

.emailandPhone {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex-wrap: wrap;
}

.socialMedia {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3rem;
}

.socialMedia a {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50px;
  background-color: rgba(57, 62, 70, 0.5);
  backdrop-filter: blur(4px);
  padding: 1rem;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.socialMedia a:hover {
  background-color: rgba(0, 173, 181, 0.7);
}

.socialMedia img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  margin: 0 8px;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.socialMedia img:hover {
  transform: scale(1.1);
}

footer {
  color: #eeeeee;
  padding: 2rem;
  text-align: center;
}

.langBtn {
  background-color: #00adb5;
  color: #eeeeee;
  border: none;
  padding: 0.3rem 0.8rem; /* صغير الحجم */
  border-radius: 6px;
  cursor: pointer;
  font-family: "Cairo", sans-serif;
  font-size: 0.9rem;
  transition: background-color 0.3s ease;
  user-select: none;
  /* لا نستخدم position fixed أو sticky */
  /* فقط يتبع تدفق الصفحة */
}

.langBtn:hover {
  background-color: #009ca8;
}

@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(50px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* التعليقات */
.commentsSection {
  background-color: #1e1e1e;
  padding: 2rem;
  border-radius: 20px;
  margin: 3rem 1rem;
  box-shadow: 0 0 10px #00000088;
}

.commentsSection h2 {
  color: #fff;
  text-align: center;
  margin-bottom: 1rem;
  font-size: 2rem;
}

#commentForm {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 500px;
  margin: 0 auto;
}

#commentForm input,
#commentForm textarea {
  padding: 0.75rem;
  border-radius: 12px;
  border: none;
  outline: none;
  font-size: 1rem;
  background-color: #2c2c2c;
  color: #fff;
  resize: vertical;
}

#commentForm button {
  padding: 0.75rem;
  background-color: #00adb5;
  color: #000;
  border: none;
  border-radius: 12px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#commentForm button:hover {
  background-color: #009ca8;
}

#commentList {
  margin-top: 2rem;
  list-style: none;
  padding: 0;
  max-width: 600px;
  margin-inline: auto;
}

#commentList li {
  background-color: #2c2c2c;
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 12px;
  color: #fff;
  word-wrap: break-word;
}

/* Responsive */
@media (max-width: 1023px) {
  header {
    margin: 0 1rem;
  }
  .hero {
    flex-direction: column;
    align-items: center;
    gap: 2rem;
  }
  .heroImg {
    width: 400px;
  }
  .name,
  .title {
    font-size: 2rem;
  }
  .arrow {
    display: none;
  }
  .aboutMe {
    flex-direction: column-reverse;
    align-items: center;
    gap: 2rem;
  }
  .textContainer {
    align-items: center;
    margin: 0 5rem;
    gap: 1rem;
  }
  .aboutName,
  .aboutTitle {
    font-size: 2rem;
  }
  .aboutMeImg {
    width: 400px;
  }
  .works {
    padding: 0;
  }
  .worksContainer {
    padding: 5rem 0;
    gap: 3rem;
  }
  .projectTitle {
    margin-left: 1rem;
  }
  .works ul {
    flex-direction: column;
    gap: 1rem;
  }
  .contactContainer {
    margin: 10rem 5rem;
    gap: 2rem;
  }
  .contact {
    flex-direction: column;
    gap: 1rem;
  }
}

#langToggle {
  padding: 10px 15px;
  border-radius: 5px;
  background-color: #f0f0f0;
  color: #333;
  border: none;
  cursor: pointer;
  font-weight: bold;
}

.floating-icon {
  animation: floatAround 6s ease-in-out infinite;
  display: inline-block;
}

@keyframes floatAround {
  0%   { transform: translate(0px, 0px); }
  25%  { transform: translate(5px, -5px); }
  50%  { transform: translate(0px, -10px); }
  75%  { transform: translate(-5px, -5px); }
  100% { transform: translate(0px, 0px); }
}


.reactions {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 10px;
}

.reaction-button {
  background-color: #222;
  border: none;
  border-radius: 12px;
  padding: 10px 15px;
  color: white;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.2s ease, background-color 0.3s;
}

.reaction-button:hover {
  background-color: #444;
  transform: scale(1.05);
}

.reaction-count {
  font-size: 16px;
}

.reaction-button.selected {
  color: #00adb5;
}


.reaction-button {
  position: relative;
  /* تم إزالة overflow حتى تسمح للجزيئات بالخروج */
}

.particle {
  position: absolute;
  width: 6px;
  height: 6px;
  background: #00adb5;
  border-radius: 50%;
  pointer-events: none;
  animation: explode-fall 700ms ease-out forwards;
}

@keyframes explode-fall {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 1;
  }
  60% {
    opacity: 1;
  }
  100% {
    transform: translate(var(--x), var(--y)) rotate(720deg) scale(0.5);
    opacity: 0;
  }
}

@keyframes gentleWiggle {
  0%, 100% {
    transform: translate(0, 0);
  }
  25% {
    transform: translate(3px, -2px);
  }
  50% {
    transform: translate(-3px, 2px);
  }
  75% {
    transform: translate(2px, 3px);
  }
}

.full-width-button {
  display: block;
  width: 100%;
  max-width: 100%;
  padding: 12px 0;
  border: 1.5px solid #00adb5;
  border-radius: 30px / 50%;
  background: transparent;
  color: #00adb5;
  font-weight: 700;
  font-size: 1.2rem;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease;
  animation: gentleWiggle 4s ease-in-out infinite;
}

.full-width-button:hover {
  background-color: #00adb5;
  color: white;
  animation-play-state: paused; /* يوقف الحركة عند المرور على الزر */
}

.full-width-button {
  /* باقي الخصائص */
  font-weight: 700; /* يجعل النص سميك */
}

@keyframes glowPulse {
  0%, 100% {
    text-shadow: 0 0 5px #00adb5, 0 0 10px #00adb5, 0 0 20px #00adb5;
    color: #00adb5;
  }
  50% {
    text-shadow: 0 0 20px #00adb5, 0 0 40px #00adb5, 0 0 60px #00adb5;
    color: #00e0ff;
  }
  70% {
    text-shadow: none;
    color: #007b8a;
  }
}
.full-width-button {
  /* باقي خصائص الزر عندك */
  animation: gentleWiggle 4s ease-in-out infinite, glowPulse 2s ease-in-out infinite;
}



.floating-icon {
  animation: floatIcon 6s ease-in-out infinite, blinkIcon 2s steps(2, start) infinite;
  filter: drop-shadow(0 0 5px white);
  cursor: pointer;
  transition: transform 0.2s;
  position: relative;
  z-index: 1;
}

@keyframes floatIcon {
  0% { transform: translate(0px, 0px); }
  25% { transform: translate(5px, -5px); }
  50% { transform: translate(-5px, 5px); }
  75% { transform: translate(5px, 5px); }
  100% { transform: translate(0px, 0px); }
}

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

.pixel-spark {
  width: 3px;
  height: 3px;
  background-color: white;
  box-shadow: 0 0 3px yellow;
  position: absolute;
  animation: scatterPixel 1s ease-out forwards;
  z-index: -1; /* خلف الأيقونة */
  opacity: 1;
  border-radius: 1px;
}

@keyframes scatterPixel {
  0% {
    transform: translate(0, 0);
    opacity: 1;
  }
  100% {
    transform: translate(var(--x), var(--y));
    opacity: 0;
  }
}

.icon-container {
  position: relative;
  display: inline-block;
  z-index: 1; /* هذا يضمن أن الأيقونة تبقى فوق الشرارات */
}

/* تأثير الوميض السريع */
.broken-flash {
  animation: brokenFlash 0.1s infinite;
}

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

/* الكهرباء حول الأيقونة */
.spark-electric {
  position: absolute;
  width: 4px;
  height: 4px;
  background: white;
  box-shadow: 0 0 6px yellow;
  z-index: 0;
  animation: fallSpark 0.5s ease-out forwards;
  pointer-events: none;
}

@keyframes fallSpark {
  0% { transform: translate(0, 0) scale(1); opacity: 1; }
  100% { transform: translate(var(--x), var(--y)) scale(0.5); opacity: 0; }
}

/* سقوط الأيقونة */
.icon-fall {
  animation: fallDown 1s forwards;
}

@keyframes fallDown {
  to {
    transform: translateY(200px) rotate(90deg);
    opacity: 0;
  }
}

#bashIcon {
  outline: none !important;
  border: none;
  transition: transform 0.15s ease;
  cursor: pointer;
}

#bashIcon:focus {
  outline: none !important;
}

#bashIcon:active {
  transform: scale(0.9);
}

#bashIcon:focus:not(:focus-visible) {
  outline: none;
}



@keyframes sparkMove {
  to {
    transform: translate(var(--x), var(--y));
    opacity: 0;
  }
}

.spark-electric {
  width: 6px;
  height: 6px;
  background-color: white;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  pointer-events: none;
  animation: sparkMove 0.6s ease-out forwards;
  z-index: 9999;
}

@keyframes sparkMove {
  to {
    transform: translate(var(--x), var(--y));
    opacity: 0;
  }
}

/* Overlay كامل */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5); /* ضباب */
  backdrop-filter: blur(5px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  animation: fadeIn 0.4s ease forwards;
}

.hidden {
  display: none;
}

/* مربع النص */
.popup {
  background-color: rgba(30, 30, 30, 0.95);
  color: white;
  border-radius: 20px;
  padding: 30px 25px 25px 25px; /* ترك مساحة من الأعلى واليمين للزر */
  max-width: 500px;
  width: 90%;
  position: relative;
  animation: popUpScale 0.4s ease forwards;
  font-size: 1rem;
  line-height: 1.7;
  box-sizing: border-box;
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 19px;
  cursor: pointer;
  color: white;
  font-weight: bold;
  background: none;
  border: none;
} 