:root {
  --bg-color: #0f0f0f;
  --card-bg: #1a1a1a;
  --text-primary: #ffffff;
  --text-secondary: #a0a0a0;
  --accent-primary: #00bcd4;
  --accent-secondary: #4caf50;
  --border-color: #333;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 20px;
  background-color: var(--bg-color);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
}

h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #fff 0%, #888 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.02em;
}

.subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 40px;
  font-weight: 400;
}

#drop-zone {
  width: 800px;
  max-width: 100%;
  height: 250px;
  border: 2px dashed var(--border-color);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 30px;
  transition: var(--transition);
  background: var(--card-bg);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

#drop-zone::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(0, 188, 212, 0.05) 0%, transparent 100%);
  pointer-events: none;
}

#drop-zone.dragover {
  background: rgba(0, 188, 212, 0.1);
  border-color: var(--accent-primary);
  transform: scale(1.02);
  box-shadow: 0 0 30px rgba(0, 188, 212, 0.1);
}

#drop-zone:hover {
  border-color: var(--accent-primary);
  background: #222;
}

.drop-text {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.drop-hint {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.controls {
  display: flex;
  gap: 16px;
  margin-bottom: 30px;
  flex-wrap: wrap;
  justify-content: center;
}

button {
  padding: 14px 28px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  border-radius: 12px;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
}

#compress-btn {
  background: var(--accent-primary);
  color: #000;
  box-shadow: 0 4px 14px rgba(0, 188, 212, 0.3);
}

#compress-btn:hover:not(:disabled) {
  background: #00acc1;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 188, 212, 0.4);
}

#download-btn {
  background: var(--accent-secondary);
  color: #000;
  box-shadow: 0 4px 14px rgba(76, 175, 80, 0.3);
}

#download-btn:hover:not(:disabled) {
  background: #43a047;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

button:active:not(:disabled) {
  transform: translateY(0);
}

button:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  filter: grayscale(1);
}

#status {
  margin: 10px 0 20px;
  color: var(--text-secondary);
  font-size: 0.95rem;
  min-height: 24px;
  transition: var(--transition);
}

.status-success { color: var(--accent-secondary) !important; }
.status-error { color: #ff5252 !important; }
.status-info { color: var(--accent-primary) !important; }
.status-warning { color: #ffd740 !important; }
.status-default { color: var(--text-secondary) !important; }

#stats {
  background: var(--card-bg);
  padding: 20px 30px;
  border-radius: 16px;
  border: 1px solid var(--border-color);
  margin-bottom: 30px;
  font-size: 0.95rem;
  line-height: 1.8;
  width: 800px;
  max-width: 100%;
}

#stats:empty {
  display: none;
}

#stats b {
  color: var(--accent-primary);
}

#image-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
  width: 100%;
  max-width: 800px;
  margin-top: 20px;
}

.image-item {
  display: flex;
  align-items: center;
  background: var(--card-bg);
  padding: 15px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  gap: 15px;
  animation: fadeIn 0.3s ease-out;
}

.image-item img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
}

.image-info {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.unsupported-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 82, 82, 0.05);
  padding: 10px 15px;
  border-radius: 8px;
  border: 1px dashed rgba(255, 82, 82, 0.2);
  gap: 15px;
  animation: fadeIn 0.3s ease-out;
}

.unsupported-item .image-info {
  color: #ff5252;
  font-weight: 500;
  font-size: 0.9rem;
}

.unsupported-item .delete-btn {
  padding: 6px 10px;
  font-size: 0.8rem;
  background: transparent;
  border: 1px solid rgba(255, 82, 82, 0.4);
}

.unsupported-item .delete-btn:hover {
  background: rgba(255, 82, 82, 0.1);
  color: #ff5252;
  box-shadow: none;
}

.image-name {
  font-weight: 600;
  margin-bottom: 5px;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.image-stats {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.image-stats b {
  color: var(--accent-primary);
}

.delete-btn {
  background: rgba(255, 82, 82, 0.1);
  color: #ff5252;
  padding: 8px 12px;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid rgba(255, 82, 82, 0.3);
  cursor: pointer;
  transition: var(--transition);
}

.delete-btn:hover {
  background: #ff5252;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 82, 82, 0.3);
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

body > * {
  animation: fadeIn 0.6s ease-out forwards;
}
