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

:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-card-hover: rgba(255, 255, 255, 0.07);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-border-hover: rgba(255, 255, 255, 0.15);

  --text-primary: #f0f0f5;
  --text-secondary: #9e9eb8;
  --text-muted: #5e5e78;

  --accent: #7c5cfc;
  --accent-light: #9b82fd;
  --accent-glow: rgba(124, 92, 252, 0.25);
  --accent-gradient: linear-gradient(135deg, #7c5cfc 0%, #c084fc 50%, #f472b6 100%);

  --success: #34d399;
  --success-glow: rgba(52, 211, 153, 0.2);
  --error: #f87171;
  --error-glow: rgba(248, 113, 113, 0.2);
  --warning: #fbbf24;

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

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 64px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 40px var(--accent-glow);

  --transition-fast: 150ms ease;
  --transition-normal: 300ms ease;
  --transition-slow: 500ms ease;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===== BACKGROUND EFFECTS ===== */
body::before {
  content: '';
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(124, 92, 252, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(244, 114, 182, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(192, 132, 252, 0.04) 0%, transparent 60%);
  z-index: -1;
  animation: bgShift 20s ease-in-out infinite alternate;
}

@keyframes bgShift {
  0% { transform: translate(0, 0) rotate(0deg); }
  100% { transform: translate(-2%, -2%) rotate(3deg); }
}

/* ===== CONTAINER ===== */
.container {
  width: 100%;
  max-width: 600px;
  padding: 2rem 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

/* ===== HEADER ===== */
.header {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.header__icon {
  font-size: 3rem;
  line-height: 1;
  filter: drop-shadow(0 0 20px var(--accent-glow));
  animation: float 3s ease-in-out infinite;
}

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

.header__title {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header__subtitle {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.5;
  max-width: 440px;
}

.header__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.8rem;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: 100px;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.header__badge-dot {
  width: 6px;
  height: 6px;
  background: var(--success);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ===== CARD ===== */
.card {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: border-color var(--transition-normal), box-shadow var(--transition-normal);
}

.card:hover {
  border-color: var(--glass-border-hover);
}

/* ===== DROPZONE ===== */
.dropzone {
  width: 100%;
  border: 2px dashed var(--glass-border);
  border-radius: var(--radius-md);
  padding: 2.5rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.dropzone::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent-gradient);
  opacity: 0;
  transition: opacity var(--transition-normal);
  border-radius: inherit;
}

.dropzone:hover,
.dropzone.drag-over {
  border-color: var(--accent);
  box-shadow: var(--shadow-glow);
}

.dropzone:hover::before,
.dropzone.drag-over::before {
  opacity: 0.05;
}

.dropzone__icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  position: relative;
  z-index: 1;
}

.dropzone__text {
  font-size: 0.95rem;
  color: var(--text-secondary);
  position: relative;
  z-index: 1;
}

.dropzone__text strong {
  color: var(--accent-light);
  font-weight: 600;
}

.dropzone__hint {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
}

.dropzone__file-input {
  display: none;
}

/* ===== FILE LIST ===== */
.file-list {
  display: none;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
  max-height: 220px;
  overflow-y: auto;
  padding-right: 0.25rem;
  animation: slideUp 0.3s ease;
}

.file-list.visible {
  display: flex;
}

/* Custom Scrollbar for file list */
.file-list::-webkit-scrollbar {
  width: 6px;
}
.file-list::-webkit-scrollbar-track {
  background: var(--bg-card);
  border-radius: 10px;
}
.file-list::-webkit-scrollbar-thumb {
  background: var(--glass-border-hover);
  border-radius: 10px;
}
.file-list::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

.file-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-fast);
}

.file-item:hover {
  border-color: var(--glass-border-hover);
}

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

.file-item__icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.file-item__details {
  flex: 1;
  min-width: 0;
}

.file-item__name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-item__size {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.file-item__status {
  font-size: 0.75rem;
  font-weight: 600;
  margin-right: 0.5rem;
}

.file-item__status.success {
  color: var(--success);
}

.file-item__status.error {
  color: var(--error);
}

.file-item__remove {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.2rem;
  padding: 0.25rem;
  transition: color var(--transition-fast);
  flex-shrink: 0;
}

.file-item__remove:hover {
  color: var(--error);
}

/* ===== PASSWORD INPUT ===== */
.password-section {
  display: none;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.5rem;
  animation: slideUp 0.3s ease;
}

.password-section.visible {
  display: flex;
}

.password-section__label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.password-section__input-wrapper {
  position: relative;
}

.password-section__input {
  width: 100%;
  padding: 0.85rem 3rem 0.85rem 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: inherit;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  outline: none;
}

.password-section__input::placeholder {
  color: var(--text-muted);
}

.password-section__input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.password-section__toggle {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.1rem;
  padding: 0.25rem;
  transition: color var(--transition-fast);
}

.password-section__toggle:hover {
  color: var(--text-secondary);
}

/* ===== BUTTON ===== */
.btn-primary {
  width: 100%;
  padding: 0.95rem 1.5rem;
  background: var(--accent-gradient);
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
  margin-top: 0.5rem;
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 60%);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 30px var(--accent-glow);
}

.btn-primary:hover:not(:disabled)::before {
  opacity: 1;
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ===== PROGRESS ===== */
.progress-section {
  display: none;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
  animation: slideUp 0.3s ease;
}

.progress-section.visible {
  display: flex;
}

.progress-bar {
  width: 100%;
  height: 6px;
  background: var(--bg-secondary);
  border-radius: 100px;
  overflow: hidden;
}

.progress-bar__fill {
  height: 100%;
  width: 0%;
  background: var(--accent-gradient);
  border-radius: 100px;
  transition: width 0.4s ease;
}

.progress-text {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
}

/* ===== STATUS MESSAGES ===== */
.status-message {
  display: none;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  margin-top: 1rem;
  animation: slideUp 0.3s ease;
}

.status-message.visible {
  display: flex;
}

.status-message--error {
  background: rgba(248, 113, 113, 0.08);
  border: 1px solid rgba(248, 113, 113, 0.2);
  color: var(--error);
}

.status-message--success {
  background: rgba(52, 211, 153, 0.08);
  border: 1px solid rgba(52, 211, 153, 0.2);
  color: var(--success);
}

.status-message__icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

/* ===== DOWNLOAD ===== */
.download-section {
  display: none;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  animation: slideUp 0.4s ease;
}

.download-section.visible {
  display: flex;
}

.btn-download {
  width: 100%;
  padding: 0.95rem 1.5rem;
  background: linear-gradient(135deg, #059669 0%, #34d399 100%);
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition-normal);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-download:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 30px var(--success-glow);
}

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

.btn-reset {
  background: none;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  padding: 0.7rem 1rem;
  font-size: 0.85rem;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-reset:hover {
  border-color: var(--glass-border-hover);
  color: var(--text-primary);
}

/* ===== FOOTER ===== */
.footer {
  text-align: center;
  padding: 1rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: auto;
}

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

.footer a:hover {
  color: var(--accent);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 480px) {
  .container {
    padding: 1.5rem 1rem;
  }

  .header__title {
    font-size: 1.6rem;
  }

  .header__subtitle {
    font-size: 0.85rem;
  }

  .card {
    padding: 1.5rem;
  }

  .dropzone {
    padding: 2rem 1rem;
  }
}
