* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, sans-serif;
  background: #f5f5f5;
  color: #222;
  line-height: 1.4;
}

header {
  background: #fff;
  padding: 1rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 900px;
  margin: 0 auto;
}

h1 {
  font-size: 1.4rem;
}

.lang-switch button {
  padding: 6px 14px;
  margin-left: 6px;
  border: 2px solid #2563eb;
  background: #ffffff;
  color: #2563eb;
  cursor: pointer;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
}

.lang-switch button.active {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
}

header p {
  text-align: center;
  margin-top: 0.5rem;
  color: #555;
  font-size: 0.95rem;
}

.upload-zone {
  max-width: 420px;
  margin: 2.5rem auto;
  padding: 3rem 2rem;
  border: 2px dashed #ccc;
  text-align: center;
  background: #fff;
  border-radius: 12px;
}

.upload-zone.drag {
  border-color: #2563eb;
  background: #eff6ff;
}

button {
  padding: 11px 20px;
  font-size: 15px;
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

button:hover {
  opacity: 0.9;
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

button.primary {
  background: #16a34a;
}

.editor {
  max-width: 920px;
  margin: 1.5rem auto;
  background: #fff;
  padding: 1.2rem;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.canvas-wrap {
  position: relative;
  display: inline-block;
  max-width: 100%;
}

#canvas {
  max-width: 100%;
  display: block;
  background: #eee;
  cursor: crosshair;
  border-radius: 4px;
}

.crop-overlay {
  position: absolute;
  border: 2px dashed #2563eb;
  background: rgba(37,99,235,0.15);
  pointer-events: none;
}

.controls {
  margin-top: 1.2rem;
}

.sliders {
  display: flex;
  gap: 1.8rem;
  flex-wrap: wrap;
  margin-bottom: 1.2rem;
}

.sliders label {
  display: flex;
  flex-direction: column;
  font-size: 14px;
  gap: 4px;
}

.buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.ad-slot {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  min-height: 250px !important;
  min-width: 300px;
  width: 100%;
  max-width: 728px;
  margin: 2.5rem auto;
  text-align: center;
  background: #f9fafb;
  overflow: visible !important;
}

.ratio-btn {
  background: #f3f4f6;
  color: #1f2937;
  border: 1px solid #d1d5db;
  font-weight: 600;
  min-width: 52px;
}

.ratio-btn:hover {
  background: #e5e7eb;
}
