/* =================== الحركة والتفاعل والتحفيز =================== */
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes pop { 0% { transform: scale(.6); opacity: 0; } 70% { transform: scale(1.12); } 100% { transform: scale(1); opacity: 1; } }
@keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes floaty { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-18px) rotate(8deg); } }
@keyframes wave { 0%, 60%, 100% { transform: rotate(0); } 10%, 30% { transform: rotate(16deg); } 20%, 40% { transform: rotate(-10deg); } }
@keyframes shake { 10%, 90% { transform: translateX(-2px); } 20%, 80% { transform: translateX(4px); } 30%, 50%, 70% { transform: translateX(-7px); } 40%, 60% { transform: translateX(7px); } }
@keyframes rise { from { opacity: 1; transform: translate(-50%, 0) scale(1); } to { opacity: 0; transform: translate(-50%, -90px) scale(1.6); } }
@keyframes bannerIn { from { opacity: 0; transform: translate(-50%, -30px) scale(.8); } to { opacity: 1; transform: translate(-50%, 0) scale(1); } }
@keyframes shine { from { background-position: -200% 0; } to { background-position: 200% 0; } }

#main > * { animation: fadeUp .35s ease both; }
#main > *:nth-child(2) { animation-delay: .04s; }
#main > *:nth-child(3) { animation-delay: .08s; }
#main > *:nth-child(4) { animation-delay: .12s; }
.pop { animation: pop .5s cubic-bezier(.2, .9, .3, 1.4) both; }
.bounce { display: inline-block; animation: bounce 1.6s ease-in-out infinite; }
.float { display: inline-block; animation: floaty 4s ease-in-out infinite; }
.shake { animation: shake .45s; }
.wave { display: inline-block; transform-origin: 70% 80%; animation: wave 2.4s ease-in-out 2; }

.btn { transition: transform .12s, box-shadow .15s, background .15s; }
.btn:active { transform: scale(.95); }
.btn.big { font-size: 16px; padding: 11px 20px; border-radius: 14px; }
.btn.primary { box-shadow: 0 6px 16px rgba(14, 116, 144, .25); }
.exp-card, .grade-card, .quick, .gal-card, .feature { transition: transform .18s ease, box-shadow .18s ease; }
.exp-card:hover, .grade-card:hover, .quick:hover, .feature:hover { transform: translateY(-4px) scale(1.01); box-shadow: 0 12px 28px rgba(16, 24, 40, .13); text-decoration: none; }
.exp-card:hover .subj-icon { display: inline-block; animation: bounce .8s ease; }

.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 200; }
.float-emoji { position: fixed; z-index: 210; font-size: 34px; pointer-events: none; animation: rise 1.2s ease-out forwards; transform: translateX(-50%); }

/* الرئيسية */
.hero-fun { position: relative; overflow: hidden; background: linear-gradient(135deg, #0e7490 0%, #155e75 45%, #5f3dc4 100%); color: #fff; border-radius: 22px; padding: 26px 26px 20px; }
.hero-fun p { color: #e0f2fe; max-width: 640px; }
.hero-fun h1 { color: #fff; font-size: 28px; }
.floaters span { position: absolute; font-size: 26px; opacity: .22; animation: floaty 6s ease-in-out infinite; animation-delay: calc(var(--i) * -0.5s); left: calc(var(--i) * 8.3% + 2%); top: calc(8% + var(--i) * 7%); pointer-events: none; }
.hero-row { position: relative; display: flex; gap: 20px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.hero-text { flex: 1 1 380px; }
.hero-fun .hero-stats { position: relative; margin-top: 16px; }
.hero-fun .hero-stats span { background: rgba(255, 255, 255, .14); color: #fff; border-color: transparent; }
.hero-fun .btn:not(.primary) { background: rgba(255, 255, 255, .92); }
.mini-bar { display: block; height: 5px; border-radius: 5px; background: #e9ecef; overflow: hidden; margin: 4px 0; }
.mini-bar > i { display: block; height: 100%; background: linear-gradient(90deg, #20c997, #0e7490); border-radius: 5px; }
.quick-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin: 16px 0 4px; }
.quick { border-radius: 18px; padding: 16px; color: #fff; display: flex; flex-direction: column; gap: 3px; min-height: 120px; }
.quick b { font-size: 17px; }
.quick small { opacity: .92; line-height: 1.5; }
.q-ic { font-size: 30px; }
.q-search { background: linear-gradient(135deg, #f59f00, #e8590c); }
.q-daily { background: linear-gradient(135deg, #20c997, #087f5b); }
.q-gallery { background: linear-gradient(135deg, #4dabf7, #1864ab); }
.q-me { background: linear-gradient(135deg, #cc5de8, #6741d9); }

/* الشريط الجانبي */
.credit { margin-top: 8px; padding: 12px 10px 4px; border-top: 1px solid #1e293b; text-align: center; font-size: 11.5px; color: #94a3b8; display: flex; flex-direction: column; gap: 2px; }
.credit:hover { text-decoration: none; }
.credit b { color: #fcc419; font-size: 14px; }
.credit small { color: #94a3b8; font-size: 13px; }

.settings { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.switch { display: flex; gap: 8px; align-items: center; cursor: pointer; }

/* تثبيت التطبيق */
.install-btn { font: inherit; display: flex; align-items: center; justify-content: center; gap: 6px; background: linear-gradient(135deg, #20c997, #0e7490); color: #fff; border: none; border-radius: 12px; padding: 10px 12px; cursor: pointer; font-weight: 700; box-shadow: 0 6px 16px rgba(32, 201, 151, .25); animation: pop .5s both; }
.install-btn:hover { filter: brightness(1.08); }
.install-card { display: flex; align-items: center; gap: 14px; margin: 14px 0; background: linear-gradient(135deg, #e6fcf5, #e7f5ff); border: 2px solid #96f2d7; }
.install-card > div { flex: 1; display: flex; flex-direction: column; }
.install-card small { color: var(--muted); }
.install-ic { font-size: 36px; }
.ios-steps { line-height: 2.1; padding-inline-start: 22px; }
.founder-loc { color: #0e7490; font-weight: 700; margin: 0 0 8px; }

/* العرض على الشاشة */
body.presenting #sidebar, body.presenting #topbar, body.presenting .exp-actions, body.presenting .pager { display: none !important; }
body.presenting #app { grid-template-columns: 1fr; }
body.presenting #main { font-size: 19px; padding: 24px 6vw; }
body.presenting .exp-title h1 { font-size: 32px; }
body.presenting .bio-fig .art-svg { max-height: 78vh; }

/* عن الموقع */
.about-hero { text-align: center; padding: 18px 0 8px; }
.about-logo { font-size: 70px; }
.founder { display: flex; gap: 18px; align-items: center; background: linear-gradient(135deg, #fff9db, #fff); border: 2px solid #ffe066; }
.founder-avatar { font-size: 58px; }
.founder h2 { font-size: 24px; margin: 2px 0 6px; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.feature { background: #fff; border-radius: 16px; box-shadow: var(--shadow); padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.feature span { font-size: 34px; }
.feature small { color: var(--muted); }

@media (max-width: 860px) {
  .hero-fun { padding: 18px 16px; border-radius: 18px; }
  .hero-fun h1 { font-size: 22px; }
      .founder { flex-direction: column; text-align: center; }
  .quick { min-height: 0; }
  .hero-text { flex: 1 1 100%; min-width: 0; }
  .hero-text .btn { white-space: normal; text-align: center; flex: 1 1 100%; }
  .hero-text .btn-row { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
