/* ================================================
   WebTools — Design System
   Dark gradient + glassmorphism theme
   ================================================ */

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

/* ---------- CSS Custom Properties ---------- */
:root {
  /* Colors */
  --bg-primary: #0f0f23;
  --bg-secondary: #1a1a2e;
  --bg-tertiary: #16213e;
  --bg-card: rgba(255, 255, 255, 0.05);
  --bg-card-hover: rgba(255, 255, 255, 0.08);
  --bg-glass: rgba(255, 255, 255, 0.07);
  --bg-glass-strong: rgba(255, 255, 255, 0.12);

  --text-primary: #e8e8f0;
  --text-secondary: #a0a0b8;
  --text-muted: #6c6c80;
  --text-heading: #ffffff;

  --accent-primary: #6c63ff;
  --accent-primary-hover: #7b73ff;
  --accent-secondary: #00d4aa;
  --accent-gradient: linear-gradient(135deg, #6c63ff 0%, #00d4aa 100%);
  --accent-gradient-hover: linear-gradient(135deg, #7b73ff 0%, #1ae0b8 100%);

  --danger: #ff6b6b;
  --warning: #ffc107;
  --success: #00d4aa;
  --info: #6c63ff;

  --border-color: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.15);

  /* Typography */
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: 'Space Grotesk', 'Inter', sans-serif;

  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-md: 1.125rem;
  --fs-lg: 1.25rem;
  --fs-xl: 1.5rem;
  --fs-2xl: 2rem;
  --fs-3xl: 2.5rem;
  --fs-4xl: 3.5rem;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  /* Borders & Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 20px rgba(108, 99, 255, 0.15);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;

  /* Layout */
  --navbar-height: 70px;
  --container-max: 1200px;
  --container-sm: 640px;
  --container-md: 800px;
}

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

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

body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  color: var(--text-primary);
  background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 50%, var(--bg-tertiary) 100%);
  background-attachment: fixed;
  min-height: 100vh;
  line-height: 1.6;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  color: var(--text-heading);
  font-weight: 600;
  line-height: 1.3;
}

a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--accent-primary-hover);
}

/* ---------- Navbar ---------- */
.wt-navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--navbar-height);
  background: rgba(15, 15, 35, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
}

.wt-navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.wt-navbar__brand {
  font-family: var(--font-heading);
  font-size: var(--fs-xl);
  font-weight: 700;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
}

.wt-navbar__nav {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  list-style: none;
}

.wt-navbar__link {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-md);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  font-size: var(--fs-sm);
  font-weight: 500;
  background: none;
  border: none;
  cursor: pointer;
}

.wt-navbar__link:hover {
  color: var(--text-primary);
  background: var(--bg-glass);
}

/* Language Dropdown */
.wt-lang-dropdown {
  position: relative;
}

.wt-lang-dropdown__menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: var(--space-xs);
  background: var(--bg-secondary);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  min-width: 140px;
  padding: var(--space-xs);
  box-shadow: var(--shadow-lg);
  z-index: 1001;
}

.wt-lang-dropdown:hover .wt-lang-dropdown__menu,
.wt-lang-dropdown:focus-within .wt-lang-dropdown__menu {
  display: block;
}

.wt-lang-dropdown__item {
  display: block;
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  color: var(--text-secondary);
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: left;
  font-size: var(--fs-sm);
  transition: all var(--transition-fast);
}

.wt-lang-dropdown__item:hover,
.wt-lang-dropdown__item.active {
  color: var(--text-primary);
  background: var(--bg-glass);
}

/* Mobile Nav Toggle */
.wt-navbar__toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: var(--fs-xl);
  cursor: pointer;
  padding: var(--space-sm);
}

@media (max-width: 768px) {
  .wt-navbar__toggle {
    display: block;
  }

  .wt-navbar__nav {
    display: none;
    position: absolute;
    top: var(--navbar-height);
    left: 0;
    right: 0;
    background: rgba(15, 15, 35, 0.95);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: var(--space-md);
    border-bottom: 1px solid var(--border-color);
  }

  .wt-navbar__nav.active {
    display: flex;
  }
}

/* ---------- Container ---------- */
.wt-container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--space-2xl) var(--space-lg);
}

.wt-container--sm {
  max-width: var(--container-sm);
}

.wt-container--md {
  max-width: var(--container-md);
}

/* ---------- Breadcrumb ---------- */
.wt-breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-xl);
  font-size: var(--fs-sm);
  color: var(--text-muted);
  list-style: none;
}

.wt-breadcrumb a {
  color: var(--text-secondary);
}

.wt-breadcrumb a:hover {
  color: var(--accent-primary);
}

.wt-breadcrumb__sep {
  color: var(--text-muted);
  font-size: var(--fs-xs);
}

/* ---------- Hero Section ---------- */
.wt-hero {
  text-align: center;
  padding: var(--space-3xl) 0;
  position: relative;
}

.wt-hero__title {
  font-size: var(--fs-4xl);
  font-weight: 700;
  margin-bottom: var(--space-md);
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.wt-hero__subtitle {
  font-size: var(--fs-lg);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto var(--space-xl);
}

@media (max-width: 768px) {
  .wt-hero__title {
    font-size: var(--fs-2xl);
  }

  .wt-hero__subtitle {
    font-size: var(--fs-base);
  }
}

/* ---------- Search Bar ---------- */
.wt-search {
  max-width: 500px;
  margin: 0 auto var(--space-2xl);
  position: relative;
}

.wt-search__input {
  width: 100%;
  padding: var(--space-md) var(--space-lg);
  padding-left: 3rem;
  background: rgba(15, 15, 35, 0.8);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  color: var(--text-primary);
  font-size: var(--fs-base);
  font-family: var(--font-body);
  transition: all var(--transition-base);
  outline: none;
}

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

.wt-search__input:focus {
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-glow);
  background: var(--bg-glass-strong);
}

.wt-search__icon {
  position: absolute;
  left: var(--space-lg);
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

/* ---------- Category Tabs ---------- */
.wt-tabs {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-2xl);
  flex-wrap: wrap;
}

.wt-tab {
  padding: var(--space-sm) var(--space-lg);
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: var(--fs-sm);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-base);
  font-family: var(--font-body);
}

.wt-tab:hover,
.wt-tab.active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #fff;
  box-shadow: var(--shadow-glow);
}

/* ---------- Tool Card Grid ---------- */
.wt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-lg);
}

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

/* ---------- Tool Card ---------- */
.wt-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
  animation: fadeInUp 0.5s ease backwards;
}

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

.wt-card__icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-xl);
  color: #fff;
  margin-bottom: var(--space-md);
}

.wt-card__title {
  font-size: var(--fs-lg);
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.wt-card__desc {
  color: var(--text-secondary);
  font-size: var(--fs-sm);
  margin-bottom: var(--space-lg);
  line-height: 1.5;
}

.wt-card__link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  color: var(--accent-primary);
  font-weight: 500;
  font-size: var(--fs-sm);
  transition: all var(--transition-fast);
}

.wt-card__link:hover {
  gap: var(--space-sm);
  color: var(--accent-primary-hover);
}

.wt-card__link::after {
  content: '→';
  transition: transform var(--transition-fast);
}

.wt-card:hover .wt-card__link::after {
  transform: translateX(4px);
}

/* Stagger animation delay */
.wt-card:nth-child(1) {
  animation-delay: 0.05s;
}

.wt-card:nth-child(2) {
  animation-delay: 0.1s;
}

.wt-card:nth-child(3) {
  animation-delay: 0.15s;
}

.wt-card:nth-child(4) {
  animation-delay: 0.2s;
}

.wt-card:nth-child(5) {
  animation-delay: 0.25s;
}

.wt-card:nth-child(6) {
  animation-delay: 0.3s;
}

.wt-card:nth-child(7) {
  animation-delay: 0.35s;
}

.wt-card:nth-child(8) {
  animation-delay: 0.4s;
}

.wt-card:nth-child(9) {
  animation-delay: 0.45s;
}

.wt-card:nth-child(10) {
  animation-delay: 0.5s;
}

.wt-card:nth-child(11) {
  animation-delay: 0.55s;
}

.wt-card:nth-child(12) {
  animation-delay: 0.6s;
}

/* ---------- Glass Panel (Tool Pages) ---------- */
.wt-panel {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  animation: fadeInUp 0.4s ease;
}

.wt-panel__header {
  margin-bottom: var(--space-xl);
}

.wt-panel__title {
  font-size: var(--fs-2xl);
  font-weight: 700;
  margin-bottom: var(--space-xs);
}

.wt-panel__subtitle {
  color: var(--text-secondary);
  font-size: var(--fs-sm);
}

/* ---------- Form Controls ---------- */
.wt-form-group {
  margin-bottom: var(--space-lg);
}

.wt-label {
  display: block;
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
}

.wt-input,
.wt-select,
.wt-textarea {
  width: 100%;
  padding: var(--space-md);
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  transition: all var(--transition-base);
  outline: none;
}

.wt-input:focus,
.wt-select:focus,
.wt-textarea:focus {
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-glow);
  background: var(--bg-glass-strong);
}

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

.wt-textarea {
  resize: vertical;
  min-height: 120px;
}

.wt-select {
  cursor: pointer;
  appearance: none;
  background-color: #1a1a2e;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23a0a0b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

.wt-select option {
  background-color: #1a1a2e;
  color: var(--text-primary);
  padding: var(--space-sm);
}

.wt-select:focus {
  background-color: #16213e;
}

.wt-form-text {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  margin-top: var(--space-xs);
}

/* Checkbox & Radio */
.wt-check-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.wt-check-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: var(--fs-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  user-select: none;
}

.wt-check-label:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
}

.wt-check-label input:checked+span {
  color: var(--accent-primary);
}

.wt-check-label input {
  accent-color: var(--accent-primary);
}

/* Color Picker */
.wt-color-picker {
  width: 48px;
  height: 48px;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: none;
  cursor: pointer;
  padding: 2px;
}

/* ---------- Buttons ---------- */
.wt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-xl);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  font-weight: 600;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
  line-height: 1;
  white-space: nowrap;
}

.wt-btn--primary {
  background: var(--accent-gradient);
  color: #fff;
  box-shadow: 0 4px 15px rgba(108, 99, 255, 0.3);
}

.wt-btn--primary:hover {
  background: var(--accent-gradient-hover);
  box-shadow: 0 6px 20px rgba(108, 99, 255, 0.4);
  transform: translateY(-1px);
  color: #fff;
}

.wt-btn--secondary {
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

.wt-btn--secondary:hover {
  background: var(--bg-glass-strong);
  border-color: var(--border-hover);
  color: #fff;
}

.wt-btn--danger {
  background: rgba(255, 107, 107, 0.15);
  border: 1px solid rgba(255, 107, 107, 0.3);
  color: var(--danger);
}

.wt-btn--danger:hover {
  background: rgba(255, 107, 107, 0.25);
}

.wt-btn--sm {
  padding: var(--space-sm) var(--space-md);
  font-size: var(--fs-sm);
  border-radius: var(--radius-sm);
}

.wt-btn--block {
  width: 100%;
}

.wt-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* ---------- Drag & Drop Upload ---------- */
.wt-dropzone {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  text-align: center;
  transition: all var(--transition-base);
  cursor: pointer;
  position: relative;
  background: var(--bg-glass);
}

.wt-dropzone:hover,
.wt-dropzone.dragover {
  border-color: var(--accent-primary);
  background: rgba(108, 99, 255, 0.05);
  box-shadow: var(--shadow-glow);
}

.wt-dropzone__icon {
  font-size: 3rem;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
  transition: color var(--transition-base);
}

.wt-dropzone:hover .wt-dropzone__icon,
.wt-dropzone.dragover .wt-dropzone__icon {
  color: var(--accent-primary);
}

.wt-dropzone__text {
  color: var(--text-secondary);
  font-size: var(--fs-sm);
  margin-bottom: var(--space-xs);
}

.wt-dropzone__text strong {
  color: var(--accent-primary);
}

.wt-dropzone__hint {
  color: var(--text-muted);
  font-size: var(--fs-xs);
}

.wt-dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

/* ---------- File List ---------- */
.wt-file-list {
  list-style: none;
  margin-top: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.wt-file-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  animation: fadeInUp 0.3s ease;
}

.wt-file-item__icon {
  font-size: var(--fs-xl);
  color: var(--accent-primary);
  flex-shrink: 0;
}

.wt-file-item__info {
  flex: 1;
  min-width: 0;
}

.wt-file-item__name {
  font-size: var(--fs-sm);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wt-file-item__size {
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

.wt-file-item__remove {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: var(--space-xs);
  font-size: var(--fs-lg);
  transition: color var(--transition-fast);
  flex-shrink: 0;
}

.wt-file-item__remove:hover {
  color: var(--danger);
}

.wt-file-item__handle {
  cursor: grab;
  color: var(--text-muted);
  padding: var(--space-xs);
  font-size: var(--fs-lg);
}

.wt-file-item__handle:active {
  cursor: grabbing;
}

.wt-file-item.dragging {
  opacity: 0.5;
  border-color: var(--accent-primary);
}

/* ---------- Image Thumbnails Grid ---------- */
.wt-thumb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: var(--space-md);
  margin-top: var(--space-md);
}

.wt-thumb {
  position: relative;
  aspect-ratio: 3/4;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 2px solid var(--border-color);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.wt-thumb:hover {
  border-color: var(--border-hover);
}

.wt-thumb.selected {
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-glow);
}

.wt-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wt-thumb__label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  text-align: center;
  font-size: var(--fs-xs);
  padding: var(--space-xs);
}

.wt-thumb__check {
  position: absolute;
  top: var(--space-xs);
  right: var(--space-xs);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent-primary);
  color: #fff;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-xs);
}

.wt-thumb.selected .wt-thumb__check {
  display: flex;
}

/* ---------- Stats Cards ---------- */
.wt-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--space-md);
}

.wt-stat {
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  text-align: center;
  transition: all var(--transition-fast);
}

.wt-stat:hover {
  border-color: var(--border-hover);
  background: var(--bg-glass-strong);
}

.wt-stat__value {
  font-family: var(--font-heading);
  font-size: var(--fs-2xl);
  font-weight: 700;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.wt-stat__label {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  margin-top: var(--space-xs);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ---------- Result / Output Area ---------- */
.wt-result {
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  margin-top: var(--space-lg);
  position: relative;
  animation: fadeInUp 0.3s ease;
}

.wt-result__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-md);
}

.wt-result__title {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.wt-result pre,
.wt-result textarea {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: var(--space-md);
  color: var(--text-primary);
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: var(--fs-sm);
  width: 100%;
  resize: vertical;
  outline: none;
}

/* ---------- Preview Comparison ---------- */
.wt-preview-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.wt-preview-compare__side {
  text-align: center;
}

.wt-preview-compare__label {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: var(--space-sm);
}

.wt-preview-compare img {
  max-width: 100%;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

@media (max-width: 640px) {
  .wt-preview-compare {
    grid-template-columns: 1fr;
  }
}

/* ---------- Action Button Grid ---------- */
.wt-action-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.wt-action-btn {
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: var(--fs-xs);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: var(--font-body);
}

.wt-action-btn:hover,
.wt-action-btn.active {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  background: rgba(108, 99, 255, 0.1);
}

/* ---------- Alert Messages ---------- */
.wt-alert {
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-lg);
  font-size: var(--fs-sm);
  display: flex;
  align-items: center;
  gap: var(--space-md);
  animation: fadeInUp 0.3s ease;
}

.wt-alert--error {
  background: rgba(255, 107, 107, 0.1);
  border: 1px solid rgba(255, 107, 107, 0.2);
  color: var(--danger);
}

.wt-alert--success {
  background: rgba(0, 212, 170, 0.1);
  border: 1px solid rgba(0, 212, 170, 0.2);
  color: var(--success);
}

.wt-alert--warning {
  background: rgba(255, 193, 7, 0.1);
  border: 1px solid rgba(255, 193, 7, 0.2);
  color: var(--warning);
}

.wt-alert--info {
  background: rgba(108, 99, 255, 0.1);
  border: 1px solid rgba(108, 99, 255, 0.2);
  color: var(--info);
}

/* ---------- QR Preview ---------- */
.wt-qr-preview {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: var(--space-xl);
  background: #fff;
  border-radius: var(--radius-md);
  margin: var(--space-lg) auto;
  max-width: 300px;
}

.wt-qr-preview img {
  max-width: 100%;
}

/* ---------- Progress Bar ---------- */
.wt-progress {
  width: 100%;
  height: 6px;
  background: var(--bg-glass);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin: var(--space-md) 0;
}

.wt-progress__bar {
  height: 100%;
  background: var(--accent-gradient);
  border-radius: var(--radius-full);
  transition: width var(--transition-slow);
  width: 0%;
}

.wt-progress__bar.indeterminate {
  width: 30%;
  animation: indeterminate 1.5s ease-in-out infinite;
}

/* ---------- Toast Notifications ---------- */
.wt-toast-container {
  position: fixed;
  bottom: var(--space-xl);
  right: var(--space-xl);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.wt-toast {
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: var(--fs-sm);
  box-shadow: var(--shadow-lg);
  animation: slideInRight 0.3s ease;
  max-width: 360px;
  backdrop-filter: blur(12px);
}

.wt-toast--success {
  border-left: 3px solid var(--success);
}

.wt-toast--error {
  border-left: 3px solid var(--danger);
}

/* ---------- Footer ---------- */
.wt-footer {
  margin-top: var(--space-3xl);
  padding: var(--space-2xl) 0;
  border-top: 1px solid var(--border-color);
  text-align: center;
  color: var(--text-muted);
  font-size: var(--fs-sm);
}

.wt-footer__links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-lg);
  margin-bottom: var(--space-md);
  list-style: none;
}

.wt-footer__links a {
  color: var(--text-secondary);
  font-size: var(--fs-sm);
  transition: color var(--transition-fast);
}

.wt-footer__links a:hover {
  color: var(--accent-primary);
}

/* ---------- Presets Grid ---------- */
.wt-presets {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.wt-preset {
  padding: var(--space-xs) var(--space-md);
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: var(--fs-xs);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: var(--font-body);
}

.wt-preset:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

/* ---------- Utility Classes ---------- */
.text-center {
  text-align: center;
}

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

.mt-md {
  margin-top: var(--space-md);
}

.mt-lg {
  margin-top: var(--space-lg);
}

.mt-xl {
  margin-top: var(--space-xl);
}

.mb-md {
  margin-bottom: var(--space-md);
}

.mb-lg {
  margin-bottom: var(--space-lg);
}

.gap-sm {
  gap: var(--space-sm);
}

.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.justify-center {
  justify-content: center;
}

.flex-wrap {
  flex-wrap: wrap;
}

.w-full {
  width: 100%;
}

.hidden {
  display: none !important;
}

/* Inline form row */
.wt-row {
  display: flex;
  gap: var(--space-md);
  align-items: flex-end;
}

.wt-row>* {
  flex: 1;
}

@media (max-width: 640px) {
  .wt-row {
    flex-direction: column;
  }
}

/* ---------- Keyframe Animations ---------- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(100px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

  100% {
    transform: translateX(400%);
  }
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

/* Loading spinner */
.wt-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-color);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  display: inline-block;
}

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

/* ---------- Ad Layout System ---------- */
.wt-layout {
  display: flex;
  justify-content: center;
  min-height: calc(100vh - var(--navbar-height));
  position: relative;
}

.wt-layout__main {
  flex: 1;
  max-width: var(--container-max);
  min-width: 0;
}

/* Sidebar Ads */
.wt-ad--sidebar {
  width: 160px;
  flex-shrink: 0;
  padding: var(--space-xl) var(--space-sm);
  display: none;
}

.wt-ad--sidebar .wt-ad__inner {
  position: sticky;
  top: calc(var(--navbar-height) + var(--space-lg));
}

@media (min-width: 1400px) {
  .wt-ad--sidebar {
    display: block;
  }
}

/* Header & Footer Banner Ads */
.wt-ad--header,
.wt-ad--footer {
  text-align: center;
  padding: var(--space-md) var(--space-lg);
  max-width: var(--container-max);
  margin: 0 auto;
}

/* Hide all ads on small screens */
@media (max-width: 768px) {

  .wt-ad--header,
  .wt-ad--footer {
    padding: var(--space-sm);
  }
}