/* ========================================
   MODERN UPLOAD PAGE - 2025 REDESIGN
   Design System v1.0
   ======================================== */

/* ===== CSS VARIABLES & DESIGN TOKENS ===== */
:root {
  /* Primary Brand Colors */
  --color-primary: #00B5EF;
  --color-primary-light: #33C9FF;
  --color-primary-dark: #0096C7;
  --color-primary-gradient: linear-gradient(135deg, #33C9FF 0%, #00B5EF 50%, #0096C7 100%);
  
  /* Accent Colors */
  --color-accent: #FFD700;
  --color-success: #10B981;
  --color-info: #3B82F6;
  --color-warning: #F59E0B;
  --color-danger: #EF4444;
  
  /* Neutral Palette */
  --white: #FFFFFF;
  --black: #000000;
  --gray-50: #F9FAFB;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-300: #D1D5DB;
  --gray-400: #9CA3AF;
  --gray-500: #6B7280;
  --gray-600: #4B5563;
  --gray-700: #374151;
  --gray-800: #1F2937;
  --gray-900: #111827;
  
  /* Spacing Scale (4px base unit) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  
  /* Typography Scale */
  --text-xs: 12px;
  --text-sm: 14px;
  --text-base: 16px;
  --text-lg: 18px;
  --text-xl: 20px;
  --text-2xl: 24px;
  --text-3xl: 30px;
  --text-4xl: 36px;
  --text-5xl: 48px;
  
  /* Font Weights */
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  --font-extrabold: 800;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
  --shadow-xl: 0 20px 25px rgba(0,0,0,0.12);
  --shadow-2xl: 0 25px 50px rgba(0,0,0,0.15);
  --shadow-primary: 0 10px 30px rgba(138,0,37,0.25);
  
  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 24px;
  --radius-full: 9999px;
  
  /* Transitions */
  --transition-base: 250ms cubic-bezier(0.4,0,0.2,1);
  --transition-slow: 350ms cubic-bezier(0.4,0,0.2,1);
}

/* ===== RESET & BASE STYLES ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--gray-800);
  background: linear-gradient(135deg, var(--gray-50) 0%, var(--gray-100) 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
  position: relative;
  overflow: hidden;
}

/* Background decorative elements */
body::before {
  content: '';
  position: absolute;
  top: -30%;
  left: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(138,0,37,0.08) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

body::after {
  content: '';
  position: absolute;
  bottom: -30%;
  right: -20%;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(138,0,37,0.05) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

/* ===== CONTAINER ===== */
.container {
  width: 100%;
  max-width: 600px;
  position: relative;
  z-index: 1;
}

/* ===== UPLOAD SECTION CARD ===== */
.upload-section {
  background: var(--white);
  border-radius: var(--radius-2xl);
  padding: var(--space-12);
  box-shadow: var(--shadow-2xl);
  border: 2px solid var(--gray-100);
  position: relative;
  overflow: hidden;
  transition: all var(--transition-base);
}

.upload-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: var(--color-primary-gradient);
}

.upload-section:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-2xl), 0 0 0 1px var(--color-primary);
}

/* ===== HEADING ===== */
.upload-section h1 {
  font-size: var(--text-4xl);
  font-weight: var(--font-extrabold);
  color: var(--gray-900);
  margin-bottom: var(--space-8);
  text-align: center;
  position: relative;
}

.upload-section h1::after {
  content: '';
  display: block;
  width: 80px;
  height: 4px;
  background: var(--color-primary-gradient);
  margin: var(--space-4) auto 0;
  border-radius: var(--radius-full);
}

/* ===== FORM ===== */
#upload-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

/* ===== FORM GROUP ===== */
.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.form-group label {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: var(--font-semibold);
  color: var(--gray-700);
  font-size: var(--text-base);
}

.form-group label i {
  color: var(--color-primary);
}

/* ===== FILE INPUT STYLING ===== */
.form-group input[type="file"] {
  padding: var(--space-6);
  border: 3px dashed var(--gray-300);
  border-radius: var(--radius-lg);
  font-size: var(--text-base);
  font-family: inherit;
  transition: all var(--transition-base);
  background: var(--gray-50);
  cursor: pointer;
  position: relative;
}

.form-group input[type="file"]:hover {
  border-color: var(--color-primary);
  background: linear-gradient(135deg, rgba(138,0,37,0.05) 0%, rgba(138,0,37,0.02) 100%);
}

.form-group input[type="file"]:focus {
  outline: none;
  border-color: var(--color-primary);
  border-style: solid;
  box-shadow: 0 0 0 4px rgba(138,0,37,0.1);
}

/* File input custom styling */
.form-group input[type="file"]::file-selector-button {
  padding: var(--space-3) var(--space-6);
  background: var(--color-primary-gradient);
  color: var(--white);
  border: none;
  border-radius: var(--radius-md);
  font-weight: var(--font-semibold);
  cursor: pointer;
  transition: all var(--transition-base);
  margin-right: var(--space-4);
}

.form-group input[type="file"]::file-selector-button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-primary);
}

/* ===== BUTTON ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-lg);
  font-weight: var(--font-bold);
  text-decoration: none;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
  width: 100%;
}

.btn-primary {
  background: var(--color-primary-gradient);
  color: var(--white);
  box-shadow: var(--shadow-primary);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(138,0,37,0.35);
}

.btn-primary:active {
  transform: translateY(-1px);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Ripple effect */
.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:active::before {
  width: 300px;
  height: 300px;
}

/* ===== PROGRESS CONTAINER ===== */
.progress-container {
  margin-top: var(--space-6);
  opacity: 0;
  visibility: hidden;
  max-height: 0;
  overflow: hidden;
  transition: all var(--transition-base);
}

.progress-container.visible {
  opacity: 1;
  visibility: visible;
  max-height: 100px;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-3);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  color: var(--gray-700);
}

.progress-bar-wrapper {
  width: 100%;
  height: 20px;
  background: var(--gray-200);
  border-radius: var(--radius-full);
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
  box-shadow: 0 0 10px rgba(138,0,37,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: var(--text-xs);
  font-weight: var(--font-bold);
}

/* ===== PROGRESS BAR ===== */
progress {
  width: 100%;
  height: 12px;
  border-radius: var(--radius-full);
  border: none;
  overflow: hidden;
  background: var(--gray-200);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

progress::-webkit-progress-bar {
  background: var(--gray-200);
  border-radius: var(--radius-full);
}

progress::-webkit-progress-value {
  background: var(--color-primary-gradient);
  border-radius: var(--radius-full);
  transition: all var(--transition-base);
  box-shadow: 0 0 10px rgba(138,0,37,0.5);
}

progress::-moz-progress-bar {
  background: var(--color-primary-gradient);
  border-radius: var(--radius-full);
  box-shadow: 0 0 10px rgba(138,0,37,0.5);
}

/* ===== PROGRESS TEXT ===== */
#progress-text {
  display: block;
  text-align: center;
  margin-top: var(--space-3);
  font-size: var(--text-base);
  font-weight: var(--font-semibold);
  color: var(--gray-700);
}

/* ===== SUCCESS MESSAGE ===== */
#success-message {
  margin-top: var(--space-6);
  padding: 0;
  border-radius: var(--radius-md);
  font-weight: var(--font-medium);
  text-align: center;
  opacity: 0;
  visibility: hidden;
  max-height: 0;
  overflow: hidden;
  transition: all var(--transition-base);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
}

#success-message.visible {
  opacity: 1;
  visibility: visible;
  max-height: 100px;
  padding: var(--space-5);
}

#success-message.success {
  background: linear-gradient(135deg, rgba(16,185,129,0.1) 0%, rgba(16,185,129,0.05) 100%);
  border: 2px solid var(--color-success);
  color: var(--color-success);
}

#success-message.error {
  background: linear-gradient(135deg, rgba(239,68,68,0.1) 0%, rgba(239,68,68,0.05) 100%);
  border: 2px solid var(--color-danger);
  color: var(--color-danger);
}

#success-message i {
  font-size: var(--text-2xl);
}

/* ===== CARD UTILITY CLASS ===== */
.card {
  /* Already styled by .upload-section */
}

/* ===== FILE DROP ZONE (if added via JS) ===== */
.drop-zone {
  border: 3px dashed var(--gray-300);
  border-radius: var(--radius-lg);
  padding: var(--space-16);
  text-align: center;
  background: var(--gray-50);
  transition: all var(--transition-base);
  cursor: pointer;
}

.drop-zone:hover,
.drop-zone.drag-over {
  border-color: var(--color-primary);
  background: linear-gradient(135deg, rgba(138,0,37,0.05) 0%, rgba(138,0,37,0.02) 100%);
  transform: scale(1.02);
}

.drop-zone-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto var(--space-4);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary-gradient);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-primary);
}

.drop-zone-icon i {
  font-size: var(--text-4xl);
  color: var(--white);
}

.drop-zone-text {
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
  color: var(--gray-700);
  margin-bottom: var(--space-2);
}

.drop-zone-hint {
  font-size: var(--text-sm);
  color: var(--gray-500);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
  body {
    padding: var(--space-4);
  }
  
  .upload-section {
    padding: var(--space-8);
  }
  
  .upload-section h1 {
    font-size: var(--text-3xl);
  }
  
  .btn {
    padding: var(--space-4) var(--space-6);
    font-size: var(--text-base);
  }
}

@media (max-width: 480px) {
  .upload-section {
    padding: var(--space-6);
  }
  
  .upload-section h1 {
    font-size: var(--text-2xl);
  }
  
  .form-group input[type="file"] {
    padding: var(--space-4);
    font-size: var(--text-sm);
  }
  
  .form-group input[type="file"]::file-selector-button {
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-sm);
  }
  
  .drop-zone {
    padding: var(--space-12);
  }
  
  .drop-zone-icon {
    width: 60px;
    height: 60px;
  }
  
  .drop-zone-icon i {
    font-size: var(--text-3xl);
  }
}

/* ===== MODERN FILE INPUT WRAPPER ===== */
.upload-description {
  color: var(--gray-600);
  font-size: var(--text-base);
  margin-bottom: var(--space-6);
  text-align: center;
}

.file-input-wrapper {
  position: relative;
  width: 100%;
  margin-bottom: var(--space-4);
}

.file-input-wrapper input[type="file"] {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

.file-input-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  padding: var(--space-12);
  border: 3px dashed var(--gray-300);
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, var(--gray-50) 0%, var(--white) 100%);
  transition: all var(--transition-base);
  cursor: pointer;
  min-height: 200px;
}

.file-input-label i {
  font-size: var(--text-5xl);
  color: var(--color-primary);
  transition: all var(--transition-base);
}

.file-input-label span {
  color: var(--gray-700);
  font-size: var(--text-base);
  font-weight: var(--font-medium);
  text-align: center;
  line-height: 1.5;
}

.file-input-wrapper:hover .file-input-label {
  border-color: var(--color-primary);
  background: linear-gradient(135deg, rgba(138,0,37,0.05) 0%, rgba(138,0,37,0.02) 100%);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.file-input-wrapper:hover .file-input-label i {
  transform: scale(1.1);
  color: var(--color-primary-light);
}

.file-input-wrapper.drag-over .file-input-label {
  border-color: var(--color-primary);
  border-style: solid;
  background: linear-gradient(135deg, rgba(138,0,37,0.1) 0%, rgba(138,0,37,0.05) 100%);
  box-shadow: 0 0 0 6px rgba(138,0,37,0.1);
}

.file-input-wrapper.drag-over .file-input-label i {
  transform: scale(1.2);
  animation: bounce 0.6s ease infinite;
}

@keyframes bounce {
  0%, 100% { transform: scale(1.2) translateY(0); }
  50% { transform: scale(1.2) translateY(-10px); }
}

.file-info {
  display: block;
  color: var(--gray-500);
  font-size: var(--text-sm);
  text-align: center;
  margin-top: var(--space-2);
}

/* ===== MESSAGE STYLES ===== */
.message {
  padding: var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--text-base);
  font-weight: var(--font-medium);
  margin-top: var(--space-6);
  display: none;
  animation: slideIn 0.3s ease;
}

.message:not(:empty) {
  display: block;
}

.message-success {
  background: linear-gradient(135deg, rgba(16,185,129,0.15) 0%, rgba(16,185,129,0.05) 100%);
  color: var(--color-success);
  border: 2px solid var(--color-success);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.message-success::before {
  content: '\f058';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  font-size: var(--text-xl);
}

.message-error {
  background: linear-gradient(135deg, rgba(239,68,68,0.15) 0%, rgba(239,68,68,0.05) 100%);
  color: var(--color-danger);
  border: 2px solid var(--color-danger);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.message-error::before {
  content: '\f06a';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  font-size: var(--text-xl);
}

.message-warning {
  background: linear-gradient(135deg, rgba(245,158,11,0.15) 0%, rgba(245,158,11,0.05) 100%);
  color: var(--color-warning);
  border: 2px solid var(--color-warning);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.message-warning::before {
  content: '\f071';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  font-size: var(--text-xl);
}

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

/* ===== PROGRESS BAR ENHANCEMENTS ===== */
.progress-bar-container {
  width: 100%;
  margin-bottom: var(--space-3);
}

#progress-bar {
  width: 100%;
  height: 12px;
  border-radius: var(--radius-full);
  overflow: hidden;
}

#progress-bar::-webkit-progress-bar {
  background: var(--gray-200);
  border-radius: var(--radius-full);
}

#progress-bar::-webkit-progress-value {
  background: var(--color-primary-gradient);
  border-radius: var(--radius-full);
  transition: width var(--transition-base);
}

#progress-bar::-moz-progress-bar {
  background: var(--color-primary-gradient);
  border-radius: var(--radius-full);
}

#progress-text {
  font-weight: var(--font-semibold);
  color: var(--color-primary);
}
