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

body {
  font-family: "Arial", sans-serif;
  /* background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); */
  background: #f4a209;
  min-height: 100vh;
  padding: 20px;
}

/* Language Switcher Styles */
/* Language Switcher Styles */
.language-switcher {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  background: transparent;
  padding: 0;
  border: none;
  margin: 0 auto 20px;
  max-width: 800px;
  width: 100%;
}

.lang-btn {
  padding: 8px 16px;
  border: 2px solid #423435;
  border-radius: 50px;
  background: rgba(255, 255, 255, 0.6);
  color: #423435;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.lang-btn:hover {
  background: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.lang-btn.active {
  background: #e63946;
  color: white;
  border-color: #e63946;
  box-shadow: 0 4px 8px rgba(230, 57, 70, 0.3);
}

.flag {
  font-size: 16px;
  line-height: 1;
}

.flag {
  font-size: 16px;
  line-height: 1;
}

header {
  text-align: center;
  margin-bottom: 30px;
}

.subtitle {
  color: white;
  font-size: 1.1em;
  margin-top: 10px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.download-panel {
  width: 100%;
  margin-top: 25px;
  background: rgba(255, 255, 255, 0.95);
  border: 2px solid #ffe099;
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.scale-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.scale-options__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.scale-label {
  font-size: 1rem;
  font-weight: 700;
  color: #2c2c2c;
}

.scale-helper {
  font-size: 0.85rem;
  color: #6b6b6b;
}

.scale-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(70px, 1fr));
  gap: 10px;
}

.scale-btn {
  background: #fff5d9;
  border: 2px solid transparent;
  border-radius: 12px;
  padding: 12px;
  font-size: 1rem;
  font-weight: 600;
  color: #b15b00;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.scale-btn:hover {
  border-color: #f4a209;
  transform: translateY(-2px);
}

.scale-btn.active {
  background: #f4a209;
  color: white;
  border-color: #d88900;
  box-shadow: 0 10px 20px rgba(244, 162, 9, 0.35);
}

.download-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
}

.seo-section {
  background: rgba(255, 255, 255, 0.92);
  border-radius: 16px;
  padding: 24px;
  margin: 0 auto 30px;
  max-width: 900px;
  color: #2b2b2b;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.seo-heading {
  font-size: 1.75em;
  margin-bottom: 10px;
  color: #2c2c2c;
}

.seo-description {
  font-size: 1em;
  margin-bottom: 15px;
  color: #4a4a4a;
}

.seo-list {
  list-style: disc;
  margin-left: 20px;
  display: grid;
  gap: 8px;
}

.seo-list li {
  font-size: 0.95em;
  color: #3a3a3a;
}

.seo-section--footer {
  margin-top: 60px;
  margin-bottom: 10px;
}

.container {
  max-width: 1600px;
  margin: 0 auto;
  border-radius: 20px;
  padding: 40px;
}

h1 {
  color: white;
  margin-bottom: 10px;
  font-size: 2.5em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.content {
  display: grid;
  grid-template-columns: 1fr 480px;
  gap: 30px;
  align-items: start;
}

.canvas-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: sticky;
  top: 20px;
  align-self: start;
}

/* Download panel visible below canvas on desktop */
.canvas-section .download-panel {
  display: flex;
}

/* Hide mobile-toolbar on desktop (use canvas-section download-panel instead) */
.mobile-toolbar {
  display: none;
}

canvas {
  border: 3px solid #333;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  max-width: 100%;
  height: auto;
}

.canvas-zoom-indicator {
  display: none;
}

.controls {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 12px;
  border: 2px solid #e9ecef;
  max-height: calc(100vh - 60px);
  overflow-y: auto;
}


.controls::-webkit-scrollbar {
  width: 10px;
}

.controls::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.controls::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 10px;
}

.controls::-webkit-scrollbar-thumb:hover {
  background: #555;
}

.section {
  background: white;
  padding: 0;
  border-radius: 10px;
  margin-bottom: 12px;
  border: 1px solid #e0e0e0;
  overflow: hidden;
  transition: box-shadow 0.2s ease;
}

.section:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.section h3 {
  color: #333;
  margin: 0;
  padding: 14px 16px;
  font-size: 1em;
  border-bottom: none;
  background: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
  transition: background-color 0.2s ease;
}

.section h3:hover {
  background: #f8f9fa;
}

.section h3::after {
  content: '';
  width: 8px;
  height: 8px;
  border-right: 2px solid #667eea;
  border-bottom: 2px solid #667eea;
  transform: rotate(45deg);
  transition: transform 0.3s ease;
  flex-shrink: 0;
  margin-left: 10px;
}

.section.collapsed h3::after {
  transform: rotate(-45deg);
}

.section-content {
  padding: 0 16px 16px;
  max-height: 2000px;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease, opacity 0.3s ease;
  opacity: 1;
}

.section.collapsed .section-content {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  opacity: 0;
}

.form-group {
  margin-bottom: 15px;
}

.form-group-inline {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 15px;
}

label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
  color: #555;
  font-size: 12px;
}

input[type="text"],
input[type="tel"],
input[type="file"],
input[type="number"],
textarea,
select {
  width: 100%;
  padding: 8px;
  border: 2px solid #ddd;
  border-radius: 6px;
  font-size: 13px;
  transition: border-color 0.3s;
}

input[type="range"] {
  width: 100%;
  height: 6px;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: #667eea;
}

textarea {
  resize: vertical;
  min-height: 50px;
  font-family: "Arial", sans-serif;
}

button {
  width: 100%;
  padding: 15px;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-download {
  background: #28a745;
  color: white;
}

.btn-download:hover {
  background: #218838;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(40, 167, 69, 0.3);
}

.btn-reset {
  background: #dc3545;
  color: white;
}

.btn-reset:hover {
  background: #c82333;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(220, 53, 69, 0.3);
}

.range-display {
  display: inline-block;
  font-weight: bold;
  color: #667eea;
  min-width: 40px;
}

@media (max-width: 1200px) {
  .content {
    grid-template-columns: 1fr;
  }

  .canvas-section {
    position: relative;
  }
}


/* Modal Styles */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
}

.modal {
  background: white;
  border-radius: 16px;
  padding: 25px;
  max-width: 400px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-title {
  font-size: 1.2em;
  font-weight: bold;
  color: #333;
  margin-bottom: 15px;
}

.modal-input {
  width: 100%;
  padding: 12px;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 15px;
}

.modal-input:focus {
  outline: none;
  border-color: #667eea;
}

.modal-actions {
  display: flex;
  gap: 10px;
}

.modal-btn {
  flex: 1;
  padding: 12px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-btn-cancel {
  background: #f0f0f0;
  color: #666;
}

.modal-btn-cancel:hover {
  background: #e0e0e0;
}

.modal-btn-confirm {
  background: #667eea;
  color: white;
}

.modal-btn-confirm:hover {
  background: #5568d3;
}

/* Toast Notification */
.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #333;
  color: white;
  padding: 12px 24px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 500;
  z-index: 2000;
  opacity: 0;
  transition: all 0.3s ease;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.toast.success {
  background: #28a745;
}

.toast.error {
  background: #dc3545;
}

/* ===== Responsive Styles ===== */
@media (max-width: 1200px) {
  .content {
    grid-template-columns: 1fr;
  }

  .canvas-section {
    position: relative;
  }
}
