:root {
  --primary-bg: #0f172a;
  --secondary-bg: #1e293b;
  --tertiary-bg: #334155;
  --accent-blue: #3b82f6;
  --accent-green: #10b981;
  --accent-red: #ef4444;
  --accent-purple: #8b5cf6;
  --accent-orange: #f59e0b;
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --border-color: #475569;
  --shadow: rgba(0, 0, 0, 0.25);
  --radius: 8px;
  --radius-lg: 12px;
}

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

html, body {
  background: linear-gradient(135deg, var(--primary-bg) 0%, #1a202c 100%);
  font-family: 'Inter', sans-serif;
  min-height: 100vh;
  color: var(--text-primary);
}

.container {
  background: var(--secondary-bg);
  max-width: 800px;
  width: 95%;
  margin: 2rem auto;
  padding: 2rem;
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 50px -12px var(--shadow);
  border: 1px solid var(--border-color);
  position: relative;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.header {
  text-align: center;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.header-logo {
  height: 80px;
  width: auto;
  max-width: 300px;
  object-fit: contain;
  filter: brightness(1.1);
  margin-bottom: 1rem;
  transition: all 0.3s ease;
}

.header-logo:hover {
  transform: translateY(-2px) scale(1.02);
  filter: brightness(1.2);
}

.header h1 {
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 2.5rem;
  font-family: 'Inter', sans-serif;
  margin: 0;
  margin-bottom: 0.5rem;
}

.header p {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-top: 0.5rem;
  font-weight: 400;
}

/* Drop Zone Styling */
.drop-zone {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  background: rgba(59, 130, 246, 0.05);
}

.drop-zone:hover, .drop-zone.dragover {
  border-color: var(--accent-blue);
  color: var(--accent-blue);
  background: rgba(59, 130, 246, 0.1);
  transform: translateY(-2px);
}

.drop-zone i {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  display: block;
}

/* Form Styling */
.form-grid {
  display: grid;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.input-group label {
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.input-group input[type="text"],
.input-group input[type="password"] {
  background: var(--tertiary-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  font-weight: 400;
  transition: all 0.2s ease;
}

.input-group input[type="text"]:focus,
.input-group input[type="password"]:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.file-input-wrapper {
  position: relative;
  overflow: hidden;
  display: inline-block;
  width: 100%;
}

.file-input-wrapper input[type="file"] {
  position: absolute;
  left: -9999px;
}

.file-input-label {
  background: var(--tertiary-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  font-family: 'Inter', sans-serif;
}

.file-input-label:hover {
  border-color: var(--accent-blue);
  background: rgba(59, 130, 246, 0.1);
}

/* Action Buttons */
.action-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
}

.btn {
  padding: 0.875rem 1.5rem;
  border: none;
  border-radius: var(--radius);
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 25px -5px var(--shadow);
}

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

.btn-primary {
  background: var(--accent-green);
  color: white;
}

.btn-secondary {
  background: var(--accent-blue);
  color: white;
}

.btn-danger {
  background: var(--accent-red);
  color: white;
}

.btn-purple {
  background: var(--accent-purple);
  color: white;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.btn-outline:hover {
  background: var(--tertiary-bg);
  border-color: var(--accent-blue);
}

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

/* File Management Toolbar */
.file-toolbar {
  background: var(--tertiary-bg);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border-color);
  display: none;
}

.file-toolbar.visible {
  display: block;
}

.toolbar-section {
  margin-bottom: 1rem;
}

.toolbar-section:last-child {
  margin-bottom: 0;
}

.toolbar-title {
  color: var(--text-primary);
  font-size: 0.875rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Inter', sans-serif;
  letter-spacing: 0.025em;
}

.toolbar-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.toolbar-btn {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: var(--radius);
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.375rem;
  min-width: 120px;
  justify-content: center;
}

.toolbar-btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

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

.toolbar-btn.select {
  background: var(--tertiary-bg);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.toolbar-btn.download {
  background: var(--accent-blue);
  color: white;
}

.toolbar-btn.delete {
  background: var(--accent-red);
  color: white;
}

/* Progress Bars */
.progress-bar {
  height: 8px;
  background: var(--tertiary-bg);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple));
  border-radius: 4px;
  transition: width 0.3s ease;
  position: relative;
}

.progress-text {
  text-align: center;
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* File List */
.file-list {
  list-style: none;
  max-height: 500px;
  overflow-y: auto;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: var(--primary-bg);
}

.file-list::-webkit-scrollbar {
  width: 6px;
}

.file-list::-webkit-scrollbar-track {
  background: var(--tertiary-bg);
}

.file-list::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}

.file-item {
  display: flex;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
  transition: all 0.2s ease;
  gap: 1rem;
}

.file-item:last-child {
  border-bottom: none;
}

.file-item:hover {
  background: rgba(59, 130, 246, 0.05);
}

.file-checkbox {
  width: 18px;
  height: 18px;
  accent-color: var(--accent-blue);
  cursor: pointer;
}

.file-name {
  flex: 1;
  color: var(--text-primary);
  font-size: 0.875rem;
  font-weight: 500;
  word-break: break-all;
  cursor: pointer;
}

.file-size {
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 400;
  min-width: 70px;
  text-align: right;
  padding-right: 0.75rem;
}

.file-actions {
  display: flex;
  gap: 0.5rem;
}

.file-action-btn {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  transition: all 0.2s ease;
}

.file-action-btn:hover {
  transform: scale(1.05);
}

.file-action-btn.download {
  background: rgba(59, 130, 246, 0.1);
  color: var(--accent-blue);
}

.file-action-btn.delete {
  background: rgba(239, 68, 68, 0.1);
  color: var(--accent-red);
}

/* Messages */
.message {
  padding: 1rem;
  border-radius: var(--radius);
  margin: 1rem 0;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  display: none;
}

.message.visible {
  display: block;
}

.message.success {
  background: rgba(16, 185, 129, 0.1);
  color: var(--accent-green);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.message.error {
  background: rgba(239, 68, 68, 0.1);
  color: var(--accent-red);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.message.info {
  background: rgba(59, 130, 246, 0.1);
  color: var(--accent-blue);
  border: 1px solid rgba(59, 130, 246, 0.2);
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    margin: 1rem;
    padding: 1.5rem;
    width: calc(100% - 2rem);
  }

  .header-logo {
    height: 60px;
    max-width: 250px;
  }

  .action-buttons {
    grid-template-columns: 1fr;
  }

  .toolbar-buttons {
    flex-direction: column;
  }

  .toolbar-btn {
    min-width: 100%;
  }

  .file-item {
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .file-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

/* Upload Status */
.upload-status {
  list-style: none;
  margin-top: 1rem;
}

.upload-item {
  background: var(--tertiary-bg);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 0.75rem;
  border: 1px solid var(--border-color);
}

.upload-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.upload-item-name {
  font-weight: 500;
  color: var(--text-primary);
  flex: 1;
}

.upload-item-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.upload-progress {
  height: 4px;
  background: var(--primary-bg);
  border-radius: 2px;
  overflow: hidden;
}

.upload-progress-fill {
  height: 100%;
  width: 0;
  background: var(--accent-green);
  border-radius: 2px;
  transition: width 0.3s ease;
}

/* Download Progress Modal */
.download-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

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

.download-modal-content {
  background: var(--secondary-bg);
  border-radius: var(--radius-lg);
  padding: 2rem;
  max-width: 400px;
  width: 90%;
  border: 1px solid var(--border-color);
}

.download-modal-title {
  color: var(--text-primary);
  font-weight: 600;
  margin-bottom: 1rem;
  text-align: center;
}

.download-modal-progress {
  margin-bottom: 1rem;
}

.download-modal-status {
  color: var(--text-secondary);
  font-size: 0.875rem;
  text-align: center;
  margin-bottom: 0.5rem;
}
