<!DOCTYPE html>
<html lang="ar" dir="rtl">
<head>
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>شكراً لك — Elite Clothes</title>
  <link href="https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700;900&display=swap" rel="stylesheet" />
  <style>
    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

    :root {
      --gold: #C9A84C;
      --gold-light: #F0D080;
      --gold-pale: #E8C96A;
      --bg: #080808;
      --bg2: #0E0E0E;
      --white: #FFFFFF;
      --text-muted: #888;
    }

    html, body {
      width: 100%; height: 100%;
      background: var(--bg);
      font-family: 'Cairo', sans-serif;
      overflow: hidden;
    }

    /* ═══════════════════════════════════════ NOISE TEXTURE */
    body::before {
      content: '';
      position: fixed; inset: 0;
      background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
      pointer-events: none;
      z-index: 0;
      opacity: 0.6;
    }

    /* ═══════════════════════════════════════ RADIAL GLOW BG */
    .bg-glow {
      position: fixed; inset: 0;
      background: radial-gradient(ellipse 60% 50% at 50% 50%, rgba(201,168,76,0.07) 0%, transparent 70%);
      pointer-events: none;
      z-index: 0;
    }

    /* ═══════════════════════════════════════ CONFETTI CANVAS */
    #confetti-canvas {
      position: fixed; inset: 0;
      z-index: 10;
      pointer-events: none;
    }

    /* ═══════════════════════════════════════ MAIN WRAPPER */
    .page {
      position: relative;
      z-index: 20;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      min-height: 100vh;
      padding: 2rem 1.5rem;
      gap: 0;
    }

    /* ═══════════════════════════════════════ LOGO */
    .logo-wrap {
      margin-bottom: 3rem;
      animation: fadeSlideDown 0.8s ease forwards;
      opacity: 0;
    }

    .logo-img {
      height: 52px;
      filter: brightness(0) invert(1);
      position: relative;
    }

    .logo-shimmer-wrap {
      position: relative;
      display: inline-block;
      overflow: hidden;
    }

    .logo-shimmer-wrap::after {
      content: '';
      position: absolute;
      top: 0; left: -100%;
      width: 60%;
      height: 100%;
      background: linear-gradient(90deg,
        transparent 0%,
        rgba(201,168,76,0.6) 40%,
        rgba(240,208,128,0.9) 50%,
        rgba(201,168,76,0.6) 60%,
        transparent 100%
      );
      animation: shimmer 3s 1.2s infinite ease-in-out;
      pointer-events: none;
    }

    /* ═══════════════════════════════════════ CHECK CIRCLE */
    .check-wrap {
      position: relative;
      margin-bottom: 2.5rem;
      animation: scaleIn 0.7s 0.4s cubic-bezier(0.175,0.885,0.32,1.275) forwards;
      opacity: 0;
      transform: scale(0);
    }

    .check-circle {
      width: 100px; height: 100px;
      border-radius: 50%;
      background: linear-gradient(135deg, #C9A84C 0%, #F0D080 50%, #A8802A 100%);
      display: flex; align-items: center; justify-content: center;
      box-shadow:
        0 0 0 0 rgba(201,168,76,0.5),
        0 8px 40px rgba(201,168,76,0.35),
        0 2px 12px rgba(0,0,0,0.6);
      animation: pulse 2.2s 1.2s infinite ease-out;
    }

    .check-circle svg {
      width: 48px; height: 48px;
      stroke: #fff;
      stroke-width: 3;
      fill: none;
      stroke-linecap: round;
      stroke-linejoin: round;
      stroke-dasharray: 60;
      stroke-dashoffset: 60;
      animation: drawCheck 0.5s 1s ease forwards;
    }

    /* Outer ring */
    .check-ring {
      position: absolute; inset: -12px;
      border-radius: 50%;
      border: 1px solid rgba(201,168,76,0.3);
      animation: ringExpand 2.2s 1.2s infinite ease-out;
    }

    .check-ring-2 {
      position: absolute; inset: -24px;
      border-radius: 50%;
      border: 1px solid rgba(201,168,76,0.15);
      animation: ringExpand 2.2s 1.5s infinite ease-out;
    }

    /* ═══════════════════════════════════════ DIVIDER */
    .divider {
      width: 120px; height: 1px;
      background: linear-gradient(90deg, transparent, var(--gold), transparent);
      margin-bottom: 2rem;
      animation: fadeIn 0.6s 1.2s ease forwards;
      opacity: 0;
    }

    /* ═══════════════════════════════════════ TEXT */
    .thank-title {
      font-size: clamp(1.6rem, 5vw, 2.2rem);
      font-weight: 900;
      color: var(--white);
      text-align: center;
      letter-spacing: 0.04em;
      margin-bottom: 1.2rem;
      line-height: 1.3;
      animation: fadeSlideUp 0.7s 1.3s ease forwards;
      opacity: 0;
      transform: translateY(20px);
    }

    .thank-title span {
      background: linear-gradient(90deg, var(--gold) 0%, var(--gold-light) 50%, var(--gold) 100%);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
    }

    .thank-msg {
      font-size: clamp(0.9rem, 3vw, 1.05rem);
      font-weight: 400;
      color: #aaa;
      text-align: center;
      line-height: 2;
      max-width: 420px;
      animation: fadeSlideUp 0.7s 1.5s ease forwards;
      opacity: 0;
      transform: translateY(20px);
    }

    .thank-msg strong {
      color: var(--gold-pale);
      font-weight: 600;
    }

    /* ═══════════════════════════════════════ GOLD LINE SEPARATOR */
    .ornament {
      display: flex; align-items: center; gap: 12px;
      margin: 2rem 0;
      animation: fadeIn 0.6s 1.8s ease forwards;
      opacity: 0;
    }

    .ornament-line {
      width: 60px; height: 1px;
      background: linear-gradient(90deg, transparent, rgba(201,168,76,0.5));
    }
    .ornament-line.right {
      background: linear-gradient(90deg, rgba(201,168,76,0.5), transparent);
    }

    .ornament-diamond {
      width: 6px; height: 6px;
      background: var(--gold);
      transform: rotate(45deg);
    }

    /* ═══════════════════════════════════════ FOOTER BUTTON */
    .back-btn {
      display: inline-block;
      padding: 0.75rem 2.5rem;
      border: 1px solid rgba(201,168,76,0.4);
      border-radius: 2px;
      color: var(--gold);
      font-family: 'Cairo', sans-serif;
      font-size: 0.9rem;
      font-weight: 600;
      letter-spacing: 0.12em;
      text-decoration: none;
      text-align: center;
      background: transparent;
      transition: background 0.3s, border-color 0.3s, color 0.3s, box-shadow 0.3s;
      animation: fadeSlideUp 0.7s 2s ease forwards;
      opacity: 0;
      transform: translateY(20px);
      cursor: pointer;
    }

    .back-btn:hover {
      background: rgba(201,168,76,0.08);
      border-color: var(--gold);
      box-shadow: 0 0 24px rgba(201,168,76,0.2);
      color: var(--gold-light);
    }

    /* ═══════════════════════════════════════ FOOTER */
    .footer-brand {
      position: fixed;
      bottom: 1.5rem;
      left: 50%; transform: translateX(-50%);
      font-size: 0.72rem;
      color: rgba(255,255,255,0.2);
      letter-spacing: 0.18em;
      text-transform: uppercase;
      font-weight: 300;
      white-space: nowrap;
      animation: fadeIn 1s 2.5s ease forwards;
      opacity: 0;
    }

    /* ═══════════════════════════════════════ KEYFRAMES */
    @keyframes fadeSlideDown {
      to { opacity: 1; transform: translateY(0); }
      from { opacity: 0; transform: translateY(-20px); }
    }
    @keyframes fadeSlideUp {
      to { opacity: 1; transform: translateY(0); }
    }
    @keyframes fadeIn {
      to { opacity: 1; }
    }
    @keyframes scaleIn {
      to { opacity: 1; transform: scale(1); }
    }
    @keyframes drawCheck {
      to { stroke-dashoffset: 0; }
    }
    @keyframes shimmer {
      0% { left: -100%; }
      60%, 100% { left: 150%; }
    }
    @keyframes pulse {
      0%   { box-shadow: 0 0 0 0 rgba(201,168,76,0.55), 0 8px 40px rgba(201,168,76,0.3); }
      70%  { box-shadow: 0 0 0 22px rgba(201,168,76,0), 0 8px 40px rgba(201,168,76,0.15); }
      100% { box-shadow: 0 0 0 0 rgba(201,168,76,0), 0 8px 40px rgba(201,168,76,0.3); }
    }
    @keyframes ringExpand {
      0%   { opacity: 0.6; transform: scale(1); }
      100% { opacity: 0; transform: scale(1.6); }
    }
  </style>
</head>
<body>

<div class="bg-glow"></div>
<canvas id="confetti-canvas"></canvas>

<main class="page">

  <!-- LOGO -->
  <div class="logo-wrap">
    <div class="logo-shimmer-wrap">
      <img class="logo-img"
        src="https://eliteclothes16.com/wp-content/themes/elite/assets/images/logo.png"
        alt="Elite Clothes"
        onerror="this.style.display='none'; document.querySelector('.logo-text').style.display='block';"
      />
      <div class="logo-text" style="display:none; font-size:1.6rem; font-weight:900; letter-spacing:0.3em; color:#fff;">ELITE</div>
    </div>
  </div>

  <!-- CHECK ICON -->
  <div class="check-wrap">
    <div class="check-ring"></div>
    <div class="check-ring-2"></div>
    <div class="check-circle">
      <svg viewBox="0 0 48 48">
        <polyline points="10,26 20,36 38,14"/>
      </svg>
    </div>
  </div>

  <!-- DIVIDER -->
  <div class="divider"></div>

  <!-- TITLE -->
  <h1 class="thank-title">تم استلام طلبك <span>بنجاح!</span></h1>

  <!-- MESSAGE -->
  <p class="thank-msg">
    شكراً لثقتك بـ <strong>Elite Clothes</strong>.<br/>
    سيتواصل معك فريقنا لتأكيد طلبك في أقرب وقت.<br/>
    نرجو إبقاء خط هاتفك <strong>متاحاً</strong>.
  </p>

  <!-- ORNAMENT -->
  <div class="ornament">
    <div class="ornament-line"></div>
    <div class="ornament-diamond"></div>
    <div class="ornament-line right"></div>
  </div>

  <!-- BACK BUTTON -->
  <a class="back-btn" href="https://eliteclothes16.com">العودة للمتجر</a>

</main>

<!-- FOOTER -->
<div class="footer-brand">© Elite Clothes 16 — الجزائر</div>

<script>
// ══════════════════════════════════════════ CONFETTI ENGINE
(function() {
  const canvas = document.getElementById('confetti-canvas');
  const ctx = canvas.getContext('2d');
  let W, H, particles = [];
  let running = true;
  const startTime = Date.now();
  const DURATION = 4000; // ms

  function resize() {
    W = canvas.width  = window.innerWidth;
    H = canvas.height = window.innerHeight;
  }
  resize();
  window.addEventListener('resize', resize);

  // Gold palette
  const COLORS = ['#C9A84C','#F0D080','#E8C96A','#A8802A','#FFE08A','#D4AA60'];

  function Particle() {
    this.reset(true);
  }

  Particle.prototype.reset = function(init) {
    this.x = Math.random() * W;
    this.y = init ? (Math.random() * -H * 0.3) : -12;
    this.size = 4 + Math.random() * 6;
    this.vy = 1.5 + Math.random() * 2.5;
    this.vx = (Math.random() - 0.5) * 1.5;
    this.rot = Math.random() * Math.PI * 2;
    this.rotSpeed = (Math.random() - 0.5) * 0.12;
    this.color = COLORS[Math.floor(Math.random() * COLORS.length)];
    this.shape = Math.random() < 0.5 ? 'rect' : 'diamond';
    this.alpha = 0.85 + Math.random() * 0.15;
    this.wave = Math.random() * Math.PI * 2;
  };

  Particle.prototype.update = function(elapsed) {
    this.wave += 0.04;
    this.x += this.vx + Math.sin(this.wave) * 0.4;
    this.y += this.vy;
    this.rot += this.rotSpeed;

    // Fade out near the end
    const fadeStart = DURATION * 0.55;
    if (elapsed > fadeStart) {
      this.alpha = Math.max(0, this.alpha - 0.012);
    }
    if (this.y > H + 20) this.alpha = 0;
  };

  Particle.prototype.draw = function() {
    ctx.save();
    ctx.globalAlpha = this.alpha;
    ctx.translate(this.x, this.y);
    ctx.rotate(this.rot);
    ctx.fillStyle = this.color;

    if (this.shape === 'rect') {
      ctx.fillRect(-this.size / 2, -this.size * 0.3, this.size, this.size * 0.6);
    } else {
      ctx.beginPath();
      ctx.moveTo(0, -this.size / 2);
      ctx.lineTo(this.size / 2, 0);
      ctx.lineTo(0, this.size / 2);
      ctx.lineTo(-this.size / 2, 0);
      ctx.closePath();
      ctx.fill();
    }
    ctx.restore();
  };

  // Spawn 180 particles
  for (let i = 0; i < 180; i++) particles.push(new Particle());

  function loop() {
    if (!running) return;
    ctx.clearRect(0, 0, W, H);

    const elapsed = Date.now() - startTime;
    let allGone = true;

    particles.forEach(p => {
      if (p.alpha > 0) {
        allGone = false;
        p.update(elapsed);
        p.draw();
      }
    });

    if (elapsed < DURATION) {
      requestAnimationFrame(loop);
    } else if (!allGone) {
      requestAnimationFrame(loop);
    } else {
      running = false;
      canvas.style.display = 'none';
    }
  }

  loop();
})();
</script>
</body>
</html>