/* ==========================================
   RESET
========================================== */

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #fffbef;

  --bg2: #ffe98a;

  --glass: rgba(255, 255, 255, 0.28);

  --border: rgba(255, 255, 255, 0.55);

  --text: #433b16;

  --gold: #e8b52c;

  --gold2: #ffd44d;

  --shadow: 0 30px 70px rgba(0, 0, 0, 0.18);
}

html {
  font-size: 16px;
}

body {
  font-family: "Peyda";
  direction: rtl;

  overflow-x: hidden;
  overflow-y: auto;

  background: #101010;

  display: flex;
  justify-content: center;
  align-items: flex-start;

  width: 100%;
  min-height: 100vh;

  padding: 20px 0;
}

/* ==========================================
   MOBILE FRAME
========================================== */

.mobile {
  position: relative;

  width: 360px;

  height: 640px;

  overflow: hidden;

  border-radius: 36px;

  background: linear-gradient(180deg, var(--bg), var(--bg2));

  box-shadow: 0 50px 120px rgba(0, 0, 0, 0.35);
}

/* ==========================================
   BACKGROUND
========================================== */

.bg-gradient {
  position: absolute;

  inset: 0;

  background: radial-gradient(
      circle at top left,
      rgba(255, 255, 255, 0.75),
      transparent 45%
    ),
    radial-gradient(
      circle at bottom right,
      rgba(255, 222, 80, 0.35),
      transparent 45%
    );
}

.sun {
  position: absolute;

  width: 650px;

  height: 650px;

  border-radius: 50%;

  background: #fff6ae;

  filter: blur(130px);

  top: -420px;

  left: -220px;

  opacity: 0.9;
}

.noise {
  position: absolute;

  inset: 0;

  opacity: 0.08;

  background-image: radial-gradient(#000 1px, transparent 1px);

  background-size: 22px 22px;
}

/* ==========================================
   CANVAS
========================================== */

#fxCanvas {
  position: absolute;

  inset: 0;

  width: 100%;

  height: 100%;

  pointer-events: none;
}

/* ==========================================
   DECORATIONS
========================================== */

.olive {
  position: absolute;

  width: 110px;

  opacity: 0.18;

  pointer-events: none;

  user-select: none;
}

.olive.left {
  left: -28px;

  top: 120px;

  transform: rotate(-18deg);
}

.olive.right {
  right: -28px;

  bottom: 90px;

  transform: rotate(18deg);
}

.floating {
  position: absolute;

  width: 70px;

  pointer-events: none;

  user-select: none;

  filter: drop-shadow(0 15px 20px rgba(0, 0, 0, 0.15));
}

.lemon1 {
  top: 90px;

  left: 25px;
}

.lemon2 {
  bottom: 120px;

  right: 25px;
}

/* ==========================================
   CARD
========================================== */

.card {
  position: absolute;

  inset: 10px;

  width: auto;
  height: auto;

  transform: none;

  border-radius: 34px;

  padding: 30px 20px;
  background: var(--glass);

  border: 1px solid var(--border);

  backdrop-filter: blur(24px);

  box-shadow: var(--shadow), inset 0 0 45px rgba(255, 255, 255, 0.35);

  overflow: hidden;

  z-index: 10;
}

/* Shine */

/* .card::before {
  content: "";

  position: absolute;

  width: 220%;

  height: 45%;

  left: -60%;

  top: -120%;

  background: linear-gradient(
    120deg,
    transparent,
    rgba(255, 255, 255, 0.45),
    transparent
  );

  transform: rotate(25deg);
} */

/* ==========================================
   LOGO
========================================== */

.logo {
  width: 92px;

  height: 92px;

  margin: auto;

  border-radius: 50%;

  background: white;

  display: flex;

  justify-content: center;

  align-items: center;

  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.12);
}

.logo img {
  width: 58px;
}

/* ==========================================
   TITLES
========================================== */

.subtitle {
  margin-top: 22px;

  text-align: center;

  letter-spacing: 5px;

  text-transform: uppercase;

  color: #8b7615;

  font-size: 0.72rem;
}

#powered {
  font-size: 1rem;
  font-weight: 900;
  margin-top: 20px;
  text-align: center;
  letter-spacing: 7px;
  text-transform: uppercase;
  color: #8b7615;
}

.card h1 {
  margin-top: 16px;

  text-align: center;

  color: var(--text);

  font-size: 2rem;

  line-height: 1.5;
}

.guest-name {
  background: linear-gradient(90deg, #8a7316, #ffd84f, #8a7316);

  background-size: 220%;

  -webkit-background-clip: text;

  color: transparent;
}

.card p {
  margin-top: 18px;
  text-align: center;
  color: #666;
  line-height: 2;
  font-size: 0.85rem;
  font-weight: 700;
}
/* ==========================================
   INFO BOXES
========================================== */

.info {
  margin-top: 28px;

  display: flex;

  flex-direction: column;

  gap: 12px;
}

.info div {
  display: flex;

  align-items: center;

  justify-content: center;

  gap: 10px;

  padding: 14px 16px;

  border-radius: 18px;

  background: rgba(255, 255, 255, 0.35);

  border: 1px solid rgba(255, 255, 255, 0.45);

  backdrop-filter: blur(10px);

  color: var(--text);

  font-size: 0.92rem;

  transition: 0.35s;
}

.info div:hover {
  transform: translateY(-2px);

  background: rgba(255, 255, 255, 0.45);
}

.info span {
  font-weight: 600;
}

/* ==========================================
   COUNTDOWN
========================================== */

.countdown {
  margin-top: 30px;

  display: grid;

  grid-template-columns: repeat(4, 1fr);

  gap: 10px;
}

.countdown div {
  background: rgba(255, 255, 255, 0.42);

  border: 1px solid rgba(255, 255, 255, 0.5);

  backdrop-filter: blur(10px);

  border-radius: 18px;

  padding: 14px 8px;

  text-align: center;

  transition: 0.35s;
}

.countdown div:hover {
  transform: translateY(-3px);
}

.countdown span {
  display: block;

  font-size: 1.55rem;

  font-weight: 800;

  color: #a67c00;
}

.countdown small {
  color: #666;

  font-size: 0.72rem;
}

/* ==========================================
   BUTTONS
========================================== */

button {
  border: none;

  outline: none;

  cursor: pointer;

  font-family: "Peyda";

  transition: 0.35s;
}

#confirmBtn {
  width: 100%;

  margin-top: 28px;

  padding: 16px;

  border-radius: 999px;

  background: linear-gradient(135deg, #ffd84a, #f1b400);

  color: white;

  font-size: 1rem;

  font-weight: 700;

  box-shadow: 0 18px 35px rgba(255, 193, 7, 0.35);
}

#confirmBtn:hover {
  transform: translateY(-3px);

  box-shadow: 0 22px 40px rgba(255, 193, 7, 0.45);
}

#confirmBtn:active {
  transform: scale(0.98);
}

/* ==========================================
   DOWNLOAD BUTTON
========================================== */

#downloadBtn {
  position: fixed;

  right: 16px;
  top: 20px;

  padding: 12px 18px;

  border-radius: 999px;

  background: white;

  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);

  z-index: 9999;

  font-size: 0.85rem;
}

/* ==========================================
   MUSIC
========================================== */

.music {
  position: absolute;

  top: 22px;

  left: 22px;

  width: 52px;

  height: 52px;

  border-radius: 50%;

  background: rgba(255, 255, 255, 0.45);

  backdrop-filter: blur(15px);

  font-size: 22px;

  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);

  z-index: 50;
}

.music:hover {
  transform: scale(1.08);
}

/* ==========================================
   SCROLLBAR
========================================== */

::-webkit-scrollbar {
  width: 0;
}

/* ==========================================
   ANIMATIONS
========================================== */

@keyframes float {
  0% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-14px);
  }

  100% {
    transform: translateY(0px);
  }
}

@keyframes shine {
  0% {
    top: -140%;
  }

  100% {
    top: 180%;
  }
}

@keyframes gradientMove {
  0% {
    background-position: 0%;
  }

  100% {
    background-position: 220%;
  }
}

/* اجرا */

.card::before {
  animation: shine 8s linear infinite;
}

.guest-name {
  animation: gradientMove 5s linear infinite;
}

.lemon1 {
  animation: float 5s ease-in-out infinite;
}

.lemon2 {
  animation: float 6s ease-in-out infinite;
}

/* ==========================================
   RESPONSIVE
========================================== */

@media (max-width: 420px) {
  body {
    padding: 0;
  }

  .mobile {
    width: 100%;
    min-height: 100dvh;
    /* height: auto; */
    border-radius: 0;
  }
}

/* ==========================================
   STORY EXPORT
========================================== */
#storyExport {
  display: flex;
  justify-content: center;
  align-items: center;
}
#storyExport.exporting {
  width: 1080px;
  height: 1920px;

  background: #f8e38b;

  justify-content: center;
  align-items: center;
}
#storyExport.exporting .logo {
  display: none;
}

#storyExport.exporting #downloadBtn {
  display: none;
}

#storyExport.exporting .card {
  padding-top: 0;
}
#storyExport.exporting .mobile {
  width: 700px;
  height: auto;
}
#storyExport.exporting .mobile {
  transform: scale(1.15);
}
