/* Base Styles */
:root {
  --primary: #4a6bff;
  --dark: #1a1a2e;
  --light: #f8f9fa;
  --accent: #ff6b6b;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding: 0;
  background-color: var(--light);
  color: var(--dark);
}

/* Header Styles */
header {
  background: white;
  padding: 1rem 2rem;
  box-shadow: var(--shadow);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo-container img {
  height: 40px;
}

.logo-container h1 {
  font-size: 1.5rem;
  margin: 0;
}

.logo-container h1 span {
  color: var(--primary);
}

.hamburger-menu {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--dark);
}

/* Hero Section */
.hero {
  background-size: cover;
  background-position: center;
  padding: 4rem 2rem;
  color: white;
  text-align: center;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.hero h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

/* Main Content */
main {
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.tool-container {
  max-width: 800px;
  margin: 0 auto;
}

.subtitle {
  text-align: center;
  color: #666;
  margin-bottom: 2rem;
}

/* Upload Area */
.upload-area {
  border: 2px dashed #ccc;
  border-radius: 10px;
  padding: 2rem;
  text-align: center;
  margin-bottom: 2rem;
  transition: all 0.3s;
}

.upload-area.active {
  border-color: var(--primary);
  background: rgba(74, 107, 255, 0.05);
}

.upload-area i {
  font-size: 3rem;
  color: var(--primary);
  margin-bottom: 1rem;
}

.btn-primary {
  background: var(--primary);
  color: white;
  border: none;
  padding: 0.8rem 1.5rem;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.2s;
}

.btn-primary:hover {
  background: #3a5ae8;
}

/* File List */
.file-list {
  margin-top: 1.5rem;
  min-height: 100px;
}

.file-item {
  display: flex;
  align-items: center;
  padding: 1rem;
  margin: 0.5rem 0;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: all 0.2s;
  cursor: grab;
  user-select: none;
}

.file-item.dragging {
  opacity: 0.5;
  background: #f8f9fa;
}

.file-item.hold-active {
  transform: scale(1.02);
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  cursor: grabbing;
}

.file-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
}

.file-info i {
  color: #e74c3c;
  font-size: 1.2rem;
}

.file-name {
  margin: 0;
  font-weight: 500;
}

.file-size {
  margin: 0;
  font-size: 0.8rem;
  color: #666;
}

.remove-btn {
  background: none;
  border: none;
  color: #999;
  cursor: pointer;
  padding: 0.5rem;
  margin-left: 0.5rem;
  transition: color 0.2s;
}

.remove-btn:hover {
  color: #ff6b6b;
}

/* Add More Button */
.add-more {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
  padding: 0.8rem;
  background: #f0f0f0;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.2s;
}

.add-more.visible {
  display: flex;
}

.add-more:hover {
  background: #e0e0e0;
}

/* Merge Button */
.btn-merge {
  background: var(--primary);
  color: white;
  border: none;
  padding: 0.8rem 1.5rem;
  border-radius: 5px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s;
  margin-top: 1.5rem;
  width: 100%;
}

.btn-merge:hover {
  background: #3a5ae8;
}

.btn-merge:disabled {
  background: #ccc;
  cursor: not-allowed;
}

/* Info Section */
.info-section {
  background: white;
  padding: 1.5rem;
  border-radius: 10px;
  margin-top: 2rem;
  box-shadow: var(--shadow);
}

.info-section h3 {
  color: var(--primary);
  margin-top: 0;
}

.info-section ol {
  padding-left: 1.5rem;
}

.info-section li {
  margin: 0.5rem 0;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 1001;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
}

.modal-content {
  background-color: white;
  margin: 15% auto;
  padding: 2rem;
  border-radius: 10px;
  width: 80%;
  max-width: 500px;
  box-shadow: var(--shadow);
  position: relative;
}

.close-modal {
  position: absolute;
  right: 1rem;
  top: 1rem;
  font-size: 1.5rem;
  cursor: pointer;
}

/* Footer */
footer {
  background: var(--dark);
  color: white;
  padding: 1.5rem;
  text-align: center;
  margin-top: 3rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-links {
  display: flex;
  gap: 1rem;
}

.footer-links a {
  color: white;
  text-decoration: none;
  transition: opacity 0.2s;
}

.footer-links a:hover {
  opacity: 0.8;
}

/* Responsive */
@media (max-width: 768px) {
  .hero h2 {
    font-size: 2rem;
  }
  
  .footer-content {
    flex-direction: column;
    gap: 1rem;
  }
}