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

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Poppins', sans-serif;
}

body {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 30px;
  overflow-x: hidden;
  background: #020617;
  color: #ffffff;
  position: relative;
  isolation: isolate;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 15% 20%, rgba(34, 197, 94, 0.35), transparent 28%),
    radial-gradient(circle at 85% 15%, rgba(59, 130, 246, 0.4), transparent 30%),
    radial-gradient(circle at 50% 90%, rgba(245, 158, 11, 0.25), transparent 30%),
    linear-gradient(135deg, #020617, #0f172a 45%, #111827);
  z-index: -2;
}

.money-rain {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}

.money-bill {
  position: absolute;
  top: -90px;
  width: 95px;
  height: 45px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.9);
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.95), rgba(14, 165, 233, 0.9));
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
  opacity: 0.45;
  animation: fallBill linear forwards;
}

.money-bill::before {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 7px;
  border: 1px dashed rgba(255, 255, 255, 0.45);
}

.money-bill::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  right: 10px;
}

@keyframes fallBill {
  0% {
    transform: translateY(-120px) translateX(0) rotate(0deg);
    opacity: 0;
  }

  10% {
    opacity: 0.45;
  }

  50% {
    transform: translateY(55vh) translateX(45px) rotate(180deg);
  }

  100% {
    transform: translateY(120vh) translateX(-35px) rotate(360deg);
    opacity: 0;
  }
}

.container {
  width: 100%;
  max-width: 1100px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
  align-items: stretch;
  position: relative;
  z-index: 10;
}

.card,
.ticket {
  position: relative;
  z-index: 20;
  overflow: hidden;
  border-radius: 28px;
  padding: 34px;
  background: rgba(255, 255, 255, 0.11);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.card::before,
.ticket::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(90deg, #22c55e, #38bdf8, #facc15);
}

h1 {
  font-size: 34px;
  line-height: 1.1;
  margin-bottom: 12px;
  font-weight: 800;
  background: linear-gradient(90deg, #ffffff, #bae6fd, #bbf7d0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

h2 {
  font-size: 26px;
  margin-bottom: 22px;
  color: #ffffff;
  font-weight: 700;
}

.subtitle {
  color: rgba(255, 255, 255, 0.68);
  margin-bottom: 26px;
  font-size: 13px;
}

form {
  display: grid;
  gap: 15px;
}

label {
  display: block;
  margin-bottom: -7px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

input,
select {
  width: 100%;
  padding: 15px 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  font-size: 15px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.62);
  outline: none;
  transition: 0.25s ease;
}

input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

input:focus,
select:focus {
  border-color: #38bdf8;
  background: rgba(15, 23, 42, 0.85);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.18);
  transform: translateY(-1px);
}

select option {
  background: #0f172a;
  color: #ffffff;
}

button {
  width: 100%;
  margin-top: 8px;
  border: none;
  border-radius: 18px;
  padding: 16px;
  background: linear-gradient(135deg, #22c55e, #0ea5e9);
  color: white;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.25s ease;
  box-shadow: 0 18px 35px rgba(14, 165, 233, 0.28);
}

button:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 45px rgba(34, 197, 94, 0.3);
  filter: brightness(1.08);
}

button:disabled {
  background: #64748b;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.ticket {
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.ticket.hidden {
  display: none;
}

.ticket-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  gap: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.11);
}

.ticket-line span:first-child {
  color: rgba(255, 255, 255, 0.55);
  font-weight: 600;
  font-size: 14px;
}

.ticket-line span:last-child {
  color: #ffffff;
  text-align: right;
  font-weight: 600;
}

.result {
  margin: 22px 0 10px;
  padding: 22px;
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(34, 197, 94, 0.24), rgba(14, 165, 233, 0.2)),
    rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.result p {
  margin: 10px 0;
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
}

.error {
  display: none;
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(239, 68, 68, 0.18);
  border: 1px solid rgba(248, 113, 113, 0.35);
  color: #fecaca;
  font-weight: 600;
  line-height: 1.5;
}

.warning {
  display: none;
  margin-top: 14px;
  padding: 13px 15px;
  border-radius: 16px;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(251, 191, 36, 0.35);
  color: #fde68a;
  font-weight: 500;
  line-height: 1.5;
  font-size: 14px;
}

.date {
  margin-top: 22px;
  color: rgba(255, 255, 255, 0.52);
  font-size: 12px;
  text-align: center;
  line-height: 1.6;
}

@media (max-width: 850px) {
  body {
    padding: 18px;
    align-items: flex-start;
  }

  .container {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 28px;
  }
}

.app-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.app-logo {
  width: 100px;
  height: 100px;
  border-radius: 20px;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 18px 45px rgba(14, 165, 233, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.app-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* باش العنوان يكون بجانب اللوغو وماينزلش بزاف */
.app-header h1 {
  margin-bottom: 0;
}
