: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);
}

/* ===== 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); }
}

/* ===== MAIN CONTENT ===== */


.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;
}

