@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;900&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
}

html, body {
  height: 100%;
}

/* ==================== RAINBOW MOVING BACKGROUND ==================== */
body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: #E5E7EB;

  background: linear-gradient(
    270deg,
    #ff0000,
    #ff9900,
    #ffee00,
    #33ff00,
    #00ffee,
    #0066ff,
    #9900ff,
    #ff0000
  );
  background-size: 1600% 1600%;
  animation: rainbowMove 20s linear infinite;
}

/* ==================== MAIN CARD / FORMS ==================== */
form, .card {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(14px);
  border-radius: 18px;
  padding: 35px 45px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.55);
  display: flex;
  flex-direction: column;
  gap: 15px;
  animation: fadeIn 0.8s ease-in-out;
}

/* ==================== RAINBOW TITLE ==================== */
h2 {
  text-align: center;
  font-weight: 900;
  font-size: clamp(28px, 4vw, 34px);
  margin-bottom: 20px;

  background: linear-gradient(
    90deg,
    red,
    orange,
    yellow,
    green,
    cyan,
    blue,
    violet,
    red
  );
  background-size: 400% 400%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: rainbowText 6s linear infinite;
}

/* optional brand title class if used */
.brand-title {
  font-weight: 900;
  font-size: 30px;
  text-align: center;
  margin-bottom: 10px;

  background: linear-gradient(
    90deg,
    red,
    orange,
    yellow,
    green,
    cyan,
    blue,
    violet,
    red
  );
  background-size: 400% 400%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: rainbowText 6s linear infinite;
}

.page-title, .pdf-text {
  text-align: center;
  color: #E2E8F0;
  font-size: 1.1rem;
  margin-bottom: 15px;
}

/* ==================== INPUTS ==================== */
input {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #334155;
  background-color: #020617;
  color: #E5E7EB;
  outline: none;
  font-size: 1rem;
}

input::placeholder {
  color: #64748B;
}

input:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 2px rgba(56,189,248,0.35);
}

/* ==================== BUTTON ==================== */
button {
  padding: 12px;
  border-radius: 12px;
  border: none;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;

  background: linear-gradient(90deg, #6366f1, #06b6d4);
  color: white;
  transition: all 0.25s ease;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.4);
}

/* ==================== PDF ==================== */
iframe.pdf-frame {
  width: 100%;
  height: 320px;
  border-radius: 12px;
  border: none;
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

/* ==================== POPUP ==================== */
.popup {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 9999;
}

.popup.show {
  opacity: 1;
  pointer-events: auto;
}

.popup-card {
  width: 50%;
  max-width: 560px;
  background: rgba(15,23,42,0.95);
  color: #E5E7EB;
  padding: 30px 35px;
  border-radius: 18px;
  text-align: center;
  line-height: 1.6;
  box-shadow: 0 20px 60px rgba(0,0,0,0.55);
  animation: popupScale 0.35s ease;
}

/* ==================== LOADER ==================== */
.loader {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 9999;
}

.loader.show {
  opacity: 1;
  pointer-events: all;
}

.loader-box {
  background: rgba(15,23,42,0.9);
  backdrop-filter: blur(12px);
  border-radius: 16px;
  padding: 25px 30px;
  text-align: center;
  color: white;
  width: 260px;
}

.spinner {
  width: 42px;
  height: 42px;
  border: 4px solid rgba(255,255,255,0.3);
  border-top: 4px solid #06b6d4;
  border-radius: 50%;
  margin: 0 auto 15px;
  animation: spin 1s linear infinite;
}

/* ==================== ANIMATIONS ==================== */
@keyframes rainbowMove {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

@keyframes rainbowText {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes popupScale {
  from { transform: scale(0.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* ==================== MOBILE ==================== */
@media(max-width: 768px){
  .popup-card, form, .card {
    width: 90%;
  }
}
