body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial;
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 16px;
  min-height: 100vh;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  background-attachment: fixed;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.logo-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #fff 0%, #e8e8e8 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.logo-text {
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.logo-tagline {
  font-size: 14px;
  color: rgba(255,255,255,0.85);
  margin-top: 2px;
}

h1 {
  margin-bottom: 8px;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.row { 
  display:flex; 
  gap:12px; 
  align-items:center; 
  flex-wrap:wrap; 
}

.controls { 
  display:flex; 
  gap:12px; 
  flex-wrap:wrap; 
  margin-bottom:12px; 
  align-items:flex-end; 
}

label { 
  font-size:13px; 
  display:block; 
  margin-bottom:4px; 
  color:#222; 
}

input[type="file"] { 
  display:block; 
}

.thumb { 
  width:120px; 
  height:80px; 
  object-fit:cover; 
  border:1px solid #ddd; 
  border-radius:4px; 
}

button {
  padding: 8px 12px;
  font-size: 15px;
  cursor: pointer;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-weight: 500;
  transition: transform 0.15s, box-shadow 0.15s;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

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

.preview-list { 
  display:grid; 
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap:12px; 
  margin-top:12px; 
}

.preview-item {
  min-width: 0;
  border: 1px solid rgba(255,255,255,0.2);
  padding: 10px;
  border-radius: 6px;
  background: rgba(255,255,255,0.95);
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.preview-item .meta { 
  display:flex; 
  gap:8px; 
  align-items:center; 
}

.preview-item .caption { 
  width:100%; 
  font-size:13px; 
  padding:6px; 
  box-sizing:border-box; 
  border: 1px solid #d7d7d7;
  border-radius: 4px;
  resize: vertical;
}

.small { 
  font-size:13px; 
  color:#555; 
}

.muted {
  color: rgba(255,255,255,0.85);
  font-size: 13px;
}

.controls-block {
  border: 1px solid rgba(255,255,255,0.2);
  padding: 10px;
  border-radius: 6px;
  background: rgba(255,255,255,0.95);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.controls-block .muted,
.preview-item .muted {
  color: #666;
}

.actions {
  display:flex;
  gap:8px;
  margin-left: auto;
}

.actions button {
  background: #f0f0f0;
  color: #555;
  font-size: 12px;
  padding: 4px 8px;
}

.actions button:hover {
  background: #e0e0e0;
  box-shadow: none;
}

.drag-handle { 
  cursor:grab; 
  padding:4px 6px; 
  border-radius:4px; 
  background:#f0f0f0; 
  font-size:12px; 
}

.edit-panel {
  border: 1px solid #e1e1e1;
  border-radius: 6px;
  padding: 8px;
  background: #fafafa;
}

.edit-header,
.range-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.edit-title {
  font-size: 13px;
  font-weight: 700;
  color: #222;
}

.secondary-btn {
  background: #eeeeee;
  color: #444;
  font-size: 12px;
  padding: 4px 8px;
  box-shadow: none;
}

.secondary-btn:hover {
  background: #dedede;
  box-shadow: none;
}

.edit-preset {
  margin-top: 8px;
}

.edit-preset select {
  width: 100%;
  margin-top: 4px;
}

.edit-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 8px;
}

.range-control {
  margin: 0;
}

.range-label {
  color: #333;
  font-size: 12px;
  margin-bottom: 2px;
}

input[type="range"] {
  width: 100%;
  accent-color: #667eea;
}

.footer {
  margin-top: 18px;
  color: rgba(255,255,255,0.85);
  font-size: 13px;
}

input[type="number"] { 
  width:72px; 
}

.preview-empty {
  color: rgba(255,255,255,0.85);
  margin-top: 8px;
}
