/* ==========================================================================
   Modern Intuitive Link Shortener Design System & Smooth Micro-Animations
   ========================================================================== */

:root {
  --font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  /* Transition Curves */
  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: 0.18s var(--ease-smooth);
  --transition-normal: 0.28s var(--ease-spring);
  --transition-slow: 0.45s var(--ease-spring);

  /* Dark Theme (Default: Rich Black, Charcoal Gray, Crisp White, & Crimson Red) */
  --bg-page: #0a0b10;
  --bg-page-secondary: #0f1118;
  --bg-card: rgba(18, 20, 28, 0.85);
  --bg-card-solid: #12141c;
  --bg-card-hover: rgba(26, 30, 42, 0.9);
  --bg-input: rgba(21, 24, 34, 0.75);
  --bg-input-hover: rgba(28, 33, 46, 0.9);
  --bg-overlay: rgba(6, 7, 10, 0.8);
  
  --header-bg: rgba(10, 11, 16, 0.65);
  --header-border: rgba(255, 255, 255, 0.08);
  
  --border-color: rgba(255, 255, 255, 0.08);
  --border-color-hover: rgba(225, 29, 72, 0.5);
  --border-focus: #e11d48;
  --border-glass: linear-gradient(135deg, rgba(255,255,255,0.12), rgba(255,255,255,0.02));
  
  --text-main: #ffffff;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;
  
  /* Connect Marketing Red / Crimson Palette */
  --primary: #e11d48;
  --primary-hover: #be123c;
  --primary-glow: rgba(225, 29, 72, 0.38);
  --primary-light: rgba(225, 29, 72, 0.14);
  --primary-gradient: linear-gradient(135deg, #f43f5e 0%, #e11d48 50%, #be123c 100%);
  
  --accent: #dc2626;
  --accent-glow: rgba(220, 38, 38, 0.35);
  --success: #10b981;
  --success-light: rgba(16, 185, 129, 0.12);
  --warning: #f59e0b;
  --warning-light: rgba(245, 158, 11, 0.12);
  --danger: #ef4444;
  --danger-light: rgba(239, 68, 68, 0.14);
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 8px 24px -4px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 16px 36px -6px rgba(0, 0, 0, 0.6);
  --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
  --shadow-glow: 0 0 40px -8px var(--primary-glow);
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
}

[data-theme="light"] {
  --bg-page: #f8fafc;
  --bg-page-secondary: #f1f5f9;
  --bg-card: rgba(255, 255, 255, 0.9);
  --bg-card-solid: #ffffff;
  --bg-card-hover: rgba(248, 250, 252, 0.98);
  --bg-input: rgba(241, 245, 249, 0.75);
  --bg-input-hover: rgba(226, 232, 240, 0.9);
  --bg-overlay: rgba(15, 23, 42, 0.5);
  
  --header-bg: rgba(255, 255, 255, 0.68);
  --header-border: rgba(0, 0, 0, 0.07);
  
  --border-color: rgba(0, 0, 0, 0.08);
  --border-color-hover: rgba(225, 29, 72, 0.45);
  --border-focus: #e11d48;
  
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-subtle: #94a3b8;
  
  --primary: #e11d48;
  --primary-hover: #be123c;
  --primary-glow: rgba(225, 29, 72, 0.25);
  --primary-light: rgba(225, 29, 72, 0.08);
  --primary-gradient: linear-gradient(135deg, #e11d48 0%, #be123c 100%);
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 20px -4px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 16px 32px -6px rgba(0, 0, 0, 0.12);
  --shadow-xl: 0 24px 48px -12px rgba(0, 0, 0, 0.15);
  --shadow-glow: 0 0 35px -8px var(--primary-glow);
}

/* Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: var(--font-family);
  -webkit-font-smoothing: antialiased;
}

html {
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scroll-padding-top: 85px;
}

/* 120 FPS Performant Hardware-Accelerated Background Layer */
body {
  background-color: var(--bg-page);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeSpeed;
}

/* Fixed background composite layer (eliminates full-page repaint on scroll) */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: 
    radial-gradient(ellipse at 15% 0%, rgba(225, 29, 72, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse at 85% 30%, rgba(220, 38, 38, 0.08) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
  transform: translateZ(0);
  will-change: transform;
}

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

/* Header & Nav - Modern Translucent Frosted Glass */
.header {
  padding: 0.95rem 0;
  border-bottom: 1px solid var(--header-border);
  background: var(--header-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  position: sticky;
  top: 0;
  z-index: 100;
  transform: translateZ(0);
  will-change: transform;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
  transition: background-color var(--transition-normal), border-color var(--transition-normal);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-main);
  transition: transform var(--transition-fast);
}

.brand-logo-img {
  height: 32px;
  width: auto;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 2px 8px var(--primary-glow));
  transition: transform var(--transition-fast);
}

.brand:hover .brand-logo-img {
  transform: scale(1.06);
}

/* Modal Logo Headers */
.modal-brand-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.modal-brand-logo {
  height: 44px;
  width: auto;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 4px 14px var(--primary-glow));
}

.footer-logo-img {
  height: 38px;
  width: auto;
  object-fit: contain;
  display: block;
  margin-bottom: 0.75rem;
  filter: drop-shadow(0 2px 10px rgba(0,0,0,0.3));
}

.verify-brand-logo {
  height: 44px;
  width: auto;
  object-fit: contain;
  margin: 0 auto 1.25rem;
  display: block;
  filter: drop-shadow(0 4px 14px var(--primary-glow));
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 13px 22px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all var(--transition-normal);
  white-space: nowrap;
  user-select: none;
  position: relative;
  overflow: hidden;
}

.btn:active {
  transform: scale(0.96);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #ffffff;
  box-shadow: 0 4px 16px var(--primary-glow);
}

.btn-primary:hover {
  filter: brightness(1.12);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--primary-glow);
}

.btn-secondary {
  background: var(--bg-input);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: var(--bg-input-hover);
  border-color: var(--border-color-hover);
  transform: translateY(-1px);
}

.btn-sm {
  padding: 8px 14px;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
}

.btn-icon {
  padding: 10px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.icon-btn:hover {
  background: var(--bg-input-hover);
  color: var(--text-main);
  border-color: var(--border-color-hover);
  transform: translateY(-2px);
}

/* User Profile Badge in Header */
.user-menu-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
  transition: all var(--transition-fast);
}

.user-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.role-pill-admin {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  animation: pulseGlow 2.5s infinite;
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.3); }
  50% { box-shadow: 0 0 10px 2px rgba(245, 158, 11, 0.25); }
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 3.5rem 0 2rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary-light);
  border: 1px solid rgba(99, 102, 241, 0.25);
  color: var(--primary);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  animation: slideDown 0.4s var(--ease-spring);
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.18;
  margin-bottom: 1rem;
}

.hero-title span {
  background: linear-gradient(135deg, #6366f1, #a855f7 50%, #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.hero-desc {
  font-size: clamp(0.95rem, 2.5vw, 1.125rem);
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 2.5rem;
  line-height: 1.6;
}

/* Main Shortener Form Box - 120 FPS Optimized */
.shortener-card {
  background: var(--bg-card-solid);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: clamp(1.25rem, 4vw, 2rem);
  box-shadow: 0 12px 36px -6px rgba(0, 0, 0, 0.6), 0 0 24px -6px var(--primary-glow);
  margin-bottom: 2.5rem;
  position: relative;
  contain: layout style;
  transform: translateZ(0);
  transition: border-color var(--transition-normal), box-shadow var(--transition-normal);
}

.shortener-card:hover {
  border-color: var(--border-color-hover);
  box-shadow: 0 16px 44px -6px rgba(0, 0, 0, 0.7), 0 0 32px -4px var(--primary-glow);
}

/* Tool Switcher Tabs Container & Scroll Controls */
.tool-tabs-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-bottom: 1.5rem;
  gap: 8px;
}

.tool-tabs {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-input);
  padding: 6px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  max-width: 100%;
  overflow-x: auto;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  will-change: scroll-position;
  overscroll-behavior: contain;
  scrollbar-width: none;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.tool-tabs::-webkit-scrollbar {
  display: none;
}

.tab-scroll-arrow {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-card-solid);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
  z-index: 2;
  transition: all var(--transition-fast);
  padding: 0;
}

.tab-scroll-arrow:hover,
.tab-scroll-arrow:active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 4px 12px var(--primary-glow);
  transform: scale(1.08);
}

@media (max-width: 768px) {
  .tab-scroll-arrow {
    display: flex;
  }
}

.tool-tab {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  padding: 9px 18px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  user-select: none;
}

.tool-tab-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

.tool-tab:not(.active) .tool-tab-icon {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--primary);
}

.tool-tab:not(.active):hover {
  color: var(--text-main);
  background: var(--bg-input-hover);
}

.tool-tab:not(.active):hover .tool-tab-icon {
  border-color: var(--border-color-hover);
  transform: scale(1.08);
}

.tool-tab.active {
  background: linear-gradient(135deg, var(--primary), #9f1239);
  color: #ffffff !important;
  border-color: transparent;
  box-shadow: 0 4px 16px rgba(225, 29, 72, 0.4);
}

.tool-tab.active .tool-tab-icon {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.tool-tab.active svg {
  stroke: #ffffff !important;
}

.tool-badge-shield {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  padding: 3px 8px;
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.4);
  margin-left: 2px;
}

.tool-tab.active .tool-badge-shield {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

/* Cyber Security Audit Result Card */
.verify-result-card {
  margin-top: 1.5rem;
  background: var(--bg-card-solid);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: clamp(1.2rem, 3vw, 1.75rem);
  text-align: left;
  box-shadow: var(--shadow-lg);
  animation: scaleUp 0.35s var(--ease-spring);
}

.audit-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-color);
  flex-wrap: wrap;
}

.audit-score-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
}

.audit-score-circle {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #0a0b10;
  border: 4px solid var(--success);
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
  flex-shrink: 0;
}

.audit-score-val {
  font-size: 1.4rem;
  font-weight: 900;
  line-height: 1;
  color: #ffffff;
}

.audit-score-max {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-subtle);
  text-transform: uppercase;
}

.audit-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.audit-url-preview {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  word-break: break-all;
}

.audit-summary-box {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin: 1.25rem 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text-main);
}

.audit-checks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
  margin-top: 1rem;
}

.audit-check-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  transition: all var(--transition-fast);
}

.audit-check-card:hover {
  border-color: var(--border-color-hover);
  transform: translateY(-1px);
}

.audit-check-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.9rem;
}

.audit-check-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 3px;
}

.audit-check-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.audit-destination-box {
  background: rgba(225, 29, 72, 0.06);
  border: 1px solid rgba(225, 29, 72, 0.2);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-top: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.audit-dest-info {
  font-size: 0.85rem;
  color: var(--text-main);
}

.input-group-main {
  display: flex;
  gap: 12px;
  position: relative;
}

.input-icon-wrap {
  position: relative;
  flex: 1;
}

.input-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-subtle);
  pointer-events: none;
  transition: color var(--transition-fast);
}

.input-main {
  width: 100%;
  background: var(--bg-input);
  border: 2px solid transparent;
  color: var(--text-main);
  font-size: 1.05rem;
  padding: 16px 85px 16px 48px;
  border-radius: var(--radius-md);
  outline: none;
  transition: all var(--transition-normal);
}

.paste-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.paste-btn:hover {
  color: var(--primary);
  background: var(--bg-card-solid);
  border-color: var(--primary-light);
  transform: translateY(-50%) scale(1.04);
}

.paste-btn:active {
  transform: translateY(-50%) scale(0.96);
}

.input-main:focus {
  background: var(--bg-card-solid);
  border-color: var(--border-focus);
  box-shadow: 0 0 0 4px var(--primary-light);
}

.input-main:focus + .input-icon {
  color: var(--primary);
}

/* Advanced Options Toggle */
.advanced-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 1.25rem;
  padding: 8px 12px;
  border-radius: 8px;
  transition: all var(--transition-fast);
}

.advanced-toggle:hover {
  color: var(--primary);
  background: var(--primary-light);
}

.advanced-toggle svg {
  transition: transform var(--transition-normal);
}

.advanced-toggle.active svg {
  transform: rotate(180deg);
}

.advanced-drawer {
  display: none;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-color);
  animation: slideDownFade 0.3s var(--ease-spring) forwards;
}

.advanced-drawer.open {
  display: grid;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}

.form-label {
  font-size: 0.825rem;
  font-weight: 700;
  color: var(--text-muted);
}

.input-field {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-size: 0.9rem;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  outline: none;
  transition: all var(--transition-fast);
}

.input-field:focus {
  border-color: var(--border-focus);
  background: var(--bg-card-solid);
  box-shadow: 0 0 0 3px var(--primary-light);
}

/* Result Card */
.result-card {
  display: none;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(168, 85, 247, 0.08));
  border: 2px solid var(--primary);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-top: 1.5rem;
  box-shadow: 0 8px 30px var(--primary-glow);
  animation: scaleUp 0.35s var(--ease-spring);
}

.result-card.active {
  display: block;
}

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

.result-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--success);
  font-weight: 700;
  font-size: 0.9rem;
}

.result-link-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card-solid);
  border: 1px solid var(--border-color);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  gap: 12px;
  flex-wrap: wrap;
}

.result-url {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--primary);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 180px;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

/* Stats Overview */
.stats-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2.5rem;
  transition: all var(--transition-normal);
}

.stats-overview.single-card {
  display: flex;
  justify-content: center;
  max-width: 380px;
  margin-left: auto;
  margin-right: auto;
}

.stats-overview.single-card .stat-box {
  width: 100%;
  box-shadow: var(--shadow-md), 0 0 20px rgba(99, 102, 241, 0.1);
  border-color: rgba(99, 102, 241, 0.25);
}

.stat-box {
  background: var(--bg-card-solid);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  contain: layout style;
  transform: translateZ(0);
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.stat-box:hover {
  transform: translateY(-3px) translateZ(0);
  border-color: var(--border-color-hover);
  box-shadow: var(--shadow-md);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform var(--transition-fast);
}

.stat-box:hover .stat-icon {
  transform: scale(1.08);
}

.stat-icon.blue { background: rgba(99, 102, 241, 0.15); color: #6366f1; }
.stat-icon.green { background: rgba(16, 185, 129, 0.15); color: #10b981; }
.stat-icon.purple { background: rgba(168, 85, 247, 0.15); color: #a855f7; }

.stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--text-main);
}

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

/* Dashboard Section - 120 FPS Optimized */
.dashboard-card {
  background: var(--bg-card-solid);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  box-shadow: 0 10px 30px -4px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  margin-bottom: 4rem;
  contain: layout style;
  transform: translateZ(0);
  transition: border-color var(--transition-normal);
}

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

.dashboard-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dashboard-title {
  font-size: 1.25rem;
  font-weight: 800;
}

.dashboard-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.search-input-wrap {
  position: relative;
}

.search-input-wrap svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-subtle);
  pointer-events: none;
}

.search-input {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-size: 0.875rem;
  padding: 8px 12px 8px 36px;
  border-radius: var(--radius-sm);
  outline: none;
  min-width: 200px;
  transition: all var(--transition-fast);
}

.search-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.filter-tabs {
  display: flex;
  background: var(--bg-input);
  padding: 4px;
  border-radius: var(--radius-sm);
  gap: 4px;
  overflow-x: auto;
}

.filter-tab {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.825rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.filter-tab.active {
  background: var(--bg-card-solid);
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
}

/* Links Table */
.links-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.links-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.links-table th {
  padding: 12px 18px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-subtle);
  border-bottom: 1px solid var(--border-color);
  background: rgba(0, 0, 0, 0.02);
  white-space: nowrap;
}

.links-table td {
  padding: 16px 18px;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
  transition: background var(--transition-fast);
}

.links-table tr:hover td {
  background: rgba(255, 255, 255, 0.03);
}

.short-code-link {
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color var(--transition-fast);
}

.short-code-link:hover {
  text-decoration: underline;
  color: var(--primary-hover);
}

.orig-url {
  color: var(--text-muted);
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.85rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
}

.pill-active { background: var(--success-light); color: var(--success); }
.pill-paused { background: var(--warning-light); color: var(--warning); }
.pill-expired { background: var(--danger-light); color: var(--danger); }
.pill-locked { background: var(--primary-light); color: var(--primary); }
.pill-unique { background: rgba(16, 185, 129, 0.15); color: #10b981; border: 1px solid rgba(16, 185, 129, 0.25); }
.pill-repeat { background: rgba(148, 163, 184, 0.15); color: var(--text-muted); border: 1px solid rgba(148, 163, 184, 0.25); }

.ip-code-badge {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 0.8rem;
  background: var(--bg-card);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  color: var(--text-main);
}

.click-badge {
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--text-main);
  background: var(--bg-input);
  padding: 4px 10px;
  border-radius: 8px;
}

.table-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Empty State */
.empty-state {
  padding: 4rem 2rem;
  text-align: center;
  animation: fadeIn 0.4s var(--ease-smooth);
}

.empty-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--bg-input);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  color: var(--text-subtle);
}

.empty-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

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

/* Modals */
.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--bg-overlay);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: fadeIn 0.2s var(--ease-smooth);
  transform: translateZ(0);
  will-change: opacity;
}

.modal-backdrop.open {
  display: flex;
}

.modal {
  background: var(--bg-card-solid);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 650px;
  max-height: 90vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  box-shadow: var(--shadow-xl);
  animation: scaleUp 0.25s var(--ease-spring);
  position: relative;
  transform: translateZ(0);
  will-change: transform, opacity;
}

.modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  background: var(--bg-card-solid);
  z-index: 10;
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 800;
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Auth Tabs & Google Sign-In */
.auth-tabs {
  display: flex;
  background: var(--bg-input);
  padding: 4px;
  border-radius: var(--radius-sm);
  gap: 4px;
  margin-bottom: 1.5rem;
}

.auth-tab {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 700;
  padding: 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.auth-tab.active {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 4px 12px var(--primary-glow);
}

.google-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #ffffff;
  color: #1f2937;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-sm);
  margin-top: 1rem;
}

.google-btn:hover {
  background: #f9fafb;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.google-btn:active {
  transform: scale(0.98);
}

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 1.25rem 0 0.5rem;
  color: var(--text-subtle);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border-color);
}

.auth-divider span {
  padding: 0 10px;
}

/* Analytics Visualizations */
.analytics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.analytics-card {
  background: var(--bg-input);
  border-radius: var(--radius-md);
  padding: 1rem;
  border: 1px solid var(--border-color);
  transition: transform var(--transition-fast);
}

.analytics-card:hover {
  transform: translateY(-2px);
}

.chart-section {
  background: var(--bg-input);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border-color);
}

.chart-title {
  font-size: 0.875rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-muted);
}

/* SVG Chart */
.bar-chart-wrap {
  height: 160px;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding-top: 10px;
  overflow-x: auto;
}

.bar-col {
  flex: 1;
  min-width: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
  gap: 4px;
}

.bar-fill {
  width: 100%;
  max-width: 32px;
  background: linear-gradient(180deg, var(--primary), var(--accent));
  border-radius: 4px 4px 0 0;
  transition: height 0.6s var(--ease-spring);
  min-height: 4px;
  position: relative;
  cursor: pointer;
}

.bar-fill:hover {
  filter: brightness(1.2);
  transform: scaleY(1.03);
}

.bar-label {
  font-size: 0.65rem;
  color: var(--text-subtle);
  white-space: nowrap;
}

.bar-tooltip {
  position: absolute;
  top: -28px;
  left: 50%;
  transform: translateX(-50%);
  background: #0f172a;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
  border: 1px solid rgba(255,255,255,0.1);
  z-index: 10;
}

.bar-fill:hover .bar-tooltip {
  opacity: 1;
}

/* Progress bar lists for Device/Referrer */
.breakdown-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.breakdown-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.breakdown-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.825rem;
  font-weight: 600;
}

.progress-track {
  height: 8px;
  background: var(--bg-card);
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 999px;
  transition: width 0.7s var(--ease-spring);
}

/* QR Code Display in Modal */
.qr-preview-box {
  background: #ffffff;
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  margin: 0 auto 1.5rem;
  box-shadow: var(--shadow-md);
  animation: scaleUp 0.3s var(--ease-spring);
}

/* Toast System */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 200;
  pointer-events: none;
}

.toast {
  background: var(--bg-card-solid);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  color: var(--text-main);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  animation: slideInRight 0.3s var(--ease-spring);
  max-width: 360px;
  pointer-events: auto;
  transition: all var(--transition-normal);
}

.toast-success { border-left: 4px solid var(--success); }
.toast-error { border-left: 4px solid var(--danger); }
.toast-info { border-left: 4px solid var(--primary); }

/* Alerts */
.alert-box {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  animation: shake 0.4s ease;
}

.alert-error {
  background: var(--danger-light);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--danger);
}

/* Keyframe Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleUp {
  from { opacity: 0; transform: scale(0.92) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

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

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

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

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.spin {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Live Sync Real-time Indicator */
.live-indicator-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--success);
  letter-spacing: 0.02em;
  user-select: none;
  transition: all 0.2s ease;
}

.live-pulse-dot {
  width: 8px;
  height: 8px;
  background: var(--success);
  border-radius: 50%;
  display: inline-block;
  position: relative;
}

.live-pulse-dot::after {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.6);
  animation: pulseLive 1.8s cubic-bezier(0.24, 0, 0.38, 1) infinite;
}

@keyframes pulseLive {
  0% { transform: scale(1); opacity: 0.8; }
  70% { transform: scale(2.6); opacity: 0; }
  100% { transform: scale(2.6); opacity: 0; }
}

.stat-value.highlight-bump {
  animation: numberBump 0.5s var(--ease-spring);
}

@keyframes numberBump {
  0% { transform: scale(1); }
  40% { transform: scale(1.15); color: var(--primary); }
  100% { transform: scale(1); }
}

/* Clickable Stats & Interactivity */
.clickable-stat {
  cursor: pointer;
  user-select: none;
}
.clickable-stat:hover {
  transform: translateY(-4px) scale(1.01);
  border-color: var(--primary);
}
.clickable-stat:active {
  transform: scale(0.99);
}

/* Mobile Drawer Navigation */
.mobile-nav-toggle-wrap {
  display: none;
  align-items: center;
  gap: 8px;
}

.mobile-drawer {
  display: none;
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 1.5rem;
  backdrop-filter: blur(16px);
  animation: slideDown 0.25s var(--ease-out);
}

.mobile-drawer.open {
  display: block;
}

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

.mobile-auth-section {
  padding-bottom: 1rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  color: var(--text-main);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-sm);
  transition: background 0.15s ease;
}

.mobile-nav-link:hover, .mobile-nav-link:active {
  background: var(--bg-input);
  color: var(--primary);
}

/* Modern Footer - 120 FPS Optimized */
.footer {
  margin-top: 5rem;
  border-top: 1px solid var(--border-color);
  background: var(--bg-card-solid);
  padding: 3.5rem 0 2rem;
  content-visibility: auto;
  contain-intrinsic-size: 0 350px;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

.footer-links-group {
  display: flex;
  gap: 3.5rem;
  flex-wrap: wrap;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-heading {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  color: var(--text-subtle);
  margin-bottom: 4px;
}

.footer-link, .footer-link-btn {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  background: none;
  border: none;
  padding: 0;
  text-align: left;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.15s ease;
}

.footer-link:hover, .footer-link-btn:hover {
  color: var(--primary);
}

.clickable-email {
  color: var(--primary);
  font-weight: 600;
}

.footer-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--success);
}

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-subtle);
  flex-wrap: wrap;
  gap: 1rem;
}

/* ==========================================================================
   Responsive Breakpoints & Super-Optimized Mobile Layout
   ========================================================================== */
@media (max-width: 768px) {
  .container {
    padding: 0 1rem;
  }

  /* Navigation Header */
  .desktop-nav {
    display: none !important;
  }

  .mobile-nav-toggle-wrap {
    display: flex !important;
    align-items: center;
    gap: 8px;
  }

  .mobile-drawer {
    background: var(--bg-card-solid);
    border-radius: 0 0 16px 16px;
    box-shadow: var(--shadow-xl);
  }

  /* Hero Section */
  .hero {
    padding: 2rem 0 1.25rem;
  }

  .hero-title {
    font-size: 1.75rem;
    line-height: 1.25;
    margin-bottom: 0.75rem;
  }

  .hero-desc {
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
  }

  .shortener-card {
    padding: 1.25rem 1rem;
    border-radius: var(--radius-lg);
  }

  .input-group-main {
    flex-direction: column;
    gap: 10px;
  }

  .input-icon-wrap {
    width: 100%;
  }

  .input-main {
    font-size: 0.925rem;
    padding: 14px 75px 14px 42px;
    min-height: 48px;
    width: 100%;
  }

  #shortenBtn {
    width: 100%;
    min-height: 48px;
    font-size: 0.975rem;
    justify-content: center;
  }

  /* Stats Grid */
  .stats-overview {
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin-bottom: 1.75rem;
  }

  .stat-box {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
  }

  .stat-icon {
    width: 40px;
    height: 40px;
  }

  .stat-value {
    font-size: 1.4rem;
  }

  /* Dashboard Header & Controls */
  .dashboard-card {
    border-radius: var(--radius-lg);
    margin-bottom: 2.5rem;
  }

  .dashboard-header {
    padding: 1.25rem 1rem;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .dashboard-title-wrap {
    justify-content: space-between;
    width: 100%;
  }

  .dashboard-title {
    font-size: 1.15rem;
  }

  .dashboard-controls {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    width: 100%;
  }

  .search-input-wrap {
    width: 100%;
  }

  .search-input {
    width: 100%;
    min-width: 100%;
    min-height: 42px;
  }

  .filter-tabs {
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 3px;
  }

  .filter-tab {
    flex: 1;
    text-align: center;
    padding: 8px 4px;
    font-size: 0.8rem;
    min-height: 36px;
  }

  /* Mobile Links Table as Responsive Card Stack */
  .links-table,
  .links-table thead,
  .links-table tbody,
  .links-table th,
  .links-table td,
  .links-table tr {
    display: block;
    width: 100%;
  }

  .links-table thead {
    display: none !important;
  }

  .links-table-wrap {
    padding: 10px;
    overflow: visible;
  }

  .links-table tbody tr {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 14px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-sm);
  }

  .links-table tbody tr:hover td {
    background: transparent;
  }

  .links-table tbody td {
    padding: 6px 0;
    border: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 0.875rem;
  }

  .links-table tbody td:first-child {
    display: block;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 8px;
  }

  .links-table tbody td:last-child {
    padding-top: 10px;
    border-top: 1px solid var(--border-color);
    margin-top: 8px;
    display: flex;
    justify-content: flex-end;
  }

  .table-actions {
    display: flex;
    gap: 6px;
    width: 100%;
    justify-content: space-between;
  }

  .table-actions .btn,
  .table-actions .btn-icon {
    flex: 1;
    height: 38px;
    min-height: 38px;
    padding: 0;
    justify-content: center;
    border-radius: 8px;
  }

  /* Result Card on Mobile */
  .result-link-box {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .result-url {
    text-align: center;
    font-size: 1.05rem;
  }

  #copyResultBtn {
    width: 100%;
    min-height: 44px;
  }

  .result-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .result-actions .btn {
    width: 100%;
    min-height: 42px;
    justify-content: center;
  }

  /* Modals on Mobile */
  .modal {
    margin: 12px;
    max-width: calc(100vw - 24px) !important;
    max-height: 90vh;
    border-radius: 18px;
    padding: 0;
  }

  .modal-header {
    padding: 1.25rem 1rem;
  }

  .modal-body {
    padding: 1rem;
  }

  .modal-footer {
    padding: 1rem;
    flex-direction: column;
    gap: 8px;
  }

  .modal-footer .btn {
    width: 100%;
  }

  /* Footer on Mobile */
  .footer {
    margin-top: 3rem;
    padding: 2.5rem 0 1.5rem;
  }

  .footer-content {
    flex-direction: column;
    gap: 2rem;
  }

  .footer-links-group {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .toast-container {
    right: 12px;
    bottom: 12px;
    left: 12px;
  }

  .toast {
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .brand-name {
    font-size: 1.1rem;
  }
  .stat-box {
    padding: 1rem;
  }
}

/* ==========================================================================
   Universal Image & File Converter Styles
   ========================================================================== */
.converter-wrap {
  text-align: left;
  animation: fadeIn 0.3s ease;
}

.converter-dropzone {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-lg);
  padding: clamp(2rem, 5vw, 3rem);
  text-align: center;
  background: var(--bg-input);
  cursor: pointer;
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  position: relative;
}

.converter-dropzone:hover,
.converter-dropzone.dragover {
  border-color: var(--primary);
  background: var(--bg-input-hover);
  box-shadow: 0 0 25px var(--primary-glow);
  transform: translateY(-2px);
}

.converter-dropzone-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: rgba(225, 29, 72, 0.1);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}

.converter-dropzone-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-main);
}

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

.converter-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: var(--bg-card-solid);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin: 1.25rem 0;
  flex-wrap: wrap;
  max-width: 100%;
  box-sizing: border-box;
}

.converter-controls-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  flex: 1;
  min-width: 0;
}

.converter-select-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  max-width: 100%;
}

.converter-select {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  outline: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.converter-select:focus {
  border-color: var(--primary);
}

.converter-slider-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.825rem;
  font-weight: 700;
  color: var(--text-muted);
}

.converter-slider {
  accent-color: var(--primary);
  cursor: pointer;
}

@media (max-width: 768px) {
  .converter-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 12px;
  }

  .converter-controls-group {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .converter-select-wrap {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .converter-select {
    width: 100%;
    font-size: 0.825rem;
  }

  .converter-slider-wrap {
    width: 100%;
    justify-content: space-between;
  }

  .converter-toolbar .btn {
    width: 100%;
    justify-content: center;
  }
}

.converter-items-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 1.25rem;
}

.converter-item-card {
  background: var(--bg-card-solid);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  contain: layout style;
  transform: translateZ(0);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  animation: slideDownFade 0.25s ease;
}

.converter-item-card:hover {
  border-color: var(--border-color-hover);
  box-shadow: var(--shadow-sm);
}

.converter-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 200px;
}

.converter-item-thumb {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  flex-shrink: 0;
}

.converter-item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.converter-item-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-main);
  word-break: break-all;
}

.converter-item-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.converter-badge-format {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  background: rgba(225, 29, 72, 0.15);
  color: var(--primary);
  padding: 2px 6px;
  border-radius: 4px;
}

/* File & Data Converter Split Editor */
.file-converter-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 1.25rem;
}

@media (max-width: 768px) {
  .file-converter-split {
    grid-template-columns: 1fr;
  }
}

.code-pane {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.code-pane-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.825rem;
  font-weight: 700;
  color: var(--text-muted);
}

.code-editor {
  width: 100%;
  height: 220px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 0.85rem;
  padding: 12px 14px;
  resize: vertical;
  outline: none;
  line-height: 1.5;
  transition: all var(--transition-fast);
}

.code-editor:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

/* ==========================================================================
   Admin Impersonation Mode Floating Banner & Quick Switch
   ========================================================================== */
.impersonation-banner {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateZ(0);
  background: linear-gradient(135deg, #1e1b4b 0%, #311042 100%);
  border: 2px solid var(--primary);
  border-radius: var(--radius-lg);
  padding: 12px 20px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.7), 0 0 25px var(--primary-glow);
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: 999;
  animation: slideDownFade 0.3s var(--ease-spring);
  color: #ffffff;
  font-weight: 600;
  font-size: 0.9rem;
  max-width: 90vw;
  flex-wrap: wrap;
}

.impersonation-banner .btn-exit-admin {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #ffffff;
  border: none;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-fast);
  box-shadow: 0 4px 12px var(--primary-glow);
}

.impersonation-banner .btn-exit-admin:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
}

.clickable-user-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.clickable-user-link:hover {
  color: var(--primary-hover);
  text-decoration: underline;
  transform: translateX(2px);
}


