*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #6c5ce7;
  --primary-light: #a29bfe;
  --secondary: #fd79a8;
  --accent: #00cec9;
  --accent-light: #55efc4;
  --bg: #0a0a1a;
  --bg-card: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-shadow: rgba(0, 0, 0, 0.3);
  --text: #e0e0e0;
  --text-muted: #888;
  --text-light: #fff;
  --radius: 20px;
  --radius-sm: 12px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

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

::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 4px;
}

/* ===== ANIMATED BACKGROUND ===== */
#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ===== GLASS ORBS ===== */
.orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
  animation: orbFloat 20s ease-in-out infinite;
}
.orb-1 {
  width: 400px;
  height: 400px;
  background: rgba(108, 92, 231, 0.15);
  top: -10%;
  left: -5%;
  animation-delay: 0s;
}
.orb-2 {
  width: 350px;
  height: 350px;
  background: rgba(253, 121, 168, 0.12);
  bottom: -5%;
  right: -5%;
  animation-delay: -7s;
}
.orb-3 {
  width: 300px;
  height: 300px;
  background: rgba(0, 206, 201, 0.1);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: -14s;
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -30px) scale(1.1); }
  66% { transform: translate(-20px, 20px) scale(0.9); }
}

/* ===== HEADER / NAVBAR ===== */
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.logo a {
  font-size: 1.5rem;
  font-weight: 800;
  text-decoration: none;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 0.5rem;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  color: var(--text);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-light);
  background: var(--bg-card);
}

.nav-links a i {
  margin-right: 6px;
  font-size: 0.85rem;
}

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
  padding: 5px;
  position: relative;
  z-index: 1001;
}

.hamburger span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--text-light);
  border-radius: 2px;
  transition: var(--transition);
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
}
.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ===== MOBILE MENU OVERLAY ===== */
.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 999;
  background: #0a0a1a;
  display: none;
}
.mobile-menu.open {
  display: flex;
  flex-direction: column;
}
.mobile-menu-inner {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 5rem 1rem 2rem;
}
.mm-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text);
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 600;
  padding: 0.7rem 1.2rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.mm-link:hover {
  color: var(--text-light);
  background: var(--bg-card);
}
.mm-link i {
  width: 22px;
  text-align: center;
  font-size: 1rem;
}
.mm-home {
  color: var(--text-light);
  background: linear-gradient(135deg, rgba(108,92,231,0.15), rgba(253,121,168,0.15));
  border: 1px solid rgba(108,92,231,0.2);
  margin-bottom: 0.5rem;
}
.mm-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  padding: 0.5rem 1.2rem 0.2rem;
  font-weight: 700;
  margin-top: 0.5rem;
}
.mm-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  padding: 0.5rem 0;
  margin-top: 0.5rem;
  border-top: 1px solid var(--glass-border);
}
.mm-grid .mm-link {
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.6rem 1rem;
}
.mm-grid .mm-link i {
  width: 18px;
  font-size: 0.85rem;
}

/* ===== MAIN CONTENT ===== */
main {
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

/* ===== HERO ===== */
.hero {
  text-align: center;
  padding: 6rem 2rem 4rem;
}

.hero-badge {
  display: inline-block;
  padding: 0.4rem 1.2rem;
  border-radius: 50px;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  font-size: 0.85rem;
  color: var(--primary-light);
  margin-bottom: 1.5rem;
  backdrop-filter: blur(10px);
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  color: var(--text-light);
}

.hero h1 .gradient-text {
  background: linear-gradient(135deg, var(--primary-light), var(--secondary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 2rem;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: var(--text-light);
  text-decoration: none;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  transition: var(--transition);
  border: none;
  cursor: pointer;
}

.hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 40px rgba(108, 92, 231, 0.4);
}

/* ===== GLASS CARD ===== */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: var(--transition);
  box-shadow: 0 8px 32px var(--glass-shadow);
}

.glass-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 12px 48px var(--glass-shadow);
}

/* ===== 3D TILT CARD ===== */
.tilt-card {
  transform-style: preserve-3d;
  perspective: 1000px;
}

.tilt-card-inner {
  transition: transform 0.2s ease;
  transform-style: preserve-3d;
}

/* ===== TOOL GRID ===== */
.section-title {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title h2 {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text-light);
  margin-bottom: 0.8rem;
}

.section-title p {
  color: var(--text-muted);
  font-size: 1.05rem;
}

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

.tool-card {
  text-decoration: none;
  color: inherit;
  display: block;
  transform-style: preserve-3d;
}

.tool-card .glass-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2.5rem 1.5rem;
}

.tool-icon {
  width: 70px;
  height: 70px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: var(--text-light);
  margin-bottom: 1.2rem;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  transition: var(--transition);
}

.tool-card:hover .tool-icon {
  transform: scale(1.1) rotateY(10deg);
}

.tool-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-light);
  margin-bottom: 0.5rem;
}

.tool-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ===== TOOL PAGE STYLES ===== */
.tool-page {
  padding: 2rem;
  max-width: 900px;
  margin: 0 auto;
}

.tool-page-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.tool-page-header h1 {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text-light);
  margin-bottom: 0.5rem;
}

.tool-page-header p {
  color: var(--text-muted);
}

.tool-container {
  padding: 2.5rem;
}

.tool-container textarea,
.tool-container input[type="text"],
.tool-container input[type="number"],
.tool-container input[type="url"],
.tool-container input[type="password"],
.tool-container select {
  width: 100%;
  padding: 0.9rem 1.2rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--text-light);
  font-size: 0.95rem;
  font-family: inherit;
  transition: var(--transition);
  outline: none;
}

.tool-container textarea:focus,
.tool-container input:focus,
.tool-container select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.15);
}

.tool-container textarea {
  min-height: 180px;
  resize: vertical;
}

.glass-input {
  width: 100%;
  padding: 0.9rem 1.2rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--text-light);
  font-size: 0.95rem;
  font-family: inherit;
  transition: var(--transition);
  outline: none;
}

.glass-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.15);
}

/* File input styling */
input[type="file"]::file-selector-button {
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  margin-right: 0.8rem;
}
input[type="file"]::file-selector-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(108, 92, 231, 0.3);
}

/* Range slider styling */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.1);
  outline: none;
  transition: var(--transition);
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  cursor: pointer;
  border: 2px solid var(--bg);
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  transition: var(--transition);
}
input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}
input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  cursor: pointer;
  border: none;
}

/* Color input styling */
input[type="color"] {
  -webkit-appearance: none;
  appearance: none;
  width: 48px;
  height: 48px;
  border: 2px solid var(--glass-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  background: transparent;
  padding: 2px;
  transition: var(--transition);
}
input[type="color"]:hover {
  border-color: var(--primary);
}
input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}
input[type="color"]::-webkit-color-swatch {
  border: none;
  border-radius: 8px;
}
input[type="color"]::-moz-color-swatch {
  border: none;
  border-radius: 8px;
}

.tool-container select option {
  background: #1a1a2e;
  color: var(--text-light);
}

.tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.8rem;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: var(--text-light);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}

.tool-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(108, 92, 231, 0.35);
}

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

.tool-btn-outline {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-light);
}

.tool-btn-outline:hover {
  background: rgba(108, 92, 231, 0.12);
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(108, 92, 231, 0.2);
}

/* Alternate button class aliases */
.btn-primary,
.tool-btn-primary,
.btn,
.btn btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.8rem;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: var(--text-light);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  text-decoration: none;
}
.btn-primary:hover,
.tool-btn-primary:hover,
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(108, 92, 231, 0.35);
}
.btn-secondary,
.tool-btn-outline {
  background: transparent;
  border: 1px solid var(--glass-border);
}
.btn-secondary:hover,
.tool-btn-outline:hover {
  background: var(--bg-card);
  border-color: var(--primary);
  transform: translateY(-2px);
}

/* Fix for class="btn primary" pattern */
.btn.primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.8rem;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: var(--text-light);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  text-decoration: none;
}
.btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(108, 92, 231, 0.35);
}

/* Tool page shared styles */
.tool-label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
}
.tool-form-group {
  margin-bottom: 1.2rem;
}
.tool-output {
  width: 100%;
  min-height: 120px;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--text-light);
  font-size: 0.9rem;
  font-family: 'Consolas', 'Monaco', monospace;
  white-space: pre-wrap;
  word-break: break-all;
  overflow-x: auto;
  line-height: 1.6;
}
.tool-info-text {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0.5rem 0;
  line-height: 1.5;
}
.tool-image-preview,
.image-preview-container {
  margin: 1rem 0;
  text-align: center;
}
.tool-image-preview img,
.image-preview-container img {
  max-width: 100%;
  max-height: 400px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
}
.file-input-wrapper {
  position: relative;
  margin: 1rem 0;
}
.file-input-placeholder {
  padding: 2rem;
  border: 2px dashed var(--glass-border);
  border-radius: var(--radius-sm);
  text-align: center;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}
.file-input-placeholder:hover {
  border-color: var(--primary);
  background: rgba(108,92,231,0.05);
}
.file-input-browse {
  display: inline-block;
  padding: 0.6rem 1.5rem;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.85rem;
  margin-top: 0.5rem;
  cursor: pointer;
}
.tool-file-input {
  display: none;
}

.btn-row,
.tab-btns,
.mode-btns,
.tts-buttons {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 1rem 0;
}

.tab-btn,
.mode-btn,
.harmony-btn,
.preset-btn {
  padding: 0.5rem 1.2rem;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.85rem;
  transition: var(--transition);
  font-family: inherit;
}
.tab-btn:hover,
.mode-btn:hover,
.harmony-btn:hover {
  color: var(--text-light);
  border-color: var(--primary);
}
.tab-btn.active,
.mode-btn.active,
.harmony-btn.active,
.active-preset,
.tip-pct-btn.active-pct {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: var(--text-light);
  border-color: transparent;
}

.remove-btn {
  padding: 0.4rem 0.8rem;
  border: 1px solid rgba(255, 71, 87, 0.3);
  border-radius: var(--radius-sm);
  background: transparent;
  color: #ff4757;
  cursor: pointer;
  font-size: 0.8rem;
  transition: var(--transition);
  font-family: inherit;
}
.remove-btn:hover {
  background: rgba(255, 71, 87, 0.1);
  border-color: #ff4757;
}

.copy-css-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.85rem;
  transition: var(--transition);
  font-family: inherit;
}
.copy-css-btn:hover {
  color: var(--text-light);
  border-color: var(--primary);
  background: rgba(108,92,231,0.1);
}

.tool-btn.copy-btn,
.tool-btn.filter-btn,
.tool-btn.ratio-preset {
  font-size: 0.85rem;
  padding: 0.5rem 1rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
}

.form-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: flex-end;
}

.form-row .form-group {
  flex: 1;
  min-width: 150px;
  margin-bottom: 0;
}

.tool-output {
  margin-top: 1.5rem;
  padding: 1.2rem;
  background: rgba(0, 0, 0, 0.3);
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  word-break: break-all;
}

.copy-btn {
  margin-top: 0.8rem;
}

/* ===== CHECKBOX ===== */
.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin: 0.5rem 0;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.9rem;
}

.checkbox-item:hover {
  border-color: var(--primary);
}

.checkbox-item input[type="checkbox"] {
  accent-color: var(--primary);
  width: 16px;
  height: 16px;
}

/* ===== PASSWORD STRENGTH ===== */
.strength-bar {
  height: 4px;
  border-radius: 2px;
  margin-top: 1rem;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.strength-bar-inner {
  height: 100%;
  border-radius: 2px;
  transition: var(--transition);
  width: 0;
}

/* ===== COLOR PICKER ===== */
.color-preview {
  width: 100%;
  height: 120px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  margin-top: 1rem;
  transition: background 0.2s;
}

.color-input-row {
  display: flex;
  gap: 1rem;
  align-items: center;
}

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

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

.color-input-row input[type="color"]::-webkit-color-swatch {
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
}

/* ===== QR CODE ===== */
.qr-display {
  display: flex;
  justify-content: center;
  padding: 2rem;
  margin-top: 1.5rem;
}

.qr-display img,
.qr-display canvas {
  border-radius: var(--radius-sm);
}

/* ===== JSON ===== */
.json-tree {
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 0.85rem;
  line-height: 1.6;
}

.json-key { color: #ff79c6; }
.json-string { color: #f1fa8c; }
.json-number { color: #bd93f9; }
.json-boolean { color: #50fa7b; }
.json-null { color: #ff5555; }

/* ===== BLOG ===== */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.blog-card {
  text-decoration: none;
  color: inherit;
  display: block;
}

.blog-card .glass-card {
  height: 100%;
  padding: 2rem;
}

.blog-card .blog-date {
  font-size: 0.8rem;
  color: var(--primary-light);
  margin-bottom: 0.5rem;
}

.blog-card h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-light);
  margin-bottom: 0.5rem;
}

.blog-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ===== CONTENT PAGES ===== */
.content-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
}

.content-page h1 {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text-light);
  margin-bottom: 0.5rem;
}

.content-page .last-updated {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  font-style: italic;
}

.content-page h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-light);
  margin: 2rem 0 1rem;
}

.content-page h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-light);
  margin: 1.5rem 0 0.5rem;
}

.content-page p {
  margin-bottom: 1rem;
  color: var(--text-muted);
  line-height: 1.8;
}

.content-page ul,
.content-page ol {
  margin: 1rem 0;
  padding-left: 1.5rem;
  color: var(--text-muted);
  line-height: 1.8;
}

.content-page li {
  margin-bottom: 0.3rem;
}

/* ===== CATEGORY SECTIONS ===== */
.category-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
  margin-bottom: 2.5rem;
  padding: 0.8rem;
  background: rgba(108,92,231,0.06);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(108,92,231,0.15);
  backdrop-filter: blur(10px);
}
.cat-nav-link {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.3s ease;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}
.cat-nav-link::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  opacity: 0;
  transition: opacity 0.3s ease;
}
.cat-nav-link:hover::before,
.cat-nav-link:focus::before {
  opacity: 0.12;
}
.cat-nav-link:hover,
.cat-nav-link:focus {
  color: var(--text-light);
  transform: translateY(-1px);
}
.cat-nav-link i {
  margin-right: 0.35rem;
  color: var(--primary);
  position: relative;
  z-index: 1;
}
.cat-nav-link span {
  position: relative;
  z-index: 1;
}

.category-section {
  margin-bottom: 3rem;
  scroll-margin-top: 6rem;
  position: relative;
}
.category-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(108,92,231,0.3), rgba(253,121,168,0.3), transparent);
}
.category-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-light);
  margin-bottom: 1.25rem;
  padding: 0.75rem 1.25rem;
  background: linear-gradient(135deg, rgba(108,92,231,0.1), rgba(253,121,168,0.05));
  border-radius: var(--radius-sm);
  border-left: 3px solid;
  border-image: linear-gradient(180deg, var(--primary), var(--secondary)) 1;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  transition: all 0.3s ease;
}
.category-title:hover {
  background: linear-gradient(135deg, rgba(108,92,231,0.15), rgba(253,121,168,0.08));
  transform: translateX(3px);
}
.category-title i {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 1.2rem;
}
.category-title .cat-count {
  margin-left: auto;
  font-size: 0.8rem;
  color: var(--text-muted);
  background: rgba(108,92,231,0.1);
  padding: 0.2rem 0.7rem;
  border-radius: 20px;
  -webkit-text-fill-color: var(--text-muted);
}
.category-section .tool-grid {
  margin-bottom: 0;
}

/* ===== DROPDOWN MENU ===== */
.nav-dropdown {
  position: relative;
}
.drop-trigger {
  display: flex !important;
  align-items: center;
  gap: 0.3rem;
}
.drop-icon {
  font-size: 0.65rem;
  transition: transform 0.3s ease;
}
.nav-dropdown:hover .drop-icon,
.nav-dropdown:focus-within .drop-icon {
  transform: rotate(180deg);
}
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  min-width: 220px;
  max-height: 70vh;
  overflow-y: auto;
  background: rgba(15, 15, 35, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(108,92,231,0.2);
  border-radius: var(--radius-sm);
  padding: 0.5rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
  z-index: 100;
  box-shadow: 0 10px 40px rgba(0,0,0,0.3), 0 0 20px rgba(108,92,231,0.1);
}

.dropdown-menu::-webkit-scrollbar { width: 4px; }
.dropdown-menu::-webkit-scrollbar-track { background: transparent; }
.dropdown-menu::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 2px; }
.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(4px);
}
.dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.8rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted) !important;
  font-size: 0.85rem;
  transition: all 0.2s ease;
  text-decoration: none;
}
.dropdown-menu a:hover {
  color: var(--text-light) !important;
  background: rgba(108,92,231,0.12);
  transform: translateX(3px);
}
.dropdown-menu a i {
  width: 1.1rem;
  font-size: 0.8rem;
  color: var(--primary);
}

/* ===== NAV CATEGORY DROPDOWN ===== */
.nav-cat-trigger {
  display: flex; align-items: center; gap: 0.6rem; width: 100%;
  padding: 0.5rem 0.8rem; border-radius: var(--radius-sm);
  color: var(--text-muted); font-size: 0.85rem; cursor: pointer;
  transition: all 0.2s ease; border: none; background: none;
  font-family: inherit; text-align: left;
}
.nav-cat-trigger:hover { color: var(--text-light); background: rgba(108,92,231,0.08); }
.nav-cat-trigger i:first-child { width: 1.1rem; font-size: 0.8rem; color: var(--primary); }
.nav-cat-trigger .cat-arrow {
  font-size: 0.55rem; color: var(--text-muted);
  transition: transform 0.3s ease; margin-left: auto;
}
.nav-cat-trigger.open .cat-arrow { transform: rotate(180deg); }
.nav-tool-sublist {
  max-height: 0; overflow: hidden; transition: max-height 0.3s ease;
  background: rgba(108,92,231,0.03); border-radius: var(--radius-sm);
}
.nav-tool-sublist.open { max-height: 600px; }
.nav-tool-sublist a {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.4rem 0.8rem 0.4rem 2.2rem;
  color: var(--text-muted); text-decoration: none;
  font-size: 0.78rem; transition: all 0.2s ease;
}
.nav-tool-sublist a:hover { color: var(--text-light); background: rgba(108,92,231,0.06); }
.nav-tool-sublist a i { width: 0.9rem; font-size: 0.65rem; color: var(--primary); }

.mobile-cat-trigger {
  display: flex; align-items: center; gap: 0.6rem; width: 100%;
  padding: 0.8rem 2rem; color: var(--text); text-decoration: none;
  font-size: 1.15rem; font-weight: 600; cursor: pointer;
  transition: var(--transition); border: none; background: none;
  font-family: inherit; text-align: left;
}
.mobile-cat-trigger:hover { color: var(--text-light); background: var(--bg-card); }
.mobile-cat-trigger i:first-child { margin-right: 10px; width: 24px; text-align: center; }
.mobile-cat-trigger .cat-arrow {
  font-size: 0.65rem; transition: transform 0.3s ease; margin-left: auto;
}
.mobile-cat-trigger.open .cat-arrow { transform: rotate(180deg); }
.mobile-tool-sublist {
  max-height: 0; overflow: hidden; transition: max-height 0.4s ease;
  background: rgba(108,92,231,0.04); border-radius: var(--radius-sm);
  width: 100%;
}
.mobile-tool-sublist.open { max-height: 800px; }
.mobile-tool-sublist a {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.6rem 1rem 0.6rem 3.5rem;
  color: var(--text-muted); text-decoration: none;
  font-size: 0.85rem; transition: var(--transition);
}
.mobile-tool-sublist a:hover { color: var(--text-light); background: rgba(108,92,231,0.06); }
.mobile-tool-sublist a i { width: 1rem; text-align: center; color: var(--primary); font-size: 0.75rem; }



/* ===== CONTACT FORM ===== */
.contact-form .form-group {
  margin-bottom: 1.5rem;
}

.contact-form textarea {
  min-height: 150px;
}

/* ===== FOOTER ===== */

/* ===== PAGE TRANSITIONS ===== */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.6s ease forwards;
}

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

@font-face {
  font-family: 'Font Awesome 6 Free';
  font-display: swap;
  src: url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/webfonts/fa-solid-900.woff2') format('woff2');
}
@font-face {
  font-family: 'Font Awesome 6 Brands';
  font-display: swap;
  src: url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/webfonts/fa-brands-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Font Awesome 6 Free';
  font-style: normal;
  font-display: swap;
  src: url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/webfonts/fa-regular-400.woff2') format('woff2');
}

.fade-in-delay-1 { animation-delay: 0.1s; }
.fade-in-delay-2 { animation-delay: 0.2s; }
.fade-in-delay-3 { animation-delay: 0.3s; }
.fade-in-delay-4 { animation-delay: 0.4s; }
.fade-in-delay-5 { animation-delay: 0.5s; }

/* ===== SCROLL ANIMATION ===== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* ===== 404 ===== */
.error-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 80vh;
  text-align: center;
  padding: 2rem;
}

.error-page h1 {
  font-size: 8rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 1rem;
}

.error-page h2 {
  font-size: 1.8rem;
  color: var(--text-light);
  margin-bottom: 1rem;
}

.error-page p {
  color: var(--text-muted);
  margin-bottom: 2rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .hero {
    padding: 4rem 1rem 3rem;
  }

  .section {
    padding: 2rem 1rem;
  }

  .tool-grid {
    grid-template-columns: 1fr;
  }

  .tool-page {
    padding: 1rem;
  }

  .tool-container {
    padding: 1.5rem;
  }

  .form-row {
    flex-direction: column;
  }

  .form-row .form-group {
    min-width: 100%;
  }

  .blog-grid {
    grid-template-columns: 1fr;
  }

  .content-page {
    padding: 1rem;
  }

  .error-page h1 {
    font-size: 5rem;
  }

  /* Force all inline tool grids to single column on mobile */
  .tool-container [style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }

  /* Style-tag grid overrides */
  .html-editor-wrap,
  .md-editor-wrap,
  .diff-wrap,
  .y2j-wrap,
  .checks-grid,
  .color-info,
  .meta-grid,
  .tts-controls {
    grid-template-columns: 1fr !important;
  }

  .tool-container input,
  .tool-container textarea,
  .tool-container select {
    font-size: 16px !important;
  }

  .tool-output {
    font-size: 0.8rem;
    padding: 0.8rem;
    overflow-x: auto;
  }

  .tool-page-header h1 {
    font-size: 1.4rem;
  }

  .gpa-row {
    grid-template-columns: 1fr 1fr !important;
  }
}

@media (min-width: 769px) {
  .mobile-menu {
    display: none !important;
  }
}

/* ===== GLASSMORPHISM SPECIAL EFFECTS ===== */
.glass-glow {
  position: relative;
  overflow: hidden;
}

.glass-glow::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(108, 92, 231, 0.1), transparent 50%);
  pointer-events: none;
  transition: opacity 0.3s;
  opacity: 0;
}

.glass-glow:hover::before {
  opacity: 1;
}

/* ===== SEARCH BAR ===== */
.search-bar {
  position: relative;
  max-width: 500px;
  margin: 0 auto 3rem;
}

.search-bar input {
  width: 100%;
  padding: 1rem 1.2rem 1rem 3rem;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: 50px;
  color: var(--text-light);
  font-size: 1rem;
  outline: none;
  transition: var(--transition);
  font-family: inherit;
}

.search-bar input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.15);
}

.search-bar i {
  position: absolute;
  left: 1.2rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

/* ===== TOGGLE SWITCH ===== */
.toggle-wrap {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.toggle {
  position: relative;
  width: 48px;
  height: 26px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 13px;
  cursor: pointer;
  transition: var(--transition);
}

.toggle.active {
  background: var(--primary);
}

.toggle::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  background: var(--text-light);
  border-radius: 50%;
  transition: var(--transition);
}

.toggle.active::after {
  left: 25px;
}

/* ===== STATS SECTION ===== */
.stats-section {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  max-width: 1000px;
  margin: -3rem auto 4rem;
  padding: 0 2rem;
  position: relative;
  z-index: 2;
}

.stat-item {
  text-align: center;
  padding: 2rem 1rem;
}

.stat-number {
  font-size: 2.8rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary-light), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
}

.stat-icon {
  font-size: 1.5rem;
  color: var(--primary-light);
  margin-bottom: 0.5rem;
}

/* ===== HOW IT WORKS ===== */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  max-width: 900px;
  margin: 0 auto;
}

.step-card {
  text-align: center;
  padding: 2.5rem 1.5rem;
  position: relative;
}

.step-number {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-light);
  margin: 0 auto 1.2rem;
}

.step-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-light);
  margin-bottom: 0.5rem;
}

.step-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.step-connector {
  display: none;
}

@media (min-width: 768px) {
  .step-card {
    position: relative;
  }
  .step-card:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 2.5rem;
    right: -1.5rem;
    width: 3rem;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), transparent);
  }
}

/* ===== TESTIMONIALS ===== */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: 1000px;
  margin: 0 auto;
}

.testimonial-card {
  padding: 2rem;
  text-align: center;
}

.testimonial-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--text-light);
  margin: 0 auto 1rem;
}

.testimonial-text {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
  font-style: italic;
  margin-bottom: 1rem;
}

.testimonial-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-light);
}

.testimonial-role {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ===== CTA SECTION ===== */
.cta-section {
  text-align: center;
  padding: 5rem 2rem;
  max-width: 700px;
  margin: 0 auto;
}

.cta-section h2 {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text-light);
  margin-bottom: 1rem;
}

.cta-section p {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 2rem;
  line-height: 1.7;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.cta-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 2rem;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  color: var(--text-light);
  text-decoration: none;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  transition: var(--transition);
}

.cta-secondary:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}

/* ===== HERO FLOATING ELEMENTS ===== */
.hero-float {
  position: absolute;
  pointer-events: none;
  opacity: 0.15;
  font-size: 3rem;
  color: var(--primary-light);
  animation: heroFloat 6s ease-in-out infinite;
}

@keyframes heroFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(5deg); }
}

/* ===== FEATURES ENHANCED ===== */
.feature-icon-large {
  width: 80px;
  height: 80px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--text-light);
  margin: 0 auto 1.2rem;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  transition: var(--transition);
}

.feature-card:hover .feature-icon-large {
  transform: scale(1.1) rotateY(10deg);
}

/* ===== RESPONSIVE STATS/TESTIMONIALS ===== */
@media (max-width: 768px) {
  .stats-section {
    grid-template-columns: repeat(2, 1fr);
    margin-top: -2rem;
  }
  .steps-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
  }
  .testimonials-grid {
    grid-template-columns: 1fr;
  }
  .step-card:not(:last-child)::after {
    display: none;
  }
}

/* ===== LOADING SPINNER ===== */
.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--primary-light);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

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

/* ===== CSV/TABLE MOBILE FIXES ===== */
@media (max-width: 768px) {
  .tool-table {
    font-size: 0.7rem;
  }
  .tool-table th,
  .tool-table td {
    padding: 0.3rem 0.4rem;
    white-space: nowrap;
  }
  #tableContainer {
    margin: 0 -0.75rem;
    border-radius: 0;
  }
  .tool-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}
