:root {
  --bg-color: #1a1b26;
  --card-bg: rgba(24, 25, 38, 0.95);
  --text-color: #c0caf5;
  --border-color: rgba(88, 88, 117, 0.35);
  --accent-color: #7aa2f7;
  --error-color: #f7768e;
  --success-color: #9ece6a;
  --muted-text: #565f89;
}

/* Light theme variables */
:root[data-theme="light"] {
  --bg-color: #ffffff;
  --card-bg: rgba(255, 255, 255, 0.95);
  --text-color: #1a1b26;
  --border-color: rgba(26, 27, 38, 0.15);
  --muted-text: #6b7280;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  margin: 0;
  padding: 0;
  background-color: var(--bg-color);
  color: var(--text-color);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.nav-bar {
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  padding: 0.75rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
}

.nav-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-color);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-actions {
  display: flex;
  gap: 1rem;
}

.icon-button {
  background: none;
  border: none;
  color: var(--text-color);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 0.5rem;
  transition: background-color 0.2s;
}

.icon-button:hover {
  background: rgba(255, 255, 255, 0.1);
}

.main-content {
  flex: 1;
  display: flex;
  padding: 3rem;
  gap: 3rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .main-content {
    flex-direction: column;
    padding: 1.5rem;
    gap: 1.5rem;
  }
}

.container {
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  border-radius: 1.5rem;
  padding: 2.5rem;
  border: 1px solid var(--border-color);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.main-container {
  flex: 1;
}

.side-panel {
  width: 300px;
  height: fit-content;
}

@media (max-width: 768px) {
  .side-panel {
    width: 100%;
  }
}

.compression-info {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.9rem;
  color: var(--muted-text);
}

.how-it-works {
  margin-top: 2rem;
}

.steps-list {
  list-style: none;
  padding: 0;
  counter-reset: step-counter;
}

.step-item {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  align-items: flex-start;
  line-height: 1.5;
}

.step-item::before {
  counter-increment: step-counter;
  content: counter(step-counter);
  background: var(--accent-color);
  color: var(--bg-color);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  flex-shrink: 0;
}

.privacy-security {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--muted-text);
}

h2 {
  margin-top: 0;
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--text-color);
}

h1 {
  text-align: center;
  color: var(--text-color);
  margin-bottom: 2rem;
  font-size: 1.8rem;
  font-weight: 600;
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
  }
}

.upload-area {
  border: 2px dashed var(--border-color);
  border-radius: 1rem;
  padding: 3rem 1.5rem;
  text-align: center;
  margin-bottom: 2rem;
  cursor: pointer;
  transition: all 0.3s;
  background: var(--card-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.upload-area:hover, .upload-area.active {
  border-color: var(--accent-color);
  background: rgba(122, 162, 247, 0.1);
}

.upload-area input[type="file"] {
  display: none;
}

.file-info {
  display: none;
  margin-bottom: 1.5rem;
  padding: 1rem;
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
}

#compress-btn {
  width: 100%;
  padding: 1rem;
  font-size: 1rem;
  font-weight: 500;
  color: #ffffff;
  background: var(--accent-color);
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s;
}

#compress-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

#compress-btn:not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(122, 162, 247, 0.3);
}

.status {
  margin-top: 1.5rem;
}

progress {
  width: 100%;
  height: 8px;
  border-radius: 4px;
  margin-top: 0.5rem;
  appearance: none;
}

progress::-webkit-progress-bar {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

progress::-webkit-progress-value {
  background: var(--accent-color);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.error {
  color: var(--error-color);
}

.download-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--success-color);
  color: #ffffff;
  text-decoration: none;
  border-radius: 0.5rem;
  font-weight: 500;
  transition: all 0.2s;
}

.download-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(158, 206, 106, 0.3);
}

#log-area {
  margin-top: 1.5rem;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 0.5rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  white-space: pre-wrap;
  color: var(--muted-text);
}

.settings {
  margin-bottom: 1.5rem;
}

.settings label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-color);
}

input[type="range"] {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 16px;
  height: 16px;
  background: var(--accent-color);
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.2s;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}