/* 
   Shortcode Icons Design System
   Aesthetic: Warm Liquid Organic (Soft-Tech)
   A premium, borderless, fluid theme with soft gradients and large rounded corners.
*/

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@500;700&display=swap');

:root {
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Color Palette: Warm Organic Earth & Alabaster */
  --bg-main: #FCFAF7; /* Clean warm alabaster */
  --bg-card: rgba(255, 255, 255, 0.85); /* Semitransparent white sheet */
  --border-light: rgba(43, 34, 27, 0.04);
  --border-hover: rgba(43, 34, 27, 0.09);
  
  --primary: #224D30; /* Deep Organic Forest Pine */
  --primary-hover: #163320;
  --primary-light: rgba(34, 77, 48, 0.06);
  
  --secondary: #AB8358; /* Warm Soft Copper */
  --secondary-hover: #8D6740;
  --secondary-light: #FBF7F2;
  
  --accent: #D2765A; /* Soft Terracotta */
  --accent-light: #FDF3F0;
  
  --text-primary: #26211E; /* Organic Soft Black */
  --text-muted: #6C635B;
  --text-dark: #A59C94;

  /* Border Radii (Large & Fluid) */
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 32px;
  --radius-pill: 9999px;
  
  /* Soft, Diffuse Long-tail Shadows (No hard block shadows) */
  --shadow-sm: 0 8px 24px rgba(43, 34, 27, 0.02);
  --shadow-md: 0 16px 40px -10px rgba(43, 34, 27, 0.04);
  --shadow-lg: 0 32px 64px -16px rgba(43, 34, 27, 0.07);

  --transition-smooth: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset & Base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-family: var(--font-body);
  overflow-x: hidden;
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
}

/* Floating Background Blobs */
.bg-blob {
  position: fixed;
  border-radius: 50%;
  filter: blur(100px);
  z-index: -1;
  pointer-events: none;
  opacity: 0.65;
}

.blob-1 {
  top: -15%;
  left: -10%;
  width: 55vw;
  height: 55vw;
  background: radial-gradient(circle, #E4ECE9 0%, rgba(228, 236, 233, 0) 70%);
  animation: float-blob 28s infinite alternate ease-in-out;
}

.blob-2 {
  bottom: -10%;
  right: -5%;
  width: 48vw;
  height: 48vw;
  background: radial-gradient(circle, #F9EAE1 0%, rgba(249, 234, 225, 0) 70%);
  animation: float-blob 22s infinite alternate-reverse ease-in-out;
}

.blob-3 {
  top: 35%;
  left: 25%;
  width: 38vw;
  height: 38vw;
  background: radial-gradient(circle, #F6F0E5 0%, rgba(246, 240, 229, 0) 70%);
  animation: float-blob 34s infinite alternate ease-in-out;
}

@keyframes float-blob {
  0% {
    transform: translate(0, 0) scale(1) rotate(0deg);
  }
  50% {
    transform: translate(4vw, 5vh) scale(1.08) rotate(120deg);
  }
  100% {
    transform: translate(-3vw, -4vh) scale(0.92) rotate(240deg);
  }
}

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 2rem;
  position: relative;
  z-index: 1;
}

/* Header */
header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: var(--shadow-sm);
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

header.scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.7);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
  transition: padding 0.3s ease;
}

header.scrolled .header-inner {
  padding: 0.75rem 2rem;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.logo-icon {
  background: var(--primary);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 8px 20px rgba(34, 77, 48, 0.18);
}

.logo-text {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.logo-text strong {
  font-weight: 800;
  color: var(--primary);
}

.nav-links {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.nav-links button {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.6);
  color: var(--text-primary);
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
}

.nav-links button:hover {
  background: white;
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-coffee-header {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.6);
  color: var(--text-primary);
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-coffee-header:hover {
  background: white;
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  color: var(--text-primary);
}

.nav-links button.btn-share-trigger {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  box-shadow: 0 8px 20px rgba(34, 77, 48, 0.15);
}

.nav-links button.btn-share-trigger:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  box-shadow: 0 12px 24px rgba(34, 77, 48, 0.25);
}

/* Mobile Header wrapping */
@media (max-width: 640px) {
  header {
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    text-align: center;
    margin-bottom: 3.5rem;
    border-radius: var(--radius-md);
    padding: 1.25rem;
  }
  .nav-links {
    width: 100%;
    justify-content: center;
  }
  .nav-links button {
    flex-grow: 1;
    max-width: 150px;
    font-size: 0.85rem;
    padding: 0.6rem 1rem;
  }
}

/* Hero Section */
.hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 6rem;
  align-items: center;
  margin-bottom: 7rem;
}

@media (max-width: 968px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 4.5rem;
    text-align: center;
  }
}

.hero-content h1 {
  font-size: 4rem;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
}

@media (max-width: 640px) {
  .hero-content h1 {
    font-size: 2.8rem;
  }
}

.hero-content p {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 3.5rem;
  max-width: 600px;
}

@media (max-width: 968px) {
  .hero-content p {
    margin-left: auto;
    margin-right: auto;
  }
}

.hero-stats {
  display: flex;
  gap: 3.5rem;
  margin-bottom: 3.5rem;
}

@media (max-width: 968px) {
  .hero-stats {
    justify-content: center;
  }
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.stat-val {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
}

.stat-lbl {
  font-size: 0.88rem;
  color: var(--text-muted);
  font-weight: 600;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

@media (max-width: 968px) {
  .hero-cta {
    justify-content: center;
  }
}

.btn-primary {
  background: var(--primary);
  color: white;
  border: none;
  padding: 0.95rem 2.2rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(34, 77, 48, 0.2);
  transition: var(--transition-smooth);
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-3px);
  box-shadow: 0 16px 32px rgba(34, 77, 48, 0.3);
}

.btn-secondary {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.6);
  color: var(--text-primary);
  padding: 0.95rem 2.2rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.btn-secondary:hover {
  background: white;
  border-color: var(--border-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

/* Smartphone Mockup */
.phone-mockup-container {
  display: flex;
  justify-content: center;
  align-items: center;
}

.phone-outer {
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 48px;
  width: 315px;
  height: 570px;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition-smooth);
}

.phone-header {
  height: 42px;
  background: rgba(255, 255, 255, 0.4);
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.phone-dynamic-island {
  background: rgba(43, 34, 27, 0.12);
  width: 75px;
  height: 12px;
  border-radius: var(--radius-pill);
}

.phone-view-toggle {
  background: rgba(255, 255, 255, 0.35);
  padding: 8px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.toggle-pill {
  background: rgba(255, 255, 255, 0.5);
  border: none;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: var(--transition-smooth);
  width: 48%;
  box-shadow: var(--shadow-sm);
}

.toggle-pill.active {
  background: var(--primary);
  color: white;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(34, 77, 48, 0.18);
}

.phone-screen {
  flex-grow: 1;
  background: rgba(255, 255, 255, 0.25);
  padding: 14px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.phone-screen::-webkit-scrollbar {
  display: none;
}

.phone-chat-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 4px 12px rgba(43, 34, 27, 0.015);
  border: 1px solid rgba(255, 255, 255, 0.5);
  transition: var(--transition-smooth);
}

.phone-chat-avatar {
  width: 38px;
  height: 38px;
  position: relative;
  flex-shrink: 0;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.avatar-contact {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: -0.02em;
}

.avatar-boring, .avatar-branded {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.avatar-boring {
  background: #ECEAE4;
  color: var(--text-muted);
  opacity: 1;
  transform: scale(1);
}

.avatar-boring svg {
  width: 20px;
  height: 20px;
  fill: var(--text-muted);
}

.avatar-branded {
  opacity: 0;
  transform: scale(0.8);
}

.avatar-branded canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.phone-outer.branded-mode .avatar-boring {
  opacity: 0;
  transform: scale(0.8);
}

.phone-outer.branded-mode .avatar-branded {
  opacity: 1;
  transform: scale(1);
}

.phone-chat-info {
  flex-grow: 1;
  min-width: 0;
}

.phone-chat-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
  position: relative;
  height: 1.25rem;
  overflow: hidden;
}

.name-boring, .name-branded {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-primary);
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.name-branded {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  opacity: 0;
  transform: translateY(8px);
}

.phone-outer.branded-mode .name-boring {
  opacity: 0;
  transform: translateY(-8px);
}

.phone-outer.branded-mode .name-branded {
  opacity: 1;
  transform: translateY(0);
}

.phone-chat-msg {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.phone-chat-time {
  font-size: 0.7rem;
  color: var(--text-dark);
  align-self: flex-start;
  margin-top: 2px;
}

/* Controls Panel (Search & Filter) */
.controls-panel {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 3rem;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.search-and-stats {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
}

@media (max-width: 640px) {
  .search-and-stats {
    flex-direction: column;
    align-items: stretch;
  }
}

.search-box {
  position: relative;
  flex-grow: 1;
}

.search-box svg {
  position: absolute;
  left: 18px;
  top: calc(50% - 10px);
  fill: var(--text-muted);
  width: 20px;
  height: 20px;
}

.search-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--radius-pill);
  color: var(--text-primary);
  padding: 0.85rem 1rem 0.85rem 3.2rem;
  font-family: var(--font-body);
  font-size: 0.98rem;
  box-shadow: inset 0 2px 4px rgba(43, 34, 27, 0.01);
  transition: var(--transition-smooth);
}

.search-input:focus {
  outline: none;
  background: white;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-light), var(--shadow-sm);
}

.bulk-actions-toggle {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
}

.bulk-actions-toggle input[type="checkbox"] {
  appearance: none;
  width: 16px;
  height: 16px;
  border: 2px solid var(--text-dark);
  border-radius: 4px;
  outline: none;
  cursor: pointer;
  position: relative;
  transition: var(--transition-smooth);
}

.bulk-actions-toggle input[type="checkbox"]:checked {
  background: var(--primary);
  border-color: var(--primary);
}

.bulk-actions-toggle input[type="checkbox"]:checked::after {
  content: '✓';
  position: absolute;
  color: white;
  font-size: 10px;
  font-weight: 800;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.category-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.filter-chip {
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.6);
  color: var(--text-muted);
  padding: 0.55rem 1.4rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
  box-shadow: var(--shadow-sm);
}

.filter-chip:hover {
  background: white;
  border-color: var(--border-hover);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.filter-chip.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(34, 77, 48, 0.18);
}

/* Directory Grid */
.directory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 2rem;
  margin-bottom: 7rem;
}

/* Elegant Borderless Card */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: var(--shadow-md);
  transition: var(--transition-smooth);
  cursor: pointer;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg), 0 16px 28px rgba(34, 77, 48, 0.03);
}

.card.selected {
  background: rgba(255, 255, 255, 0.95);
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary), var(--shadow-lg);
}

.card-select-wrapper {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 2;
  display: none;
}

body.select-mode .card-select-wrapper {
  display: block;
}

.card-checkbox {
  appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid var(--text-dark);
  border-radius: 6px;
  outline: none;
  cursor: pointer;
  background: white;
  position: relative;
  transition: var(--transition-smooth);
}

.card-checkbox:checked {
  background-color: var(--primary);
  border-color: var(--primary);
}

.card-checkbox:checked::after {
  content: '✓';
  position: absolute;
  color: white;
  font-size: 12px;
  font-weight: 800;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 1.15rem;
  margin-bottom: 1.4rem;
}

.card-logo {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.card-logo canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.card-brand-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 0.15rem;
}

.card-brand-name {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
}

.badge-container {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.card-badge {
  font-size: 0.72rem;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  font-weight: 600;
}

.card-badge.cat {
  background: var(--primary-light);
  color: var(--primary);
}

.card-badge.shortcodes {
  background: rgba(43, 34, 27, 0.04);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.68rem;
}

.card-sms-preview {
  background: rgba(43, 34, 27, 0.02);
  border-radius: var(--radius-md);
  padding: 1rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.card-sms-header {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  justify-content: space-between;
}

.card-sms-header .sms-sender {
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

.card-actions {
  display: flex;
  gap: 0.6rem;
}

.btn-card-action {
  flex-grow: 1;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.8);
  color: var(--text-primary);
  padding: 0.65rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
}

.btn-card-action:hover {
  background: white;
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-card-action.main {
  background: var(--primary-light);
  color: var(--primary);
  border-color: transparent;
}

.btn-card-action.main:hover {
  background: var(--primary);
  color: white;
  box-shadow: 0 8px 18px rgba(34, 77, 48, 0.2);
}

.btn-icon-only {
  width: 38px;
  height: 38px;
  flex-grow: 0;
  padding: 0;
}



/* Floating Actions Bar (Capsule design) */
.floating-bar {
  position: fixed;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(150px);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  padding: 0.85rem 1.8rem;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  gap: 2rem;
  box-shadow: var(--shadow-lg);
  z-index: 100;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.floating-bar.visible {
  transform: translateX(-50%) translateY(0);
}

.floating-count {
  font-size: 0.98rem;
  font-weight: 700;
}

.floating-count span {
  color: var(--primary);
  font-weight: 800;
}

.batch-selected-logos {
  display: flex;
  align-items: center;
  gap: 4px;
  max-width: 180px;
  overflow-x: auto;
  padding-right: 12px;
  border-right: 1px solid rgba(0, 0, 0, 0.1);
  scrollbar-width: none;
}

.batch-selected-logos::-webkit-scrollbar {
  display: none;
}

.tiny-batch-logo {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  flex-shrink: 0;
}

.floating-buttons {
  display: flex;
  gap: 0.85rem;
}

.floating-buttons button {
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}

/* Footer styling */
footer {
  margin-top: 7rem;
  padding: 3rem 0;
  border-top: 1px solid rgba(43, 34, 27, 0.04);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 500;
}

.footer-links {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.footer-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0;
  transition: var(--transition-smooth);
}

.footer-btn:hover {
  color: var(--primary);
  text-decoration: underline;
}

.footer-link-highlight {
  color: var(--secondary);
  font-weight: 700;
  text-decoration: none;
  transition: var(--transition-smooth);
}

.footer-link-highlight:hover {
  color: var(--secondary-hover);
  text-decoration: underline;
}

.divider {
  color: rgba(43, 34, 27, 0.08);
}

@media (max-width: 640px) {
  footer {
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
  }
}

/* Modals & Dialogs (Borderless Soft overlays) */
dialog {
  margin: auto;
  border: none;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  color: var(--text-primary);
  width: 90%;
  max-width: 520px;
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
  
  opacity: 0;
  transform: scale(0.95) translateY(15px);
  transition-property: opacity, transform, display, overlay;
  transition-duration: 0.35s;
  transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
  transition-behavior: allow-discrete;
}

dialog[open] {
  opacity: 1;
  transform: scale(1) translateY(0);
  
  @starting-style {
    opacity: 0;
    transform: scale(0.95) translateY(15px);
  }
}

dialog::backdrop {
  background-color: rgba(43, 34, 27, 0);
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  transition:
    display 0.35s allow-discrete,
    overlay 0.35s allow-discrete,
    background-color 0.35s ease-out,
    backdrop-filter 0.35s ease-out;
}

dialog[open]::backdrop {
  background-color: rgba(43, 34, 27, 0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  
  @starting-style {
    background-color: rgba(43, 34, 27, 0);
    backdrop-filter: blur(0px);
  }
}

@media (prefers-reduced-motion: reduce) {
  dialog {
    transform: none;
    transition-duration: 0.1s;
  }
  @starting-style {
    dialog[open] {
      transform: none;
    }
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(43, 34, 27, 0.04);
}

.modal-header h2 {
  font-size: 1.5rem;
}

.modal-close {
  background: rgba(43, 34, 27, 0.03);
  border: none;
  color: var(--text-primary);
  font-size: 1.25rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
}

.modal-close:hover {
  background: rgba(43, 34, 27, 0.08);
}

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.instruction-step {
  display: flex;
  gap: 1.15rem;
}

.step-num {
  background: var(--primary-light);
  color: var(--primary);
  width: 30px;
  height: 30px;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.step-content h3 {
  font-size: 1.05rem;
  margin-bottom: 0.25rem;
}

.step-content p {
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-main);
}

::-webkit-scrollbar-thumb {
  background: rgba(43, 34, 27, 0.08);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(43, 34, 27, 0.16);
}

/* Mobile Optimization Overrides */
@media (max-width: 640px) {
  .container {
    padding: calc(var(--header-height, 8.5rem) + 1.5rem) 1.25rem 4rem 1.25rem !important;
    max-width: 100vw;
    overflow-x: hidden;
  }

  header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  }

  .header-inner {
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    padding: 1.25rem 1.25rem;
    transition: padding 0.3s ease, gap 0.3s ease;
  }

  .logo-text {
    display: block;
    transition: opacity 0.2s ease, max-width 0.2s ease;
    opacity: 1;
    max-width: 200px;
    overflow: hidden;
  }

  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    transition: all 0.3s ease;
  }

  .nav-links a, .nav-links button {
    font-size: 0.82rem;
    padding: 0.45rem 0.9rem;
    transition: all 0.2s ease;
  }

  /* Scrolled header state on mobile - url disappears, shifts to row */
  header.scrolled .header-inner {
    flex-direction: row;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    gap: 0.5rem;
  }

  header.scrolled .logo-text {
    display: none;
  }

  header.scrolled .nav-links {
    flex-wrap: nowrap;
    justify-content: flex-end;
    gap: 0.4rem;
    width: auto;
  }

  header.scrolled .nav-links a, header.scrolled .nav-links button {
    font-size: 0.8rem;
    padding: 0.4rem 0.7rem;
    white-space: nowrap;
  }

  .hero {
    flex-direction: column;
    gap: 2.5rem;
    align-items: center;
    text-align: center;
  }

  .hero-content h1 {
    font-size: 2.2rem;
    line-height: 1.2;
  }

  .hero-stats {
    gap: 1.25rem;
    justify-content: center;
    flex-wrap: wrap;
  }

  .stat-item {
    min-width: 80px;
  }

  .phone-outer {
    width: 290px !important;
    height: 580px !important;
    min-height: auto;
  }

  .phone-screen {
    height: calc(100% - 75px) !important;
  }

  /* Redesign the floating bar into a modern bottom-sheet card */
  .floating-bar {
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    transform: translateY(100%) !important;
    border-radius: 24px 24px 0 0 !important;
    padding: 0.85rem 1rem calc(0.85rem + env(safe-area-inset-bottom, 0px)) 1rem !important;
    display: grid !important;
    grid-template-areas: 
      "count logos"
      "buttons buttons" !important;
    grid-template-columns: auto 1fr !important;
    gap: 0.65rem !important;
    align-items: center !important;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.1) !important;
    border-left: none !important;
    border-right: none !important;
    border-bottom: none !important;
  }

  .floating-bar.visible {
    transform: translateY(0) !important;
  }

  .floating-count {
    grid-area: count !important;
    font-size: 0.9rem !important;
  }

  .batch-selected-logos {
    grid-area: logos !important;
    border-right: none !important;
    padding-right: 0 !important;
    max-width: 100% !important;
    justify-self: start !important;
    margin-left: 0.25rem !important;
  }

  .floating-buttons {
    grid-area: buttons !important;
    width: 100% !important;
    display: flex !important;
    gap: 0.5rem !important;
  }

  .floating-buttons button {
    flex: 1 !important;
    font-size: 0.85rem !important;
    padding: 0.65rem 0.75rem !important;
  }
  
  .directory-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .category-filters {
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding-bottom: 0.5rem !important;
    margin-left: -1.25rem !important;
    margin-right: -1.25rem !important;
    padding-left: 1.25rem !important;
    padding-right: 1.25rem !important;
    scrollbar-width: none !important;
  }
  .category-filters::-webkit-scrollbar {
    display: none !important;
  }
  .filter-chip {
    flex-shrink: 0 !important;
  }
}

/* Premium Toast Notifications */
.toast {
  position: fixed;
  top: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(-120px);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.08);
  z-index: 9999;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
  opacity: 0;
  pointer-events: none;
  max-width: 90%;
  width: max-content;
}

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

.toast-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.toast-success .toast-icon {
  color: var(--primary);
}

.toast-error .toast-icon {
  color: #DC2626;
}

.toast-message {
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
}

/* Share Dialog Buttons */
.share-buttons-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
}

.btn-share-social {
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  color: white !important;
  border: none;
  cursor: pointer;
}

.btn-share-social.twitter {
  background: #1DA1F2;
}
.btn-share-social.twitter:hover {
  background: #1a90da;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(29, 161, 242, 0.25);
}

.btn-share-social.facebook {
  background: #1877F2;
}
.btn-share-social.facebook:hover {
  background: #166fe5;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(24, 119, 242, 0.25);
}

.btn-share-social.sms {
  background: #34C759;
}
.btn-share-social.sms:hover {
  background: #2eaf4e;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(52, 199, 89, 0.25);
}

.btn-share-social.email {
  background: #4B5563;
}
.btn-share-social.email:hover {
  background: #374151;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(75, 85, 99, 0.25);
}

.btn-share-social.system {
  background: #111827;
}
.btn-share-social.system:hover {
  background: #1F2937;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(17, 24, 39, 0.25);
}

#btn-modal-copy-link {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem;
  transition: all 0.25s ease;
}
#btn-modal-copy-link:hover {
  transform: translateY(-2px);
}


