:root {
    --primary-color: #667eea;
    --primary-dark: #5a67d8;
    --secondary-color: #764ba2;
    --accent-color: #48bb78;
    --error-color: #e53e3e;
    --success-color: #48bb78;
    --text-dark: #2d3748;
    --text-medium: #4a5568;
    --text-light: #718096;
    --bg-white: #ffffff;
    --bg-light: #f7fafc;
    --bg-dark: #1a202c;
    --border-light: #e2e8f0;
    --border-medium: #cbd5e0;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --radius: 2px;
    --radius-lg: 4px;
    --transition: all 0.2s ease;
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

body {
    font-family: var(--font-primary);
    /*background: var(--bg-light);*/
    background: #ababab;
    min-height: 100vh;
    color: var(--text-dark);
    line-height: 1.6;
    font-weight: 400;
}

.hero-section {
  text-align: center;
  padding: 3rem 2rem 2rem;
  background: var(--bg-white);
  box-shadow: var(--shadow);
  border-bottom: 3px solid var(--primary-color);
}

.hero-title {
  font-size: clamp(1.75rem, 5vw, 3rem);
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.hero-subtitle {
  font-size: clamp(0.875rem, 2.5vw, 1.25rem);
  color: var(--text-medium);
  max-width: 700px;
  margin: 0 auto;
}

.main-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

.form-panel, .qr-panel {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
}

.qr-panel {
  text-align: center;
  position: sticky;
  top: 2rem;
}

.section-title {
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--bg-light);
}

.icon {
  width: 20px;
  height: 20px;
  fill: var(--primary-color);
  flex-shrink: 0;
}

.svgicon {
    width: 16px;
    height: 16px;
    margin-right: 0.5rem;
}

.sucessicon {
    width: 20px;
    height: 20px;
    margin-right: 0.5rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-medium);
  margin-bottom: 0.5rem;
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--border-light);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: var(--font-primary);
  transition: var(--transition);
  background: var(--bg-white);
  color: var(--text-dark);
}

.form-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.range-container {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.5rem;
}

.range-input {
  flex: 1;
  height: 6px;
  background: var(--border-light);
  border-radius: 3px;
  outline: none;
  appearance: none;
}

.range-input::-webkit-slider-thumb {
  appearance: none;
  width: 20px;
  height: 20px;
  background: var(--primary-color);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: var(--shadow);
  border: 2px solid white;
}

.range-input::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: var(--primary-color);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: var(--shadow);
  border: 2px solid white;
}

.range-value {
  min-width: 40px;
  text-align: center;
  font-weight: 600;
  color: var(--primary-color);
  background: var(--bg-light);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
}

.utm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.form-help {
  font-size: 0.75rem;
  color: var(--text-light);
  margin-top: 0.25rem;
  line-height: 1.4;
}

.required-asterisk {
  color: var(--error-color);
  margin-right: 0.25rem;
}

.utm-presets {
  background: var(--bg-light);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.preset-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.preset-btn {
  padding: 0.5rem 0.75rem;
  background: var(--bg-white);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-medium);
  display: flex;
  align-items: center;
  white-space: nowrap;
}

.preset-btn:hover {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.preset-btn:last-child {
  background: #fee;
  color: var(--error-color);
  border-color: #fbb;
}

.preset-btn:last-child:hover {
  background: var(--error-color);
  color: white;
}

.upload-area {
  border: 2px dashed var(--border-medium);
  border-radius: var(--radius-lg);
  /*padding: 2rem;*/
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background: var(--bg-light);
  margin-bottom: 1.5rem;
}

.upload-area:hover {
  border-color: var(--primary-color);
  background: rgba(102, 126, 234, 0.05);
}

.upload-area.dragover {
  border-color: var(--primary-dark);
  background: rgba(102, 126, 234, 0.1);
}

.upload-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 1rem;
  color: var(--text-light);
}

.upload-text {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.upload-subtext {
  color: var(--text-light);
  font-size: 0.875rem;
}

.requirements {
  background: #f0fff4;
  border: 1px solid #9ae6b4;
  border-radius: var(--radius);
  padding: 1rem;
  font-size: 0.875rem;
  color: #2f855a;
}

.requirements-title {
  font-weight: 600;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.requirements ul {
  margin-left: 1rem;
}

.requirements li {
  margin-bottom: 0.25rem;
}

#logoFile {
  display: none;
}

.preview {
  max-width: 80px;
  max-height: 80px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-top: 1rem;
  border: 2px solid white;
}

.qr-display {
  margin-bottom: 2rem;
}

.qr-wrapper {
  display: inline-block;
  padding: 2rem;
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-light);
  position: relative;
  margin-bottom: 1.5rem;
  max-width: 100%;
}

#qrcode {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

#qrcode canvas {
  max-width: 100%;
  height: auto;
}

.logo-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100px;
  height: 100px;
  background: white;
  border-radius: var(--radius);
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  padding: 10px;
  border: 2px solid white;
}

.logo-overlay img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: var(--radius);
}

.url-preview {
  background: var(--bg-light);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 1rem;
  font-family: "SF Mono", Monaco, monospace;
  font-size: 0.875rem;
  color: var(--text-medium);
  word-break: break-all;
  text-align: left;
  margin-bottom: 1.5rem;
  cursor: pointer;
  transition: var(--transition);
}

.url-preview:hover {
  background: rgba(102, 126, 234, 0.05);
  border-color: var(--primary-color);
}

.button-group {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.875rem;
  font-family: var(--font-primary);
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: var(--shadow);
  min-width: 120px;
  justify-content: center;
}

.btn-primary {
  background: var(--primary-color);
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--accent-color);
  color: white;
}

.btn-secondary:hover:not(:disabled) {
  background: #38a169;
  transform: translateY(-1px);
}

.btn-outline {
  background: var(--bg-white);
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.btn-outline:hover:not(:disabled) {
  background: var(--primary-color);
  color: white;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-icon {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.btn-remove {
  background: #fed7d7;
  color: #c53030;
  border: 1px solid #feb2b2;
  width: 100%;
  margin-bottom: 1rem;
  justify-content: center;
}

.btn-remove:hover:not(:disabled) {
  background: #c53030;
  color: white;
  border-color: #c53030;
}

.color-picker-container {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-around;
  padding: 1rem;
  background: var(--bg-light);
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
}

.color-picker-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.color-picker {
  width: 50px;
  height: 40px;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  box-shadow: var(--shadow);
  border: 2px solid white;
}

.tabs {
  display: flex;
  margin-bottom: 2rem;
  background: var(--bg-light);
  border-radius: var(--radius);
  padding: 0.25rem;
  border: 1px solid var(--border-light);
}

.tab {
  flex: 1;
  padding: 0.75rem;
  background: transparent;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  font-weight: 500;
  font-family: var(--font-primary);
  color: var(--text-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  text-align: center;
}

.tab.active {
  background: white;
  color: var(--primary-color);
  box-shadow: var(--shadow);
  font-weight: 600;
}

.tab:hover:not(.active) {
  color: var(--text-medium);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.customization-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.format-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.format-card {
  background: var(--bg-light);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
}

.format-card h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.format-card p {
  font-size: 0.875rem;
  color: var(--text-medium);
  margin-bottom: 1rem;
  line-height: 1.4;
}

.success-message {
  position: fixed;
  top: 20px;
  right: 20px;
  background: var(--success-color);
  color: white;
  padding: 1rem 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  transform: translateX(400px);
  transition: var(--transition);
  z-index: 1000;
  font-weight: 500;
  display: flex;
  align-items: center;
}

.success-message.show {
  transform: translateX(0);
}

/* Footer Styles */
.footer {
  background: var(--bg-dark);
  color: white;
  margin-top: 4rem;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2rem 1.5rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h3.footer-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.footer-section h4.footer-subtitle {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #e2e8f0;
}

.footer-description {
  color: #a0aec0;
  font-size: 0.875rem;
  line-height: 1.6;
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-link {
  color: #a0aec0;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  transition: var(--transition);
}

.footer-link:hover {
  color: var(--primary-color);
}

.footer-icon {
  width: 16px;
  height: 16px;
  fill: currentColor;
  flex-shrink: 0;
}

.footer-divider {
  height: 1px;
  background: #4a5568;
  margin: 2rem 0 1.5rem;
}

.footer-bottom {
  text-align: center;
}

.footer-copyright {
  color: #a0aec0;
  font-size: 0.875rem;
}

.footer-copyright p {
  margin-bottom: 0.5rem;
}

.footer-tech {
  color: #718096;
  font-size: 0.75rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .main-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .qr-panel {
    position: static;
  }

  .customization-grid {
    grid-template-columns: 1fr 1fr;
  }

  .utm-grid {
    grid-template-columns: 1fr;
  }

  .format-options {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .hero-section {
    padding: 2rem 1rem;
  }

  .hero-title {
    flex-direction: column;
    gap: 1rem;
  }

  .form-panel,
  .qr-panel {
    padding: 1.5rem;
  }

  .main-container {
    padding: 1rem;
  }

  .button-group {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    min-width: auto;
  }

  .tabs {
    flex-direction: column;
    gap: 0.25rem;
  }

  .tab {
    text-align: center;
    padding: 1rem;
  }

  .customization-grid {
    grid-template-columns: 1fr;
  }

  .color-picker-container {
    flex-direction: column;
    gap: 1.5rem;
  }

  .preset-buttons {
    justify-content: center;
  }

  .preset-btn {
    flex: 1;
    min-width: 100px;
    justify-content: center;
  }

  .footer-container {
    padding: 2rem 1rem 1rem;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    text-align: center;
  }

  .qr-wrapper {
    padding: 1rem;
  }

  .logo-overlay {
    width: 60px;
    height: 60px;
  }
}

@media (max-width: 480px) {

  .form-panel,
  .qr-panel {
    padding: 1rem;
  }

  .hero-title {
    font-size: 1.5rem;
  }

  .success-message {
    left: 10px;
    right: 10px;
    transform: translateY(-100px);
  }

  .success-message.show {
    transform: translateY(0);
  }

  .range-container {
    flex-direction: column;
    gap: 0.5rem;
    align-items: stretch;
  }

  .range-value {
    align-self: center;
  }

  .upload-area {
    padding: 1.5rem 1rem;
  }

  .upload-icon {
    width: 32px;
    height: 32px;
  }
}

/* Print Styles */
@media print {

  .footer,
  .success-message,
  .button-group {
    display: none;
  }

  .main-container {
    grid-template-columns: 1fr;
  }

  .form-panel {
    page-break-after: always;
  }
}