/* =============================================
   DESIGN TOKENS
   ============================================= */
:root {
  /* BACKGROUNDS: Pure black and very dark grays */
  --bg-base: #000000;
  --bg-surface: #080808;
  --bg-elevated: #121212;
  --bg-glass-hover: rgba(255, 255, 255, 0.05);
  --bg-surface-glass: rgba(8, 8, 8, 0.45);



  /* BORDERS: Very subtle, elite look */
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-mid: rgba(255, 255, 255, 0.12);
  --border-strong: rgba(255, 255, 255, 0.20);

  /* COPPER / AMBER ACCENT */
  --accent: #d97706;
  --accent-hover: #f59e0b;
  --accent-glow: rgba(217, 119, 6, 0.15);
  --accent-2: #ea580c;
  --accent-grad: linear-gradient(135deg, #f59e0b, #ea580c);

  /* TEXT */
  --text-primary: #ffffff;
  --text-secondary: #a1a1aa;
  --text-muted: #52525b;
  --text-accent: #fbbf24;

  /* STATUS COLORS */
  --success: #10b981;
  --success-bg: rgba(16, 185, 129, 0.10);
  --error: #ef4444;
  --error-bg: rgba(239, 68, 68, 0.10);
  --warning: #f59e0b;

  /* JSON syntax colors */
  --json-string: #10b981;
  --json-number: #f59e0b;
  --json-boolean: #3b82f6;
  --json-null: #8b5cf6;
  --json-key: #a1a1aa;
  --json-bracket: #52525b;

  --font-sans: 'Plus Jakarta Sans', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  --sidebar-w: 260px;
  --header-h: 72px;

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-xl: 24px;

  --t-fast: 150ms ease-out;
  --t-mid: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --t-spring: 400ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* =============================================
   RESET & BASE
   ============================================= */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
  touch-action: manipulation;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  touch-action: manipulation;
}

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

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

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border-mid);
  border-radius: 99px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--border-strong);
}

/* =============================================
   LAYOUT
   ============================================= */
.app-layout {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

/* =============================================
   TOP NAV
   ============================================= */
.top-nav {
  height: var(--header-h);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-surface-glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  gap: 20px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  transform: translateZ(0);
  overflow: visible;
  /* Hardware acceleration for blur */
  transition: all var(--t-mid);
}




.top-nav-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 5px;
  /* Added gap */
  color: var(--text-primary);
  transition: opacity var(--t-fast);
}

.logo:hover {
  opacity: 0.8;
}

.logo-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--r-sm);
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 0 16px var(--accent-glow);
}

.logo-text {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.3px;
  white-space: nowrap;
}

.top-nav-center {
  flex: 1;
  max-width: 600px;
  display: flex;
  justify-content: center;
}

.global-search-wrapper {
  position: relative;
  width: 100%;
}

.global-search-input {
  width: 100%;
  background: var(--bg-base);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  padding: 10px 16px 10px 40px;
  color: var(--text-primary);
  font-size: 14px;
  transition: all var(--t-fast);
  outline: none;
}

.global-search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-glow);
  background: var(--bg-elevated);
}

.global-search-wrapper .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.top-nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
}


.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--r-md);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: background var(--t-fast), color var(--t-fast), box-shadow var(--t-fast);
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  border: 1px solid transparent;
  user-select: none;
}

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

.nav-item.active {
  background: rgba(217, 119, 6, 0.08);
  color: var(--text-primary);
  border-color: rgba(217, 119, 6, 0.15);
}

.nav-item.active .nav-icon {
  color: var(--accent);
}

.nav-icon {
  font-size: 16px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
  font-style: normal;
}

.nav-label {
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-footer {
  padding: 12px 16px 20px;
  border-top: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.coming-soon-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
}

/* =============================================
   SIDEBAR OVERLAY (mobile)
   ============================================= */
/* =============================================
   MAIN CONTENT
   ============================================= */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  /* padding-top removed from here to allow content to scroll under header */
}



/* =============================================
   DASHBOARD VIEW (App Store Style)
   ============================================= */
.dashboard-view {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  position: relative;
  padding-top: var(--header-h);
  /* Content starts below header but scrolls behind it */
}


.dashboard-hero {
  text-align: center;
  max-width: 800px;
  margin-bottom: 48px;
  padding: 40px 40px 0;
  position: relative;
}

.dashboard-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(ellipse, var(--accent-glow) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.dashboard-title {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -1px;
  color: var(--text-primary);
  margin-bottom: 16px;
  line-height: 1.3;
  padding-bottom: 4px;
  position: relative;
  z-index: 1;
}

.dashboard-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.6;
  position: relative;
  z-index: 1;
}

/* =============================================
   FLOATING SIDE NAV (Pop-up Menu)
   ============================================= */
.floating-side-nav {
  position: fixed;
  left: 40px;
  top: 50%;
  transform: translateY(-50%) translateZ(0);
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  background: var(--bg-surface-glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 8px 32px rgb(0, 0, 0);
  scrollbar-width: none;

}

.floating-side-nav::-webkit-scrollbar {
  display: none;
}

.category-nav-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  padding: 10px 20px;
  border-radius: var(--r-md);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  white-space: nowrap;
  transition: all var(--t-fast);
  width: 100%;
}

.category-nav-btn:hover {
  background: var(--bg-glass-hover);
  color: var(--text-primary);
  border-color: var(--border-subtle);
}

.category-nav-btn.active {
  background: rgba(217, 119, 6, 0.15);
  color: var(--accent);
  border-color: rgba(217, 119, 6, 0.3);
}

/* Make sure main content doesn't get hidden behind left nav on large screens */
@media (min-width: 1400px) {
  .dashboard-grid-container {
    padding-left: 160px;
    /* Offset to center the grid considering the left nav + original padding */
  }
}

@media (max-width: 1399px) {
  .floating-side-nav {
    display: none;
    /* Hide on smaller screens where it would overlap too much */
  }
}

.dashboard-grid-container {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 40px;
  position: relative;
  z-index: 1;
  padding: 0 40px 40px;
}

.category-section-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.category-section-title::before {
  content: '';
  display: block;
  width: 4px;
  height: 18px;
  background: var(--accent);
  border-radius: 4px;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.tool-card {
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  padding: 24px;
  cursor: pointer;
  transition: all var(--t-mid);
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
  content-visibility: auto;
  contain-intrinsic-size: 200px;
}

@media (hover: hover) {
  .tool-card:hover {
    background: var(--bg-glass-hover);
    border-color: var(--border-mid);
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  }
}

.tool-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tool-card-icon {
  font-size: 28px;
  width: 48px;
  height: 48px;
  background: var(--bg-elevated);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-subtle);
}

.tool-card-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.tool-card-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 39px;
}

/* =============================================
   SCROLL TO TOP BUTTON
   ============================================= */
.scroll-top-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all var(--t-mid);
  z-index: 90;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.scroll-top-btn.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-top-btn:hover {
  background: var(--bg-elevated);
  border-color: var(--border-mid);
  color: var(--accent);
  transform: translateY(-4px);
}

/* =============================================
   TOOL VIEW (Focus Mode)
   ============================================= */
.tool-view {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-top: var(--header-h);
  /* Add padding to account for fixed header on desktop */
}


.tool-view-header {
  padding: 20px 40px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--bg-surface);
}

.btn-back {
  align-self: flex-start;
  padding: 6px 12px;
  margin-left: -12px;
}

.tool-active-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.tool-viewport {
  flex: 1;
  overflow-y: auto;
  padding: 40px;
  display: flex;
  flex-direction: column;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

/* =============================================
   BUTTONS
   ============================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: 600;
  transition: all var(--t-fast);
  white-space: nowrap;
  cursor: pointer;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 2px 8px var(--accent-glow);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 4px 12px var(--accent-glow);
}

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text-secondary);
  border-color: var(--border-mid);
}

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

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: transparent;
}

.btn-ghost:hover {
  background: var(--bg-glass-hover);
  color: var(--text-secondary);
}

.btn-danger:hover {
  color: var(--error) !important;
}

.btn-sm {
  padding: 5px 12px;
  font-size: 12px;
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* =============================================
   FORM ELEMENTS
   ============================================= */
.tool-select {
  background: var(--bg-elevated);
  border: 1px solid var(--border-mid);
  border-radius: var(--r-sm);
  color: var(--text-secondary);
  font-size: 12px;
  padding: 6px 10px;
  cursor: pointer;
  transition: border-color var(--t-fast);
}

.tool-select:hover,
.tool-select:focus {
  border-color: var(--accent);
  outline: none;
  color: var(--text-primary);
}

/* =============================================
   GLASS PANEL
   ============================================= */
.glass-panel {
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02), 0 8px 32px rgba(0, 0, 0, 0.4);
}

/* =============================================
   TOOL CONTAINER SHARED
   ============================================= */
.tool-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
  animation: fadeSlideUp var(--t-spring) both;
}

.panel-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
  text-transform: uppercase;
}

/* =============================================
   JSON BEAUTIFIER TOOL
   ============================================= */
.json-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.json-toolbar-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.json-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  flex: 1;
  min-height: 0;
}

.json-panel {
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  overflow: hidden;
  min-height: 380px;
}

.json-textarea {
  flex: 1;
  resize: none;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  padding: 16px;
  outline: none;
  tab-size: 2;
}

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

.json-output-container {
  flex: 1;
  overflow: auto;
  padding: 16px;
}

.json-output {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-secondary);
  white-space: pre;
  margin: 0;
}

.json-string {
  color: var(--json-string);
}

.json-number {
  color: var(--json-number);
}

.json-boolean {
  color: var(--json-boolean);
}

.json-null {
  color: var(--json-null);
}

.json-key {
  color: var(--json-key);
}

.json-bracket {
  color: var(--json-bracket);
}

.json-status {
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: background var(--t-fast), box-shadow var(--t-fast);
}

.status-dot.valid {
  background: var(--success);
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.4);
}

.status-dot.invalid {
  background: var(--error);
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.4);
}

.json-statusbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 2px 0;
  font-size: 11px;
  color: var(--text-muted);
}

.statusbar-sep {
  opacity: 0.4;
}

.json-error-banner {
  background: var(--error-bg);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: var(--r-sm);
  padding: 10px 14px;
  font-size: 12px;
  color: var(--error);
  font-family: var(--font-mono);
  margin-top: 4px;
  display: none;
}

.json-error-banner.visible {
  display: block;
}

/* =============================================
   WORD COUNTER TOOL
   ============================================= */
.wc-tool {
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
}

.wc-textarea-wrapper {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.wc-textarea {
  resize: none;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 15px;
  line-height: 1.8;
  padding: 20px;
  outline: none;
  min-height: 200px;
  flex: 1;
}

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

.wc-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  padding: 8px 12px;
  border-top: 1px solid var(--border-subtle);
}

.wc-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  padding: 18px;
  transition: border-color var(--t-fast), transform var(--t-fast);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  opacity: 0;
  transition: opacity var(--t-fast);
}

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

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

.stat-card.featured {
  border-color: rgba(99, 102, 241, 0.25);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.06), rgba(139, 92, 246, 0.04));
}

.stat-card.featured::before {
  opacity: 1;
}

.stat-icon {
  font-size: 18px;
  margin-bottom: 8px;
  display: block;
}

.stat-value {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -1px;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 6px;
  font-family: var(--font-mono);
  transition: color var(--t-fast);
}

.stat-card.featured .stat-value {
  color: var(--text-accent);
}

.stat-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.stat-value.updating {
  color: var(--accent);
}

/* Top word list */
.wc-top-words {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  padding: 16px 18px;
}

.wc-top-words h3 {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.word-freq-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.word-freq-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 99px;
  padding: 3px 10px;
  font-size: 12px;
}

.word-freq-chip span {
  color: var(--text-muted);
  font-size: 10px;
}

/* =============================================
   TOAST NOTIFICATIONS
   ============================================= */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 9999;
  pointer-events: none;
}

.toast {
  background: var(--bg-elevated);
  border: 1px solid var(--border-mid);
  border-radius: var(--r-md);
  padding: 12px 18px;
  font-size: 13px;
  color: var(--text-primary);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  animation: toastIn 0.3s var(--t-spring) both;
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.toast.success {
  border-color: rgba(34, 197, 94, 0.3);
}

.toast.error {
  border-color: rgba(239, 68, 68, 0.3);
}

.toast.hide {
  animation: toastOut 0.25s ease-out both;
}

/* =============================================
   ANIMATIONS
   ============================================= */
@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

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

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-8px);
  }
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(20px);
  }

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

@keyframes toastOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }

  to {
    opacity: 0;
    transform: translateX(20px);
  }
}

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

  to {
    transform: rotate(360deg);
  }
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1024px) {
  .sidebar {
    width: 64px;
  }

  .sidebar .logo-text,
  .sidebar .nav-label,
  .sidebar .sidebar-section-label,
  .sidebar .coming-soon-badge {
    display: none;
  }

  .sidebar .logo-icon {
    margin: 0 auto;
  }

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

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

  .nav-item {
    justify-content: center;
    padding: 10px;
  }

  .nav-icon {
    width: auto;
  }

  .sidebar-footer {
    display: none;
  }
}

/* =============================================
   COLOR CONVERTER TOOL
   ============================================= */
.cc-swatch-row {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  padding: 20px;
}

.cc-swatch-main {
  width: 100px;
  height: 100px;
  border-radius: var(--r-lg);
  flex-shrink: 0;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  transition: background 0.25s ease;
}

.cc-swatch-label {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 1px;
  margin-bottom: 10px;
}

.cc-contrast-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.cc-contrast-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 500;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.cc-inputs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.cc-input-group {
  padding: 16px;
  border-radius: var(--r-lg);
}

.cc-input-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.cc-format-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.cc-hex-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cc-color-picker {
  width: 40px;
  height: 36px;
  border: 1px solid var(--border-mid);
  border-radius: var(--r-sm);
  background: var(--bg-elevated);
  cursor: pointer;
  padding: 2px;
  flex-shrink: 0;
}

.cc-color-picker::-webkit-color-swatch-wrapper {
  padding: 0;
}

.cc-color-picker::-webkit-color-swatch {
  border: none;
  border-radius: 4px;
}

.cc-text-input {
  flex: 1;
  background: var(--bg-elevated);
  border: 1px solid var(--border-mid);
  border-radius: var(--r-sm);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 8px 10px;
  transition: border-color var(--t-fast);
  outline: none;
}

.cc-text-input:focus {
  border-color: var(--accent);
}

.cc-rgb-row {
  display: flex;
  gap: 8px;
}

.cc-channel {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.cc-channel-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.cc-num-input {
  background: var(--bg-elevated);
  border: 1px solid var(--border-mid);
  border-radius: var(--r-sm);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 7px 8px;
  text-align: center;
  width: 100%;
  outline: none;
  transition: border-color var(--t-fast);
}

.cc-num-input:focus {
  border-color: var(--accent);
}

.cc-num-input::-webkit-inner-spin-button {
  opacity: 0.5;
}

.cc-palette {
  padding: 14px 16px;
  border-radius: var(--r-lg);
}

.cc-palette-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 10px;
}

.cc-palette-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.cc-palette-chip {
  width: 36px;
  height: 36px;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: transform var(--t-fast), box-shadow var(--t-fast);
  border: 2px solid rgba(255, 255, 255, 0.08);
}

.cc-palette-chip:hover {
  transform: scale(1.15);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* =============================================
   PASSWORD GENERATOR TOOL
   ============================================= */
.pg-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 16px;
  flex: 1;
}

.pg-controls {
  padding: 20px;
  border-radius: var(--r-lg);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.pg-section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
  margin-bottom: -4px;
}

.pg-control-group {
  display: flex;

  gap: 8px;
}

.pg-control-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pg-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.pg-length-val {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
}

.pg-slider {
  width: 100%;
  -webkit-appearance: none;
  height: 4px;
  background: var(--border-mid);
  border-radius: 99px;
  outline: none;
  cursor: pointer;
}

.pg-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
  cursor: pointer;
  transition: transform var(--t-fast);
}

.pg-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.pg-slider-marks {
  position: relative;
  height: 16px;
  margin-top: 2px;
}

.pg-slider-marks span {
  position: absolute;
  font-size: 10px;
  color: var(--text-muted);
  transform: translateX(-50%);
  white-space: nowrap;
}

.pg-slider-marks span:first-child {
  transform: translateX(0);
}

.pg-slider-marks span:last-child {
  transform: translateX(-100%);
}

.pg-toggles {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pg-toggle-item {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.pg-toggle-item input[type="checkbox"] {
  display: none;
}

.pg-toggle-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 600;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--t-fast);
  width: 100%;
}

.pg-toggle-item input:checked+.pg-toggle-pill {
  background: var(--accent-glow);
  border-color: rgba(99, 102, 241, 0.3);
  color: var(--text-accent);
}

.pg-output-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.pg-strength {
  padding: 16px;
  border-radius: var(--r-lg);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pg-strength-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pg-strength-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}

.pg-strength-name {
  font-size: 13px;
  font-weight: 700;
  transition: color 0.3s ease;
}

.pg-strength-bar-track {
  height: 6px;
  background: var(--border-subtle);
  border-radius: 99px;
  overflow: hidden;
}

.pg-strength-bar-fill {
  height: 100%;
  border-radius: 99px;
  transition: width 0.4s ease, background 0.4s ease;
}

.pg-entropy-txt {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.pg-passwords {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.pg-empty-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 120px;
  color: var(--text-muted);
  font-size: 13px;
  background: var(--bg-surface);
  border: 1px dashed var(--border-subtle);
  border-radius: var(--r-lg);
}

.pg-pw-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  padding: 12px 16px;
  transition: border-color var(--t-fast);
  animation: fadeSlideUp 0.3s both;
}

.pg-pw-row:hover {
  border-color: var(--border-mid);
}

.pg-pw-text {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text-primary);
  word-break: break-all;
  letter-spacing: 0.05em;
}

/* =============================================
   QR CODE GENERATOR TOOL
   ============================================= */
.qr-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 20px;
  align-items: start;
  flex: 1;
}

@media (max-width: 900px) {
  .qr-layout {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }

  .qr-preview-panel {
    order: -1;
    /* Puts preview on top so users see changes instantly without scrolling */
    width: 100%;
    max-width: 100%;
  }

  .qr-canvas-wrapper {
    min-height: 240px;
    padding: 16px;
  }

  .qr-controls {
    padding: 16px;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }

  .wc-textarea {
    width: 100%;
    max-width: 100%;
  }
}

@media (max-width: 600px) {
  .qr-grid-2col {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .qr-tabs-header,
  .qr-presets-row {
    width: 100%;
    max-width: 100%;
  }

  .qr-style-pill {
    padding: 8px 4px;
    font-size: 10px;
    gap: 4px;
  }

  .qr-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .qr-actions .btn {
    width: 100%;
    justify-content: center;
    font-size: 12px;
    padding: 10px 8px;
  }

  .qr-actions button:nth-child(3) {
    grid-column: span 2;
  }

  .qr-meta {
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
  }

  .qr-meta .statusbar-sep {
    display: none;
  }

  .qr-meta span {
    background: var(--bg-elevated);
    padding: 4px 8px;
    border-radius: var(--r-sm);
    border: 1px solid var(--border-subtle);
  }
}

.qr-controls {
  padding: 20px;
  border-radius: var(--r-lg);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.qr-colors-row {
  display: flex;
  gap: 16px;
  margin-top: 6px;
}

.qr-color-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-items: center;
}

.qr-preview-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.qr-canvas-wrapper {
  flex: 1;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-lg);
  padding: 24px;
}

.qr-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  text-align: center;
}

.qr-loading {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.qr-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.qr-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--r-md);
  font-size: 11px;
  color: var(--text-muted);
}

.qr-ecc-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
}

.qr-ecc-tip {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.5;
  padding: 8px 10px;
  background: var(--bg-elevated);
  border-radius: var(--r-sm);
  border-left: 2px solid var(--accent);
}

.qr-style-grid {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

.qr-style-item {
  flex: 1;
  cursor: pointer;
}

.qr-style-item input[type="radio"] {
  display: none;
}

.qr-style-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 8px;
  border-radius: var(--r-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--t-fast);
}

.qr-style-item input:checked+.qr-style-pill {
  border-color: rgba(99, 102, 241, 0.4);
  background: var(--accent-glow);
  color: var(--text-accent);
}

.qr-style-pill:hover {
  border-color: var(--border-mid);
  color: var(--text-primary);
}

.qr-style-preview {
  width: 28px;
  height: 28px;
}

.classic-preview {
  background:
    linear-gradient(var(--text-primary) 0 0) 0 0/8px 8px,
    linear-gradient(var(--text-primary) 0 0) 10px 0/8px 8px,
    linear-gradient(var(--text-primary) 0 0) 0 10px/18px 8px,
    linear-gradient(var(--text-primary) 0 0) 10px 10px/8px 8px;
  background-repeat: no-repeat;
}

.dots-preview {
  background:
    radial-gradient(circle, var(--text-primary) 50%, transparent 50%) 0 0/8px 8px,
    radial-gradient(circle, var(--text-primary) 50%, transparent 50%) 10px 0/8px 8px,
    radial-gradient(circle, var(--text-primary) 50%, transparent 50%) 5px 10px/8px 8px;
  background-repeat: no-repeat;
}

.rounded-preview {
  background: var(--text-primary);
  border-radius: 5px;
  opacity: 0.5;
}

/* Advanced QR Controls */
/* =============================================
   QR CODE GENERATOR - PREMIUM TABS & CONTROLS
   ============================================= */
/* Tabs Navigation */
.qr-tabs-header {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 6px;
  margin-bottom: 16px;
  overflow-x: auto;
  scrollbar-width: none;
}

.qr-tabs-header::-webkit-scrollbar {
  display: none;
}

.qr-tab-btn {
  padding: 8px 12px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all var(--t-fast);
}

.qr-tab-btn:hover {
  color: var(--text-primary);
}

.qr-tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* Tabs Panel Layout */
.qr-tab-panel {
  display: none;
  flex-direction: column;
  gap: 16px;
  animation: fadeSlideUp 0.2s both;
}

.qr-tab-panel.active {
  display: flex;
}

/* Presets Row */
.qr-presets-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0 10px 0;
  scrollbar-width: none;
}

.qr-presets-row::-webkit-scrollbar {
  display: none;
}

.qr-preset-btn {
  flex: 0 0 auto;
  padding: 6px 12px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--t-fast);
}

.qr-preset-btn:hover {
  border-color: var(--accent);
  color: var(--text-primary);
  background: var(--bg-surface);
}

/* Premium Sliders */
.pg-control-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pg-control-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pg-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
}

.pg-length-val {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  background: rgba(99, 102, 241, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
}

.pg-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: var(--border-subtle);
  outline: none;
  margin: 6px 0;
}

.pg-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  box-shadow: 0 0 6px rgba(99, 102, 241, 0.4);
  transition: transform var(--t-fast);
}

.pg-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.pg-slider-marks {
  display: flex;
  justify-content: space-between;
  padding: 0 2px;
  margin-top: -2px;
}

.pg-slider-marks span {
  font-size: 10px;
  color: var(--text-muted);
}

/* Form Layout Grids & Custom inputs */
.qr-grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.qr-checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 600;
}

.qr-checkbox-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
}

.cc-color-picker {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  height: 38px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  background: var(--bg-elevated);
  padding: 4px;
  cursor: pointer;
  transition: border-color var(--t-fast);
}

.cc-color-picker::-webkit-color-swatch-wrapper {
  padding: 0;
}

.cc-color-picker::-webkit-color-swatch {
  border: none;
  border-radius: calc(var(--r-md) - 4px);
}

.tool-select {
  height: 38px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  background: var(--bg-elevated);
  color: var(--text-primary);
  padding: 0 12px;
  font-size: 12px;
  outline: none;
  cursor: pointer;
  transition: border-color var(--t-fast);
}

.tool-select:focus {
  border-color: var(--accent);
}

/* Style Selector Pills */
.qr-style-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.qr-style-item {
  cursor: pointer;
  position: relative;
}

.qr-style-item input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.qr-style-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 8px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  background: var(--bg-elevated);
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all var(--t-fast);
}

.qr-style-item input[type="radio"]:checked+.qr-style-pill {
  border-color: var(--accent);
  background: rgba(99, 102, 241, 0.05);
  color: var(--accent);
}

.qr-style-preview {
  width: 20px;
  height: 20px;
  border: 2px solid currentColor;
  display: block;
}

.classic-preview {
  background: currentColor;
}

.dots-preview {
  border-radius: 50%;
  background: currentColor;
}

.rounded-preview {
  border-radius: 4px;
  background: currentColor;
}

/* Logo Upload & Chips */
.qr-logo-upload-btn {
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  border: 1px dashed var(--border-mid);
  border-radius: var(--r-md);
  background: var(--bg-elevated);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all var(--t-fast);
  text-align: center;
}

.qr-logo-upload-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(99, 102, 241, 0.05);
}

.qr-file-input-hidden {
  display: none;
}

.qr-preset-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.qr-icon-chip {
  padding: 6px 12px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--t-fast);
}

.qr-icon-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.qr-icon-chip.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}

/* ECC badge & tip */
.qr-ecc-badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  background: rgba(99, 102, 241, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
}

.qr-ecc-tip {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.4;
}

/* =============================================
   INFO BUTTON & TOOLTIP
   ============================================= */
.info-btn-wrapper {
  position: relative;
}

.info-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1px solid var(--border-mid);
  color: var(--text-muted);
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--t-fast);
  flex-shrink: 0;
  line-height: 1;
  padding: 0;
}

.info-btn:hover {
  background: var(--accent-glow);
  border-color: var(--accent);
  color: var(--text-accent);
  box-shadow: 0 0 10px var(--accent-glow);
}

.info-tooltip {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  width: 340px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-mid);
  border-radius: var(--r-lg);
  padding: 16px 18px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.75;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
  z-index: 2000;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  white-space: normal;
}

.info-tooltip::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 8px;
  width: 10px;
  height: 10px;
  background: var(--bg-elevated);
  border-left: 1px solid var(--border-mid);
  border-top: 1px solid var(--border-mid);
  transform: rotate(45deg);
}

.info-btn-wrapper:hover .info-tooltip,
.info-btn-wrapper:focus-within .info-tooltip {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.info-tooltip-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.info-tooltip-title::before {
  content: 'ⓘ';
  color: var(--accent);
}

.info-tooltip-body {
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.75;
}

.info-tooltip-tip {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
  font-size: 11px;
  color: var(--text-muted);
}

.info-tooltip-tip strong {
  color: var(--text-accent);
}

@media (max-width: 768px) {
  body {
    overflow: auto;
  }

  .app-layout {
    flex-direction: column;
    height: auto;
    min-height: 100vh;
  }

  .sidebar {
    width: 100%;
    height: auto;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
    flex-direction: row;
    align-items: center;
    padding: 0;
    overflow: visible;
  }

  .sidebar-header {
    border: none;
    padding: 12px 16px;
    flex: 1;
  }

  .sidebar .sidebar-section-label,
  .sidebar .coming-soon-badge {
    display: none;
  }

  .sidebar-nav {
    position: fixed;
    top: 57px;
    left: 0;
    right: 0;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-subtle);
    flex-direction: column;
    padding: 8px;
    transform: translateY(-120%);
    opacity: 0;
    transition: transform var(--t-mid), opacity var(--t-mid);
    z-index: 99;
  }

  .sidebar.open .sidebar-nav {
    transform: translateY(0);
    opacity: 1;
  }

  .sidebar.open+.sidebar-overlay {
    display: block;
  }

  .hamburger-btn {
    display: flex;
  }

  .sidebar .logo-text {
    display: block;
  }

  .sidebar .nav-label {
    display: block;
  }

  .nav-item {
    justify-content: flex-start;
  }

  .main-content {
    margin-top: 57px;
    height: calc(100vh - 57px);
  }

  .tool-viewport {
    padding: 16px;
  }

  .json-panels {
    grid-template-columns: 1fr;
  }

  .wc-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* =============================================
   FOOTER
   ============================================= */
.app-footer {
  margin-top: auto;
  width: 100%;
  padding: 60px 40px;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-surface);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 60px;
  flex-wrap: wrap;
}

.footer-left {
  flex: 1;
  min-width: 300px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.footer-logo {
  width: 28px;
  height: 28px;
  border-radius: var(--r-sm);
  object-fit: cover;
}

.footer-logo-text {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.footer-tagline {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 320px;
  margin-bottom: 24px;
}

.footer-copyright {
  font-size: 13px;
  color: var(--text-muted);
}

.footer-link-highlight {
  color: var(--accent);
  font-weight: 700;
  transition: color var(--t-fast);
}

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

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

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

.footer-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}

.footer-link {
  font-size: 14px;
  color: var(--text-secondary);
  transition: all var(--t-fast);
}

.footer-link:hover {
  color: var(--accent);
  transform: translateX(4px);
}

@media (max-width: 768px) {
  .app-footer {
    padding: 40px 60px;
  }

  .footer-content {
    flex-direction: row;
    justify-content: center;
    align-items: flex-start;
    gap: 80px;
    max-width: 900px;
    margin: 0 auto;
    margin: 40px;
    margin-right: 0px;
  }



  .footer-left {
    min-width: 200px;
    flex: 1;
    text-align: left;
  }

  .footer-brand {
    justify-content: flex-start;
  }

  .footer-tagline {
    margin: 0 0 20px;
    font-size: 13px;
  }

  .footer-links-grid {
    gap: 32px;
    justify-content: flex-end;
  }
}

@media (max-width: 580px) {
  .footer-content {
    flex-direction: column;
    text-align: center;
    gap: 40px;
  }

  .footer-left {
    align-items: center;
    text-align: center;
    margin: 0 auto;
  }

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

  .footer-links-grid {
    flex-direction: column;
    /* Stack on phones */
    align-items: center;
    gap: 32px;
    width: 100%;
  }

  .footer-links-col {
    align-items: center;
  }
}



/* =============================================
   COLOR THEME: LIGHT MODE (BEYAZ TEMA)
   ============================================= */
body.theme-light {
  /* BACKGROUNDS: Light grays and pure whites */
  --bg-base: #f1f5f9;
  --bg-surface: #ffffff;
  --bg-elevated: #f8fafc;
  --bg-glass: rgba(0, 0, 0, 0.03);
  --bg-glass-hover: rgba(0, 0, 0, 0.06);
  --bg-surface-glass: rgba(255, 255, 255, 0.85);


  /* BORDERS: Subtle dark lines */
  --border-subtle: rgba(0, 0, 0, 0.05);
  --border-mid: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.12);

  /* TEXT: Darker colors */
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;

  /* ACCENT: Inherit from dynamic root selection */

  /* STATUS COLORS */
  --success-bg: rgba(16, 185, 129, 0.15);
  --error-bg: rgba(239, 68, 68, 0.15);
}

/* Specific Light Mode Adjustments */
body.theme-light .top-nav {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom-color: var(--border-strong);
}

body.theme-light .global-search-input {
  background: #ffffff;
  border-color: var(--border-mid);
  color: var(--text-primary);
}

body.theme-light .tool-card {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

body.theme-light .tool-card:hover {
  background: #ffffff;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
}

body.theme-light .floating-side-nav {
  background: rgba(255, 255, 255, 0.85);
  border-color: var(--border-strong);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

body.theme-light .category-nav-btn:hover {
  background: rgba(0, 0, 0, 0.05);
}

/* =============================================
   STRUCTURAL THEME: RETRO
   ============================================= */
body.theme-retro {
  --font-sans: 'JetBrains Mono', monospace;
  --font-mono: 'JetBrains Mono', monospace;

  /* Sharp corners for retro feel */
  --r-sm: 0px !important;
  --r-md: 0px !important;
  --r-lg: 0px !important;
  --r-xl: 0px !important;

  /* Instant transitions or stepped for retro feel */
  --t-fast: 0ms !important;
  --t-mid: 0ms !important;
  --t-spring: 0ms !important;

  --bg-surface: #000000;
  --bg-elevated: #111111;
  --border-subtle: #333333;
  --border-mid: #666666;

  /* Retro accent: Classic White Terminal */
  --accent: #ffffff !important;
  --accent-hover: #eeeeee !important;
  --accent-glow: rgba(255, 255, 255, 0.1) !important;
  --accent-2: #cccccc !important;
  --accent-grad: #ffffff !important;

  /* Remove modern effects globally in retro mode */
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: none !important;
}

body.theme-retro * {
  transition: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

/* CRT Scanline Effect Overlay (Only in Retro Theme) - Toned down */
body.theme-retro::before {
  content: " ";
  display: block;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.1) 50%), linear-gradient(90deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01), rgba(255, 255, 255, 0.02));
  z-index: 9999;
  background-size: 100% 3px, 3px 100%;
  pointer-events: none;
  opacity: 0.12;
  /* Reduced from 0.3 */
}

/* Subtle noise effect (Only in Retro Theme) - Toned down */
body.theme-retro::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  opacity: 0.02;
  /* Reduced from 0.05 */
  z-index: 9998;
  pointer-events: none;
}

/* Specific Component Fixes for Retro Mode */
body.theme-retro .floating-side-nav {
  background: var(--bg-surface) !important;
  border: 2px solid var(--border-strong) !important;
  box-shadow: 6px 6px 0px var(--border-mid) !important;
}

body.theme-retro .tool-card {
  border: 2px solid var(--accent) !important;
  background: var(--bg-surface) !important;
  box-shadow: 6px 6px 0px var(--accent) !important;
  /* Sweet retro box shadow */
  position: relative;
  transition: none !important;
}

body.theme-retro .tool-card:hover {
  background: var(--accent) !important;
  color: var(--bg-base) !important;
  box-shadow: 10px 10px 0px var(--accent) !important;
  transform: translate(-4px, -4px) !important;
}

/* Fix text readability inside tool-card on hover for specific text elements only */
body.theme-retro .tool-card:hover .tool-card-name,
body.theme-retro .tool-card:hover .tool-card-desc {
  color: var(--bg-base) !important;
}

body.theme-retro .dashboard-grid-container {
  padding-left: 200px;
  /* Increase space to avoid sidebar overlap */
}

@media (max-width: 1399px) {
  body.theme-retro .dashboard-grid-container {
    padding-left: 40px;
  }
}

/* Theme Toggle Buttons Styles */
.theme-controls {
  display: flex;
  gap: 8px;
  margin-right: 12px;
}

.theme-toggle-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: var(--r-md);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  transition: all var(--t-fast);
  cursor: pointer;
}

.theme-toggle-btn:hover {
  background: var(--bg-glass-hover);
  border-color: var(--border-mid);
}

.theme-toggle-btn.active {
  border-color: var(--accent);
  background: var(--accent-glow);
  color: var(--text-accent);
}

/* Retro specific button styles */
body.theme-retro .theme-toggle-btn {
  border: 2px solid var(--accent) !important;
  background: var(--bg-base) !important;
  border-radius: 0 !important;
  text-transform: uppercase;
}

body.theme-retro .theme-toggle-btn.active {
  background: var(--accent) !important;
  color: var(--bg-base) !important;
}

/* =============================================
   LIGHT MODE + RETRO COMBINATION (OLD PAPER LOOK)
   ============================================= */
body.theme-light.theme-retro {
  --bg-base: #f4f1ea;
  /* Paper Bej */
  --bg-surface: #fffef0;
  --bg-elevated: #e8e4d8;
  --border-strong: #000000;
  --text-primary: #000000;
  --text-secondary: #222222;
  --accent: #000000 !important;
  /* Black accent for Light mode */
}

body.theme-light.theme-retro::before {
  opacity: 0.15;
  /* Subtler scanlines in light mode */
}

body.theme-light.theme-retro .floating-side-nav {
  background: #f4f1ea !important;
  border: 2px solid #000000 !important;
}

body.theme-light.theme-retro .tool-card {
  border: 2px solid #000000 !important;
  background: #ffffff !important;
  box-shadow: 6px 6px 0px #000000 !important;
}

body.theme-light.theme-retro .tool-card:hover {
  background: #000000 !important;
  color: #f4f1ea !important;
  /* Flip to paper-bej text on black bg */
  box-shadow: 10px 10px 0px #000000 !important;
}

body.theme-light.theme-retro .btn-primary {
  background: #000000 !important;
  color: #ffffff !important;
  border: 2px solid #000000 !important;
}

body.theme-light.theme-retro .top-nav {
  background: #f4f1ea !important;
  border-bottom: 2px solid #000000 !important;
}

/* =============================================
   DESIGN MENU (TASARIM)
   ============================================= */
.design-menu-wrapper {
  position: relative;
  z-index: 1000;
}

.design-menu-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--t-fast);
  letter-spacing: 0.5px;
}

.design-menu-btn:hover {
  background: var(--bg-glass-hover);
  border-color: var(--border-mid);
  transform: translateY(-1px);
}

.design-menu-btn .chevron {
  transition: transform var(--t-fast);
  color: var(--text-muted);
}

.design-menu-wrapper.open .design-menu-btn {
  background: var(--accent-glow);
  border-color: var(--accent);
  color: var(--text-accent);
}

.design-menu-wrapper.open .chevron {
  transform: rotate(180deg);
  color: var(--accent);
}

.design-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 260px;
  background: var(--bg-surface);
  border: 1px solid var(--border-mid);
  border-radius: var(--r-lg);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  padding: 12px;
  display: none;
  flex-direction: column;
  gap: 8px;
  animation: dropdownFadeIn 0.2s cubic-bezier(0, 0, 0.2, 1);
  backdrop-filter: blur(20px);
  z-index: 9999;
}

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

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

.design-menu-wrapper.open .design-dropdown {
  display: flex !important;
}

.dropdown-header {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 4px 12px 8px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 4px;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
  transition: all var(--t-fast);
  width: 100%;
}

.dropdown-item:hover {
  background: var(--bg-glass-hover);
  border-color: var(--border-subtle);
}

.dropdown-item .item-icon {
  font-size: 18px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-elevated);
  border-radius: var(--r-sm);
  flex-shrink: 0;
}

.item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.item-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}

.item-desc {
  font-size: 11px;
  color: var(--text-muted);
}

.toggle-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border-mid);
  border: 2px solid var(--bg-surface);
  box-shadow: 0 0 0 1px var(--border-subtle);
  transition: all var(--t-fast);
}

.dropdown-item.active .toggle-indicator {
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow), 0 0 0 1px var(--accent);
}

.dropdown-item.active {
  background: var(--accent-glow);
  border-color: rgba(202, 138, 4, 0.2);
}

/* Retro Theme Overrides for Design Menu */
body.theme-retro .design-menu-btn {
  border: 2px solid var(--accent) !important;
  border-radius: 0 !important;
  background: var(--bg-base) !important;
  text-transform: uppercase;
}

body.theme-retro .design-dropdown {
  border: 4px double var(--accent) !important;
  border-radius: 0 !important;
  background: var(--bg-base) !important;
  box-shadow: 8px 8px 0px #000 !important;
}

body.theme-retro .dropdown-item {
  border: 2px solid transparent !important;
  border-radius: 0 !important;
}

body.theme-retro .dropdown-item:hover {
  background: var(--accent) !important;
  color: var(--bg-base) !important;
}

body.theme-retro .dropdown-item:hover * {
  color: var(--bg-base) !important;
}

body.theme-retro .dropdown-item.active .toggle-indicator {
  background: var(--accent) !important;
  border-radius: 0 !important;
}

/* =============================================
   DYNAMIC BACKGROUND & ACCENT PICKER
   ============================================= */
.bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  opacity: 0.5;
  transition: opacity 1s ease;
}

body.theme-light .bg-canvas {
  opacity: 0.3;
}

.accent-picker {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  padding: 8px 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 8px;
}

/* =============================================
   CLIPBOARD HISTORY UI
   ============================================= */
.clipboard-history {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
}

.clipboard-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.clipboard-item {
  padding: 10px 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: all var(--t-fast);
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  overflow: hidden;
}

.clipboard-item:hover {
  border-color: var(--accent);
  background: var(--bg-base);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--shadow-color);
}

.clipboard-item-text {
  font-size: 13px;
  color: var(--text-primary);
  font-family: var(--font-mono);
  word-break: break-all;
  line-height: 1.4;
}

.clipboard-item-meta {
  font-size: 10px;
  color: var(--text-muted);
  text-align: right;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.clipboard-empty {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  padding: 20px;
  border: 1px dashed var(--border-subtle);
  border-radius: var(--r-md);
}

.clipboard-item::after {
  content: 'KOPYALA';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  transform: translateX(100%);
  transition: transform var(--t-fast);
}

.clipboard-item:hover::after {
  transform: translateX(0);
}


.accent-color {
  width: 10%;
  aspect-ratio: 1;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--t-fast);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.1);
}

.accent-color:hover {
  transform: scale(1.2);
}

.accent-color.active {
  border-color: #fff;
  box-shadow: 0 0 10px var(--accent-glow);
}

body.theme-light .accent-color.active {
  border-color: #000;
}

/* Star/Favorite Icon for Tools */
.tool-fav-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 50%;
  color: var(--text-muted);
  cursor: pointer;
  z-index: 5;
  transition: all var(--t-fast);
  opacity: 0;
  transform: scale(0.8);
}

.tool-card:hover .tool-fav-btn {
  opacity: 1;
  transform: scale(1);
}

.tool-fav-btn:hover {
  background: var(--accent-glow);
  color: var(--accent);
  border-color: var(--accent);
}

.tool-fav-btn.active {
  opacity: 1;
  transform: scale(1);
  color: #fbbf24;
  /* Star Gold */
  background: rgba(251, 191, 36, 0.1);
  border-color: #fbbf24;
}

/* Category Badge Update */
.category-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.fav-badge {
  background: #fbbf24;
  color: #000;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

/* =============================================
   CLIPBOARD HISTORY
   ============================================= */
.clipboard-history {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.category-header {
  font-size: 10px;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  padding: 0 12px;
  text-transform: uppercase;
}

.clipboard-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0 8px;
  max-height: 160px;
  overflow-y: auto;
}

.clipboard-item {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  padding: 8px 10px;
  font-size: 11px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--t-fast);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  position: relative;
}

.clipboard-item:hover {
  background: var(--bg-glass-hover);
  border-color: var(--accent);
  color: var(--text-primary);
  transform: translateX(2px);
}

.clipboard-empty {
  font-size: 10px;
  color: var(--text-muted);
  text-align: center;
  padding: 12px 0;
  font-style: italic;
}

/* Retro specific for Clipboard */
body.theme-retro .clipboard-item {
  border: 1px solid var(--accent) !important;
  border-radius: 0 !important;
  background: var(--bg-base) !important;
}

body.theme-retro .clipboard-item:hover {
  background: var(--accent) !important;
  color: var(--bg-base) !important;
}

.dashboard-hero {
  padding: 80px 40px 40px;
  text-align: center;
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.dashboard-grid-container {
  margin: 0 auto;
}

/* FINAL SIDEBAR FIX & SPACING */
@media (min-width: 992px) {
  .floating-side-nav {
    display: flex !important;
    width: 200px !important;
    left: 40px !important;
  }

  .dashboard-hero,
  .dashboard-grid-container,
  .app-footer {
    padding-left: 280px !important;
    /* Sidebar (200px) + Left (40px) + Gap (40px) */
  }
}

/* Medium Screens (Laptops) Optimization */
@media (min-width: 992px) and (max-width: 1300px) {
  .floating-side-nav {
    width: 180px !important;
    left: 20px !important;
  }

  .dashboard-hero,
  .dashboard-grid-container,
  .app-footer {
    padding-left: 220px !important;
    /* Sidebar (180px) + Left (20px) + Gap (20px) */
  }

  .top-nav-center {
    max-width: 400px;
  }
}


@media (max-width: 991px) {
  .floating-side-nav {
    display: none !important;
  }

  .dashboard-view,
  .dashboard-hero,
  .dashboard-grid-container,
  .app-footer {
    padding-left: 0 !important;
  }
}

/* =============================================
   MOBILE HEADER & NAVIGATION
   ============================================= */
.mobile-nav-toggle {
  display: none;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  width: 42px;
  height: 42px;
  border-radius: var(--r-md);
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all var(--t-fast);
}

.hamburger-lines {
  width: 20px;
  height: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hamburger-lines .line {
  display: block;
  height: 2px;
  width: 100%;
  border-radius: 10px;
  background: var(--text-primary);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
}

/* Hamburger to X Animation */
.mobile-nav-toggle.open .line1 {
  transform: translateY(6px) rotate(45deg);
}

.mobile-nav-toggle.open .line2 {
  opacity: 0;
  transform: translateX(-20px);
}

.mobile-nav-toggle.open .line3 {
  transform: translateY(-6px) rotate(-45deg);
}


/* Mobile Sidebar Overlay */
.mobile-sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all var(--t-mid);
}

.mobile-sidebar-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Mobile Sidebar */
.mobile-sidebar {
  position: fixed;
  top: 0;
  right: -100%;
  width: 320px;
  max-width: 85%;
  height: 100%;
  background: var(--bg-surface-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);

  border-left: 1px solid var(--border-subtle);
  z-index: 1001;
  transition: right var(--t-mid) cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
}

.mobile-sidebar.active {
  right: 0;
}

.mobile-sidebar-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mobile-sidebar-close {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all var(--t-fast);
}

.mobile-sidebar-close:hover {
  background: var(--bg-glass-hover);
  color: var(--text-primary);
}

.mobile-sidebar-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.mobile-search-section .global-search-wrapper {
  max-width: 100%;
}

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

.mobile-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--r-md);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  border: 1px solid transparent;
  transition: all var(--t-fast);
}

.mobile-nav-item.active {
  background: var(--accent-glow);
  color: var(--accent);
  border-color: rgba(202, 138, 4, 0.2);
}

.mobile-design-settings .settings-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  margin-bottom: 16px;
  text-transform: uppercase;
}

/* Animations for sidebar items */
.mobile-sidebar.active .mobile-nav-item,
.mobile-sidebar.active .mobile-design-settings {
  animation: mobileItemFadeIn 0.5s var(--t-spring) both;
}

.mobile-sidebar.active .mobile-design-settings {
  animation-delay: 0.1s;
}

.mobile-sidebar.active .mobile-nav-menu {
  animation-delay: 0.2s;
}

@keyframes mobileItemFadeIn {
  from {
    opacity: 0;
    transform: translateX(20px);
  }

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


.mobile-design-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  opacity: 1 !important;
  visibility: visible !important;
}

.mobile-design-grid .dropdown-header {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  padding: 8px 0;
  border-bottom: 1px solid var(--border-subtle);
  margin-top: 8px;
}

.mobile-design-grid .accent-picker {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  padding: 8px 0;
}

.mobile-design-grid .dropdown-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mobile-design-grid .dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px !important;
  background: var(--bg-elevated) !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: var(--r-md) !important;
  color: var(--text-primary) !important;
  text-align: left;
  width: 100%;
}

.mobile-design-grid .item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mobile-design-grid .item-label {
  font-size: 13px;
  font-weight: 600;
}

.mobile-design-grid .item-desc {
  font-size: 10px;
  color: var(--text-muted);
}

.mobile-design-grid .toggle-indicator {
  margin-left: auto;
}



/* =============================================
   RESPONSIVE OVERRIDES
   ============================================= */
@media (max-width: 768px) {
  .top-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 0 12px;
    height: 64px;
    gap: 12px;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-subtle);
    transition: all 0.3s ease;
    /* Smooth transition for everything */
    box-shadow: none;
    /* No shadow at very top */
  }

  .top-nav.scrolled {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    background: var(--bg-surface-glass);
    /* Slightly more opaque or glass effect if needed */
    backdrop-filter: blur(10px);
  }

  /* Prevent content from going under the fixed header */
  body {
    padding-top: 64px;
    height: auto !important;
    overflow: visible !important;
    scroll-behavior: smooth;
  }


  .app-layout {
    height: auto !important;
    /*overflow: visible !important;*/
  }

  .main-content,
  .dashboard-view {
    height: auto !important;
    overflow: visible !important;
  }



  .top-nav-left {
    gap: 8px;
  }

  .logo-text {
    font-size: 13px;
    display: block !important;
    /* Always show logo text per user request */
  }

  .top-nav-center {
    display: flex;
    flex: 1;
    max-width: none;
    margin: 0 8px;
  }

  .global-search-input {
    padding: 8px 12px 8px 34px;
    font-size: 14px;
    border-radius: var(--r-md);
    background: var(--bg-elevated);
    height: 38px;
  }

  .global-search-wrapper .search-icon {
    left: 10px;
    width: 16px;
    height: 16px;
    opacity: 0.7;
  }

  .top-nav-right .design-menu-wrapper,
  .top-nav-right .badge {
    display: none;
  }

  .mobile-nav-toggle {
    display: flex;
    width: 38px;
    height: 38px;
    flex-shrink: 0;
  }

  /* Spacing and Typography */
  .dashboard-hero {
    padding: 72px 24px 32px !important;
    /* Increased top padding to 72px for fixed header */
  }

  .dashboard-title {
    font-size: 28px;
    line-height: 1.2;
    margin-bottom: 12px;
  }

  .dashboard-subtitle {
    font-size: 15px;
    opacity: 0.8;
  }

  .dashboard-grid-container {
    padding: 0 16px 40px !important;
  }

  .tool-category-header {
    margin-top: 40px;
    /* More breathing room between categories */
    margin-bottom: 20px;
  }


  .tool-grid {
    grid-template-columns: repeat(2, 1fr);
    /* 2 columns for tablets */
    gap: 16px;
  }

  .tool-view-header {
    padding: 16px 20px;
  }

  .tool-viewport {
    padding: 2px;
    /* Reduced to 2px for mobile narrow screens */
  }

  .tool-active-title {
    font-size: 20px;
  }

  /* Global Tool Layout Fixes */
  .pg-layout {
    grid-template-columns: 1fr !important;
    gap: 16px;
  }

  .json-panels {
    grid-template-columns: 1fr !important;
    gap: 16px;
  }

  /* Fix for tools using sidebars like Password Gen or QR */
  .pg-controls,
  .qr-controls {
    padding: 16px;
  }

  /* Renk Dönüştürücü: 3-kolon grid → tek kolon */
  .cc-inputs-grid {
    grid-template-columns: 1fr !important;
  }

  /* HEX input taşmasını önle */
  .cc-hex-row {
    min-width: 0;
  }

  .cc-hex-row .cc-text-input {
    min-width: 0;
    flex: 1;
  }

  /* Ensure flex rows in tools wrap/stack on mobile */
  .json-toolbar,
  .json-toolbar-actions {
    flex-direction: column !important;
    /* Force column stack for actions */
    align-items: stretch !important;
    gap: 8px !important;
  }

  /* Sayaç butonları her zaman yan yana kalmalı */
  .sayac-btns {
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
  }

  /* Sayaç butonları: inline width/height'ı koru, ezme */
  .sayac-btns button {
    flex-shrink: 0;
    aspect-ratio: 1;
  }

  /* Palette: yan yana grid (3 kolon), column değil */
  .cc-palette-row {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 8px !important;
    flex-direction: unset !important;
    align-items: unset !important;
  }

  .tool-container .btn {
    width: 100% !important;
    /* Buttons take full width */
    justify-content: center;
  }

  /* Specifically fix the URL/Method/Button collision in tools */
  .tool-container select.tool-select,
  .tool-container input.cc-text-input {
    width: 100% !important;
    min-width: 0 !important;
  }


  /* Grid fixes for specific tools */
  .qr-layout {
    grid-template-columns: 1fr !important;
  }

  /* Universal grid responsive overrides for tools using inline styles */
  .tool-container div[style*="grid-template-columns: minmax"],
  .tool-container div[style*="grid-template-columns:minmax"],
  .tool-container div[style*="grid-template-columns: 1fr 1fr"],
  .tool-container div[style*="grid-template-columns:1fr 1fr"],
  .tool-container div[style*="grid-template-columns: 300px 1fr"],
  .tool-container div[style*="grid-template-columns:300px 1fr"],
  .tool-container div[style*="grid-template-columns: 350px 1fr"],
  .tool-container div[style*="grid-template-columns:350px 1fr"] {
    grid-template-columns: 1fr !important;
  }

  /* Mobilde flex ile yan yana dizilen paneller tam genişliğe geçsin */
  .tool-container .glass-panel[style*="min-width"] {
    min-width: 0 !important;
    width: 100% !important;
  }

  /* Yatay scroll oluşmasını önle */
  .tool-container {
    overflow-x: hidden;
  }

  .tool-container div[style*="height:70vh"],
  .tool-container div[style*="height: 70vh"],
  .tool-container div[style*="height: 65vh"],
  .tool-container div[style*="height:65vh"] {
    height: auto !important;
  }
}


/* =============================================
   ADVANCED TOOL INTERFACE
   ============================================= */
.tool-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
  animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

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

.tool-header-info {
  background: rgba(217, 119, 6, 0.05);
  border-left: 3px solid var(--accent);
  padding: 16px 20px;
  border-radius: 4px var(--r-md) var(--r-md) 4px;
  margin-bottom: 8px;
}

.tool-header-info p {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
}

.tool-layout-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

@media (max-width: 992px) {
  .tool-layout-split {
    grid-template-columns: 1fr !important;
    height: auto !important;
  }
}

.tool-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.panel-header {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* =============================================
   ENHANCED TEXTAREA (CODE EDITOR LOOK)
   ============================================= */
.tool-textarea {
  width: 100%;
  min-height: 180px;
  background: #0d0d0d !important;
  border: 1px solid var(--border-mid) !important;
  border-radius: var(--r-md);
  padding: 18px;
  color: #e4e4e7;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.7;
  transition: all var(--t-mid);
  outline: none;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.tool-textarea:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px var(--accent-glow), 0 10px 30px rgba(0, 0, 0, 0.5);
  background: #050505 !important;
}

.tool-input,
.tool-select {
  width: 100%;
  background: var(--bg-base);
  border: 1px solid var(--border-mid);
  border-radius: var(--r-md);
  /*padding: 12px 16px;*/
  color: var(--text-primary);
  font-size: 14px;
  transition: all var(--t-fast);
  outline: none;
}

.tool-input:focus,
.tool-select:focus {
  border-color: var(--accent);
  background: var(--bg-elevated);
}

.btn-full {
  width: 100%;
  justify-content: center;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 14px;
}

/* =============================================
   FORM GROUP & RANGE INPUTS
   ============================================= */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.label-row label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.value-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-glow);
  padding: 4px 10px;
  border-radius: 6px;
  min-width: 45px;
  text-align: center;
  border: 1px solid rgba(217, 119, 6, 0.2);
}

/* Custom Range Styling */
input[type="range"].glass-input {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  background: var(--bg-base);
  border-radius: 5px;
  outline: none;
  border: 1px solid var(--border-subtle);
  cursor: pointer;
}

input[type="range"].glass-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  background: var(--accent);
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 10px var(--accent-glow);
  transition: transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

input[type="range"].glass-input::-webkit-slider-thumb:hover {
  transform: scale(1.25);
  box-shadow: 0 0 15px var(--accent-glow);
}

input[type="range"].glass-input::-moz-range-thumb {
  width: 18px;
  height: 18px;
  background: var(--accent);
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 10px var(--accent-glow);
}

/* =============================================
   FINAL ADJUSTMENTS & MEDIA QUERIES
   ============================================= */
@media (max-width: 480px) {
  .logo-text {
    font-size: 12px;
  }

  .top-nav {
    padding: 0 8px;
    gap: 8px;
  }

  .global-search-input::placeholder {
    color: transparent;
    /* Hide placeholder on very small screens to save space */
  }

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

  .tool-grid {
    grid-template-columns: 1fr;
    /* 1 column for phones */
  }
}

/* =============================================
   LANGUAGE SELECTOR
   ============================================= */
.lang-selector {
  display: flex;
  align-items: center;
  gap: 2px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  padding: 3px;
}

.lang-btn {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  padding: 6px 10px;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: all var(--t-fast);
  user-select: none;
}

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

.lang-btn.active {
  color: var(--accent);
  background: var(--accent-glow);
}

@media (max-width: 768px) {
  #langSelector {
    display: none;
  }

  .lang-selector {
    padding: 2px;
  }

  .lang-btn {
    padding: 5px 8px;
    font-size: 10px;
  }
}

/* Notification Bell & Changelog Modal */
.notification-btn {
  position: relative;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 20px;
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.notification-btn:hover {
  color: var(--text-main);
  transform: scale(1.1);
}
.notification-btn .badge {
  position: absolute;
  top: 0px;
  right: -2px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: bold;
  padding: 2px 5px;
  border-radius: 10px;
  line-height: 1;
  box-shadow: 0 0 5px var(--accent);
}
.changelog-modal {
  display: none;
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(5px);
  z-index: 10000;
  align-items: center;
  justify-content: center;
}
.changelog-modal.active {
  display: flex;
  animation: fadeIn 0.3s ease;
}
.changelog-content {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  overflow: hidden;
}
.changelog-header {
  padding: 20px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255,255,255,0.02);
}
.changelog-header h2 {
  margin: 0;
  font-size: 1.2rem;
  color: var(--accent);
}
.close-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 24px;
  cursor: pointer;
  transition: color 0.2s;
}
.close-btn:hover { color: var(--text-main); }
.changelog-body {
  padding: 20px;
  overflow-y: auto;
  color: var(--text-secondary);
  line-height: 1.6;
}
.changelog-body h3 {
  color: var(--text-primary);
  margin-top: 20px;
  margin-bottom: 10px;
  font-size: 1.1rem;
}
.changelog-body ul {
  padding-left: 20px;
  margin-bottom: 15px;
}
.changelog-body li {
  margin-bottom: 8px;
}
.changelog-body li strong {
  color: var(--accent);
}
