@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%;
}

body {
  min-height: 100vh;
  background-color: #0F172A;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: #E5E7EB;
}

/* ==================== MAIN CARD / FORMS ==================== */
form, .card {
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(12px);
  border-radius: 18px;
  padding: 35px 45px;
  width: 100%;
  max-width: 400px;
  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;
}

/* ==================== HEADINGS ==================== */
h2 {
  text-align: center;
  font-weight: 900;
  font-size: clamp(26px, 4vw, 40px);
  margin-bottom: 20px;

  background: linear-gradient(
    90deg,
    #10B981,
    #22C55E,
    #34D399,
    #10B981
  );
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 3s linear infinite;
}

.page-title, .pdf-text {
  text-align: center;
  color: #CBD5E1;
  font-size: 1.1rem;
  margin-bottom: 15px;
  opacity: 0.9;
}

/* ==================== INPUTS ==================== */
input {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #134E4A;
  background-color: #020617;
  color: #E5E7EB;
  outline: none;
  font-size: 1rem;
}

input::placeholder {
  color: #64748B;
}

input:focus {
  border-color: #22C55E;
  box-shadow: 0 0 0 2px rgba(34,197,94,0.3);
}

/* ==================== BUTTONS ==================== */
button {
  padding: 12px;
  border-radius: 12px;
  border: none;
  font-weight: 700;
  background: linear-gradient(90deg, #10B981, #22C55E);
  color: #ECFDF5;
  cursor: pointer;
  transition: all 0.3s ease;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(16,185,129,0.45);
}

/* ==================== PDF FRAME ==================== */
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;
}

.popup-card::before {
  content: "⚠️";
  display: block;
  font-size: 38px;
  margin-bottom: 15px;
}

/* ==================== 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.85);
  backdrop-filter: blur(12px);
  border-radius: 16px;
  padding: 25px 30px;
  text-align: center;
  color: #ECFDF5;
  width: 260px;
}

.spinner {
  width: 42px;
  height: 42px;
  border: 4px solid rgba(255,255,255,0.3);
  border-top: 4px solid #10B981;
  border-radius: 50%;
  margin: 0 auto 15px;
  animation: spin 1s linear infinite;
}

/* ==================== ANIMATIONS ==================== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(15px);}
  to { opacity: 1; transform: translateY(0);}
}

@keyframes shimmer {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes popupScale {
  from { transform: scale(0.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

@media(max-width: 768px){
  .popup-card, form, .card {
    width: 90%;
  }
  h2 {
    font-size: clamp(24px, 6vw, 32px);
  }
}
