:root{
    --bg:#0b0c0f;
    --panel:#121316;
    --muted:#9aa0a6;
    --accentA:#caa4ff;
    --accentB:#8a5cff;
    --card:#16171a;
    --yellow:#f1c40f;
    --glass: rgba(255,255,255,0.03);
  }
  *{box-sizing:border-box}
  body{
    margin:0;font-family:Inter,system-ui,Arial; background:linear-gradient(180deg,#07080a 0%,#0b0c0f 100 %); color:#eaf0f9;
    -webkit-font-smoothing:antialiased; -moz-osx-font-smoothing:grayscale;
    margin: 0;
    height: 100vh;
    font-weight: 100;
    background: radial-gradient(#a23982,#1f1013);

    overflow-y: auto;

    -webkit-animation: fadeIn 1 1s ease-out;
    -moz-animation: fadeIn 1 1s ease-out;
    -o-animation: fadeIn 1 1s ease-out;
    animation: fadeIn 1 1s ease-out;
  }

  /* HEADER + SEARCH */
  header{
    padding:22px 18px;
    display:flex;
    justify-content:center;
    border-bottom:1px solid rgba(255,255,255,0.02);
    backdrop-filter: blur(6px);
  }
  .search-wrap{
    width:min(1100px,96%); display:flex; gap:12px; align-items:center;
  }

  .search {
    position:relative; flex:1;
    background:linear-gradient(180deg, rgba(255,255,255,0.02), rgba(0,0,0,0.03));
    border-radius:14px; padding:10px 14px; display:flex; align-items:center; gap:10px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.6);
    border:1px solid rgba(255,255,255,0.02);
  }
  .search svg{width:20px;height:20px;opacity:0.9}
  .search input{
    background:transparent; border:0; outline:none; color: #eaf0f9; font-size:15px; flex:1;
  }
  .suggestions{
    position:absolute; left:12px; right:12px; top:calc(100% + 8px); background:linear-gradient(180deg, #0f1113, #0b0c10);
    border-radius:10px; overflow:hidden; box-shadow: 0 14px 40px rgba(3,6,9,0.7); border:1px solid rgba(255,255,255,0.03);
    max-height:240px; display:none; z-index:60;
  }
  .suggestions button{
    width:100%; text-align:left; padding:10px 12px; border:0; background:transparent; color:#eaf0f9; font-weight:600;
    cursor:pointer; display:flex; gap:12px; align-items:center; border-bottom:1px solid rgba(255,255,255,0.01);
  }
  .suggestions button:hover{ background: rgba(255,255,255,0.02) }

  /* GRID */
  main{padding:20px;}
  .grid{
  max-width:1100px;
  margin:0 auto;
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap:16px;
}
  /* CARD */
  .card{
    background: linear-gradient(190deg, #B8860B, #FFF8DC);
    border-radius:15px;
    padding:12px;

    display:flex;
    align-items:center;
    gap:12px;
    overflow:hidden;


    min-width:0;
  }

  .card:hover{ transform: translateY(-6px); box-shadow: 0 14px 40px rgba(2,6,12,0.6); }

  .thumb{
    width:86px; height:86px; border-radius:14px; overflow:hidden; flex-shrink:0; background:#0b0c0f;
    display:flex; align-items:center; justify-content:center;
  }
  .thumb img{ width:100%; height:100%; object-fit:cover; display:block }

  .meta{
    flex:1; display:flex; flex-direction:column; gap:6px;
  }
  .title{ font-size:15px; font-weight:700; color:black; line-height:1.05; margin:0 }
  .subrow{ display:flex; align-items:center; gap:8px; font-size:13px; color:var(--muted) }
  .size { color:var(--muted); font-weight:600; font-size:13px }
  .downloads { color:var(--muted); font-size:13px }
  .platforms { display:flex; gap:6px; align-items:center }
  .platforms svg{ width:18px; height:18px; opacity:0.95; }

  .rating-wrap{ display:flex; gap:8px; align-items:center }
  .stars{ position:relative; width:92px; height:16px; display:inline-block; overflow:hidden }
  .stars .empty, .stars .fill { display:flex; gap:4px; position:absolute; top:0; left:0; }
  .stars .empty svg{ fill: rgba(255,255,255,0.07) }
  .stars .fill svg{ fill: var(--yellow) }
  .stars .fill{ overflow:hidden; width:0 } /* width set in JS */

  .rating-num{ font-size:13px; color:var(--muted); font-weight:600 }

  .install-col {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0; /* يمنع الزر من الانكماش */
    min-width: 0;
    margin-left:auto; /* يحمي الزر من دفعه بواسطة النصوص الطويلة */
}

  .install-btn{
    background: linear-gradient(90deg,var(--accentA),var(--accentB)); border:0; color:white; padding:10px 12px; border-radius:12px;
    font-weight:700; cursor:pointer; box-shadow: 0 8px 24px rgba(138,92,255,0.14);
  }
  .install-btn:active{ transform:translateY(1px) }

  /* MODALS */
  .backdrop{ position:fixed; inset:0; display:none; align-items:center; justify-content:center; background:rgba(2,6,10,0.66); z-index:1200; padding:20px }
  .modal{
    width:360px; max-width:98%; background:var(--panel); border-radius:14px; padding:18px; border:1px solid rgba(255,255,255,0.03);
    box-shadow: 0 20px 80px rgba(3,6,9,0.8); position:relative;
  }
  .xclose{ position:absolute; left:12px; top:12px; background:transparent; border:1px solid rgba(255,255,255,0.03); color:var(--muted); padding:6px 8px; border-radius:8px; cursor:pointer }

  /* Info modal */
  .info-top{ display:flex; gap:12px; align-items:center }
  .info-top .bigthumb{ width:94px; height:94px; border-radius:12px; overflow:hidden; background:#0b0c0f }
  .info-top h2{ font-size:18px; margin:0; color:#eef5ff }
  .info-meta{ color:var(--muted); font-size:13px; margin-top:6px }

  .download-btn{ margin-top:12px; width:100%; padding:12px; border-radius:12px; border:0; color:#071019; font-weight:800; background:linear-gradient(90deg,#b278f7,#8f5cf3); cursor:pointer; box-shadow:0 12px 36px rgba(143,92,243,0.12) }

  /* Progress modal */
  .progress-modal{ width:420px; padding:18px; display:flex; flex-direction:column; gap:14px; align-items:center }
  .progress-track{ width:100%; background:#0f1113; border-radius:12px; padding:6px; box-shadow: inset 0 2px 6px rgba(0,0,0,0.6) }
  .progress-bar{
    width:0%; height:14px; border-radius:8px; background:var(--yellow); transition:width 0.8s linear;
    box-shadow: 0 8px 30px rgba(241,196,15,0.12);
  }
  .msg{ color:var(--muted); font-size:14px; min-height:24px; text-align:center }

  .verify-wrap{ display:none; flex-direction:column; align-items:center; gap:10px }
  .rot-circle{ width:88px; height:88px; border-radius:50%; position:relative; display:flex; align-items:center; justify-content:center;
    background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(0,0,0,0.08)); border:6px solid rgba(255,255,255,0.02) }
  .rot-circle::after{
    content:""; position:absolute; inset:0; border-radius:50%; border-top:6px solid rgba(241,196,15,1); border-right:6px solid rgba(241,196,15,0.2);
    border-bottom:6px solid rgba(241,196,15,0.05); border-left:6px solid rgba(241,196,15,0.02);
    animation: spin 0.9s linear infinite;
  }
  @keyframes spin{ to{ transform: rotate(360deg) } }
  .verify-text{ color:#f6f6f6; font-weight:800 }

  /* iframe modal */
  .iframe-modal{ width:92%; max-width:1100px; height:86%; padding:0; border-radius:12px; overflow:hidden; display:flex; flex-direction:column }
  .iframe-top{ display:flex; align-items:center; gap:8px; padding:8px 12px; background:linear-gradient(180deg, rgba(255,255,255,0.01), transparent); border-bottom:1px solid rgba(255,255,255,0.02) }
  .iframe-top .close-iframe{ background:#f05454; border:0; color:white; padding:6px 10px; border-radius:8px; cursor:pointer; font-weight:700 }
  .iframe-frame{ flex:1; border:0; width:100%; height:100%; background:white }

  /* small screen adjustments */
  @media (max-width:420px){
    .thumb{ width:72px; height:72px } .title{ font-size:14px } .stars{ width:76px }
    .progress-modal{ width:94% } .modal{ width:94% }
  }

  .slideshow {
    width: 100vw;
    height: 30vh;
    position: relative;
    overflow: hidden;
  }

  .slideshow img {
    position: absolute;
    width: 100%;
    height: 100%; /* بدل 100vh ليظهر داخل البلوك */
    object-fit: cover;
    opacity: 0;
    animation: fade 15s infinite;
  }

  .slideshow img:nth-child(1) { animation-delay: 0s; }
  .slideshow img:nth-child(2) { animation-delay: 5s; }
  .slideshow img:nth-child(3) { animation-delay: 10s; }

  @keyframes fade {
    0%, 60%, 100% { opacity: 0; }
    20%, 40% { opacity: 1; }
  }


.buttonn {
  position: absolute;
  border: 2px solid white;
  background: transparent;
  font-family: 'Roboto', sans-serif;
  color: white;
  width: 250px;
  height: 50px;
  font-size: 2em;
  border-radius: 5px;
  opacity: 0.5;
  top: 60vh;
  left: 50%;
  transform: translateX(-50%);
  transition: 0.3s;
}

.buttonn:hover {
  border: 2px solid #104F55;
  background-color: rgba(255, 255, 255, 0.5); /* كانت مكتوبة بشكل خاطئ */
  cursor: pointer;
  color: #104F55;
  opacity: 0.8;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

/* إصلاح عنصر light */
.light {
  position: absolute;
  width: 0px;
  height: 0px;
  background-color: white;
  box-shadow: 0 0 20px 2px #e9f1f1;
  opacity: 0.75; /* حذف التكرار */
  top: 100vh;
  left: 50%;
  transform: translateX(-50%);
}


.x1{
  -webkit-animation: floatUp 4s infinite linear;
  -moz-animation: floatUp 4s infinite linear;
  -o-animation: floatUp 4s infinite linear;
  animation: floatUp 4s infinite linear;
   -webkit-transform: scale(1.0);
   -moz-transform: scale(1.0);
   -o-transform: scale(1.0);
  transform: scale(1.0);
}

.x2{
  -webkit-animation: floatUp 7s infinite linear;
  -moz-animation: floatUp 7s infinite linear;
  -o-animation: floatUp 7s infinite linear;
  animation: floatUp 7s infinite linear;
  -webkit-transform: scale(1.6);
  -moz-transform: scale(1.6);
  -o-transform: scale(1.6);
  transform: scale(1.6);
  left: 15%;
}

.x3{
  -webkit-animation: floatUp 2.5s infinite linear;
  -moz-animation: floatUp 2.5s infinite linear;
  -o-animation: floatUp 2.5s infinite linear;
  animation: floatUp 2.5s infinite linear;
  -webkit-transform: scale(.5);
  -moz-transform: scale(.5);
  -o-transform: scale(.5);
  transform: scale(.5);
  left: -15%;
}

.x4{
  -webkit-animation: floatUp 4.5s infinite linear;
  -moz-animation: floatUp 4.5s infinite linear;
  -o-animation: floatUp 4.5s infinite linear;
  animation: floatUp 4.5s infinite linear;
  -webkit-transform: scale(1.2);
  -moz-transform: scale(1.2);
  -o-transform: scale(1.2);
  transform: scale(1.2);
  left: -34%;
}

.x5{
  -webkit-animation: floatUp 8s infinite linear;
  -moz-animation: floatUp 8s infinite linear;
  -o-animation: floatUp 8s infinite linear;
  animation: floatUp 8s infinite linear;
  -webkit-transform: scale(2.2);
  -moz-transform: scale(2.2);
  -o-transform: scale(2.2);
  transform: scale(2.2);
  left: -57%;
}

.x6{
  -webkit-animation: floatUp 3s infinite linear;
  -moz-animation: floatUp 3s infinite linear;
  -o-animation: floatUp 3s infinite linear;
  animation: floatUp 3s infinite linear;
  -webkit-transform: scale(.8);
  -moz-transform: scale(.8);
  -o-transform: scale(.8);
  transform: scale(.8);
  left: -81%;
}

.x7{
  -webkit-animation: floatUp 5.3s infinite linear;
  -moz-animation: floatUp 5.3s infinite linear;
  -o-animation: floatUp 5.3s infinite linear;
  animation: floatUp 5.3s infinite linear;
  -webkit-transform: scale(3.2);
  -moz-transform: scale(3.2);
  -o-transform: scale(3.2);
  transform: scale(3.2);
  left: 37%;
}

.x8{
  -webkit-animation: floatUp 4.7s infinite linear;
  -moz-animation: floatUp 4.7s infinite linear;
  -o-animation: floatUp 4.7s infinite linear;
  animation: floatUp 4.7s infinite linear;
  -webkit-transform: scale(1.7);
  -moz-transform: scale(1.7);
  -o-transform: scale(1.7);
  transform: scale(1.7);
  left: 62%;
}

.x9{
  -webkit-animation: floatUp 4.1s infinite linear;
  -moz-animation: floatUp 4.1s infinite linear;
  -o-animation: floatUp 4.1s infinite linear;
  animation: floatUp 4.1s infinite linear;
  -webkit-transform: scale(0.9);
  -moz-transform: scale(0.9);
  -o-transform: scale(0.9);
  transform: scale(0.9);
  left: 85%;
}

buttonn:focus{
  outline: none;
}

@-webkit-keyframes floatUp{
  0%{top: 100vh; opacity: 0;}
  25%{opacity: 1;}
  50%{top: 0vh; opacity: .8;}
  75%{opacity: 1;}
  100%{top: -100vh; opacity: 0;}
}
@-moz-keyframes floatUp{
  0%{top: 100vh; opacity: 0;}
  25%{opacity: 1;}
  50%{top: 0vh; opacity: .8;}
  75%{opacity: 1;}
  100%{top: -100vh; opacity: 0;}
}
@-o-keyframes floatUp{
  0%{top: 100vh; opacity: 0;}
  25%{opacity: 1;}
  50%{top: 0vh; opacity: .8;}
  75%{opacity: 1;}
  100%{top: -100vh; opacity: 0;}
}
@keyframes floatUp{
  0%{top: 100vh; opacity: 0;}
  25%{opacity: 1;}
  50%{top: 0vh; opacity: .8;}
  75%{opacity: 1;}
  100%{top: -100vh; opacity: 0;}
}

.headerr{
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Roboto', sans-serif;
  font-weight: 200;
  color: white;
  font-size: 2em;
}

#headd1, #headd2,#headd3, #headd4, #headd5{
  opacity: 0;
}

#headd1{
  -webkit-animation: fadeOut 1 5s ease-in;
  -moz-animation: fadeOut 1 5s ease-in;
  -o-animation: fadeOut 1 5s ease-in;
  animation: fadeOut 1 5s ease-in;
}

#headd2{
  -webkit-animation: fadeOut 1 5s ease-in;
  -moz-animation: fadeOut 1 5s ease-in;
  -o-animation: fadeOut 1 5s ease-in;
  animation: fadeOut 1 5s ease-in;
  -webkit-animation-delay: 6s;
  -moz-animation-delay: 6s;
  -o-animation-delay: 6s;
  animation-delay: 6s;
}

#headd3{
  -webkit-animation: fadeOut 1 5s ease-in;
  -moz-animation: fadeOut 1 5s ease-in;
  -o-animation: fadeOut 1 5s ease-in;
  animation: fadeOut 1 5s ease-in;
  -webkit-animation-delay: 12s;
  -moz-animation-delay: 12s;
  -o-animation-delay: 12s;
  animation-delay: 12s;
}

#headd4{
  -webkit-animation: fadeOut 1 5s ease-in;
  -moz-animation: fadeOut 1 5s ease-in;
  -o-animation: fadeOut 1 5s ease-in;
  animation: fadeOut 1 5s ease-in;
  -webkit-animation-delay: 17s;
  -moz-animation-delay: 17s;
  -o-animation-delay: 17s;
  animation-delay: 17s;
}

#headd5{
  -webkit-animation: finalFade 1 5s ease-in;
  -moz-animation: finalFade 1 5s ease-in;
  -o-animation: finalFade 1 5s ease-in;
  animation: finalFade 1 5s ease-in;
  -webkit-animation-fill-mode: forwards;
  -moz-animation-fill-mode: forwards;
  -o-animation-fill-mode: forwards;
  animation-fill-mode: forwards;
  -webkit-animation-delay: 22s;
  -moz-animation-delay: 22s;
  -o-animation-delay: 22s;
  animation-delay: 22s;
}

@-webkit-keyframes fadeIn{
  from{opacity: 0;}
  to{opacity: 1;}
}

@-moz-keyframes fadeIn{
  from{opacity: 0;}
  to{opacity: 1;}
}

@-o-keyframes fadeIn{
  from{opacity: 0;}
  to{opacity: 1;}
}

@keyframes fadeIn{
  from{opacity: 0;}
  to{opacity: 1;}
}

@-webkit-keyframes fadeOut{
  0%{opacity: 0;}
  30%{opacity: 1;}
  80%{opacity: .9;}
  100%{opacity: 0;}
}

@-moz-keyframes fadeOut{
  0%{opacity: 0;}
  30%{opacity: 1;}
  80%{opacity: .9;}
  100%{opacity: 0;}
}

@-o-keyframes fadeOut{
  0%{opacity: 0;}
  30%{opacity: 1;}
  80%{opacity: .9;}
  100%{opacity: 0;}
}

@keyframes fadeOut{
  0%{opacity: 0;}
  30%{opacity: 1;}
  80%{opacity: .9;}
  100%{opacity: 0;}
}

@-webkit-keyframes finalFade{
  0%{opacity: 0;}
  30%{opacity: 1;}
  80%{opacity: .9;}
  100%{opacity: 1;}
}

@-moz-keyframes finalFade{
  0%{opacity: 0;}
  30%{opacity: 1;}
  80%{opacity: .9;}
  100%{opacity: 1;}
}

@-o-keyframes finalFade{
  0%{opacity: 0;}
  30%{opacity: 1;}
  80%{opacity: .9;}
  100%{opacity: 1;}
}

@keyframes finalFade{
  0%{opacity: 0;}
  30%{opacity: 1;}
  80%{opacity: .9;}
  100%{opacity: 1;}
}

#footerr{
  font-family: 'Roboto', sans-serif;
  font-size: 1.2em;
  color: white;
  position: fixed;
  -webkit-transform: translate(95vw,90vh);
  -moz-transform: translate(95vw,90vh);
  transform: translate(95vw,90vh);
  transform: translate(95vw,90vh);
}
