:root {
  --bg-color: #050505;
  --text-color: #f0f0f0;
  --accent-color: #8b5cf6;
  --accent-hover: #7c3aed;
  --glass-bg: rgba(25, 25, 30, 0.6);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  --input-bg: rgba(0, 0, 0, 0.3);
}

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

body {
  font-family: 'Outfit', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  position: relative;
  overflow-x: hidden;
  padding: 4rem 1rem;
}

/* Animated Background Orbs */
.background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  animation: float 20s infinite ease-in-out alternate;
}

.orb-1 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, #8b5cf6, transparent 70%);
  top: -100px;
  left: -100px;
}

.orb-2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #ec4899, transparent 70%);
  bottom: -200px;
  right: -100px;
  animation-delay: -5s;
}

.orb-3 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, #3b82f6, transparent 70%);
  top: 40%;
  left: 60%;
  animation-delay: -10s;
}

@keyframes float {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(100px, 50px) scale(1.1); }
  100% { transform: translate(-50px, 100px) scale(0.9); }
}

/* Main Container */
.container {
  width: 100%;
  max-width: 500px;
  padding: 2rem;
  z-index: 1;
}

header {
  text-align: center;
  margin-bottom: 2rem;
}

header h1 {
  font-size: 3.5rem;
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: 0.5rem;
}

.highlight {
  color: transparent;
  background: linear-gradient(90deg, #8b5cf6, #ec4899);
  -webkit-background-clip: text;
  background-clip: text;
}

header p {
  color: #a1a1aa;
  font-size: 1.1rem;
}

/* Glassmorphism Card */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 2rem;
  box-shadow: var(--glass-shadow);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.45);
}

/* Tabs */
.tabs {
  display: flex;
  background: var(--input-bg);
  border-radius: 12px;
  padding: 0.3rem;
  gap: 0.3rem;
}

.tab-btn {
  flex: 1;
  background: transparent;
  color: #a1a1aa;
  border: none;
  padding: 0.75rem;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.tab-btn.active {
  background: var(--glass-bg);
  color: white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* Input Section */
.input-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #d4d4d8;
  margin-left: 4px;
}

/* Contact Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

textarea,
input[type="text"],
input[type="tel"],
input[type="email"] {
  width: 100%;
  background: var(--input-bg);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 1rem;
  color: var(--text-color);
  font-family: inherit;
  font-size: 1rem;
  resize: none;
  transition: all 0.3s ease;
}

textarea:focus,
input[type="text"]:focus,
input[type="tel"]:focus,
input[type="email"]:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2);
}

textarea::placeholder,
input[type="text"]::placeholder,
input[type="tel"]::placeholder,
input[type="email"]::placeholder {
  color: #52525b;
}

/* QR Display Section */
.qr-display-section {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 16px;
  min-height: 250px;
}

.qr-wrapper {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

#qr-wrapper svg,
#qr-wrapper canvas {
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  display: none; /* hidden initially */
  max-width: 100%;
  height: auto;
  transition: opacity 0.3s ease;
}

.qr-placeholder {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 200px;
  height: 200px;
  border: 2px dashed #3f3f46;
  border-radius: 12px;
  color: #71717a;
  font-weight: 500;
  transition: border-color 0.3s ease;
}

/* Controls */
.controls-section {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Logo Upload Section */
.logo-upload-section {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--input-bg);
  padding: 0.75rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
}

.logo-upload-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  color: var(--accent-color);
  font-weight: 600;
  margin: 0;
  transition: opacity 0.2s;
}

.logo-upload-label:hover {
  opacity: 0.8;
}

.file-name {
  font-size: 0.85rem;
  color: #a1a1aa;
  max-width: 150px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#clear-logo-btn {
  background: none;
  border: none;
  color: #ef4444;
  cursor: pointer;
  font-size: 1.1rem;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

#clear-logo-btn:hover {
  opacity: 0.8;
}

/* Theme Presets */
.theme-preset-group {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.theme-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #d4d4d8;
  margin-left: 4px;
}

.theme-buttons {
  display: flex;
  gap: 0.5rem;
}

.theme-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.theme-btn:hover {
  transform: scale(1.15);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

.color-picker-group {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.color-picker {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

input[type="color"] {
  -webkit-appearance: none;
  border: none;
  width: 100%;
  height: 40px;
  border-radius: 8px;
  cursor: pointer;
  background: transparent;
}

input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

input[type="color"]::-webkit-color-swatch {
  border: 1px solid var(--glass-border);
  border-radius: 8px;
}

.button-group {
  display: flex;
  gap: 1rem;
  width: 100%;
}

.btn-primary, .btn-secondary {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  padding: 1rem;
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

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

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 1px solid var(--glass-border);
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
  transform: scale(1.02);
}

.btn-secondary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.15);
  transform: scale(1.02);
}

.btn-primary:active:not(:disabled),
.btn-secondary:active:not(:disabled) {
  transform: scale(0.98);
}

.btn-primary:disabled,
.btn-secondary:disabled {
  background: #3f3f46;
  color: #71717a;
  cursor: not-allowed;
  opacity: 0.7;
  border-color: transparent;
}

/* Footer */
footer {
  width: 100%;
  max-width: 500px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
  padding: 1rem;
  z-index: 1;
}

footer p {
  color: #a1a1aa;
  font-size: 0.95rem;
  font-weight: 500;
}

footer a {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--accent-color);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  transition: opacity 0.2s;
}

footer a:hover {
  opacity: 0.8;
}

/* Responsive */
@media (max-width: 600px) {
  body {
    padding: 1rem 0.5rem;
  }
  header {
    margin-bottom: 1rem;
  }
  header h1 {
    font-size: 2.2rem;
  }
  header p {
    font-size: 0.95rem;
  }
  .glass-card {
    padding: 1.25rem;
    gap: 1rem;
    border-radius: 16px;
  }
  .tabs {
    padding: 0.25rem;
  }
  .tab-btn {
    padding: 0.5rem;
    font-size: 0.9rem;
  }
  .contact-form {
    gap: 0.75rem;
  }
  textarea,
  input[type="text"],
  input[type="tel"],
  input[type="email"] {
    padding: 0.75rem;
    font-size: 0.95rem;
  }
  .qr-display-section {
    padding: 1rem;
    min-height: 200px;
  }
  .qr-placeholder {
    width: 150px;
    height: 150px;
  }
  .controls-section {
    gap: 1rem;
  }
  .logo-upload-section {
    padding: 0.5rem;
  }
  .logo-upload-label {
    font-size: 0.9rem;
  }
  .button-group {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .btn-primary, .btn-secondary {
    padding: 0.75rem;
    font-size: 1rem;
    flex: 1 1 100%; /* Make them stack vertically */
  }
}
