/* Modern, clean styles for PDF Merger application */

:root {
  --primary-color: #4361ee;
  --primary-hover: #3a56d4;
  --secondary-color: #7209b7;
  --light-bg: #f8f9fa;
  --dark-text: #212529;
  --light-text: #f8f9fa;
  --border-color: #dee2e6;
  --success-color: #4cc9f0;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --radius: 8px;
}

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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  color: var(--dark-text);
  line-height: 1.6;
  min-height: 100vh;
  padding: 20px;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

header {
  background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
  color: white;
  padding: 2rem;
  text-align: center;
}

header h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

header p {
  font-size: 1.1rem;
  opacity: 0.9;
}

main {
  padding: 2rem;
}

.upload-section {
  text-align: center;
}

.file-input-wrapper {
  position: relative;
  margin-bottom: 1.5rem;
  border: 2px dashed var(--border-color);
  border-radius: var(--radius);
  padding: 2rem;
  transition: all 0.3s ease;
  background-color: var(--light-bg);
}

.file-input-wrapper:hover {
  border-color: var(--primary-color);
  background-color: rgba(67, 97, 238, 0.05);
}

.file-input-wrapper input[type="file"] {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.file-input-wrapper label {
  display: block;
  font-size: 1.2rem;
  color: var(--primary-color);
  cursor: pointer;
  padding: 1rem;
}

.file-input-wrapper label:hover {
  color: var(--primary-hover);
}

#fileList {
  margin: 1rem 0;
  text-align: left;
  max-height: 200px;
  overflow-y: auto;
}

.file-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

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

.file-name {
  flex-grow: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-right: 10px;
}

.file-size {
  color: #6c757d;
  font-size: 0.9rem;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin: 0.25rem;
}

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

.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
}

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

.btn-secondary:hover {
  background-color: #6508a6;
  transform: translateY(-2px);
}

#uploadBtn {
  background-color: var(--primary-color);
  color: white;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

#uploadBtn:hover:not(:disabled) {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
}

#uploadBtn:disabled {
  background-color: #adb5bd;
  cursor: not-allowed;
}

.hidden {
  display: none;
}

.progress {
  margin: 1.5rem 0;
  padding: 1.5rem;
  background-color: var(--light-bg);
  border-radius: var(--radius);
}

.progress-bar {
  width: 100%;
  height: 20px;
  background-color: #e9ecef;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 10px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(to right, var(--primary-color), var(--success-color));
  width: 0%;
  transition: width 0.4s ease;
}

.result {
  margin: 1.5rem 0;
  padding: 1.5rem;
  background-color: #e7f5ff;
  border-radius: var(--radius);
  border-left: 4px solid var(--primary-color);
}

.result h3 {
  margin-bottom: 0.5rem;
  color: var(--primary-color);
}

.file-url-container {
  margin: 1.5rem 0;
  padding: 1rem;
  background-color: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  text-align: left;
}

.file-url-container p {
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--dark-text);
}

.file-url-display {
  padding: 0.75rem;
  background-color: #f8f9fa;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  word-break: break-all;
  font-family: monospace;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  min-height: 24px;
}

#copyLink {
  background-color: #6c757d;
  color: white;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
}

#copyLink:hover {
  background-color: #5a6268;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

#copyLink.copied {
  background-color: #28a745;
}

.link-section {
  margin: 1.5rem 0;
}

.link-info label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--dark-text);
}

.url-display {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 1rem;
}

.url-text {
  flex: 1;
  padding: 0.75rem;
  background-color: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  word-break: break-all;
  font-family: monospace;
  font-size: 0.9rem;
}

.btn-tertiary {
  background-color: #6c757d;
  color: white;
  padding: 0.75rem 1.2rem;
  border: none;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.btn-tertiary:hover {
  background-color: #5a6268;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Стили для кнопки копирования */
.copy-btn {
  background: linear-gradient(to right, var(--primary-color), #5a6268);
  color: white;
  border: none;
  border-radius: var(--radius);
  padding: 0.5rem 1rem;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.copy-btn:hover {
  background: linear-gradient(to right, var(--primary-hover), #495057);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.copy-btn.copied {
  background: linear-gradient(to right, #28a745, #218838);
}

footer {
  background-color: var(--light-bg);
  padding: 1.5rem;
  text-align: center;
  color: #6c757d;
  font-size: 0.9rem;
  border-top: 1px solid var(--border-color);
}

/* Responsive design */
@media (max-width: 768px) {
  body {
    padding: 10px;
  }
  
  header {
    padding: 1.5rem 1rem;
  }
  
  header h1 {
    font-size: 2rem;
  }
  
  main {
    padding: 1.5rem 1rem;
  }
  
  .file-input-wrapper {
    padding: 1.5rem 1rem;
  }
  
  .btn {
    display: block;
    width: 100%;
    margin: 0.5rem 0;
  }
}