/* ========================================
   CustomCord - Premium Discord Tools
   Clean Blue Theme
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Space+Grotesk:wght@400;500;600;700&display=swap');

/* ---- CSS Variables ---- */
:root {
  /* Backgrounds - deep rich dark blue */
  --bg-primary: #0a0e1a;
  --bg-secondary: #0f1423;
  --bg-tertiary: #141a2e;
  --bg-card: rgba(15, 20, 38, 0.75);
  --bg-card-hover: rgba(20, 28, 52, 0.85);
  --bg-input: rgba(10, 14, 26, 0.9);

  /* Accent colors - blue/cyan palette, no pink or purple */
  --accent-primary: #3b82f6;
  --accent-secondary: #60a5fa;
  --accent-cyan: #22d3ee;
  --accent-teal: #14b8a6;
  --accent-green: #34d399;
  --accent-yellow: #fbbf24;
  --accent-red: #ef4444;

  /* Gradients - clean blue to cyan */
  --gradient-main: linear-gradient(135deg, #3b82f6 0%, #22d3ee 100%);
  --gradient-subtle: linear-gradient(135deg, rgba(59,130,246,0.12) 0%, rgba(34,211,238,0.12) 100%);
  --gradient-glow: linear-gradient(135deg, rgba(59,130,246,0.35) 0%, rgba(34,211,238,0.35) 100%);
  --gradient-surface: linear-gradient(135deg, rgba(59,130,246,0.06) 0%, rgba(34,211,238,0.04) 100%);

  /* Text */
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-link: #60a5fa;

  /* Borders */
  --border-primary: rgba(148, 163, 184, 0.08);
  --border-active: rgba(59, 130, 246, 0.45);
  --border-subtle: rgba(148, 163, 184, 0.05);

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 4px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 8px 48px rgba(0, 0, 0, 0.45);
  --shadow-glow: 0 0 40px rgba(59, 130, 246, 0.15), 0 0 80px rgba(34, 211, 238, 0.05);
  --shadow-blue: 0 4px 20px rgba(59, 130, 246, 0.25);

  /* Radii */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Transition */
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
  border: none;
  outline: none;
  font-family: inherit;
}

input, select, textarea {
  font-family: inherit;
  outline: none;
  border: none;
}

img {
  max-width: 100%;
  display: block;
}

ul, ol {
  list-style: none;
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar {
  width: 5px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.12);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.22);
}

/* ---- Animated Background ---- */
.bg-animated {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
}

.bg-animated::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: 
    radial-gradient(ellipse at 20% 50%, rgba(59, 130, 246, 0.07) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(34, 211, 238, 0.05) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(20, 184, 166, 0.04) 0%, transparent 50%);
  animation: bgShift 25s ease-in-out infinite;
}

@keyframes bgShift {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(-2%, 1%) rotate(0.5deg); }
  66% { transform: translate(1%, -2%) rotate(-0.5deg); }
}

/* ---- Floating Orbs ---- */
.orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.12;
  pointer-events: none;
  z-index: -1;
}

.orb-1 {
  width: 550px;
  height: 550px;
  background: var(--accent-primary);
  top: -120px;
  right: -120px;
  animation: orbFloat1 18s ease-in-out infinite;
}

.orb-2 {
  width: 450px;
  height: 450px;
  background: var(--accent-cyan);
  bottom: -100px;
  left: -100px;
  animation: orbFloat2 22s ease-in-out infinite;
}

.orb-3 {
  width: 300px;
  height: 300px;
  background: var(--accent-teal);
  top: 50%;
  left: 50%;
  animation: orbFloat3 15s ease-in-out infinite;
}

@keyframes orbFloat1 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-50px, 50px); }
}
@keyframes orbFloat2 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(40px, -40px); }
}
@keyframes orbFloat3 {
  0%, 100% { transform: translate(-50%, -50%); }
  50% { transform: translate(-50%, calc(-50% + 25px)); }
}

/* ---- Navigation ---- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 0;
  transition: var(--transition);
  backdrop-filter: blur(0px);
}

.navbar.scrolled {
  background: rgba(10, 14, 26, 0.88);
  backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border-primary);
  padding: 12px 0;
  box-shadow: 0 1px 20px rgba(0, 0, 0, 0.3);
}

.navbar .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--text-primary);
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: var(--gradient-main);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-self: center;
}

.nav-right {
  justify-self: end;
}


.nav-link {
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
  position: relative;
}

.nav-link:hover {
  color: var(--text-primary);
  background: rgba(59, 130, 246, 0.06);
}

.nav-link.active {
  color: var(--text-primary);
  background: rgba(59, 130, 246, 0.12);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 2px;
  background: var(--accent-primary);
  border-radius: 2px;
}

.nav-link-personal {
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  transition: all 0.2s ease;
}

.nav-link-personal svg {
  display: block;
}

.nav-link-personal:hover {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.4);
  color: var(--accent-primary);
}

.nav-cta {
  padding: 8px 20px;
  background: var(--gradient-main);
  color: white;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  transition: var(--transition);
  box-shadow: var(--shadow-blue);
}

.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 28px rgba(59, 130, 246, 0.35);
}

/* Mobile Menu */
.mobile-menu-btn {
  display: none;
  background: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  padding: 8px;
}

/* ---- Hero Section ---- */
.hero {
  padding: 160px 24px 80px;
  text-align: center;
  position: relative;
}

.hero .container {
  max-width: 900px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 6px 6px 16px;
  border-radius: 50px;
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.18);
  margin-bottom: 28px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  backdrop-filter: blur(10px);
}

.hero-badge-tag {
  padding: 4px 12px;
  border-radius: 50px;
  background: var(--gradient-main);
  color: white;
  font-weight: 600;
  font-size: 0.75rem;
}

.hero h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #f1f5f9 0%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero h1 .gradient-text {
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  transition: var(--transition);
}

.btn-primary {
  background: var(--gradient-main);
  color: white;
  box-shadow: 0 4px 24px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 36px rgba(59, 130, 246, 0.4);
}

.btn-secondary {
  background: rgba(148, 163, 184, 0.06);
  color: var(--text-primary);
  border: 1px solid var(--border-primary);
  backdrop-filter: blur(8px);
}

.btn-secondary:hover {
  background: rgba(148, 163, 184, 0.1);
  border-color: rgba(148, 163, 184, 0.15);
  transform: translateY(-1px);
}

/* ---- Feature Cards ---- */
.features {
  padding: 40px 24px 100px;
}

.features .container {
  max-width: 1000px;
  margin: 0 auto;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  padding: 40px;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
  backdrop-filter: blur(12px);
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-main);
  opacity: 0;
  transition: var(--transition);
}

.feature-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-active);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 20px;
}

.feature-icon.icon-blue {
  background: rgba(59, 130, 246, 0.12);
  color: var(--accent-primary);
}

.feature-icon.icon-pink {
  background: rgba(34, 211, 238, 0.12);
  color: var(--accent-cyan);
}

.feature-card h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 24px;
}

.feature-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent-secondary);
  font-weight: 600;
  font-size: 0.9rem;
  transition: var(--transition);
}

.feature-link:hover {
  gap: 10px;
  color: var(--accent-cyan);
}

/* ---- Editor Page Layout ---- */
.editor-page {
  padding: 88px 24px 40px;
  min-height: 100vh;
}

.editor-page .container {
  max-width: 1280px;
  margin: 0 auto;
}

.editor-header {
  text-align: center;
  margin-bottom: 32px;
}

.editor-header h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.editor-header h1 .gradient-text {
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.editor-header p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.editor-layout {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 24px;
  align-items: start;
}

/* ---- Editor Panel (Left) ---- */
.editor-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  overflow: hidden;
  backdrop-filter: blur(12px);
}

.editor-tabs {
  display: flex;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-primary);
}

.editor-tab {
  flex: 1;
  padding: 14px 20px;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  background: none;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-bottom: 2px solid transparent;
  position: relative;
}

.editor-tab:hover {
  color: var(--text-secondary);
  background: rgba(59, 130, 246, 0.03);
}

.editor-tab.active {
  color: var(--text-primary);
  background: var(--bg-card);
  border-bottom-color: var(--accent-primary);
}

.editor-tab svg {
  width: 16px;
  height: 16px;
}

.tab-content {
  display: none;
  padding: 24px;
}

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

/* ---- Search Bar ---- */
.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-input);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-sm);
  padding: 0 14px;
  transition: var(--transition);
}

.search-bar:focus-within {
  border-color: var(--border-active);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.08);
}

.search-bar svg {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.search-bar input {
  flex: 1;
  padding: 12px 0;
  background: none;
  color: var(--text-primary);
  font-size: 0.9rem;
}

.search-bar input::placeholder {
  color: var(--text-muted);
}

/* ---- Category Filter ---- */
.category-filter {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.category-btn {
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  background: rgba(148, 163, 184, 0.05);
  border: 1px solid transparent;
  transition: var(--transition);
}

.category-btn:hover {
  color: var(--text-secondary);
  background: rgba(148, 163, 184, 0.1);
}

.category-btn.active {
  color: var(--accent-secondary);
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.25);
}

/* ---- Icons Grid ---- */
.icons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(52px, 1fr));
  gap: 8px;
  margin-top: 20px;
  max-height: 340px;
  overflow-y: auto;
  padding-right: 4px;
}

.icon-item {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: rgba(148, 163, 184, 0.04);
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  padding: 10px;
}

.icon-item:hover {
  background: rgba(59, 130, 246, 0.08);
  border-color: rgba(59, 130, 246, 0.15);
}

.icon-item.selected {
  background: rgba(59, 130, 246, 0.12);
  border-color: var(--accent-primary);
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.15);
}

.icon-item svg,
.icon-item .icon-item-svg svg {
  width: 24px;
  height: 24px;
  color: var(--text-secondary);
}

.icon-item .icon-item-svg {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-item.selected svg,
.icon-item.selected .icon-item-svg svg {
  color: var(--accent-secondary);
}

/* ---- Shapes Grid ---- */
.shapes-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-top: 16px;
}

.shape-item {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: rgba(148, 163, 184, 0.04);
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  padding: 8px;
}

.shape-item:hover {
  background: rgba(59, 130, 246, 0.06);
  border-color: rgba(59, 130, 246, 0.12);
}

.shape-item.selected {
  background: rgba(59, 130, 246, 0.12);
  border-color: var(--accent-primary);
}

.shape-item .shape-preview {
  width: 100%;
  height: 100%;
}

/* ---- Color Pickers ---- */
.control-group {
  margin-top: 20px;
}

.control-label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 10px;
  display: block;
}

.color-picker-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.color-input-wrapper {
  position: relative;
  flex-shrink: 0;
}

.color-input-wrapper input[type="color"] {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 0;
  background: none;
  -webkit-appearance: none;
}

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

.color-input-wrapper input[type="color"]::-webkit-color-swatch {
  border: 2px solid rgba(148, 163, 184, 0.15);
  border-radius: var(--radius-sm);
}

.color-hex {
  flex: 1;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-family: 'Space Grotesk', monospace;
  transition: var(--transition);
}

.color-hex:focus {
  border-color: var(--border-active);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.08);
}

.color-presets {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.color-preset {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
}

.color-preset:hover {
  transform: scale(1.15);
}

.color-preset.active {
  border-color: white;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

/* ---- Range Slider ---- */
.range-group {
  margin-top: 16px;
}

.range-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.range-value {
  font-size: 0.8rem;
  font-family: 'Space Grotesk', monospace;
  color: var(--accent-secondary);
  font-weight: 600;
}

input[type="range"] {
  width: 100%;
  height: 5px;
  background: rgba(148, 163, 184, 0.1);
  border-radius: 10px;
  -webkit-appearance: none;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-primary);
  box-shadow: 0 2px 10px rgba(59, 130, 246, 0.4);
  transition: var(--transition);
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 2px 14px rgba(59, 130, 246, 0.5);
}

/* ---- Text Input ---- */
.text-input {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.9rem;
  transition: var(--transition);
}

.text-input:focus {
  border-color: var(--border-active);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.08);
}

.text-input::placeholder {
  color: var(--text-muted);
}

/* ---- Toggle Switch ---- */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
}

.toggle-label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.toggle {
  position: relative;
  width: 44px;
  height: 24px;
  cursor: pointer;
}

.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background: rgba(148, 163, 184, 0.12);
  border-radius: 12px;
  transition: var(--transition);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: white;
  transition: var(--transition);
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.toggle input:checked + .toggle-slider {
  background: var(--accent-primary);
}

.toggle input:checked + .toggle-slider::before {
  transform: translateX(20px);
}

/* ---- Preview Panel (Right) ---- */
.preview-panel {
  position: sticky;
  top: 104px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Canvas Preview */
.canvas-preview {
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  overflow: hidden;
  backdrop-filter: blur(12px);
}

.canvas-area {
  padding: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: 
    linear-gradient(45deg, rgba(148,163,184,0.03) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(148,163,184,0.03) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(148,163,184,0.03) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(148,163,184,0.03) 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0px;
  min-height: 220px;
}

.canvas-area canvas {
  border-radius: 4px;
}

/* Discord Mock */
.discord-mock {
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  overflow: hidden;
  backdrop-filter: blur(12px);
}

.discord-mock-header {
  padding: 12px 16px;
  background: rgba(148, 163, 184, 0.03);
  border-bottom: 1px solid var(--border-primary);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.discord-message {
  padding: 16px;
  display: flex;
  gap: 12px;
}

.discord-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gradient-main);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
}

.discord-message-body {
  flex: 1;
  min-width: 0;
}

.discord-username-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.discord-username {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--accent-secondary);
}

.discord-role-icon {
  width: 20px;
  height: 20px;
}

.discord-timestamp {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.discord-message-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Discord Profile Mock */
.discord-profile {
  padding: 0;
}

.discord-profile-banner {
  height: 60px;
  background: #1e2433;
  position: relative;
}

.discord-profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  border: 5px solid var(--bg-tertiary);
  position: absolute;
  bottom: -36px;
  left: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.discord-profile-avatar::after {
  content: '';
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent-red);
  border: 3px solid var(--bg-tertiary);
}

.discord-profile-body {
  padding: 44px 16px 16px;
  background: var(--bg-tertiary);
}

.discord-profile-badges {
  display: flex;
  gap: 4px;
  justify-content: flex-end;
  padding: 8px 16px 0;
  background: var(--bg-tertiary);
  min-height: 28px;
  align-items: center;
}

.discord-profile-badges span {
  opacity: 0.9;
  transition: opacity 0.2s;
  cursor: pointer;
}

.discord-profile-badges span:hover {
  opacity: 1;
}

.discord-profile-info {
  background: rgba(0, 0, 0, 0.25);
  border-radius: var(--radius-sm);
  padding: 12px;
}

.discord-profile-name {
  font-weight: 700;
  font-size: 1.15rem;
}

.discord-profile-tag {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.discord-profile-divider {
  height: 1px;
  background: rgba(148, 163, 184, 0.06);
  margin: 10px 0;
}

.discord-profile-section-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-primary);
  margin-bottom: 6px;
}

/* ---- Download Button ---- */
.download-section {
  padding: 16px;
  border-top: 1px solid var(--border-primary);
}

.btn-download {
  width: 100%;
  padding: 14px;
  background: var(--gradient-main);
  color: white;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition);
  box-shadow: var(--shadow-blue);
}

.btn-download:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 28px rgba(59, 130, 246, 0.35);
}

.btn-download svg {
  width: 18px;
  height: 18px;
}

.btn-download-secondary {
  background: rgba(148, 163, 184, 0.06);
  box-shadow: none;
  border: 1px solid var(--border-primary);
}

.btn-download-secondary:hover {
  background: rgba(148, 163, 184, 0.1);
  box-shadow: none;
}

.download-hint {
  padding: 0 16px 16px;
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.5;
  text-align: center;
}

/* ---- Upload & Custom Text ---- */
/* Background Image Upload Area */
.bg-image-upload-area {
  position: relative;
  border: 2px dashed rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  background: rgba(255, 255, 255, 0.02);
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.bg-image-upload-area:hover,
.bg-image-upload-area.dragover {
  border-color: var(--accent-primary);
  background: rgba(59, 130, 246, 0.06);
}
#bg-image-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.78rem;
}
#bg-image-placeholder svg {
  opacity: 0.4;
}
#bg-image-preview-container {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
#bg-image-preview {
  max-width: 100%;
  max-height: 120px;
  border-radius: 8px;
  object-fit: contain;
}
.bg-image-remove-btn {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--danger);
  color: #fff;
  border: 2px solid var(--bg-primary);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease;
}
.bg-image-remove-btn:hover {
  transform: scale(1.15);
}

.action-row {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.btn-action {
  flex: 1;
  padding: 10px 14px;
  background: rgba(148, 163, 184, 0.05);
  border: 1px solid var(--border-primary);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: var(--transition);
}

.btn-action:hover {
  background: rgba(59, 130, 246, 0.08);
  color: var(--text-primary);
  border-color: rgba(59, 130, 246, 0.15);
}

.btn-action svg {
  width: 14px;
  height: 14px;
}

/* ---- Badge Editor Specific ---- */
.control-sublabel {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.select-input {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 30px;
}

.select-input:focus {
  border-color: var(--border-active);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.08);
}

.select-input option {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.badge-icon-picker {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-primary);
  background: var(--bg-input);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.badge-icon-picker:hover {
  border-color: var(--accent-primary);
  background: rgba(59, 130, 246, 0.08);
}

.badge-icon-picker svg {
  width: 16px;
  height: 16px;
}

.icon-picker-popup {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  width: 480px;
  max-width: calc(100vw - 40px);
  max-height: 70vh;
  padding: 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.icon-picker-popup.show {
  opacity: 1;
  pointer-events: all;
  transform: translate(-50%, -50%) scale(1);
}

.icon-picker-popup .icons-grid {
  flex: 1;
  max-height: 50vh;
  overflow-y: auto;
}

.icon-picker-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}

.icon-picker-overlay.show {
  opacity: 1;
  pointer-events: all;
}

.badge-shapes-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.badge-shape-item {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: rgba(148, 163, 184, 0.04);
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  overflow: hidden;
  padding: 0 8px;
}

.badge-shape-item:hover {
  background: rgba(59, 130, 246, 0.06);
}

.badge-shape-item.selected {
  background: rgba(59, 130, 246, 0.12);
  border-color: var(--accent-primary);
}

.icon-position-group {
  display: flex;
  gap: 4px;
  margin-top: 10px;
}

.position-btn {
  flex: 1;
  padding: 10px;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(148, 163, 184, 0.04);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.position-btn:first-child {
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.position-btn:last-child {
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.position-btn:hover {
  background: rgba(148, 163, 184, 0.08);
}

.position-btn.active {
  background: rgba(59, 130, 246, 0.12);
  color: var(--accent-secondary);
  border-color: rgba(59, 130, 246, 0.25);
}

/* ---- Add Icon Card (Customise Icons tab) ---- */
.add-icon-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border: 2px dashed rgba(148, 163, 184, 0.1);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 16px;
}

.add-icon-card:hover {
  border-color: var(--accent-primary);
  background: rgba(59, 130, 246, 0.03);
}

.add-icon-card-plus {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(148, 163, 184, 0.06);
  border-radius: var(--radius-sm);
  font-size: 1.5rem;
  color: var(--text-muted);
  transition: var(--transition);
}

.add-icon-card:hover .add-icon-card-plus {
  background: var(--accent-primary);
  color: white;
}

.add-icon-card-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.add-icon-card-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ---- Icon List Item (per-icon controls) ---- */
.icon-list-item {
  background: rgba(148, 163, 184, 0.02);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  overflow: hidden;
  transition: var(--transition);
}

.icon-list-item.active {
  border-color: rgba(59, 130, 246, 0.25);
  background: rgba(59, 130, 246, 0.04);
}

.icon-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  cursor: pointer;
  transition: var(--transition);
}

.icon-list-header:hover {
  background: rgba(148, 163, 184, 0.04);
}

.icon-list-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.icon-list-toggle {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.icon-list-delete {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(239, 68, 68, 0.08);
  color: var(--accent-red);
  border-radius: 4px;
  font-size: 0.7rem;
  cursor: pointer;
  transition: var(--transition);
}

.icon-list-delete:hover {
  background: rgba(239, 68, 68, 0.2);
}

.icon-controls {
  padding: 0 14px 14px;
}

/* ---- Footer ---- */
.footer {
  padding: 40px 24px;
  border-top: 1px solid var(--border-primary);
  margin-top: 60px;
}

.footer .container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-text {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.85rem;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--text-secondary);
}

/* ---- Section Title ---- */
.section-title {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-primary);
}

/* ---- Two Column Controls ---- */
.controls-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* ---- Empty State ---- */
.empty-state {
  text-align: center;
  padding: 40px 20px;
}

.empty-state svg {
  width: 48px;
  height: 48px;
  color: var(--text-muted);
  margin: 0 auto 12px;
  opacity: 0.4;
}

.empty-state p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ---- Counter Badge ---- */
.counter-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 50px;
  background: rgba(148, 163, 184, 0.1);
  color: var(--text-muted);
  margin-left: 4px;
}

.category-btn.active .counter-badge {
  background: rgba(59, 130, 246, 0.2);
  color: var(--accent-secondary);
}

/* Mobile Nav */
.nav-links.show {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: rgba(10, 14, 26, 0.96);
  backdrop-filter: blur(24px);
  padding: 16px;
  gap: 4px;
  border-bottom: 1px solid var(--border-primary);
}

/* ---- Animations ---- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.fade-in {
  animation: fadeIn 0.5s ease forwards;
}

.slide-up {
  animation: slideUp 0.6s ease forwards;
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .editor-layout {
    grid-template-columns: 1fr;
  }
  
  .preview-panel {
    position: static;
  }
}

@media (max-width: 768px) {
  .features-grid {
    grid-template-columns: 1fr;
  }
  
  .nav-links {
    display: none;
  }

  .nav-right {
    display: none;
  }
  
  .mobile-menu-btn {
    display: block;
  }
  
  .hero h1 {
    font-size: 2.2rem;
  }
  
  .editor-header h1 {
    font-size: 1.5rem;
  }
  
  .shapes-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .controls-row {
    grid-template-columns: 1fr;
  }
  
  .footer .container {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
}

/* ========================================
   Homepage - Premium Animations & Effects
   ======================================== */

/* ---- Dot Grid Background ---- */
.dot-grid {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image: radial-gradient(rgba(148, 163, 184, 0.06) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse at 50% 50%, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 50%, black 30%, transparent 75%);
}

/* ---- Floating Particles ---- */
.particles {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.particle {
  position: absolute;
  bottom: -10px;
  background: var(--accent-primary);
  border-radius: 50%;
  animation: particleFloat linear infinite;
}

@keyframes particleFloat {
  0% {
    transform: translateY(0) translateX(0);
    opacity: 0;
  }
  10% {
    opacity: var(--particle-opacity, 0.3);
  }
  90% {
    opacity: var(--particle-opacity, 0.3);
  }
  100% {
    transform: translateY(-100vh) translateX(40px);
    opacity: 0;
  }
}

/* ---- Hero Mouse Glow ---- */
.hero {
  padding: 160px 24px 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.12) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 0;
}

/* ---- Animated Gradient Text ---- */
.animated-gradient {
  background: linear-gradient(90deg, #3b82f6, #22d3ee, #14b8a6, #3b82f6);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 4s ease-in-out infinite;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* ---- Hero Badge with Pulse Dot ---- */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 6px 6px 12px;
  border-radius: 50px;
  background: rgba(59, 130, 246, 0.06);
  border: 1px solid rgba(59, 130, 246, 0.15);
  margin-bottom: 28px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  backdrop-filter: blur(12px);
}

.hero-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-cyan);
  animation: dotPulse 2s ease-in-out infinite;
  box-shadow: 0 0 8px rgba(34, 211, 238, 0.5);
}

@keyframes dotPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

.hero-desc {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 620px;
  margin: 0 auto 44px;
  line-height: 1.8;
}

/* ---- Glowing Button ---- */
.btn-glow {
  position: relative;
  overflow: hidden;
}

.btn-glow::after {
  content: '';
  position: absolute;
  inset: -2px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  transform: translateX(-100%);
  animation: btnGlowSweep 3s ease-in-out infinite;
  border-radius: inherit;
  z-index: 1;
  pointer-events: none;
}

@keyframes btnGlowSweep {
  0% { transform: translateX(-100%); }
  50% { transform: translateX(100%); }
  100% { transform: translateX(100%); }
}

/* ---- Shine Button ---- */
.btn-shine {
  position: relative;
  overflow: hidden;
}

.btn-shine::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    115deg,
    transparent 40%,
    rgba(255, 255, 255, 0.04) 45%,
    rgba(255, 255, 255, 0.08) 50%,
    rgba(255, 255, 255, 0.04) 55%,
    transparent 60%
  );
  animation: btnShine 4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes btnShine {
  0% { transform: translateX(-50%) translateY(-50%) rotate(25deg); }
  100% { transform: translateX(50%) translateY(50%) rotate(25deg); }
}

/* ---- Logo Spin on Hover ---- */
.logo-spin {
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.logo:hover .logo-spin {
  transform: rotate(15deg) scale(1.1);
}

/* ---- Stats Bar ---- */
.stats-bar {
  padding: 0 24px;
  margin-top: -20px;
  position: relative;
  z-index: 2;
}

.stats-bar .container {
  max-width: 900px;
  margin: 0 auto;
}

.stats-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  background: rgba(15, 20, 38, 0.65);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-xl);
  padding: 28px 40px;
  backdrop-filter: blur(20px);
}

.stat-item {
  flex: 1;
  text-align: center;
}

.stat-number {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2.2rem;
  font-weight: 700;
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

.stat-number.special {
  font-size: 2.4rem;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 4px;
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--border-primary);
  margin: 0 8px;
  flex-shrink: 0;
}

/* ---- Section Header ---- */
.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-tag {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-secondary);
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.15);
  margin-bottom: 16px;
}

.section-header h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.section-header p {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 500px;
  margin: 0 auto;
}

/* ---- Features with new card style ---- */
.features {
  padding: 80px 24px 80px;
}

.feature-icon.icon-cyan {
  background: rgba(34, 211, 238, 0.1);
  color: var(--accent-cyan);
}

.feature-icon.icon-teal {
  background: rgba(20, 184, 166, 0.1);
  color: var(--accent-teal);
}

.feature-icon.icon-yellow {
  background: rgba(251, 191, 36, 0.1);
  color: var(--accent-yellow);
}

/* ---- Card Hover Animated Border ---- */
.card-hover-border {
  position: relative;
}

.card-hover-border::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, transparent, rgba(59, 130, 246, 0.3), rgba(34, 211, 238, 0.2), transparent);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.card-hover-border:hover::after {
  opacity: 1;
}

/* ---- How It Works ---- */
.how-it-works {
  padding: 60px 24px 100px;
}

.how-it-works .container {
  max-width: 1000px;
  margin: 0 auto;
}

.steps-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}

.step-card {
  flex: 1;
  text-align: center;
  padding: 32px 24px;
  position: relative;
}

.step-number {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent-primary);
  letter-spacing: 0.1em;
  margin-bottom: 16px;
  opacity: 0.6;
}

.step-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  border-radius: var(--radius-lg);
  background: rgba(59, 130, 246, 0.06);
  border: 1px solid rgba(59, 130, 246, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-secondary);
  transition: var(--transition);
}

.step-card:hover .step-icon {
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.2);
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(59, 130, 246, 0.1);
}

.step-card h4 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.step-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 200px;
  margin: 0 auto;
}

.step-connector {
  flex-shrink: 0;
  color: var(--text-muted);
  padding-bottom: 60px;
}

/* ---- CTA Section ---- */
.cta-section {
  padding: 20px 24px 80px;
}

.cta-section .container {
  max-width: 800px;
  margin: 0 auto;
}

.cta-card {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 60px 40px;
  background: rgba(15, 20, 38, 0.6);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-xl);
  backdrop-filter: blur(16px);
}

.cta-glow {
  position: absolute;
  top: -80px;
  left: 50%;
  transform: translateX(-50%);
  width: 400px;
  height: 200px;
  background: radial-gradient(ellipse, rgba(59, 130, 246, 0.15), transparent 70%);
  pointer-events: none;
}

.cta-card h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.cta-card p {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 500px;
  margin: 0 auto 32px;
  line-height: 1.7;
}

/* ---- Footer Enhancement ---- */
.footer-gradient {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.3), rgba(34, 211, 238, 0.2), transparent);
  margin-bottom: 0;
}

.footer {
  padding: 40px 24px;
  border-top: none;
  margin-top: 0;
}

/* ---- Scroll Reveal Animation ---- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Responsive for new sections ---- */
@media (max-width: 768px) {
  .stats-grid {
    flex-wrap: wrap;
    gap: 16px;
    padding: 24px 20px;
  }
  
  .stat-divider {
    display: none;
  }
  
  .stat-item {
    min-width: 40%;
  }
  
  .steps-grid {
    flex-direction: column;
    gap: 8px;
  }
  
  .step-connector {
    padding-bottom: 0;
    transform: rotate(90deg);
  }
  
  .cta-card {
    padding: 40px 24px;
  }
  
  .cta-card h2 {
    font-size: 1.5rem;
  }

  .hero-desc {
    font-size: 0.95rem;
  }
}

/* ========================================
   Timestamp Editor Styles
   ======================================== */

/* Layout */
.ts-layout {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 24px;
  align-items: start;
  margin-top: 8px;
}

/* Sections */
.ts-section {
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  overflow: hidden;
  backdrop-filter: blur(12px);
}

.ts-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

.ts-section-header svg {
  color: var(--accent-secondary);
  flex-shrink: 0;
}

.ts-section-body {
  padding: 0 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Inputs */
.ts-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ts-field label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.ts-input {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.875rem;
  font-family: inherit;
  transition: var(--transition-fast);
}

.ts-input:focus {
  border-color: var(--border-active);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.ts-input::-webkit-calendar-picker-indicator {
  filter: invert(0.7);
  cursor: pointer;
}

.ts-datetime-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.ts-unix-input-row {
  display: flex;
  gap: 8px;
}

.ts-unix-input {
  flex: 1;
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 0.85rem;
}

/* Quick Buttons */
.ts-quick-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ts-quick-btn {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  border: 1px solid var(--border-primary);
  cursor: pointer;
  transition: var(--transition-fast);
}

.ts-quick-btn:hover {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.25);
  color: var(--accent-secondary);
}

/* Timezone Info */
.ts-timezone-info {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--text-muted);
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.ts-timezone-info svg {
  flex-shrink: 0;
  color: var(--accent-secondary);
}

/* Copy Button */
.ts-copy-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  border: 1px solid var(--border-primary);
  cursor: pointer;
  transition: var(--transition-fast);
  flex-shrink: 0;
}

.ts-copy-btn:hover {
  background: rgba(59, 130, 246, 0.1);
  color: var(--accent-secondary);
  border-color: rgba(59, 130, 246, 0.25);
}

.ts-copy-btn.copied {
  background: rgba(52, 211, 153, 0.15);
  color: var(--accent-green);
  border-color: rgba(52, 211, 153, 0.3);
}

/* Format Cards */
.ts-formats-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ts-format-card {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
}

.ts-format-card:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

.ts-format-info {
  min-width: 0;
}

.ts-format-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

.ts-format-desc {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 1px;
}

.ts-format-preview {
  display: flex;
  align-items: center;
}

.ts-discord-tag {
  display: inline-block;
  background: rgba(59, 130, 246, 0.15);
  color: #e0e4ea;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 0.82rem;
  white-space: nowrap;
}

.ts-format-syntax {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ts-format-syntax code {
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.2);
  padding: 4px 8px;
  border-radius: 4px;
  white-space: nowrap;
}

.ts-format-syntax .ts-copy-btn {
  width: 28px;
  height: 28px;
}

/* Discord Preview */
.ts-preview-section {
  margin-top: 12px;
}

.ts-discord-preview {
  padding: 16px;
  background: #313338;
  border-top: 1px solid var(--border-primary);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.ts-preview-msg {
  display: flex;
  gap: 16px;
}

.ts-preview-avatar {
  flex-shrink: 0;
}

.ts-preview-avatar-fallback {
  width: 40px;
  height: 40px;
  background: #5865f2;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 1.1rem;
}

.ts-preview-body {
  flex: 1;
  min-width: 0;
}

.ts-preview-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.ts-preview-username {
  font-weight: 600;
  font-size: 0.95rem;
  color: #f2f3f5;
}

.ts-preview-bot {
  background: #5865f2;
  color: white;
  font-size: 0.6rem;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 3px;
  text-transform: uppercase;
}

.ts-preview-time {
  font-size: 0.75rem;
  color: #72767d;
}

.ts-preview-content {
  color: #dcddde;
  font-size: 0.9375rem;
  line-height: 1.5;
}

/* Timestamp Responsive */
@media (max-width: 900px) {
  .ts-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .ts-datetime-grid {
    grid-template-columns: 1fr;
  }

  .ts-format-card {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .ts-format-syntax {
    justify-content: space-between;
  }
}

/* ========================================
   Webhook Editor Styles
   ======================================== */

/* Layout */
.webhook-editor-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
  margin-top: 8px;
}

.webhook-composer {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.webhook-preview-panel {
  position: sticky;
  top: 90px;
}

/* Sections */
.wh-section {
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  overflow: hidden;
  backdrop-filter: blur(12px);
}

.wh-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  user-select: none;
}

.wh-section-header svg:first-child,
.wh-section-header .wh-embed-color-dot + svg {
  color: var(--accent-secondary);
  flex-shrink: 0;
}

.wh-section-header.wh-collapsible {
  cursor: pointer;
  transition: var(--transition-fast);
}

.wh-section-header.wh-collapsible:hover {
  background: rgba(255, 255, 255, 0.02);
}

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

.wh-section-header.collapsed .wh-chevron {
  transform: rotate(-90deg);
}

.wh-section-body {
  padding: 0 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.3s ease;
}

.wh-section-body.collapsed {
  display: none;
}

/* Embed Section */
.wh-embed-section {
  border-left: 3px solid var(--accent-primary);
}

.wh-embed-color-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, 0.1);
}

.wh-embed-header {
  position: relative;
}

.wh-embed-actions {
  display: flex;
  gap: 4px;
  margin-left: auto;
  margin-right: 8px;
}

.wh-embed-action-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 6px;
  color: var(--text-muted);
  transition: var(--transition-fast);
}

.wh-embed-action-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.wh-embed-delete:hover {
  background: rgba(239, 68, 68, 0.15);
  color: var(--accent-red);
}

/* Subsections */
.wh-subsection {
  border-top: 1px solid var(--border-primary);
  padding-top: 12px;
}

.wh-subsection:first-child {
  border-top: none;
  padding-top: 0;
}

.wh-subsection-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}

/* Inputs */
.wh-input {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.875rem;
  transition: var(--transition-fast);
}

.wh-input:focus {
  border-color: var(--border-active);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.wh-input::placeholder {
  color: var(--text-muted);
}

.wh-textarea {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.875rem;
  resize: vertical;
  min-height: 60px;
  font-family: inherit;
  line-height: 1.5;
  transition: var(--transition-fast);
}

.wh-textarea:focus {
  border-color: var(--border-active);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.wh-textarea::placeholder {
  color: var(--text-muted);
}

.wh-json-textarea {
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 0.8rem;
}

/* Fields Layout */
.wh-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.wh-field label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.wh-field-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.wh-field-grow {
  flex: 1;
  min-width: 0;
}

/* Color Picker */
.wh-color-picker-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.wh-color-input {
  width: 40px;
  height: 36px;
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-sm);
  background: transparent;
  cursor: pointer;
  padding: 2px;
}

.wh-color-input::-webkit-color-swatch-wrapper {
  padding: 0;
}

.wh-color-input::-webkit-color-swatch {
  border: none;
  border-radius: 4px;
}

.wh-color-text {
  width: 90px !important;
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 0.8rem !important;
}

/* Checkbox */
.wh-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.wh-checkbox {
  width: 16px;
  height: 16px;
  accent-color: var(--accent-primary);
  cursor: pointer;
}

/* URL Section */
.wh-url-section {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.06), rgba(34, 211, 238, 0.04));
}

.wh-url-row {
  display: flex;
  gap: 10px;
  padding: 0 16px 16px;
}

.wh-url-input {
  flex: 1;
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 0.8rem;
}

/* Buttons */
.wh-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  transition: var(--transition);
  cursor: pointer;
  border: none;
  white-space: nowrap;
}

.wh-btn-send {
  background: var(--gradient-main);
  color: white;
  padding: 10px 24px;
  box-shadow: var(--shadow-blue);
}

.wh-btn-send:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 25px rgba(59, 130, 246, 0.35);
}

.wh-btn-send:active {
  transform: translateY(0);
}

.wh-btn-send.sending {
  opacity: 0.7;
  pointer-events: none;
}

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

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

.wh-btn-primary:hover {
  opacity: 0.9;
}

.wh-btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  border: 1px solid var(--border-primary);
}

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

.wh-btn-small {
  padding: 6px 12px;
  font-size: 0.8rem;
}

.wh-btn-add-embed {
  width: 100%;
  background: rgba(59, 130, 246, 0.08);
  color: var(--accent-secondary);
  border: 1px dashed rgba(59, 130, 246, 0.25);
  padding: 12px;
}

.wh-btn-add-embed:hover {
  background: rgba(59, 130, 246, 0.14);
  border-color: rgba(59, 130, 246, 0.4);
}

.wh-btn-add-field {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  border: 1px solid var(--border-primary);
}

.wh-btn-add-field:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* Toolbar */
.wh-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  backdrop-filter: blur(12px);
  flex-wrap: wrap;
}

.wh-toolbar-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 7px;
  font-size: 0.78rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition-fast);
  white-space: nowrap;
}

.wh-toolbar-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.wh-toolbar-btn svg {
  flex-shrink: 0;
}

/* Save */
.wh-toolbar-save {
  background: rgba(52, 211, 153, 0.08);
  color: var(--accent-green);
  border-color: rgba(52, 211, 153, 0.15);
}
.wh-toolbar-save:hover {
  background: rgba(52, 211, 153, 0.16);
  border-color: rgba(52, 211, 153, 0.3);
  color: var(--accent-green);
}

/* Backups */
.wh-toolbar-backups {
  background: rgba(96, 165, 250, 0.08);
  color: var(--accent-secondary);
  border-color: rgba(96, 165, 250, 0.15);
}
.wh-toolbar-backups:hover {
  background: rgba(96, 165, 250, 0.16);
  border-color: rgba(96, 165, 250, 0.3);
  color: var(--accent-secondary);
}

/* Danger (Clear All) */
.wh-toolbar-danger {
  color: var(--text-muted);
}
.wh-toolbar-danger:hover {
  background: rgba(239, 68, 68, 0.12);
  color: var(--accent-red);
}

.wh-toolbar-divider {
  width: 1px;
  height: 24px;
  background: var(--border-primary);
  margin: 0 2px;
  flex-shrink: 0;
}

/* Keep .wh-btn-save for modal confirm button */
.wh-btn-save {
  background: rgba(52, 211, 153, 0.1);
  color: var(--accent-green);
  border: 1px solid rgba(52, 211, 153, 0.2);
}
.wh-btn-save:hover {
  background: rgba(52, 211, 153, 0.18);
  border-color: rgba(52, 211, 153, 0.35);
}

/* Status */
.wh-status {
  display: none;
  padding: 0 16px 12px;
  font-size: 0.8rem;
  font-weight: 500;
}

.wh-status-success { color: var(--accent-green); }
.wh-status-error { color: var(--accent-red); }
.wh-status-info { color: var(--accent-secondary); }

/* Embed Fields */
.wh-embed-fields {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 8px;
}

.wh-embed-field {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-sm);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wh-field-delete {
  flex-shrink: 0;
  margin-top: 18px;
}

/* ---- Discord Preview ---- */
.wh-preview-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  backdrop-filter: blur(12px);
}

.wh-preview-header svg {
  color: var(--accent-secondary);
}

.wh-preview-discord {
  background: #313338;
  border: 1px solid var(--border-primary);
  border-top: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  min-height: 200px;
  padding: 16px;
  overflow-y: auto;
  max-height: calc(100vh - 200px);
}

.wh-discord-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 60px 20px;
  color: #72767d;
  text-align: center;
  font-size: 0.9rem;
}

/* Message */
.wh-msg {
  display: flex;
  gap: 16px;
  padding: 4px 0;
}

.wh-msg-avatar {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
}

.wh-msg-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wh-msg-avatar-fallback {
  width: 40px;
  height: 40px;
  background: #5865f2;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 1.1rem;
}

.wh-msg-body {
  flex: 1;
  min-width: 0;
}

.wh-msg-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.wh-msg-username {
  font-weight: 600;
  font-size: 0.95rem;
  color: #f2f3f5;
}

.wh-msg-bot-tag {
  background: #5865f2;
  color: white;
  font-size: 0.6rem;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.wh-msg-time {
  font-size: 0.75rem;
  color: #72767d;
}

.wh-msg-content {
  color: #dcddde;
  font-size: 0.9375rem;
  line-height: 1.375;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Embed Preview */
.wh-embed {
  background: #2b2d31;
  border-left: 4px solid #3b82f6;
  border-radius: 4px;
  padding: 12px 16px 12px 12px;
  margin-top: 8px;
  max-width: 520px;
}

.wh-embed-content {
  display: flex;
  gap: 16px;
}

.wh-embed-main {
  flex: 1;
  min-width: 0;
}

.wh-embed-author {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.wh-embed-author-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}

.wh-embed-author-name {
  font-size: 0.825rem;
  font-weight: 600;
  color: #f2f3f5;
}

.wh-embed-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #f2f3f5;
  margin-bottom: 4px;
  display: block;
}

a.wh-embed-title {
  color: #00aff4;
}

a.wh-embed-title:hover {
  text-decoration: underline;
}

.wh-embed-desc {
  font-size: 0.875rem;
  color: #dcddde;
  line-height: 1.375;
  margin-bottom: 8px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.wh-embed-fields {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 8px;
}

.wh-embed-field {
  min-width: 0;
}

.wh-embed-field:not(.wh-embed-field-inline) {
  grid-column: 1 / -1;
}

.wh-embed-field-name {
  font-size: 0.825rem;
  font-weight: 600;
  color: #f2f3f5;
  margin-bottom: 2px;
}

.wh-embed-field-value {
  font-size: 0.825rem;
  color: #dcddde;
  line-height: 1.3;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.wh-embed-thumbnail {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  border-radius: 4px;
  overflow: hidden;
}

.wh-embed-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wh-embed-image {
  margin-top: 8px;
}

.wh-embed-image img {
  max-width: 100%;
  max-height: 300px;
  border-radius: 4px;
  object-fit: contain;
}

.wh-embed-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: 0.75rem;
  color: #72767d;
}

.wh-embed-footer-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
}

/* Discord Markdown */
.wh-code-block {
  display: block;
  background: #1e1f22;
  border: 1px solid #232428;
  border-radius: 4px;
  padding: 8px;
  margin: 4px 0;
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 0.825rem;
  white-space: pre-wrap;
  color: #dcddde;
}

.wh-code-inline {
  background: #1e1f22;
  border-radius: 3px;
  padding: 2px 4px;
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 0.825rem;
  color: #dcddde;
}

.wh-blockquote {
  border-left: 4px solid #4e5058;
  padding-left: 12px;
  margin: 2px 0;
  color: #b5bac1;
}

.wh-md-h1 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 8px 0 4px;
  color: #f2f3f5;
}

.wh-md-h2 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 8px 0 4px;
  color: #f2f3f5;
}

.wh-md-h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 8px 0 4px;
  color: #f2f3f5;
}

.wh-link {
  color: #00aff4;
  text-decoration: none;
}

.wh-link:hover {
  text-decoration: underline;
}

/* Modal */
.wh-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
}

.wh-modal-overlay.active {
  display: flex;
}

.wh-modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
}

.wh-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-primary);
}

.wh-modal-header h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.wh-modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--text-muted);
  font-size: 1.4rem;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
}

.wh-modal-close:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
}

.wh-modal-body {
  padding: 16px 20px;
  overflow-y: auto;
  flex: 1;
}

.wh-modal-footer {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  padding: 12px 20px;
  border-top: 1px solid var(--border-primary);
}

.wh-modal-footer-between {
  justify-content: space-between;
}

.wh-modal-sm {
  max-width: 420px;
}

/* Save List in Load Modal */
.wh-modal-body-list {
  padding: 8px 12px;
  max-height: 400px;
  overflow-y: auto;
}

.wh-saves-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 40px 20px;
  color: var(--text-muted);
  text-align: center;
  font-size: 0.875rem;
}

.wh-saves-empty svg {
  opacity: 0.35;
}

.wh-save-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-primary);
  margin-bottom: 8px;
  background: rgba(255, 255, 255, 0.02);
  transition: var(--transition-fast);
}

.wh-save-item:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

.wh-save-item:last-child {
  margin-bottom: 0;
}

.wh-save-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--gradient-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--accent-secondary);
}

.wh-save-info {
  flex: 1;
  min-width: 0;
}

.wh-save-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wh-save-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
  display: flex;
  gap: 8px;
  align-items: center;
}

.wh-save-meta-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--text-muted);
  opacity: 0.5;
}

.wh-save-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.wh-save-load-btn {
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  background: rgba(59, 130, 246, 0.12);
  color: var(--accent-secondary);
  border: 1px solid rgba(59, 130, 246, 0.2);
  cursor: pointer;
  transition: var(--transition-fast);
}

.wh-save-load-btn:hover {
  background: rgba(59, 130, 246, 0.22);
  border-color: rgba(59, 130, 246, 0.35);
}

.wh-save-delete-btn {
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 0.78rem;
  background: rgba(239, 68, 68, 0.08);
  color: var(--accent-red);
  border: 1px solid rgba(239, 68, 68, 0.12);
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.wh-save-delete-btn:hover {
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(239, 68, 68, 0.3);
}

/* Webhook Editor Responsive */
@media (max-width: 1024px) {
  .webhook-editor-layout {
    grid-template-columns: 1fr;
  }
  
  .webhook-preview-panel {
    position: static;
    order: -1;
  }
  
  .wh-preview-discord {
    max-height: 400px;
  }
}

@media (max-width: 640px) {
  .wh-field-row {
    flex-direction: column;
    gap: 8px;
  }
  
  .wh-url-row {
    flex-direction: column;
    gap: 8px;
  }
  
  .wh-toolbar {
    gap: 4px;
    padding: 6px 8px;
  }

  .wh-toolbar-btn {
    padding: 6px 8px;
    font-size: 0.72rem;
    gap: 4px;
  }

  .wh-toolbar-btn span {
    display: none;
  }

  .wh-toolbar-divider {
    height: 20px;
  }
  
  .wh-embed-actions {
    gap: 2px;
  }
  
  .wh-embed-action-btn {
    width: 24px;
    height: 24px;
  }
}

/* ---- Utility ---- */
.hidden { display: none !important; }
.sr-only { 
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}
