/* Base Varables & Reset */
:root {
  --primary: #2fa572;
  --primary-hover: #106a43;
  --bg-color: #0f172a;
  --surface: rgba(30, 41, 59, 0.7);
  --border: rgba(255, 255, 255, 0.1);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Outfit', sans-serif;
  color: var(--text-main);
}

body {
  background-color: var(--bg-color);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
  position: relative;
}

/* Background Decorations (Blobs) */
.background-decorations {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
}

.blob {
  position: absolute;
  filter: blur(100px);
  border-radius: 50%;
  opacity: 0.5;
  animation: float 20s infinite ease-in-out alternate;
}

.blob-1 {
  width: 400px;
  height: 400px;
  background: rgba(47, 165, 114, 0.4);
  top: -100px;
  left: -100px;
}

.blob-2 {
  width: 500px;
  height: 500px;
  background: rgba(59, 130, 246, 0.3);
  bottom: -200px;
  right: -100px;
  animation-delay: -10s;
}

@keyframes float {
  0% {
    transform: translateY(0) scale(1);
  }

  50% {
    transform: translateY(50px) scale(1.1);
  }

  100% {
    transform: translateY(-50px) scale(0.9);
  }
}

/* Container & Layout */
.container {
  width: 100%;
  max-width: 600px;
  padding: 20px;
  z-index: 1;
}

/* Header */
.header {
  text-align: center;
  margin-bottom: 24px;
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 8px;
}

.logo i {
  font-size: 2.5rem;
  color: var(--primary);
}

.logo h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
}

/* Glass Panel */
.glass-panel {
  background: var(--surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Typography & Utils */
h2 {
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.badge {
  background: rgba(47, 165, 114, 0.2);
  color: var(--primary);
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
}

.text-danger {
  color: var(--danger);
}

.text-success {
  color: var(--success);
}

.text-warning {
  color: var(--warning);
}

/* Settings */
.setting-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.slider-container {
  margin: 15px 0;
}

.slider {
  -webkit-appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  outline: none;
  transition: opacity .2s;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  box-shadow: 0 0 10px rgba(47, 165, 114, 0.5);
  transition: transform 0.2s;
}

.slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.slider-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.slider-labels small {
  opacity: 0.8;
  font-size: 0.75rem;
}

.warning-text {
  font-size: 0.85rem;
  color: var(--warning);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.3s;
}

.warning-max {
  color: var(--danger) !important;
}

/* Upload Area */
.drop-zone {
  border: 2px dashed var(--border);
  border-radius: 16px;
  padding: 40px 20px;
  text-align: center;
  transition: all 0.3s ease;
  background: rgba(0, 0, 0, 0.1);
  cursor: pointer;
}

.drop-zone:hover,
.drop-zone.dragover {
  border-color: var(--primary);
  background: rgba(47, 165, 114, 0.05);
}

.upload-icon {
  font-size: 3rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  transition: color 0.3s;
}

.drop-zone:hover .upload-icon {
  color: var(--primary);
}

.main-text {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.sub-text {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

/* Buttons */
.btn {
  border: none;
  outline: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
}

.btn-primary {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  border: 1px solid var(--border);
}

.btn-primary:hover {
  background: rgba(255, 255, 255, 0.2);
}

.btn-success {
  background: var(--primary);
  color: white;
  width: 100%;
}

.btn-success:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(47, 165, 114, 0.3);
}

.btn-success:active {
  transform: translateY(0);
}

.btn-success:disabled {
  background: #334155;
  color: #94a3b8;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-large {
  padding: 14px 24px;
  font-size: 1.1rem;
}

.btn-sm {
  padding: 4px 10px;
  font-size: 0.85rem;
}

.btn-text {
  background: transparent;
  padding: 4px;
}

.btn-text:hover {
  text-decoration: underline;
}

/* File List Area */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
  margin-bottom: 12px;
}

.file-list {
  list-style: none;
  max-height: 250px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-right: 5px;
}

/* Custom Scrollbar for file list */
.file-list::-webkit-scrollbar {
  width: 6px;
}

.file-list::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 10px;
}

.file-list::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 10px;
}

.file-list::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

.file-item {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: slideIn 0.3s ease forwards;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.file-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.file-name {
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-size {
  color: var(--text-muted);
  font-size: 0.8rem;
  flex-shrink: 0;
  margin-left: 10px;
}

.file-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Progress Bar */
.progress-rail {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 4px;
}

.progress-fill {
  height: 100%;
  background: var(--primary);
  width: 0%;
  transition: width 0.3s ease;
}

.file-item.error .progress-fill {
  background: var(--danger);
}

.file-item.success .progress-fill {
  background: var(--success);
}

/* Download Link */
.download-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

.download-link:hover {
  text-decoration: underline;
}

/* Footer */
.footer {
  text-align: center;
  margin-top: 24px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Spinner Animation */
.spinner {
  animation: spin 1s linear infinite;
  display: inline-block;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Compression Guide */
.compression-guide {
  text-align: center;
  margin: 15px 0 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.compression-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.badge-max {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
}

.badge-max i {
  color: var(--danger);
}

.badge-balanced {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
}

.badge-balanced i {
  color: var(--success);
}

.badge-high {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
}

.badge-high i {
  color: #60a5fa;
}

.compression-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
  max-width: 90%;
}

.sales-pitch {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px dashed var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
  font-style: italic;
  line-height: 1.5;
}

/* Utility Class */
.hidden {
  display: none !important;
}

/* Privacy Link */
.privacy-link-container {
  text-align: center;
  margin-top: 20px;
}

.privacy-link {
  color: var(--primary);
  font-size: 0.95rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  transition: all 0.2s;
  padding: 8px 16px;
  border-radius: 8px;
  background: rgba(47, 165, 114, 0.1);
}

.privacy-link:hover {
  background: rgba(47, 165, 114, 0.2);
  color: var(--text-main);
  text-decoration: none;
}

/* Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.modal.hidden {
  opacity: 0;
  pointer-events: none;
}

.modal-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  width: 90%;
  max-width: 650px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 30px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  transform: translateY(0);
  transition: transform 0.3s ease;
}

/* Custom Scrollbar for Modal content */
.modal-content::-webkit-scrollbar {
  width: 6px;
}

.modal-content::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

.modal.hidden .modal-content {
  transform: translateY(-20px);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 15px;
}

.modal-header h2 {
  margin-bottom: 0;
  color: var(--text-main);
  font-size: 1.4rem;
}

.close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  transition: color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5px;
  border-radius: 5px;
}

.close-btn:hover {
  color: var(--danger);
  background: rgba(239, 68, 68, 0.1);
}

.modal-body {
  color: var(--text-muted);
  line-height: 1.6;
}

.modal-body strong {
  color: var(--text-main);
  font-weight: 600;
}

.privacy-list {
  margin: 20px 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.privacy-list li {
  color: var(--text-muted);
}

.developer-note {
  margin-top: 25px;
  padding: 15px 20px;
  background: rgba(47, 165, 114, 0.1);
  border-left: 4px solid var(--primary);
  border-radius: 0 8px 8px 0;
  font-size: 0.95rem;
  color: var(--text-main);
}

.developer-note strong {
  display: block;
  margin-bottom: 5px;
  color: var(--primary);
}

.developer-note a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.developer-note a:hover {
  text-decoration: underline;
}

/* FAQ Section */
.faq-section {
  margin-top: 30px;
  padding-top: 30px;
  border-top: 1px dashed var(--border);
}

.faq-title {
  margin-bottom: 20px;
  font-size: 1.3rem;
  text-align: center;
}

.accordion {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.accordion-item {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.accordion-item:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.3);
}

.accordion-item.active {
  border-color: var(--primary);
  background: rgba(47, 165, 114, 0.05);
}

.accordion-header {
  width: 100%;
  background: transparent;
  border: none;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-main);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: background 0.2s;
  line-height: 1.4;
  gap: 15px;
}

.accordion-header i {
  color: var(--primary);
  font-size: 1.2rem;
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.accordion-item.active .accordion-header i {
  transform: rotate(180deg);
}

.accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease, opacity 0.3s ease;
  opacity: 0;
}

.accordion-item.active .accordion-body {
  max-height: 600px;
  padding: 0 20px 16px 20px;
  opacity: 1;
}

.accordion-body p {
  color: var(--text-muted);
  line-height: 1.6;
  font-size: 0.95rem;
  margin: 0;
}

.faq-cta {
  margin-top: 25px;
  text-align: center;
  font-size: 0.95rem;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.1);
  padding: 15px;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.faq-cta a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.faq-cta a:hover {
  text-decoration: underline;
}