:root {
  --background: #fafafa;
  --foreground: #09090b;

  --card: #ffffff;
  --card-foreground: #09090b;

  --primary: #18181b;
  --primary-foreground: #fafafa;

  --secondary: #e4e4e7;
  --secondary-foreground: #18181b;

  --muted: #f4f4f5;
  --muted-foreground: #71717a;

  --destructive: #ef4444;
  --destructive-foreground: #fafafa;

  --border: #e4e4e7;
  --input: #e4e4e7;
  --ring: #18181b;

  --radius: 0.65rem;
}

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

body {
  background-color: var(--background);
  color: var(--foreground);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  line-height: 1.5; letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
}


.hidden { display: none !important; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.space-y-2 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.5rem; }
.space-y-3 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.75rem; }
.space-y-4 > :not([hidden]) ~ :not([hidden]) { margin-top: 1rem; }
.space-y-5 > :not([hidden]) ~ :not([hidden]) { margin-top: 1.25rem; }
.space-y-6 > :not([hidden]) ~ :not([hidden]) { margin-top: 1.5rem; }
.space-x-2 > :not([hidden]) ~ :not([hidden]) { margin-left: 0.5rem; }
.space-x-3 > :not([hidden]) ~ :not([hidden]) { margin-left: 0.75rem; }
.space-x-4 > :not([hidden]) ~ :not([hidden]) { margin-left: 1rem; }
.gap-1\.5 { gap: 0.375rem; }
.gap-2 { gap: 0.5rem; }
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.pb-4 { padding-bottom: 1rem; }
.pt-2 { padding-top: 0.5rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-5 { margin-bottom: 1.25rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.my-2 { margin-top: 0.5rem; margin-bottom: 0.5rem; }
.my-4 { margin-top: 1rem; margin-bottom: 1rem; }
.my-6 { margin-top: 1.5rem; margin-bottom: 1.5rem; }
.my-8 { margin-top: 2rem; margin-bottom: 2rem; }
.pb-6 { padding-bottom: 1.5rem; }
.pb-8 { padding-bottom: 2rem; }
.gap-6 { gap: 1.5rem; }
.mr-1\.5 { margin-right: 0.375rem; }
.mr-2 { margin-right: 0.5rem; }
.ml-2 { margin-left: 0.5rem; }
.w-full { width: 100%; }
.h-full { height: 100%; }
.w-auto { width: auto; }
.flex-1 { flex: 1 1 0%; }
.text-center { text-align: center; }
.aspect-square { aspect-ratio: 1 / 1; }
.max-w-\[280px\] { max-width: 280px; }
.w-36 { width: 9rem; }
.h-fit { height: fit-content; }
.absolute { position: absolute; }
.relative { position: relative; }
.top-10 { top: 2.5rem; }
.right-0 { right: 0; }
.z-50 { z-index: 50; }
.z-10 { z-index: 10; }
.overflow-hidden { overflow: hidden; }
.grid { display: grid; }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.grid-features { display: grid; gap: 0.5rem; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); }

@media (min-width: 640px) {
    .sm\:flex { display: flex; }
    .sm\:hidden { display: none; }
    .sm\:inline { display: inline !important; }
    .sm\:mr-1\.5 { margin-right: 0.375rem; }
    .sm\:mr-2 { margin-right: 0.5rem; }
}


.text-xs { font-size: 0.75rem; line-height: 1rem; text-transform: none;}
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }
.font-bold { font-weight: 700; }
.font-mono { font-family: ui-monospace, monospace; }
.tracking-widest { letter-spacing: 0.1em; }
.tracking-tight { letter-spacing: 0; }


.step-number {
  width: 1.75rem; height: 1.75rem; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 0.25rem; background-color: var(--foreground); color: var(--background);
  font-size: 0.875rem; font-weight: 700; margin-right: 1.25rem !important;
  box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.05);
  flex-shrink: 0;
}
.tracking-wider { letter-spacing: 0.05em; }
.uppercase { text-transform: uppercase; }

.text-muted-foreground { color: var(--muted-foreground); }
.text-emerald-600 { color: #059669; }


.bg-background { background-color: var(--background); }
.bg-primary { background-color: var(--primary); color: var(--primary-foreground);}
.bg-white { background-color: #ffffff; }
.bg-black { background-color: #000000; }
.bg-muted { background-color: var(--muted); }
.bg-muted\/20 { background-color: rgba(244, 244, 245, 0.4); }
.bg-muted\/50 { background-color: rgba(244, 244, 245, 0.5); }
.bg-green-500\/10 { background-color: rgba(34, 197, 94, 0.1); }
.text-foreground { color: var(--foreground); }
.border-b { border-bottom-width: 1px; border-bottom-style: solid; border-color: var(--border); }
.border-t { border-top-width: 1px; border-top-style: solid; border-color: var(--border); }
.border { border-width: 1px; border-style: solid; border-color: var(--border); }
.border-2 { border-width: 2px; border-style: solid; border-color: var(--border); }
.border-dashed { border-style: dashed; }
.border-0 { border: none; }
.border-primary\/20 { border-color: rgba(24, 24, 27, 0.2); }
.rounded { border-radius: 0.25rem; }
.rounded-md { border-radius: calc(var(--radius) - 2px); }
.rounded-lg { border-radius: var(--radius); }
.rounded-xl { border-radius: calc(var(--radius) + 4px); }
.shadow-sm { box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); }
.shadow-md { box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1); }
.shadow-inner { box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.05); }


.container { width: 100%; max-width: 1300px; margin: 0 auto; }
.workspace-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(1, minmax(0, 1fr)); }


.layout-2col { display: flex; flex-direction: column; gap: 1.5rem; }
.layout-left { display: flex; flex-direction: column; gap: 1.5rem; flex: 1; }
.layout-right { display: flex; flex-direction: column; flex: 1; }

@media (min-width: 1024px) { 
    .workspace-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } 
    .layout-2col { flex-direction: row; align-items: flex-start; }
    .layout-left { flex: 2; min-width: 0; } 
    .layout-right { flex: 1; position: sticky; top: 1.5rem; min-width: 0;}
}
.max-w-2xl { max-width: 42rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-md { max-width: 28rem; }
.w-fit { width: fit-content; }
.mx-auto { margin-left: auto; margin-right: auto; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }

.bg-emerald-500\/10 { background-color: rgba(16, 185, 129, 0.1); }
.border-emerald-500\/20 { border-color: rgba(16, 185, 129, 0.2); }
.text-emerald-700 { color: #047857; }
.border-green-500\/20 { border-color: rgba(34, 197, 94, 0.2); }
.opacity-70 { opacity: 0.7; }
.opacity-80 { opacity: 0.8; }
.hover\:opacity-100:hover { opacity: 1; }

.rounded-full { border-radius: 9999px; }
.h-12 { height: 3rem; }
.h-11 { height: 2.75rem; }
.gap-4 { gap: 1rem; }
.gap-3 { gap: 0.75rem; }
.transition-colors { transition-property: color, background-color, border-color, text-decoration-color, fill, stroke; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.text-white { color: #ffffff !important; }


.card {
  border-radius: var(--radius); border: 1px solid var(--border);
  background-color: var(--card); color: var(--card-foreground);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  
}
.card-header { position: relative; padding: 1.25rem 1.5rem; border-top-left-radius: var(--radius); border-top-right-radius: var(--radius); }
.card-title { font-size: 1.1rem; font-weight: 700; line-height: 1; letter-spacing: -0.015em; }
.card-description { font-size: 0.85rem; color: var(--muted-foreground); margin-top: 0.25rem; }


.step-badge {
    position: absolute; top: -1px; right: 1rem; width: 28px; height: 32px;
    background: var(--border); color: var(--foreground);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 0.9rem;
    border-bottom-left-radius: 8px; border-bottom-right-radius: 8px;
}
.step-badge.bg-primary { background: var(--primary); color: white; }


.label { font-size: 0.85rem; font-weight: 600; line-height: 1; margin-bottom: 0.5rem; display: block; }
.input {
  display: flex; height: 2.5rem; width: 100%; border-radius: calc(var(--radius) - 2px); border: 1px solid var(--input); background-color: var(--card);
  padding: 0.5rem 0.75rem; font-size: 0.875rem; color: var(--foreground); transition: box-shadow 0.1s, border-color 0.1s; outline: none; box-shadow: 0 1px 2px rgba(0,0,0,0.02); -webkit-appearance: none; appearance: none;
  font-family: inherit;
}
.input:focus, .input:focus-visible {
  outline: none; box-shadow: 0 0 0 2px var(--ring); border-color: var(--ring);
}
select.input.select-native {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='lucide lucide-chevron-down'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0.75rem center; background-size: 1rem; padding-right: 2.5rem;
}
.input.input-sm { height: 2rem; padding: 0.25rem 0.6rem; font-size: 0.8rem; }
.input:focus { outline: none; box-shadow: 0 0 0 1px var(--background), 0 0 0 3px var(--ring); border-color: transparent; }
textarea.input { min-height: 80px; resize: vertical; font-family: inherit; }


.button {
  display: inline-flex; align-items: center; justify-content: center; border-radius: calc(var(--radius) - 2px);
  font-size: 0.875rem; font-weight: 500; height: 2.5rem; padding: 0.5rem 1rem; white-space: nowrap; transition: background-color 0.15s; cursor: pointer; outline: none; border: none; font-family: inherit; text-decoration: none;
}
.button:focus-visible { box-shadow: 0 0 0 2px var(--background), 0 0 0 4px var(--ring); }
.button-primary { background-color: var(--primary); color: var(--primary-foreground); }
.button-primary:hover { opacity: 0.9; }
.button-secondary { background-color: var(--secondary); color: var(--secondary-foreground); }
.button-outline { background-color: transparent; border: 1px solid var(--input); color: var(--foreground); }
.button-outline:hover { background-color: var(--muted); }
.button-destructive { background-color: var(--destructive); color: var(--destructive-foreground); }


.tabs-list {
  display: inline-flex; height: 2.5rem; align-items: center; justify-content: center; border-radius: var(--radius);
  background-color: var(--muted); padding: 0.25rem; color: var(--muted-foreground);
}
.mode-switch-tabs {
  display: flex;
  width: 100%;
  max-width: none;
  margin: 0.25rem 0 0;
}
.mode-switch-tabs .tabs-trigger {
  flex: 1 1 0%;
}
.tabs-trigger {
  display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; border-radius: calc(var(--radius) - 2px);
  padding: 0.25rem 0.75rem; font-size: 0.875rem; font-weight: 500; transition: all 0.15s; background: transparent; border: none; color: inherit; cursor: pointer; height: 100%;
}
.tabs-trigger.active { background-color: var(--background); color: var(--foreground); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); font-weight: 700; }


.feat-card {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    border: 1px solid var(--border); border-radius: calc(var(--radius) - 2px); padding: 0.75rem 0.25rem;
    background: transparent; color: var(--muted-foreground); cursor: pointer; transition: all 0.15s;
}
.feat-card:hover { background: var(--muted); color: var(--foreground); }
.feat-card.active {
    background: var(--primary); color: var(--primary-foreground); border-color: var(--primary);
}


.style-btn {
    width: 2.75rem; height: 2.75rem; display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--border); border-radius: calc(var(--radius) - 2px); background: transparent;
    color: var(--muted-foreground); cursor: pointer; transition: all 0.15s;
}
.style-btn:hover { background: var(--muted); color: var(--foreground); }
.style-btn.active {
    border: 2px solid var(--primary); background: transparent; color: var(--foreground); box-shadow: 0 2px 4px rgba(0,0,0,0.05); padding: 0;
}


.color-swatch { -webkit-appearance: none; appearance: none; width: 2.2rem; height: 2.2rem; border: 1px solid var(--input); border-radius: calc(var(--radius) - 2px); cursor: pointer; padding: 0; background: transparent;}
.color-swatch::-webkit-color-swatch { border: none; border-radius: calc(var(--radius) - 4px); }
.color-swatch::-webkit-color-swatch-wrapper { padding: 3px; }

#qr-code canvas { width: 100% !important; height: 100% !important; object-fit: contain; }

.header-icon {
  width: 32px; height: 32px; border-radius: 8px; background: var(--primary); color: white; display: flex; align-items: center; justify-content: center;
}
.icon-lucide { font-family: 'lucide'; line-height: 1; -webkit-font-smoothing: antialiased; }


.ts-wrapper { z-index: 50 !important; }
.ts-control { border: 1px solid var(--border) !important; border-radius: calc(var(--radius) - 2px) !important; padding: 0 0.75rem !important; min-height: 2.75rem !important; display: flex !important; align-items: center !important; background: #ffffff !important; font-size: 0.875rem !important; color: var(--foreground) !important; font-family: inherit !important; box-shadow: 0 1px 2px rgba(0,0,0,0.05) !important;}
.ts-wrapper.single .ts-control { height: auto !important; }
.ts-control > .item { line-height: 1.2 !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: calc(100% - 20px); }
.ts-control.focus { border-color: var(--ring) !important; box-shadow: 0 0 0 1px var(--ring) !important; outline: none !important;}
.ts-dropdown { position: absolute !important; top: 100% !important; left: 0 !important; width: 100% !important; border: 1px solid var(--border) !important; border-radius: calc(var(--radius) - 2px) !important; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1) !important; z-index: 100 !important; font-family: inherit !important; margin-top: 4px !important; background: #ffffff !important; overflow: hidden !important;}
.ts-dropdown .option { padding: 0.5rem 0.75rem !important; font-size: 0.875rem !important; }
.ts-dropdown .option:hover, .ts-dropdown .option.active { background: var(--muted) !important; color: var(--foreground) !important; }


.lang-option { padding: 0.5rem 0.75rem; font-size: 0.875rem; cursor: pointer; transition: background 0.15s; }
.lang-option:hover { background-color: var(--muted); }


.emoji-btn {
  font-size: 1.4rem; text-align: center; border: none; border-radius: calc(var(--radius) - 2px); width: 100%; height: 36px; cursor: pointer; transition: background 0.15s; background: transparent; user-select: none; display: flex; align-items: center; justify-content: center;
}
.emoji-btn:hover { background: var(--muted); }
.emoji-btn.selected { background: var(--secondary); outline: 2px solid var(--primary); outline-offset: -2px; }

.emoji-cat-btn {
  flex: 1; display: flex; align-items: center; justify-content: center; height: 36px; font-size: 1.25rem; border-radius: var(--radius); background: transparent; border: none; cursor: pointer; transition: all 0.15s; padding: 0; outline: none;
}
.emoji-cat-btn:hover { background: rgba(0,0,0,.06); }
.emoji-cat-btn.active { background: white; box-shadow: 0 1px 3px rgba(0,0,0,.15); }

.emoji-btn:focus, .emoji-cat-btn:focus { outline: none; }

#emoji-list { max-height: 180px !important; overflow-y: auto !important; overflow-x: hidden !important; }
#emoji-list::-webkit-scrollbar { width: 4px; }
#emoji-list::-webkit-scrollbar-track { background: transparent; }
#emoji-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
#emoji-list::-webkit-scrollbar-thumb:hover { background: var(--muted-foreground); }

.ts-wrapper.input { border: none !important; padding: 0 !important; background: transparent !important; box-shadow: none !important; height: auto !important; }
