:root {
  --bg-dark: #0b0f19;
  --panel-bg: rgba(17, 24, 39, 0.7);
  --panel-border: rgba(255, 255, 255, 0.08);
  --primary: #a855f7;
  --primary-hover: #c084fc;
  --secondary: #38bdf8;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --success: #10b981;
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'Outfit', sans-serif;
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg-dark);
  background-image: radial-gradient(circle at 50% 0%, #1e1b4b 0%, transparent 60%);
  color: var(--text-main);
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.4;
  z-index: -1;
  pointer-events: none;
}

.orb-1 {
  width: 400px;
  height: 400px;
  background: var(--primary);
  top: -100px;
  left: -100px;
  animation: float 20s ease-in-out infinite alternate;
}

.orb-2 {
  width: 300px;
  height: 300px;
  background: var(--secondary);
  bottom: -50px;
  right: -50px;
  animation: float 15s ease-in-out infinite alternate-reverse;
}

@keyframes float {
  0% { transform: translate(0, 0); }
  100% { transform: translate(100px, 50px); }
}

.container {
  width: 90%;
  max-width: 650px;
  text-align: center;
  padding: 3rem;
  z-index: 1;
}

.glass-panel {
  background: var(--panel-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--panel-border);
  border-radius: 24px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255,255,255,0.1);
}

.header {
  margin-bottom: 2.5rem;
}

.brand {
  font-size: 3.5rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
  background: linear-gradient(135deg, #fff 0%, #a855f7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -1px;
}

.subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
  font-weight: 300;
  margin: 0;
}

.upload-box {
  background: rgba(15, 23, 42, 0.5);
  border: 2px dashed rgba(168, 85, 247, 0.3);
  border-radius: 16px;
  padding: 4rem 2rem;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.upload-box:hover, .upload-box.dragover {
  border-color: var(--primary);
  background: rgba(168, 85, 247, 0.05);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px -10px rgba(168, 85, 247, 0.2);
}

.hidden-input {
  display: none;
}

.icon-wrapper {
  background: rgba(168, 85, 247, 0.1);
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem auto;
  transition: transform 0.3s ease;
}

.upload-box:hover .icon-wrapper, .upload-box.dragover .icon-wrapper {
  transform: scale(1.1);
  background: rgba(168, 85, 247, 0.2);
}

.upload-icon {
  width: 40px;
  height: 40px;
  fill: var(--primary);
}

.upload-text h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.25rem;
  font-weight: 500;
}

.upload-text p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

#processing {
  padding: 3rem 0;
}

.spinner-container {
  position: relative;
  width: 80px;
  height: 80px;
  margin: 0 auto 2rem auto;
}

.spinner-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 3px solid transparent;
  border-top-color: var(--primary);
  border-right-color: var(--secondary);
  animation: spin 1.5s linear infinite;
}

.spinner-core {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  background: var(--primary);
  border-radius: 50%;
  box-shadow: 0 0 20px var(--primary);
  animation: pulse 2s ease-in-out infinite;
}

.status-heading {
  font-size: 1.5rem;
  font-weight: 500;
  margin: 0 0 0.5rem 0;
}

.success-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem auto;
  fill: var(--success);
  animation: scaleIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.thank-you {
  font-size: 2rem;
  margin: 0 0 0.5rem 0;
  color: var(--success);
}

.complete-subtitle {
  margin-bottom: 2.5rem;
}

.button-group {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-icon {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, #7e22ce 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(168, 85, 247, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(168, 85, 247, 0.6);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border: 1px solid var(--panel-border);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.hidden {
  display: none !important;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes pulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.8; }
  50% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
}

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

/* Footer & Donate Button */
.footer {
  margin-top: 2.5rem;
  display: flex;
  justify-content: center;
}

.donate-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: rgba(168, 85, 247, 0.1);
  color: var(--primary-hover);
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: 99px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
}

.donate-btn:hover {
  background: rgba(168, 85, 247, 0.2);
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(168, 85, 247, 0.2);
}

.heart-icon {
  width: 18px;
  height: 18px;
  fill: #ec4899;
}

/* Auth Pages */
.auth-container {
  max-width: 450px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  text-align: left;
  gap: 0.5rem;
}

.form-group label {
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
  margin-left: 0.2rem;
}

.form-group input {
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid rgba(148, 163, 184, 0.2);
  color: white;
  padding: 1rem 1.2rem;
  border-radius: 12px;
  font-family: inherit;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.2);
}

.auth-btn {
  width: 100%;
  margin-top: 1rem;
}

.auth-links {
  margin-top: 2rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.auth-links a {
  color: var(--primary-hover);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.auth-links a:hover {
  color: white;
  text-decoration: underline;
}

.user-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.user-greeting {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.logout-form {
  margin: 0;
}

.btn-logout {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.4rem 1rem;
  border-radius: 6px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-logout:hover {
  background: rgba(255, 255, 255, 0.05);
  color: white;
}

/* Alerts */
.alert {
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 0.95rem;
  text-align: center;
  font-weight: 500;
}

.alert-success {
  background: rgba(16, 185, 129, 0.1);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.alert-error {
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

@media (max-width: 640px) {
  .container { padding: 2rem 1.5rem; }
  .brand { font-size: 2.5rem; }
  .button-group { flex-direction: column; }
  .btn { width: 100%; }
}