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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(135deg, #fff9f9 0%, #fef2f2 50%, #fecaca 100%);
  background-attachment: fixed;
  min-height: 100vh;
  color: #8b5a3c;
  overflow-x: hidden;
}

.background-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('img/bg.webp');
  background-size: cover;
  background-position: center;
  opacity: 0.2;
  z-index: -1;
}

.container {
  max-width: 500px;
  margin: 0 auto;
  padding: 20px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.header {
  text-align: center;
  margin-bottom: 30px;
  padding-top: 20px;
}

.header h1 {
  font-size: 2rem;
  margin-bottom: 1px;
  text-shadow: 2px 2px 6px rgba(212, 175, 55, 0.3);
  font-family: "Handlee", cursive;
  font-weight: 400;
  font-style: normal;
  color: #8b5a3c;
  background: linear-gradient(135deg, #d4af37, #b8860b);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.status-indicator {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 20px;
}

.status-active {
  background: rgba(212, 175, 55, 0.15);
  border: 1px solid rgba(212, 175, 55, 0.4);
  color: #d4af37;
}

.status-disabled {
  background: rgba(205, 92, 92, 0.15);
  border: 1px solid rgba(205, 92, 92, 0.4);
  color: #cd5c5c;
}

.upload-area {
  background: rgba(255, 255, 255, 0.7);
  border: 2px dashed rgba(212, 175, 55, 0.4);
  border-radius: 20px;
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 20px;
  backdrop-filter: blur(15px);
  box-shadow: 0 8px 32px rgba(212, 175, 55, 0.1);
}

.upload-area:hover:not(.disabled) {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(212, 175, 55, 0.6);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(212, 175, 55, 0.2);
}

.upload-area.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: rgba(139, 90, 60, 0.1);
  border-color: rgba(139, 90, 60, 0.2);
}

.upload-icon {
  font-size: 3rem;
  margin-bottom: 15px;
  opacity: 0.8;
  color: #d4af37;
}

.upload-text {
  font-size: 1.1rem;
  margin-bottom: 10px;
  color: #8b5a3c;
  font-weight: 500;
}

.upload-subtext {
  font-size: 0.9rem;
  opacity: 0.7;
  color: #a0785a;
}

.file-input {
  display: none;
}

.batch-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.8);
  padding: 15px 20px;
  border-radius: 16px;
  margin-bottom: 20px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(212, 175, 55, 0.2);
  box-shadow: 0 4px 20px rgba(212, 175, 55, 0.1);
}

.file-count {
  font-weight: 600;
  font-size: 1.1rem;
  color: #8b5a3c;
}

.clear-btn {
  background: rgba(205, 145, 158, 0.2);
  border: 1px solid rgba(205, 145, 158, 0.4);
  color: #cd919e;
  padding: 8px 16px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.clear-btn:hover {
  background: rgba(205, 145, 158, 0.3);
  transform: translateY(-1px);
}

.file-previews {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
  max-height: 300px;
  overflow-y: auto;
}

.file-preview {
  position: relative;
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.6);
  border: 2px solid rgba(212, 175, 55, 0.2);
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.1);
  transition: transform 0.2s ease;
}

.file-preview:hover {
  transform: scale(1.02);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.2);
}

.file-preview img,
.file-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.file-preview .video-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.5rem;
  opacity: 0.9;
  color: #d4af37;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.file-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(212, 175, 55, 0.8));
  padding: 8px 5px 5px;
  font-size: 0.7rem;
  text-align: center;
  color: white;
  font-weight: 500;
}

.remove-file {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(205, 145, 158, 0.9);
  border: none;
  border-radius: 50%;
  width: 26px;
  height: 26px;
  color: white;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(205, 145, 158, 0.3);
}

.remove-file:hover {
  background: rgba(205, 145, 158, 1);
  transform: scale(1.1);
}

.upload-btn {
  background: linear-gradient(135deg, #d4af37 0%, #b8860b 100%);
  border: none;
  padding: 18px 32px;
  border-radius: 16px;
  color: white;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 20px;
  box-shadow: 0 6px 25px rgba(212, 175, 55, 0.3);
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.upload-btn:hover:not(:disabled) {
  transform: translateY(-3px);
  box-shadow: 0 10px 35px rgba(212, 175, 55, 0.4);
  background: linear-gradient(135deg, #e6c547 0%, #ca941c 100%);
}

.upload-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background: linear-gradient(135deg, #a08660 0%, #8b7355 100%);
}

.progress-container {
  margin-bottom: 20px;
}

.progress-bar {
  width: 100%;
  height: 10px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 12px;
  border: 1px solid rgba(212, 175, 55, 0.2);
  box-shadow: inset 0 2px 4px rgba(212, 175, 55, 0.1);
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #d4af37, #b8860b);
  width: 0%;
  transition: width 0.4s ease;
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

.progress-text {
  text-align: center;
  font-size: 0.9rem;
  opacity: 0.8;
  color: #8b5a3c;
  font-weight: 500;
}

.error-message,
.success-message {
  padding: 16px 20px;
  border-radius: 14px;
  margin-bottom: 15px;
  font-size: 1rem;
  font-weight: 600;
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(10px);
  border: 2px solid;
  animation: slideInDown 0.4s ease-out;
}

@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.error-message {
  background: rgba(220, 38, 38, 0.9);
  border-color: rgba(239, 68, 68, 0.8);
  color: white;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.success-message {
  background: rgba(34, 197, 94, 0.9);
  border-color: rgba(34, 197, 94, 0.8);
  color: white;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.disabled-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(139, 90, 60, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(8px);
}

.disabled-message {
  background: linear-gradient(135deg, #fff9f9 0%, #fef2f2 100%);
  color: #8b5a3c;
  padding: 35px;
  border-radius: 20px;
  text-align: center;
  max-width: 320px;
  margin: 20px;
  border: 2px solid rgba(212, 175, 55, 0.3);
  box-shadow: 0 15px 50px rgba(212, 175, 55, 0.2);
}

.disabled-message h3 {
  color: #d4af37;
  margin-bottom: 10px;
  font-weight: 600;
}

@media (max-width: 480px) {
  .container {
    padding: 15px;
  }

  .header h1 {
    font-size: 1.6rem;
  }

  .upload-area {
    padding: 5px 5px;
    border-radius: 16px;
  }

  .file-previews {
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
  }

  .batch-info {
    padding: 12px 15px;
  }
  
  .upload-btn {
    padding: 16px 28px;
    font-size: 1rem;
  }
}