:root {
  --bg: #090810;
  --glass-bg: rgba(26, 25, 43, 0.4);
  --glass-border: rgba(255, 255, 255, 0.1);
  --text-primary: #ffffff;
  --text-secondary: #a09ebe;
  --accent: #ff2a85;
  --accent-gradient: linear-gradient(135deg, #ff2a85, #8a2be2);
  --accent-hover: #ff4d9a;
  --card-bg: rgba(40, 38, 66, 0.5);
}

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

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
  position: relative;
}

/* Glowing background blobs */
.blob {
  position: absolute;
  filter: blur(80px);
  z-index: -1;
  opacity: 0.5;
  animation: float 10s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
}
.blob-1 {
  width: 400px;
  height: 400px;
  background: #ff2a85;
  top: -100px;
  left: -100px;
  border-radius: 50%;
}
.blob-2 {
  width: 500px;
  height: 500px;
  background: #8a2be2;
  bottom: -200px;
  right: -100px;
  border-radius: 50%;
  animation-delay: -5s;
}

@keyframes float {
  0% { transform: translateY(0) scale(1); }
  100% { transform: translateY(50px) scale(1.1); }
}

/* Glass panel */
.container {
  width: 100%;
  max-width: 900px;
  margin: 40px 20px;
  padding: 40px;
  border-radius: 30px;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  gap: 40px;
}

/* Header */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.header-text h1 {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 8px;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.header-text p {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

/* QR Code Section */
.qr-wrapper {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

.qr-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  max-width: 140px;
  text-align: center;
}

.qr-box {
  width: 140px;
  height: 140px;
  background: #fff;
  border-radius: 16px;
  padding: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
  transition: transform 0.3s ease;
}

.qr-box:hover {
  transform: scale(1.05);
}

.qr-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 8px;
}

.scan-text {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Upload zone */
.drop-zone {
  border: 2px dashed rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 60px 40px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.02);
  position: relative;
  overflow: hidden;
}

.drop-zone:hover, .drop-zone.dragover {
  border-color: var(--accent);
  background: rgba(255, 42, 133, 0.05);
  transform: translateY(-2px);
}

.upload-icon {
  margin-bottom: 20px;
  color: var(--accent);
  transition: transform 0.3s ease;
}

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

.drop-zone h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.drop-zone .subtitle {
  color: var(--text-secondary);
}

/* Progress bar */
.progress-wrap {
  margin-top: 20px;
}
.hidden {
  display: none !important;
}

.progress-bar {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  height: 8px;
  overflow: hidden;
  margin-bottom: 8px;
}

.progress {
  height: 100%;
  background: var(--accent-gradient);
  width: 0%;
  transition: width 0.3s ease;
}

#progress-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-align: right;
}

/* Files section */
h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.badge {
  background: var(--accent-gradient);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.9rem;
  color: white;
}

.files-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}

.file-card {
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.3s ease;
}

.file-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.2);
  border-color: rgba(255, 255, 255, 0.2);
}

.file-icon {
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--accent);
}

.file-info {
  flex: 1;
  overflow: hidden;
}

.file-name {
  font-weight: 600;
  font-size: 1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.file-meta {
  font-size: 0.8rem;
  color: var(--text-secondary);
  display: flex;
  gap: 8px;
}

.download-btn {
  background: transparent;
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 500;
  transition: all 0.3s ease;
  text-align: center;
  text-decoration: none;
}

.download-btn:hover {
  background: var(--text-primary);
  color: var(--bg);
}

/* Mobile responsive */
@media (max-width: 768px) {
  .header {
    flex-direction: column;
    text-align: center;
  }
  .header-text h1 {
    font-size: 2.5rem;
  }
  .container {
    padding: 20px;
    margin: 20px 10px;
  }
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(0, 0, 0, 0.1);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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