/* ===== TOOL HEADER ===== */
.tool-header {
  text-align: center;
  padding: 3rem 2rem 1rem;
  background: var(--accent);
  background-size: cover;
}

.tool-title {
  font-size: 2.5rem;
  color: var(--secondary);
  margin-bottom: 1rem;
}

.tool-subtitle {
  font-size: 1.1rem;
  color: var(--secondary-light);
  max-width: 700px;
  margin: 0 auto 2rem;
}

/* ===== TOOL CONTAINER ===== */
.tool-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem;
}

.tool-wrapper {
  background: var(--light);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  margin-bottom: 3rem;
}

/* ===== UPLOAD AREA ===== */
.upload-area {
  border: 3px dashed rgba(51, 51, 51, 0.2);
  border-radius: 12px;
  padding: 3rem 2rem;
  text-align: center;
  transition: all 0.3s;
  background: var(--accent);
  cursor: pointer;
  margin: 2rem;
  position: relative;
}

.upload-area.highlight {
  border-color: var(--primary);
  background-color: rgba(217, 79, 79, 0.05);
}

.upload-icon {
  font-size: 4rem;
  color: var(--primary);
  margin-bottom: 1.5rem;
}

.upload-icon i {  
  color: var(--primary);
}

.upload-text h3 {
  font-size: 1.5rem;
  color: var(--secondary);
  margin-bottom: 0.5rem;
}

.upload-text p {
  color: var(--secondary-light);
  margin-bottom: 1.5rem;
}

.upload-btn {
  display: inline-block;
  background: var(--primary);
  color: var(--light);
  padding: 0.8rem 1.8rem;
  border-radius: 50px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(217, 79, 79, 0.3);
  cursor: pointer;
  border: none;
  font-size: 1rem;
}

.upload-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(217, 79, 79, 0.4);
}

.file-input {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  opacity: 0;
  cursor: pointer;
}

/* ===== FILE LIST ===== */
.files-container {
  padding: 0 2rem 2rem;
  display: none;
}

.files-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid rgba(51, 51, 51, 0.1);
}

.files-title {
  font-size: 1.3rem;
  color: var(--secondary);
}

.action-btn {
  background: transparent;
  border: none;
  color: var(--secondary-light);
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.3s;
}

.action-btn:hover {
  color: var(--primary);
}

.file-list {
  list-style: none;
}

.file-item {
  display: flex;
  align-items: center;
  padding: 1rem;
  border: 1px solid rgba(51, 51, 51, 0.1);
  border-radius: 8px;
  margin-bottom: 1rem;
  background: var(--accent);
  transition: all 0.3s;
}

.file-item:hover {
  background: var(--accent);
  border-color: rgba(217, 79, 79, 0.2);
}

.file-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(217, 79, 79, 0.1);
  border-radius: 6px;
  margin-right: 1rem;
  flex-shrink: 0;
}

.file-icon i {
  color: var(--primary);
  font-size: 1.2rem;
}

.file-info {
  flex-grow: 1;
  min-width: 0;
}

.file-name {
  font-weight: 500;
  color: var(--secondary);
  margin-bottom: 0.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-size {
  font-size: 0.85rem;
  color: var(--secondary-light);
}

.file-actions {
  display: flex;
  gap: 0.8rem;
}

.file-action-btn {
  background: transparent;
  border: none;
  color: var(--secondary-light);
  cursor: pointer;
  font-size: 1.1rem;
  transition: color 0.3s;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.file-action-btn:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--primary);
}

/* ===== MERGE ACTION ===== */
.merge-actions {
  display: flex;
  justify-content: center;
  padding: 0 2rem 2rem;
  gap: 1rem;
}

.merge-btn {
  background: var(--primary);
  color: var(--light);
  border: none;
  padding: 1rem 2.5rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  box-shadow: 0 4px 15px rgba(217, 79, 79, 0.3);
}

.merge-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(217, 79, 79, 0.4);
}

.merge-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ===== ERROR MESSAGES ===== */
.error-message {
  background-color: #ffebee;
  color: #c1121f;
  padding: 1rem;
  border-radius: 8px;
  margin: 1rem 2rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  animation: fadeIn 0.3s ease;
  border: 1px solid rgba(225, 29, 72, 0.2);
}

.error-message i {
  font-size: 1.2rem;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== PROGRESS INDICATOR ===== */
.progress-container {
  width: 100%;
  padding: 1.5rem 2rem;
}

.progress-bar {
  height: 10px;
  background-color: #e0e0e0;
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.progress-fill {
  height: 100%;
  background-color: var(--primary);
  width: 0%;
  transition: width 0.3s ease;
}

.progress-text {
  text-align: center;
  font-size: 0.9rem;
  color: var(--secondary);
  font-weight: 500;
}

/* ===== IMPORTANT FIXES ===== */
/* Add pointer cursor to clickable elements */
.upload-area, .upload-btn, .action-btn, 
.file-action-btn, .merge-btn {
  cursor: pointer;
}

/* Disabled state for buttons */
.merge-btn:disabled, .file-action-btn:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

/* Ensure progress bar is visible */
.progress-container {
  width: 100%;
  padding: 1.5rem 2rem;
}

.progress-bar {
  height: 10px;
  background-color: #e0e0e0;
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.progress-fill {
  height: 100%;
  background-color: var(--primary);
  width: 0;
  transition: width 0.3s ease;
}

/* Fix for drag and drop highlight */
.upload-area.highlight {
  border-color: var(--primary) !important;
  background-color: rgba(217, 79, 79, 0.05) !important;
}

/* More visible error messages */
.error-message {
  background-color: #ffebee;
  color: #c1121f;
  padding: 1rem;
  border-radius: 8px;
  margin: 1rem 2rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  animation: fadeIn 0.3s ease;
  border: 1px solid rgba(225, 29, 72, 0.2);
  z-index: 100;
  position: relative;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .tool-title {
    font-size: 2rem;
  }
  
  .tool-subtitle {
    font-size: 1rem;
  }
  
  .file-item {
    flex-wrap: wrap;
  }
  
  .file-actions {
    width: 100%;
    margin-top: 1rem;
    justify-content: flex-end;
  }
  
  .merge-actions {
    flex-direction: column;
  }
}

@media (max-width: 600px) {
  .upload-area {
    margin: 1rem auto;
    padding: 2rem 0.5rem;
    max-width: 95vw;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
  }
  .file-info {
    width: 100%;
    text-align: center;
  }
  .file-list {
    width: 100%;
    max-width: 95vw;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
}
@media (max-width: 480px) {
  .upload-area, .file-info, .file-list {
    max-width: 99vw;
    padding: 1rem 0.2rem;
  }
}

@media (max-width: 576px) {
  .tool-header {
    padding: 2rem 1rem 0.5rem;
  }
  
  .tool-container {
    padding: 1rem;
  }
  
  .upload-area {
    margin: 1rem;
    padding: 2rem 1rem;
  }
  
  .upload-icon {
    font-size: 3rem;
  }
}