/* ============================================================
   AlmiCode — Gerador de Link WhatsApp & QR Code
   Design System: Dark Futuristic Glassmorphism + WhatsApp UI
   ============================================================ */

:root {
  --bg-primary: #07090e;
  --bg-secondary: #0d0f18;
  --bg-card: rgba(14, 16, 26, 0.88);
  --bg-card-hover: rgba(20, 24, 38, 0.95);
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-focus: #00e5ff;

  --text-primary: #f0f3fa;
  --text-secondary: #9aa1b9;
  --text-muted: #5e6482;

  --accent-cyan: #00e5ff;
  --accent-violet: #8b5cf6;
  --accent-green: #10b981;
  --accent-orange: #f59e0b;
  --accent-rose: #f43f5e;

  /* WhatsApp Brand Palette */
  --wa-green: #25d366;
  --wa-green-hover: #20bd5a;
  --wa-dark-green: #075e54;
  --wa-teal: #128c7e;
  --wa-bubble-out: #005c4b;
  --wa-bg-chat: #0b141a;
  --wa-chat-header: #1f2c34;
  --wa-blue-check: #53bdeb;

  --gradient-main: linear-gradient(135deg, #00e5ff 0%, #8b5cf6 100%);
  --gradient-whatsapp: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
  --gradient-card: linear-gradient(135deg, rgba(0, 229, 255, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Outfit', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
}

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

html {
  scroll-behavior: smooth;
}

/* Skip to content (a11y) */
.skip-to-content {
  position: absolute;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--wa-green);
  color: #07090e;
  padding: 0.65rem 1.25rem;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  font-weight: 700;
  font-size: 0.85rem;
  z-index: 99999;
  text-decoration: none;
  transition: top 0.2s ease;
}

.skip-to-content:focus {
  top: 0;
}

/* Global Slim & Elegant Scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(37, 211, 102, 0.35) rgba(255, 255, 255, 0.02);
}

*::-webkit-scrollbar {
  width: 6px;
  height: 5px;
}

*::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 9999px;
}

*::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, rgba(37, 211, 102, 0.35), rgba(0, 229, 255, 0.35));
  border-radius: 9999px;
  border: 1px solid rgba(37, 211, 102, 0.12);
  transition: all 0.2s ease;
}

*::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, rgba(37, 211, 102, 0.75), rgba(0, 229, 255, 0.75));
  box-shadow: 0 0 10px rgba(37, 211, 102, 0.45);
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 12% 15%, rgba(37, 211, 102, 0.07) 0%, transparent 45%),
    radial-gradient(circle at 88% 65%, rgba(0, 229, 255, 0.06) 0%, transparent 50%);
  background-attachment: fixed;
}

/* ============================================================
   App Hero Header
   ============================================================ */
.app-hero {
  text-align: center;
  padding: 2.75rem 1.5rem 1.5rem;
  max-width: 1000px;
  margin: 0 auto;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.95rem;
  border-radius: var(--radius-full);
  background: rgba(37, 211, 102, 0.1);
  border: 1px solid rgba(37, 211, 102, 0.3);
  color: var(--wa-green);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
  box-shadow: 0 0 20px rgba(37, 211, 102, 0.15);
}

.app-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 4.5vw, 3.25rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1rem;
  letter-spacing: -0.5px;
}

.gradient-text {
  background: linear-gradient(135deg, #25d366 20%, #00e5ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.app-hero p {
  color: var(--text-secondary);
  font-size: clamp(0.95rem, 2vw, 1.12rem);
  max-width: 780px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ============================================================
   Main Layout & Grid System
   ============================================================ */
.main-wrapper {
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding: 0 1.25rem 4rem;
  flex: 1;
}

.generator-grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 1.75rem;
  align-items: start;
}

@media (max-width: 1024px) {
  .generator-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* ============================================================
   Panel Card Base Styling
   ============================================================ */
.panel-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.55);
  position: relative;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-glass);
}

.panel-title {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  min-width: 0;
}

.panel-title span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.panel-title svg {
  color: var(--wa-green);
  flex-shrink: 0;
}

.panel-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

@media screen and (max-width: 580px) {
  .panel-card {
    padding: 1.25rem 1rem;
  }
  .main-wrapper {
    padding: 0 0.85rem 3rem;
  }
  .panel-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
  .panel-title {
    font-size: 1.1rem;
    width: 100%;
  }
  .panel-title span {
    white-space: normal;
  }
  .panel-actions {
    width: 100%;
    display: flex;
    justify-content: flex-start;
    gap: 0.5rem;
  }
}

.btn-subtle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-subtle:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.18);
}

/* ============================================================
   Form Inputs & Controls
   ============================================================ */
.form-section-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--accent-cyan);
  margin-bottom: 1rem;
}

/* Section completion check */
.section-check {
  display: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--wa-green);
  color: #07090e;
  font-size: 0.65rem;
  font-weight: 900;
  line-height: 18px;
  text-align: center;
  margin-left: 0.35rem;
  animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 0 10px rgba(37, 211, 102, 0.4);
}

.section-check.visible {
  display: inline-block;
}

.section-check.visible::after {
  content: '\2713';
}

/* Optional badge */
.section-badge-optional {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-left: 0.35rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.form-group label .required {
  color: var(--accent-rose);
}

.field-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Phone input row */
.phone-input-row {
  display: grid;
  grid-template-columns: 140px 90px 1fr;
  gap: 0.75rem;
  align-items: start;
}

/* Non-Brazil (selected country, no DDD needed) */
.phone-input-row.non-br {
  grid-template-columns: 150px 1fr;
}

.phone-input-row.non-br #dddWrap {
  display: none !important;
}

.phone-input-row.non-br .form-group-custom-ddi {
  display: none !important;
}

/* Custom DDI mode ("Outro" selected): País + DDI + Número */
.phone-input-row.custom-ddi {
  grid-template-columns: 130px 85px 1fr;
}

.phone-input-row.custom-ddi #dddWrap {
  display: none !important;
}

.phone-input-row.custom-ddi .form-group-custom-ddi {
  display: flex !important;
}

.form-group-ddd input {
  text-align: center;
  font-weight: 700;
  letter-spacing: 1px;
}

.form-group-custom-ddi {
  display: none;
}

.form-group-custom-ddi input {
  text-align: center;
  font-weight: 700;
  letter-spacing: 0.5px;
  font-family: var(--font-mono);
}

/* Hide number input spinners for DDI */
.form-group-custom-ddi input[type="number"]::-webkit-outer-spin-button,
.form-group-custom-ddi input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.form-group-custom-ddi input[type="number"] {
  -moz-appearance: textfield;
}

@media (max-width: 640px) {
  .phone-input-row {
    grid-template-columns: 120px 80px 1fr;
    gap: 0.5rem;
  }
  .phone-input-row.non-br {
    grid-template-columns: 120px 1fr;
  }
  .phone-input-row.custom-ddi {
    grid-template-columns: 110px 75px 1fr;
  }
}

@media (max-width: 440px) {
  .phone-input-row {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }
  .form-group-country {
    grid-column: 1 / -1;
  }
  .phone-input-row.non-br {
    grid-template-columns: 1fr;
  }
  .phone-input-row.non-br .form-group-country {
    grid-column: auto;
  }
  .phone-input-row.custom-ddi {
    grid-template-columns: 1fr 1fr;
  }
  .phone-input-row.custom-ddi .form-group-country {
    grid-column: 1 / -1;
  }
  .phone-input-row.custom-ddi .form-group-custom-ddi {
    grid-column: 1;
  }
  .phone-input-row.custom-ddi .form-group-number {
    grid-column: 2;
  }
}

.select-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.select-wrapper select {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  background: rgba(18, 22, 34, 0.95);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  border-radius: var(--radius-md);
  padding: 0.75rem 2.2rem 0.75rem 0.85rem;
  font-size: 0.9rem;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all 0.2s ease;
}

.select-wrapper select:focus {
  outline: none;
  border-color: var(--wa-green);
  box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.2);
}

.select-arrow {
  position: absolute;
  right: 0.85rem;
  pointer-events: none;
  color: var(--text-muted);
}

.phone-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.phone-input-wrap input {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

@keyframes inputShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

.input-shake {
  animation: inputShake 0.4s ease-in-out !important;
  border-color: var(--accent-rose) !important;
  box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.3) !important;
}

/* Focus-visible styles for keyboard navigation */
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--wa-green);
  outline-offset: 2px;
}

input:focus:not(:focus-visible),
textarea:focus:not(:focus-visible),
select:focus:not(:focus-visible),
button:focus:not(:focus-visible),
a:focus:not(:focus-visible) {
  outline: none;
}

/* Valid state indicator for inputs */
.input-valid {
  border-color: rgba(16, 185, 129, 0.5) !important;
}

.input-valid + .field-hint {
  color: var(--accent-green) !important;
}

input[type="text"],
input[type="tel"],
input[type="number"],
textarea {
  width: 100%;
  background: rgba(18, 22, 34, 0.95);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.92rem;
  transition: all 0.2s ease;
}

input[type="text"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus,
textarea:focus {
  outline: none;
  border-color: var(--wa-green);
  box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.2);
  background: rgba(22, 28, 44, 0.95);
}

/* Custom DDI input */
.input-prefix-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-prefix-wrap .prefix {
  position: absolute;
  left: 0.85rem;
  color: var(--text-secondary);
  font-weight: 700;
}

.input-prefix-wrap input {
  padding-left: 1.85rem;
}

/* ============================================================
   Templates Bar
   ============================================================ */
.templates-section {
  margin-bottom: 1rem;
}

.templates-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.template-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.template-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.template-chip:hover {
  background: rgba(37, 211, 102, 0.12);
  border-color: rgba(37, 211, 102, 0.35);
  color: #fff;
  transform: translateY(-1px);
}

.template-chip.active {
  background: rgba(37, 211, 102, 0.2);
  border-color: var(--wa-green);
  color: var(--wa-green);
  font-weight: 600;
}

/* ============================================================
   WhatsApp Text Editor & Formatting Bar
   ============================================================ */
.editor-container {
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  background: rgba(18, 22, 34, 0.95);
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.editor-container:focus-within {
  border-color: var(--wa-green);
  box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.2);
}

.editor-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border-glass);
  flex-wrap: wrap;
  gap: 0.5rem;
}

.toolbar-formatting {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.btn-tool-format {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-tool-format:hover {
  background: rgba(37, 211, 102, 0.2);
  border-color: var(--wa-green);
  color: var(--wa-green);
}

.btn-tool-format code {
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.toolbar-emojis {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.btn-tool-emoji {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: transparent;
  border: 1px solid transparent;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.btn-tool-emoji:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-glass);
  transform: scale(1.15);
}

.editor-container textarea {
  border: none;
  background: transparent;
  border-radius: 0;
  padding: 0.85rem 1rem;
  resize: vertical;
  min-height: 120px;
  box-shadow: none;
  font-size: 0.95rem;
  line-height: 1.5;
}

.editor-container textarea:focus {
  border: none;
  box-shadow: none;
  background: transparent;
}

.editor-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.95rem;
  background: rgba(255, 255, 255, 0.02);
  border-top: 1px solid var(--border-glass);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.char-counter {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

.char-counter.char-warning {
  color: var(--accent-orange);
}

.char-counter.char-danger {
  color: var(--accent-rose);
}

/* ============================================================
   Radio Pills for Link Format
   ============================================================ */
.link-format-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

@media (max-width: 600px) {
  .link-format-toggle {
    grid-template-columns: 1fr;
  }
}

.radio-pill {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  background: rgba(18, 22, 34, 0.7);
  cursor: pointer;
  transition: all 0.2s ease;
}

.radio-pill:hover {
  background: rgba(25, 30, 48, 0.85);
  border-color: rgba(255, 255, 255, 0.15);
}

.radio-pill.active {
  border-color: var(--wa-green);
  background: rgba(37, 211, 102, 0.08);
  box-shadow: 0 0 15px rgba(37, 211, 102, 0.1);
}

.radio-pill input[type="radio"] {
  accent-color: var(--wa-green);
  margin-top: 0.2rem;
}

.radio-pill-content {
  display: flex;
  flex-direction: column;
}

.radio-pill-content strong {
  font-size: 0.88rem;
  color: #fff;
}

.radio-pill-content span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ============================================================
   Saved Links Accordion
   ============================================================ */
.saved-links-wrap {
  margin-top: 1.5rem;
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.02);
  overflow: hidden;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.saved-links-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  cursor: pointer;
  user-select: none;
  transition: background 0.2s ease;
  width: 100%;
  box-sizing: border-box;
}

.saved-links-header:hover {
  background: rgba(255, 255, 255, 0.05);
}

.saved-links-title {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  min-width: 0;
}

.saved-links-title svg {
  color: var(--wa-green);
  flex-shrink: 0;
}

.accordion-arrow {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  color: var(--text-muted);
  flex-shrink: 0;
}

.saved-links-wrap.open .accordion-arrow {
  transform: rotate(180deg);
  color: var(--wa-green);
}

.saved-links-body {
  display: none;
  padding: 0.75rem 0.85rem;
  border-top: 1px solid var(--border-glass);
  max-height: 260px;
  overflow-y: auto;
  overflow-x: hidden;
  width: 100%;
  box-sizing: border-box;
}

.saved-links-wrap.open .saved-links-body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  animation: savedLinksFadeIn 0.2s ease-out;
}

@keyframes savedLinksFadeIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.saved-link-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.8rem;
  border-radius: var(--radius-sm);
  background: rgba(18, 22, 34, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.8rem;
  transition: all 0.2s ease;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.saved-link-item:hover {
  background: rgba(26, 32, 50, 0.95);
  border-color: rgba(37, 211, 102, 0.25);
  transform: translateY(-1px);
}

.saved-link-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.saved-link-phone {
  font-weight: 700;
  color: var(--wa-green);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.saved-link-msg {
  color: var(--text-muted);
  font-size: 0.75rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
  max-width: 100%;
  display: block;
}

.saved-link-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.btn-icon-subtle {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  cursor: pointer;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.btn-icon-subtle:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

.btn-icon-subtle.btn-load-saved:hover {
  color: #00e5ff;
  border-color: rgba(0, 229, 255, 0.35);
  background: rgba(0, 229, 255, 0.1);
}

.btn-icon-subtle.btn-copy-saved:hover {
  color: var(--wa-green);
  border-color: rgba(37, 211, 102, 0.35);
  background: rgba(37, 211, 102, 0.1);
}

.btn-icon-subtle.btn-delete-saved:hover {
  color: #ff4757;
  border-color: rgba(255, 71, 87, 0.35);
  background: rgba(255, 71, 87, 0.1);
}

@media (max-width: 520px) {
  .saved-links-wrap {
    margin-top: 1.25rem;
  }

  .saved-links-header {
    padding: 0.75rem 0.85rem;
  }

  .saved-links-body {
    padding: 0.65rem 0.65rem;
    max-height: 340px;
  }

  .saved-link-item {
    flex-direction: column;
    align-items: stretch;
    gap: 0.6rem;
    padding: 0.75rem;
    background: rgba(14, 18, 28, 0.9);
  }

  .saved-link-info {
    width: 100%;
  }

  .saved-link-phone {
    font-size: 0.85rem;
  }

  .saved-link-msg {
    font-size: 0.78rem;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.35;
  }

  .saved-link-actions {
    justify-content: flex-end;
    gap: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 0.45rem;
    width: 100%;
  }

  .btn-icon-subtle {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.06);
  }
}

/* ============================================================
   RIGHT COLUMN: Results & Smartphone Mockup
   ============================================================ */
.results-column {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  position: sticky;
  top: 80px;
  align-self: start;
}

@media (max-width: 1024px) {
  .results-column {
    position: static;
  }
}

/* Smartphone Mockup Frame */
.phone-mockup-wrapper {
  display: flex;
  justify-content: center;
  width: 100%;
}

.phone-frame {
  width: 100%;
  max-width: 390px;
  border-radius: 42px;
  background: #000;
  border: 4px solid #2a2f3f;
  box-shadow: 
    0 25px 60px -15px rgba(0, 0, 0, 0.9),
    0 0 40px rgba(37, 211, 102, 0.15);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Top bar / Dynamic Island */
.phone-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.4rem 0.4rem;
  background: var(--wa-chat-header);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
}

.phone-island {
  width: 90px;
  height: 22px;
  background: #000;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.island-camera {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #111;
  border: 1px solid #222;
}

.island-speaker {
  width: 32px;
  height: 4px;
  background: #1a1a1a;
  border-radius: 4px;
}

.phone-status-icons {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

/* WhatsApp Chat Header */
.wa-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.85rem;
  background: var(--wa-chat-header);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.wa-header-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow: hidden;
}

.wa-back-icon {
  color: #aebac1;
  flex-shrink: 0;
  cursor: pointer;
}

.wa-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--wa-teal), var(--wa-green));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-family: var(--font-display);
  font-size: 1.05rem;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.wa-contact-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.wa-contact-name {
  color: #e9edef;
  font-size: 0.95rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wa-contact-status {
  color: #8696a0;
  font-size: 0.72rem;
}

.wa-header-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  color: #aebac1;
}

/* Chat Body */
.wa-chat-body {
  background-color: var(--wa-bg-chat);
  /* Classic subtle doodle wallpaper pattern simulation */
  background-image: 
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    radial-gradient(circle at 20% 20%, rgba(37, 211, 102, 0.03) 1px, transparent 1px);
  background-size: 24px 24px;
  padding: 1.25rem 1rem;
  min-height: 240px;
  max-height: 320px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.wa-date-pill {
  align-self: center;
  background: rgba(17, 27, 33, 0.9);
  color: #8696a0;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: 8px;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

/* Bubble */
.wa-bubble-wrap {
  display: flex;
  justify-content: flex-end;
  width: 100%;
}

.wa-bubble {
  max-width: 85%;
  background: var(--wa-bubble-out);
  color: #e9edef;
  padding: 0.65rem 0.85rem 0.45rem;
  border-radius: 12px 0 12px 12px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  position: relative;
  word-break: break-word;
  animation: popIn 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
  0% { transform: scale(0.95); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.wa-bubble-text {
  font-size: 0.92rem;
  line-height: 1.45;
  white-space: pre-wrap;
}

.wa-bubble-text strong {
  font-weight: 700;
  color: #fff;
}

.wa-bubble-text em {
  font-style: italic;
}

.wa-bubble-text del {
  text-decoration: line-through;
  opacity: 0.8;
}

.wa-bubble-text code {
  font-family: var(--font-mono);
  background: rgba(0, 0, 0, 0.2);
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
  font-size: 0.85rem;
}

.wa-bubble-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.25rem;
  margin-top: 0.3rem;
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.6);
}

.wa-double-check {
  display: inline-flex;
}

/* Bottom Input Bar Mock */
.wa-input-bar {
  background: var(--wa-chat-header);
  padding: 0.6rem 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.wa-input-pill {
  flex: 1;
  background: #2a3942;
  border-radius: 24px;
  padding: 0.55rem 0.9rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #8696a0;
  font-size: 0.85rem;
}

.wa-mic-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--wa-green);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* ============================================================
   Result Panel & Generated Link Actions
   ============================================================ */
.result-panel {
  border-color: rgba(37, 211, 102, 0.2);
  background: linear-gradient(180deg, rgba(14, 16, 26, 0.95) 0%, rgba(9, 14, 20, 0.95) 100%);
}

.result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.result-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.live-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--wa-green);
  box-shadow: 0 0 10px var(--wa-green);
  animation: pulseLive 2s infinite;
}

@keyframes pulseLive {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(37, 211, 102, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

.result-header h4 {
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 700;
  color: #fff;
}

.badge-status-ready {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  background: rgba(37, 211, 102, 0.15);
  border: 1px solid rgba(37, 211, 102, 0.35);
  color: var(--wa-green);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Link Display Box */
.link-display-box {
  display: flex;
  align-items: center;
  background: rgba(7, 9, 14, 0.9);
  border: 1px solid rgba(37, 211, 102, 0.35);
  border-radius: var(--radius-md);
  padding: 0.35rem 0.45rem 0.35rem 0.95rem;
  margin-bottom: 1.25rem;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.5);
}

.link-display-box input {
  flex: 1;
  background: transparent;
  border: none;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  padding: 0.5rem 0;
  box-shadow: none;
  text-overflow: ellipsis;
}

.link-display-box input:focus {
  border: none;
  box-shadow: none;
  background: transparent;
}

.btn-copy-input {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-sm);
  background: rgba(37, 211, 102, 0.15);
  border: 1px solid rgba(37, 211, 102, 0.35);
  color: var(--wa-green);
  font-weight: 600;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.btn-copy-input:hover {
  background: var(--wa-green);
  color: #07090e;
  box-shadow: 0 0 15px rgba(37, 211, 102, 0.4);
}

.btn-copy-input.copied {
  background: var(--accent-green);
  color: #07090e;
  border-color: var(--accent-green);
}

/* Keyboard shortcut hint badge */
.kbd-hint {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  color: rgba(7, 9, 14, 0.8);
  line-height: 1.3;
  pointer-events: none;
}

@media (max-width: 768px) {
  .kbd-hint {
    display: none;
  }
}

/* Action Buttons Grid */
.action-buttons-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.btn-action-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.95rem 1.25rem;
  border-radius: var(--radius-md);
  background: var(--gradient-whatsapp);
  border: none;
  color: #07090e;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 8px 24px -6px rgba(37, 211, 102, 0.5);
  text-decoration: none;
}

.btn-action-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -4px rgba(37, 211, 102, 0.7);
  filter: brightness(1.05);
}

.btn-action-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(37, 211, 102, 0.3);
  color: #fff;
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-action-secondary:hover {
  background: rgba(37, 211, 102, 0.12);
  border-color: var(--wa-green);
  color: var(--wa-green);
}

.btn-action-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: transparent;
  border: 1px dashed var(--border-glass);
  color: var(--text-secondary);
  padding: 0.65rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-action-ghost:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  background: rgba(0, 229, 255, 0.05);
}

/* ============================================================
   QR Code Sub-Panel
   ============================================================ */
.qr-code-section {
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-glass);
}

.qr-code-header {
  margin-bottom: 1.25rem;
}

.qr-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
}

.qr-title-wrap svg {
  color: var(--accent-cyan);
}

.qr-subtitle {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.qr-display-container {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

@media (max-width: 600px) {
  .qr-display-container {
    flex-direction: column;
    text-align: center;
  }
}

.qr-card {
  background: #ffffff;
  padding: 1rem;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}

.qrcode-target {
  width: 160px;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qrcode-target img,
.qrcode-target canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

.qr-scan-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: #121b22;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.qr-actions-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
  width: 100%;
}

.btn-qr-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.85rem 1.15rem;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.2) 0%, rgba(139, 92, 246, 0.2) 100%);
  border: 1px solid rgba(0, 229, 255, 0.4);
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-qr-download:hover {
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.35) 0%, rgba(139, 92, 246, 0.35) 100%);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.25);
  transform: translateY(-1px);
}

.btn-qr-copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.75rem 1.15rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-qr-copy:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

/* ============================================================
   SEO Guide & FAQ Section
   ============================================================ */
.seo-guide-section {
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 1px solid var(--border-glass);
}

.seo-guide-header {
  text-align: center;
  max-width: 750px;
  margin: 0 auto 2.5rem;
}

.section-tag {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-cyan);
  letter-spacing: 1px;
  display: block;
  margin-bottom: 0.5rem;
}

.seo-guide-header h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.5vw, 2.3rem);
  font-weight: 800;
  margin-bottom: 0.75rem;
}

.seo-guide-header p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Steps Grid */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-bottom: 3.5rem;
}

.step-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  position: relative;
  transition: all 0.2s ease;
}

.step-card:hover {
  border-color: rgba(37, 211, 102, 0.3);
  transform: translateY(-3px);
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.6);
}

.step-number {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 800;
  color: rgba(37, 211, 102, 0.4);
  line-height: 1;
  margin-bottom: 0.75rem;
}

.step-card h4 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
}

.step-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* FAQ Accordion */
.faq-container {
  max-width: 860px;
  margin: 0 auto;
}

.faq-container h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 1.25rem;
  text-align: center;
}

.faq-accordion-item {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  margin-bottom: 0.75rem;
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.faq-accordion-item:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.35rem;
  background: transparent;
  border: none;
  color: #fff;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.faq-chevron {
  color: var(--text-muted);
  transition: transform 0.25s ease;
  flex-shrink: 0;
}

.faq-accordion-item.open .faq-chevron {
  transform: rotate(180deg);
  color: var(--wa-green);
}

.faq-answer {
  display: none;
  padding: 0 1.35rem 1.25rem;
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.6;
}

.faq-accordion-item.open .faq-answer {
  display: block;
}

.faq-answer strong {
  color: #fff;
}

.faq-answer code {
  font-family: var(--font-mono);
  background: rgba(255, 255, 255, 0.08);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  color: var(--accent-cyan);
}

/* ============================================================
   Cross-Sell Promo Box
   ============================================================ */
.promo-box {
  margin-top: 3.5rem;
  background: linear-gradient(135deg, rgba(37, 211, 102, 0.08) 0%, rgba(0, 229, 255, 0.08) 100%);
  border: 1px solid rgba(37, 211, 102, 0.25);
  border-radius: var(--radius-lg);
  padding: 2.25rem 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.6);
}

@media (max-width: 800px) {
  .promo-box {
    flex-direction: column;
    text-align: center;
    padding: 1.75rem;
  }
}

.promo-badge {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  background: rgba(0, 229, 255, 0.15);
  border: 1px solid rgba(0, 229, 255, 0.3);
  color: var(--accent-cyan);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.75rem;
}

.promo-content h4 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
}

.promo-content p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  max-width: 650px;
}

.btn-promo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.95rem 1.65rem;
  border-radius: var(--radius-full);
  background: var(--gradient-main);
  color: #07090e;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 8px 20px -4px rgba(0, 229, 255, 0.4);
}

.btn-promo:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 25px -2px rgba(0, 229, 255, 0.6);
}

/* ============================================================
   Site Footer
   ============================================================ */
.site-footer {
  text-align: center;
  padding: 2rem 1.5rem;
  border-top: 1px solid var(--border-glass);
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ============================================================
   Toast Notification
   ============================================================ */
.toast-notification {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 9999;
  background: rgba(14, 20, 28, 0.96);
  border: 1px solid var(--wa-green);
  color: #fff;
  padding: 0.85rem 1.35rem;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(37, 211, 102, 0.35);
  backdrop-filter: blur(12px);
  transform: translateY(120%);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast-notification.show {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.toast-notification svg {
  color: var(--wa-green);
  flex-shrink: 0;
}

.wa-avatar svg {
  width: 20px;
  height: 20px;
  color: #ffffff;
  display: block;
}

@media (max-width: 600px) {
  .toast-notification {
    bottom: 1.25rem;
    left: 1rem;
    right: 1rem;
    justify-content: center;
    font-size: 0.82rem;
    padding: 0.75rem 1rem;
  }
}
