/* Variables for consistent theming */
:root {
  --primary-color: #4361ee;
  --primary-dark: #3a56d4;
  --secondary-color: #7209b7;
  --success-color: #06d6a0;
  --warning-color: #ffd166;
  --error-color: #ef476f;
  --light-gray: #f8f9fa;
  --medium-gray: #e9ecef;
  --dark-gray: #6c757d;
  --text-dark: #212529;
  --border-radius: 8px;
  --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
}

/* Base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
  color: var(--text-dark);
  line-height: 1.6;
}

/* Container */
.container {
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  width: 100%;
  max-width: 600px;
  padding: 30px;
}

/* Header */
.app-header {
  text-align: center;
  margin-bottom: 30px;
}

.app-header h1 {
  font-size: 2.2rem;
  margin-bottom: 10px;
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.app-header p {
  color: var(--dark-gray);
  font-size: 1.1rem;
}

/* Upload area */
.upload-section {
  margin-bottom: 30px;
}

.drop-area {
  border: 2px dashed var(--medium-gray);
  border-radius: var(--border-radius);
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background-color: var(--light-gray);
  position: relative;
}

.drop-area:hover,
.drop-area.dragover {
  border-color: var(--primary-color);
  background-color: rgba(67, 97, 238, 0.05);
}

.drop-area-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.upload-icon {
  color: var(--primary-color);
  opacity: 0.7;
}

.drop-text {
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--text-dark);
}

.drop-subtext {
  color: var(--dark-gray);
  font-size: 0.9rem;
}

.browse-btn {
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.browse-btn:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.file-input {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  opacity: 0;
  cursor: pointer;
}

/* File list */
.file-list-section {
  margin-bottom: 30px;
}

.file-list-section h2 {
  font-size: 1.3rem;
  margin-bottom: 15px;
  color: var(--text-dark);
}

.file-list {
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid var(--medium-gray);
  border-radius: var(--border-radius);
  padding: 15px;
  background-color: var(--light-gray);
}

.file-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  border-bottom: 1px solid var(--medium-gray);
}

.file-item:last-child {
  border-bottom: none;
}

.file-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.file-name {
  font-weight: 500;
  word-break: break-all;
}

.file-size {
  color: var(--dark-gray);
  font-size: 0.9rem;
  white-space: nowrap;
  margin-left: 10px;
}

.remove-btn {
  background: none;
  border: none;
  color: var(--error-color);
  cursor: pointer;
  font-size: 1.2rem;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: var(--transition);
}

.remove-btn:hover {
  background-color: rgba(239, 71, 111, 0.1);
}

.no-files {
  text-align: center;
  color: var(--dark-gray);
  font-style: italic;
  padding: 20px;
}

/* Action section */
.action-section {
  margin-bottom: 25px;
}

.merge-btn {
  width: 100%;
  background-color: var(--secondary-color);
  color: white;
  border: none;
  padding: 16px;
  border-radius: var(--border-radius);
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.merge-btn:hover:not(:disabled) {
  background-color: #5e0a9c;
  transform: translateY(-2px);
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

.merge-btn:disabled {
  background-color: var(--medium-gray);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Progress bar */
.progress-container {
  margin-top: 20px;
}

.progress-container.hidden {
  display: none;
}

.progress-bar {
  height: 10px;
  background-color: var(--medium-gray);
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 10px;
}

.progress-fill {
  height: 100%;
  background-color: var(--success-color);
  width: 0%;
  transition: width 0.3s ease;
}

.progress-text {
  text-align: center;
  font-size: 0.9rem;
  color: var(--dark-gray);
}

/* Message section */
.message-section {
  min-height: 30px;
}

.message {
  padding: 12px 16px;
  border-radius: var(--border-radius);
  text-align: center;
  font-weight: 500;
  display: none;
}

.message.success {
  background-color: rgba(6, 214, 160, 0.2);
  color: #059669;
  border: 1px solid rgba(6, 214, 160, 0.3);
  display: block;
}

.message.error {
  background-color: rgba(239, 71, 111, 0.2);
  color: #dc2626;
  border: 1px solid rgba(239, 71, 111, 0.3);
  display: block;
}

.message.info {
  background-color: rgba(67, 97, 238, 0.2);
  color: #3730a3;
  border: 1px solid rgba(67, 97, 238, 0.3);
  display: block;
}

/* Scrollbar styling */
.file-list::-webkit-scrollbar {
  width: 8px;
}

.file-list::-webkit-scrollbar-track {
  background: var(--light-gray);
  border-radius: 4px;
}

.file-list::-webkit-scrollbar-thumb {
  background: var(--medium-gray);
  border-radius: 4px;
}

.file-list::-webkit-scrollbar-thumb:hover {
  background: var(--dark-gray);
}
