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

:root {
  --bg-color: #03000a;
  --panel-bg: rgba(10, 5, 25, 0.55);
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.07);
  --glass-border-hover: rgba(255, 255, 255, 0.15);
  
  --primary-glow: radial-gradient(circle, rgba(124, 58, 237, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
  --secondary-glow: radial-gradient(circle, rgba(34, 211, 238, 0.1) 0%, rgba(0, 0, 0, 0) 70%);
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --color-primary: #8b5cf6;
  --color-secondary: #22d3ee;
  --color-success: #10b981;
  --color-error: #ef4444;
  
  --gradient-primary: linear-gradient(135deg, #a78bfa 0%, #7c3aed 50%, #4c1d95 100%);
  --gradient-btn: linear-gradient(90deg, #7c3aed 0%, #22d3ee 100%);
  --gradient-btn-hover: linear-gradient(90deg, #6d28d9 0%, #06b6d4 100%);
  --gradient-text: linear-gradient(135deg, #ffffff 0%, #c084fc 100%);
  
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: var(--font-body);
  background-color: var(--bg-color);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
  position: relative;
}

/* Background Cosmic Ambient Glows */
body::before {
  content: '';
  position: absolute;
  top: -10%;
  left: -10%;
  width: 60%;
  height: 60%;
  background: var(--primary-glow);
  z-index: -1;
  pointer-events: none;
}

body::after {
  content: '';
  position: absolute;
  bottom: -10%;
  right: -10%;
  width: 60%;
  height: 60%;
  background: var(--secondary-glow);
  z-index: -1;
  pointer-events: none;
}

/* Main Container */
.app-container {
  width: 100%;
  max-width: 580px;
  padding: 2rem 1.5rem;
  z-index: 1;
}

/* Glassmorphism Card styling */
.glass-card {
  background: var(--panel-bg);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 3rem 2.5rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4),
              inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: var(--transition-smooth);
}

.glass-card:hover {
  border-color: var(--glass-border-hover);
  box-shadow: 0 25px 60px rgba(124, 58, 237, 0.1),
              0 20px 50px rgba(0, 0, 0, 0.5),
              inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* Form Typography */
.card-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.card-header h1 {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 800;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.5rem;
  letter-spacing: -0.03em;
}

.card-header p {
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: 400;
}

/* Forms layout */
.form-group {
  margin-bottom: 1.75rem;
  display: flex;
  flex-direction: column;
}

.form-label {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.6rem;
  color: var(--color-secondary);
  transition: var(--transition-fast);
}

/* Interactive Inputs */
.form-control {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 1rem;
  outline: none;
  transition: var(--transition-fast);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.form-control:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.25),
              inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.form-control::placeholder {
  color: var(--text-dim);
}

textarea.form-control {
  min-height: 120px;
  resize: vertical;
}

/* Drag and Drop Zone */
.upload-container {
  margin-bottom: 2rem;
}

.drop-zone {
  border: 2px dashed var(--glass-border);
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  background: rgba(255, 255, 255, 0.01);
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 160px;
  position: relative;
  overflow: hidden;
}

.drop-zone:hover {
  border-color: var(--color-secondary);
  background: rgba(34, 211, 238, 0.02);
}

.drop-zone.drag-over {
  border-color: var(--color-primary);
  background: rgba(124, 58, 237, 0.06);
  transform: scale(1.02);
  box-shadow: 0 0 20px rgba(124, 58, 237, 0.2);
}

.drop-zone-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: var(--transition-fast);
}

.drop-zone:hover .drop-zone-icon {
  transform: translateY(-4px);
}

.drop-zone-text {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.drop-zone-hint {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.file-input {
  display: none;
}

/* Selected File Preview Box */
.file-preview {
  display: none;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border-hover);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  margin-top: 0.75rem;
  font-size: 0.9rem;
  animation: slideDown 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.file-preview-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow: hidden;
}

.file-preview-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
}

.file-preview-size {
  color: var(--text-dim);
  font-size: 0.8rem;
}

.file-preview-remove {
  background: none;
  border: none;
  color: var(--color-error);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem;
  border-radius: 50%;
  transition: var(--transition-fast);
}

.file-preview-remove:hover {
  background: rgba(239, 68, 68, 0.1);
  transform: scale(1.1);
}

/* Submit Button & Animations */
.submit-btn {
  width: 100%;
  background: var(--gradient-btn);
  border: none;
  border-radius: 12px;
  padding: 1.1rem;
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3),
              inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  position: relative;
  overflow: hidden;
}

.submit-btn:hover {
  background: var(--gradient-btn-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(34, 211, 238, 0.4),
              inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.submit-btn:active {
  transform: translateY(0);
}

/* Spinner Overlay for loading states */
.loading-spinner {
  display: none;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
}

/* Success View page card styling */
.success-card {
  text-align: center;
  padding: 4rem 3rem;
}

.success-icon-container {
  width: 80px;
  height: 80px;
  background: rgba(16, 185, 129, 0.1);
  border: 2px solid var(--color-success);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 2rem;
  font-size: 2.5rem;
  color: var(--color-success);
  box-shadow: 0 0 30px rgba(16, 185, 129, 0.2);
  animation: scaleUp 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.success-card h2 {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #ffffff 0%, #10b981 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.success-details {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 2.5rem;
  text-align: left;
  animation: fadeIn 0.8s ease-out forwards;
}

.success-row {
  display: flex;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}

.success-row:last-child {
  margin-bottom: 0;
}

.success-row strong {
  width: 120px;
  color: var(--color-secondary);
  flex-shrink: 0;
}

.success-row span {
  color: var(--text-muted);
  word-break: break-all;
}

.btn-secondary {
  display: inline-flex;
  text-decoration: none;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 0.9rem 2rem;
  color: var(--text-main);
  font-family: var(--font-heading);
  font-weight: 600;
  transition: var(--transition-fast);
}

.btn-secondary:hover {
  border-color: var(--color-secondary);
  background: rgba(34, 211, 238, 0.05);
  color: #fff;
  transform: translateY(-2px);
}

/* Animations declarations */
@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Footer Styling */
.footer {
  text-align: center;
  margin-top: 2rem;
  font-size: 0.8rem;
  color: var(--text-dim);
}

.footer a {
  color: var(--color-secondary);
  text-decoration: none;
  transition: var(--transition-fast);
}

.footer a:hover {
  color: var(--color-primary);
  text-decoration: underline;
}

/* Responsive adjustment */
@media (max-width: 480px) {
  .glass-card {
    padding: 2rem 1.5rem;
  }
  .card-header h1 {
    font-size: 2rem;
  }
}
