* { box-sizing: border-box; font-family: 'SF Pro Display', 'Inter', system-ui, -apple-system, sans-serif; }
body { 
  margin: 0; 
  background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 50%, #06b6d4 100%);
  color: #111; 
  min-height: 100vh;
  overflow-x: hidden;
}
header { 
  padding: 20px; 
  text-align: center; 
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  color: white; 
}
header h1 { 
  margin: 0; 
  font-size: 2.2rem; 
  font-weight: 700;
  letter-spacing: -0.8px;
  background: linear-gradient(45deg, #fff, #e0e7ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.tagline { 
  font-weight: 500; 
  letter-spacing: 0.5px; 
  font-size: 0.85rem; 
  margin: 6px 0 12px; 
  opacity: 0.9; 
}
main { 
  max-width: 1200px; 
  margin: 16px auto; 
  padding: 0 16px;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 20px;
  height: calc(100vh - 180px);
  overflow: hidden;
}
.card { 
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 20px; 
  border-radius: 16px; 
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}
.dropzone { 
  border: 2px dashed rgba(59, 130, 246, 0.4); 
  border-radius: 12px; 
  padding: 30px; 
  text-align: center; 
  cursor: pointer; 
  color: #1e40af; 
  transition: all 0.3s ease;
  background: linear-gradient(45deg, rgba(59, 130, 246, 0.05), rgba(6, 182, 212, 0.05));
  position: relative;
  overflow: hidden;
}
.dropzone::before {
  content: '';
  position: absolute;
  top: -2px; left: -2px; right: -2px; bottom: -2px;
  background: linear-gradient(45deg, #1e3a8a, #3b82f6, #06b6d4);
  border-radius: 12px;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.dropzone:hover::before { opacity: 0.3; }
.dropzone.dragover { 
  background: rgba(59, 130, 246, 0.1); 
  border-color: #3b82f6; 
  color: #1e40af;
  transform: scale(1.02);
}
.controls-wrapper { display: flex; align-items: center; margin-top: 12px; position: relative; }

.settings-toggle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 2;
}

.settings-toggle:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
}

.settings-toggle.active {
  background: linear-gradient(45deg, #1e3a8a, #3b82f6);
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.settings-toggle.active .gear-icon {
  background-color: white;
}

.gear-icon {
  display: block;
  width: 22px;
  height: 22px;
  background-color: #6b7280;
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 15.5A3.5 3.5 0 0 1 8.5 12 3.5 3.5 0 0 1 12 8.5a3.5 3.5 0 0 1 3.5 3.5 3.5 3.5 0 0 1-3.5 3.5zm7.43-2.53c.04-.32.07-.65.07-.97 0-.32-.03-.66-.07-1l2.11-1.63c.19-.15.24-.42.12-.64l-2-3.46c-.12-.22-.39-.31-.61-.22l-2.49 1c-.52-.39-1.06-.73-1.69-.98l-.37-2.65A.506.506 0 0 0 14 2h-4c-.25 0-.46.18-.5.42l-.37 2.65c-.63.25-1.17.59-1.69.98l-2.49-1c-.23-.09-.49 0-.61.22l-2 3.46c-.13.22-.07.49.12.64L4.57 11c-.04.34-.07.67-.07 1 0 .33.03.65.07.97l-2.11 1.66c-.19.15-.25.42-.12.64l2 3.46c.12.22.39.3.61.22l2.49-1.01c.52.4 1.06.74 1.69.99l.37 2.65c.04.24.25.42.5.42h4c.25 0 .46-.18.5-.42l.37-2.65c.63-.26 1.17-.59 1.69-.99l2.49 1.01c.22.08.49 0 .61-.22l2-3.46c.12-.22.07-.49-.12-.64l-2.11-1.66z'/%3E%3C/svg%3E");
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;
}

.controls { 
  display: flex; 
  gap: 16px; 
  align-items: center; 
  flex-wrap: wrap;
  margin-left: 15px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  flex: 1;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.hidden { display: none !important; }
.controls label { 
  font-size: 14px; 
  color: #4f46e5; 
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}
.primary { 
  background: linear-gradient(45deg, #1e3a8a, #3b82f6); 
  color: white; 
  border: 0; 
  padding: 12px 20px; 
  border-radius: 10px; 
  cursor: pointer; 
  font-weight: 600;
  font-size: 14px;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4); 
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}
.primary::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
}
.primary:hover::before { left: 100%; }
.primary:hover { 
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.6); 
  transform: translateY(-2px) scale(1.02);
}
.primary:disabled { opacity: 0.7; cursor: not-allowed; }
#list { 
  margin-top: 16px; 
  display: grid; 
  gap: 12px;
  max-height: calc(100vh - 400px);
  overflow-y: auto;
  padding-right: 8px;
}
#list::-webkit-scrollbar { width: 6px; }
#list::-webkit-scrollbar-track { background: rgba(255,255,255,0.1); border-radius: 3px; }
#list::-webkit-scrollbar-thumb { background: rgba(59, 130, 246, 0.3); border-radius: 3px; }
#list::-webkit-scrollbar-thumb:hover { background: rgba(59, 130, 246, 0.5); }
.item { 
  display: flex; 
  gap: 12px; 
  align-items: center; 
  padding: 12px; 
  border-radius: 12px; 
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  position: relative; 
  padding-right: 100px;
  transition: all 0.3s ease;
}
.item:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}
.thumb { 
  width: 80px; 
  height: 60px; 
  object-fit: cover; 
  border-radius: 8px; 
  background: linear-gradient(45deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.meta { 
  flex: 1; 
  font-size: 13px; 
  color: #4f46e5;
  font-weight: 500;
  line-height: 1.4;
}
.actions { 
  display: flex; 
  gap: 10px;
  align-items: center;
}
.small { 
  font-size: 12px; 
  padding: 8px 12px; 
  border-radius: 8px; 
  background: rgba(255, 255, 255, 0.8); 
  border: 1px solid rgba(102, 126, 234, 0.2); 
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(5px);
}
.small:hover {
  background: rgba(102, 126, 234, 0.1);
  transform: translateY(-1px);
}
.note { 
  margin-top: 12px; 
  color: #6366f1; 
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  background: rgba(99, 102, 241, 0.1);
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid rgba(99, 102, 241, 0.2);
}
footer { 
  text-align: center; 
  padding: 12px; 
  color: rgba(255, 255, 255, 0.7); 
  font-size: 12px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
footer a { color: #10b981; text-decoration: none; }

/* Upload progress bar styles */
.progress-container { 
  width: 100%; 
  height: 8px; 
  background: rgba(255, 255, 255, 0.2); 
  border-radius: 4px; 
  margin: 8px 0; 
  overflow: hidden;
  backdrop-filter: blur(5px);
}
.progress-bar { 
  height: 100%; 
  background: linear-gradient(45deg, #667eea, #764ba2); 
  width: 0%; 
  border-radius: 4px; 
  transition: width 0.3s ease;
  box-shadow: 0 0 10px rgba(102, 126, 234, 0.5);
}
.upload-status { 
  font-size: 12px; 
  color: #4f46e5; 
  margin-top: 4px; 
  display: flex; 
  justify-content: space-between;
  font-weight: 500;
}
.file-icon { 
  width: 48px; 
  height: 48px; 
  background: linear-gradient(45deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1)); 
  border-radius: 8px; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  color: #667eea; 
  font-weight: bold;
  border: 1px solid rgba(102, 126, 234, 0.2);
}
.file-ext { text-transform: uppercase; font-size: 10px; }
.process-btn { margin-left: auto; }

.results-header { 
  display: flex; 
  justify-content: space-between; 
  margin-bottom: 16px; 
  gap: 12px;
  background: rgba(59, 130, 246, 0.1);
  padding: 12px;
  border-radius: 10px;
  backdrop-filter: blur(10px);
}

.bulk-status {
  flex: 1;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
  color: #1e3a8a;
  padding: 8px 16px;
  border-radius: 999px;
  background: radial-gradient(circle at top left, rgba(191, 219, 254, 0.95), rgba(219, 234, 254, 0.7));
  border: 1px solid rgba(129, 140, 248, 0.7);
  box-shadow: 0 10px 30px rgba(37, 99, 235, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 32px;
  opacity: 0;
  transform: translateY(4px);
  transition: all 0.25s ease;
  pointer-events: none;
}

.bulk-status.visible {
  opacity: 1;
  transform: translateY(0);
}

.bulk-status .label {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.7rem;
  color: #4f46e5;
}

.bulk-status.processing .label {
  color: #1d4ed8;
}

.bulk-status.done .label {
  color: #059669;
}

.bulk-status .count {
  font-variant-numeric: tabular-nums;
  font-size: 0.95rem;
}

.bulk-status .suffix {
  font-size: 0.8rem;
  opacity: 0.85;
}

.bulk-status .sep {
  opacity: 0.6;
}

.bulk-status .check {
  font-size: 0.95rem;
}

.download-btn { 
  display: flex; 
  align-items: center; 
  gap: 6px; 
  background: linear-gradient(45deg, #10b981, #059669); 
  color: white; 
  font-size: 12px; 
  padding: 8px 12px; 
  border-radius: 8px; 
  border: 0; 
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}
.download-btn:hover {
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.5);
  transform: translateY(-1px);
}
.download-btn .icon { font-size: 14px; }
.download-icon { display: inline-block; width: 14px; height: 14px; background: white; mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z'/%3E%3C/svg%3E"); mask-repeat: no-repeat; mask-position: center; mask-size: contain; }

.size-reduction { 
  display: block; 
  margin-top: 6px; 
  font-size: 12px; 
  color: #10b981; 
  font-weight: 600;
  text-align: right;
  position: absolute;
  right: 16px;
  top: 12px;
  pointer-events: none;
  background: rgba(16, 185, 129, 0.1);
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.compression-time {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  color: #777;
  font-style: italic;
}

/* Danger button styles */
.danger { 
  background: linear-gradient(45deg, #ef4444, #dc2626); 
  color: white; 
  border: 0; 
  padding: 12px 20px; 
  border-radius: 10px; 
  cursor: pointer; 
  font-weight: 600;
  font-size: 14px;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4); 
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.danger:hover { 
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.6); 
  transform: translateY(-2px) scale(1.02);
}
.danger:disabled { opacity: 0.7; cursor: not-allowed; }

/* Modal styles */
.modal { 
  display: none; 
  position: fixed; 
  z-index: 1000; 
  left: 0; 
  top: 0; 
  width: 100%; 
  height: 100%; 
  background: rgba(102, 126, 234, 0.2); 
  backdrop-filter: blur(10px);
  opacity: 0; 
  transition: all 0.3s ease; 
}
.modal.show { display: block; opacity: 1; }
.modal-content { 
  background: rgba(255, 255, 255, 0.95); 
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  margin: 15% auto; 
  padding: 0; 
  border-radius: 16px; 
  width: 400px; 
  max-width: 90%; 
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2); 
  transform: translateY(20px) scale(0.95); 
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); 
}
.modal.show .modal-content { transform: translateY(0) scale(1); }
.modal-header { 
  padding: 20px; 
  border-bottom: 1px solid rgba(102, 126, 234, 0.1); 
  display: flex; 
  justify-content: space-between; 
  align-items: center;
  background: rgba(102, 126, 234, 0.05);
  border-radius: 16px 16px 0 0;
}
.modal-header h3 { 
  margin: 0; 
  font-size: 18px;
  color: #4f46e5;
  font-weight: 600;
}
.modal-body { padding: 24px; }
.modal-footer { 
  padding: 20px; 
  border-top: 1px solid rgba(102, 126, 234, 0.1); 
  display: flex; 
  justify-content: flex-end; 
  gap: 12px;
  background: rgba(102, 126, 234, 0.05);
  border-radius: 0 0 16px 16px;
}
.close { 
  color: #6b7280; 
  font-size: 24px; 
  font-weight: bold; 
  cursor: pointer;
  transition: all 0.2s ease;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.close:hover { 
  color: #ef4444;
  transform: scale(1.1);
}

/* Additional modern styling */
.upload-icon {
  font-size: 2.5rem;
  margin-bottom: 8px;
  filter: drop-shadow(0 2px 4px rgba(102, 126, 234, 0.3));
}

.upload-link {
  color: #667eea;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(102, 126, 234, 0.4);
  cursor: pointer;
  transition: all 0.2s ease;
}

.upload-link:hover {
  color: #4f46e5;
  text-decoration-color: #4f46e5;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 120px;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.3);
  outline: none;
  transition: all 0.2s;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(45deg, #667eea, #764ba2);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(102, 126, 234, 0.4);
  transition: all 0.2s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.1);
  box-shadow: 0 3px 10px rgba(102, 126, 234, 0.6);
}

select {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(102, 126, 234, 0.3);
  border-radius: 8px;
  padding: 8px 12px;
  color: #4f46e5;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(5px);
}

select:hover {
  border-color: #667eea;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.card h2 {
  margin: 0 0 16px 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #4f46e5;
  display: flex;
  align-items: center;
  gap: 8px;
}

.seo-content {
  max-width: 1200px;
  margin: 0 auto 24px;
  padding: 16px 16px 24px;
  color: #111827;
}

.seo-content h2,
.seo-content h3 {
  color: #1f2937;
  margin-top: 0;
}

.seo-content ul {
  padding-left: 20px;
  margin: 8px 0 16px;
}

.seo-content li {
  margin-bottom: 4px;
}

.seo-content p {
  margin: 8px 0;
  line-height: 1.6;
  font-size: 0.95rem;
}

/* Responsive design */
@media (max-width: 768px) {
  main {
    grid-template-columns: 1fr;
    gap: 16px;
    height: auto;
    max-height: none;
  }
  
  header h1 {
    font-size: 1.8rem;
  }
  
  .controls {
    flex-direction: column;
    align-items: stretch;
  }
  
  .controls label {
    justify-content: space-between;
  }
  
  #list {
    max-height: 50vh;
  }
}
