/* ================================
   PSU PAYMENT PORTAL : BRAND STYLES
   Brand: Gold (#D4A32A) on Black (#231F20)
   Typography: Manrope (Mont substitute)
   ================================ */

:root {
  /* Brand colors */
  --psu-gold: #D4A32A;
  --psu-gold-light: #E8BB4A;
  --psu-gold-dark: #B88A1F;
  --psu-black: #0A0908;
  --psu-near-black: #231F20;
  --psu-charcoal: #1A1715;
  --psu-gray-900: #2A2725;
  --psu-gray-700: #4A4744;
  --psu-gray-500: #8A8786;
  --psu-gray-300: #C8C5C2;
  --psu-white: #FAF8F5;

  /* Status colors */
  --success: #10B981;
  --error: #E55934;

  /* Typography */
  --font-primary: 'Manrope', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;

  /* Radii */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  /* Shadows */
  --shadow-soft: 0 4px 24px rgba(0, 0, 0, 0.08);
  --shadow-glow: 0 0 80px rgba(212, 163, 42, 0.12);
  --shadow-button: 0 8px 24px rgba(212, 163, 42, 0.35);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  font-family: var(--font-primary);
  background: var(--psu-black);
  color: var(--psu-white);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'cv11', 'ss01';
}

body {
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(212, 163, 42, 0.12), transparent 60%),
    radial-gradient(ellipse 60% 40% at 50% 120%, rgba(212, 163, 42, 0.06), transparent 70%),
    var(--psu-black);
  background-attachment: fixed;
}

.bg-pattern {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 80px 80px;
  pointer-events: none;
  z-index: 0;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}

/* HEADER */
.header {
  padding: 32px 24px 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  z-index: 2;
  min-height: 80px;
}

.logo {
 height: 48px;
  width: auto;
  display: block;
  max-width: 240px;
}

/* MAIN */
.main {
  max-width: 520px;
  margin: 0 auto;
  padding: 24px 24px 60px;
  position: relative;
  z-index: 1;
}

/* INVOICE CARD */
.invoice-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-xl);
  padding: 40px 32px;
  box-shadow: var(--shadow-soft), var(--shadow-glow);
  animation: fadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

.greeting {
  margin-bottom: 28px;
}

.hi {
  font-size: 11px;
  font-weight: 700;
  color: var(--psu-gold);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  display: block;
  margin-bottom: 12px;
}

.customer-name {
  font-size: clamp(28px, 5vw, 36px);
  font-weight: 800;
  line-height: 1.1;
  color: var(--psu-white);
  letter-spacing: -0.025em;
}

.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212, 163, 42, 0.25), transparent);
  margin: 28px 0;
}

/* INVOICE DETAILS */
.invoice-details {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 32px;
}

.invoice-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  gap: 16px;
}

.invoice-row .label {
  color: var(--psu-gray-500);
  font-weight: 500;
  flex-shrink: 0;
}

.invoice-row .value {
  color: var(--psu-white);
  font-weight: 600;
  text-align: right;
  word-break: break-word;
}

.invoice-row .deal-name {
  color: var(--psu-gold);
  font-weight: 700;
}

/* AMOUNT SECTION */
.amount-section {
  text-align: center;
  padding: 32px 24px;
  margin-bottom: 32px;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(ellipse at center, rgba(212, 163, 42, 0.14), transparent 70%),
    rgba(212, 163, 42, 0.04);
  border: 1px solid rgba(212, 163, 42, 0.18);
  position: relative;
  overflow: hidden;
}

.amount-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, transparent 40%, rgba(212, 163, 42, 0.08) 50%, transparent 60%);
  background-size: 200% 200%;
  animation: shimmer 6s ease-in-out infinite;
  pointer-events: none;
}

@keyframes shimmer {
  0%, 100% { background-position: 200% 200%; }
  50% { background-position: 0% 0%; }
}

.amount-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--psu-gold);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 12px;
  position: relative;
}

.amount {
  font-size: clamp(48px, 11vw, 64px);
  font-weight: 800;
  line-height: 1;
  color: var(--psu-white);
  letter-spacing: -0.035em;
  position: relative;
}

.amount-note {
  display: block;
  margin-top: 12px;
  font-size: 11px;
  color: var(--psu-gray-500);
  font-weight: 500;
  position: relative;
}

/* PAY BUTTON */
.pay-button {
  width: 100%;
  background: linear-gradient(135deg, var(--psu-gold), var(--psu-gold-light));
  color: var(--psu-near-black);
  border: none;
  padding: 20px 32px;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 17px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  box-shadow: var(--shadow-button);
  transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  margin-bottom: 24px;
  letter-spacing: 0.01em;
  position: relative;
  overflow: hidden;
}

.pay-button::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent 60%);
  opacity: 0;
  transition: opacity 0.25s;
}

.pay-button:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(212, 163, 42, 0.45);
}

.pay-button:hover:not(:disabled)::after {
  opacity: 1;
}

.pay-button:active:not(:disabled) {
  transform: translateY(0);
}

.pay-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.button-arrow {
  font-size: 22px;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.pay-button:hover:not(:disabled) .button-arrow {
  transform: translateX(4px);
}

/* PAYMENT METHODS */
.payment-methods {
  text-align: center;
}

.methods-label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  color: var(--psu-gray-500);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 12px;
}

.methods-icons {
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}

.method {
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--psu-gray-300);
  letter-spacing: 0.02em;
}

/* TRUST ROW */
.trust-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 28px;
  font-size: 12px;
  color: var(--psu-gray-500);
  font-weight: 500;
}

.trust-row svg {
  color: var(--psu-gold);
  flex-shrink: 0;
}

/* FOOTER */
.footer {
  text-align: center;
  padding: 24px;
  font-size: 12px;
  color: var(--psu-gray-500);
  position: relative;
  z-index: 1;
}

.footer a {
  color: var(--psu-gold);
  text-decoration: none;
  font-weight: 600;
  transition: opacity 0.2s;
}

.footer a:hover {
  opacity: 0.8;
}

/* ERROR MODAL */
.error-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 24px;
}

.error-content {
  background: var(--psu-charcoal);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  max-width: 400px;
  text-align: center;
  animation: fadeUp 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.error-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: rgba(229, 89, 52, 0.12);
  border: 1px solid rgba(229, 89, 52, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--error);
  font-size: 28px;
  font-weight: 800;
}

.error-content h2 {
  color: var(--psu-white);
  margin-bottom: 12px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.error-content p {
  color: var(--psu-gray-300);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 24px;
}

.error-action {
  display: inline-block;
  padding: 12px 24px;
  background: var(--psu-gold);
  color: var(--psu-near-black);
  border-radius: var(--radius-md);
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  transition: all 0.2s;
}

.error-action:hover {
  background: var(--psu-gold-light);
  transform: translateY(-1px);
}

/* TOAST */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--psu-charcoal);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--psu-white);
  padding: 14px 24px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  z-index: 200;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  max-width: 90%;
}

.toast.toast-visible {
  transform: translateX(-50%) translateY(0);
}

.toast-error {
  border-color: rgba(229, 89, 52, 0.4);
}

/* SUCCESS PAGE */
.success-icon {
  width: 88px;
  height: 88px;
  margin: 0 auto 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--psu-gold), var(--psu-gold-light));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 60px rgba(212, 163, 42, 0.4);
  animation: scaleIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.success-icon svg {
  width: 44px;
  height: 44px;
  color: var(--psu-near-black);
}

@keyframes scaleIn {
  from { transform: scale(0.3); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.status-title {
  font-size: clamp(28px, 5vw, 36px);
  font-weight: 800;
  text-align: center;
  margin-bottom: 12px;
  letter-spacing: -0.025em;
  color: var(--psu-white);
}

.status-subtitle {
  font-size: 15px;
  color: var(--psu-gray-300);
  text-align: center;
  margin-bottom: 32px;
  line-height: 1.6;
}

.next-steps {
  background: rgba(212, 163, 42, 0.04);
  border: 1px solid rgba(212, 163, 42, 0.15);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  margin-bottom: 24px;
}

.next-steps h3 {
  color: var(--psu-gold);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 18px;
}

.next-steps ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.next-steps li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  font-size: 14px;
  color: var(--psu-white);
  line-height: 1.6;
}

.next-steps li::before {
  content: counter(step-counter);
  counter-increment: step-counter;
  width: 24px;
  height: 24px;
  background: rgba(212, 163, 42, 0.15);
  color: var(--psu-gold);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

.next-steps ul {
  counter-reset: step-counter;
}

.failure-icon {
  width: 88px;
  height: 88px;
  margin: 0 auto 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--error), #C94028);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 60px rgba(229, 89, 52, 0.3);
  animation: scaleIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.failure-icon svg {
  width: 44px;
  height: 44px;
  color: var(--psu-white);
}

.retry-button {
  width: 100%;
  background: linear-gradient(135deg, var(--psu-gold), var(--psu-gold-light));
  color: var(--psu-near-black);
  border: none;
  padding: 18px 32px;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  transition: all 0.25s;
  box-shadow: var(--shadow-button);
  margin-bottom: 12px;
}

.retry-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(212, 163, 42, 0.45);
}

.secondary-button {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  color: var(--psu-white);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 16px 32px;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  display: block;
  transition: all 0.2s;
}

.secondary-button:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* Mobile */
@media (max-width: 480px) {
  .header { padding: 24px 16px 8px; }
  .main { padding: 16px 16px 48px; }
  .invoice-card { padding: 32px 24px; }
  .amount-section { padding: 28px 16px; }
}
