:root {
  /* ShiftPx-Matched Dark Palette */
  --bg-dark: #0a0a0f;
  --bg-card: rgba(255, 255, 255, 0.03);
  --bg-card-hover: rgba(255, 255, 255, 0.06);
  
  --glass-border: rgba(255, 255, 255, 0.06);
  --glass-border-focus: rgba(255, 255, 255, 0.12);
  
  --text-primary: #f0f0f5;
  --text-secondary: #8a8a9a;
  --text-muted: #5a5a6a;

  /* ShiftPx Purple/Violet Accents */
  --accent-1: #6366f1;
  --accent-2: #8b5cf6;
  --accent-3: #a855f7;
  --accent-4: #d946ef;

  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  
  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --sidebar-width: 280px;
}

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

body {
  font-family: var(--font-main);
  background-color: var(--bg-dark);
  color: var(--text-primary);
  min-height: 100vh;
  overflow: hidden; /* Hide scrollbars for the main window, we'll scroll inside */
  -webkit-font-smoothing: antialiased;
  cursor: none; /* Hide default cursor for custom cursor */
}

/* --- Premium Noise Texture --- */
.noise-overlay {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.03;
  background-image: 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");
}

/* --- Custom Cursor --- */
.custom-cursor {
  position: fixed;
  top: 0; left: 0;
  width: 8px; height: 8px;
  background: var(--text-primary);
  border-radius: 50%;
  pointer-events: none;
  z-index: 10000;
  transform: translate(-50%, -50%);
  transition: width 0.2s, height 0.2s, background 0.2s;
}

.custom-cursor.hovering {
  width: 24px; height: 24px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.5);
}

.cursor-glow {
  position: fixed;
  top: 0; left: 0;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(139,92,246,0.06) 0%, rgba(99,102,241,0.03) 30%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: transform 0.1s ease-out;
}

/* Background ambient glow — matches ShiftPx */
body::before {
  content: '';
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(ellipse at 20% 50%, rgba(99,102,241,0.06) 0%, transparent 50%),
              radial-gradient(ellipse at 80% 20%, rgba(168,85,247,0.04) 0%, transparent 50%),
              radial-gradient(ellipse at 50% 80%, rgba(217,70,239,0.03) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* --- Layout --- */
.app-container {
  display: flex;
  height: 100vh;
  width: 100vw;
}

/* --- Sidebar --- */
.sidebar {
  width: var(--sidebar-width);
  background: #12121a;
  border-right: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  padding: 2rem 1.5rem;
  z-index: 10;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 3rem;
}

.logo-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--accent-1), var(--accent-3));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 30px rgba(139, 92, 246, 0.15);
}

.logo-icon i {
  color: white;
  width: 22px;
  height: 22px;
}

.logo-text h1 {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--accent-2), var(--accent-4));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.brand-tag {
  font-size: 0.7rem;
  color: var(--text-secondary);
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

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

.nav-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
  padding-left: 12px;
}

.nav-item {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 14px 16px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: var(--transition-smooth);
  text-align: left;
}

.nav-item i {
  width: 18px;
  height: 18px;
  opacity: 0.7;
  transition: var(--transition-smooth);
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
}

.nav-item:hover i {
  opacity: 1;
}

.nav-item.active {
  background: linear-gradient(135deg, rgba(99,102,241,0.2), rgba(168,85,247,0.2));
  color: #fff;
  border: 1px solid rgba(139, 92, 246, 0.2);
}

.nav-item.active i {
  color: #a78bfa;
  opacity: 1;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.05);
}

.sidebar-footer p {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.sidebar-footer a {
  color: var(--accent-1);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition-smooth);
}
.sidebar-footer a:hover {
  text-decoration: underline;
  color: #1ad8ff;
}

/* --- Main Content --- */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.top-header {
  padding: 2.5rem 3rem 1.5rem;
  flex-shrink: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-title h2 {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 4px;
  background: linear-gradient(to right, #fff, var(--text-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.header-title p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.view-area {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 3rem 3rem;
}

.view-area::-webkit-scrollbar {
  width: 6px;
}
.view-area::-webkit-scrollbar-track {
  background: transparent;
}
.view-area::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

.view-section {
  display: none;
  animation: fadeIn 0.4s ease forwards;
}

.view-section.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Staggered animation classes */
.view-section.active > * {
  animation: fadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  opacity: 0;
}
.view-section.active > *:nth-child(1) { animation-delay: 0.1s; }
.view-section.active > *:nth-child(2) { animation-delay: 0.2s; }
.view-section.active > *:nth-child(3) { animation-delay: 0.3s; }
.view-section.active > *:nth-child(4) { animation-delay: 0.4s; }

/* --- Glass Cards --- */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

/* --- Dashboard --- */
.welcome-banner {
  padding: 2.5rem;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
}

.welcome-banner::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(135deg, rgba(58,123,213,0.1), rgba(0,0,0,0));
  z-index: 0;
  pointer-events: none;
}

.welcome-text {
  position: relative;
  z-index: 1;
}

.welcome-text h3 {
  font-size: 1.5rem;
  margin-bottom: 8px;
  font-weight: 600;
}

.welcome-text p {
  color: var(--text-secondary);
  font-size: 1rem;
  max-width: 500px;
  line-height: 1.5;
}

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

.tool-card {
  padding: 1.5rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.tool-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(circle at center, rgba(255,255,255,0.1) 0%, transparent 70%);
  opacity: 0;
  transition: var(--transition-smooth);
  pointer-events: none;
}

.tool-card:hover {
  transform: translateY(-5px) scale(1.02);
  background: var(--bg-card-hover);
  border-color: rgba(139, 92, 246, 0.15);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5), 0 0 30px rgba(139,92,246,0.1);
}

.tool-card:hover::after {
  opacity: 1;
}

.tool-icon {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.2rem;
}

.tool-icon i {
  color: white;
}

.gradient-bg-1 { background: linear-gradient(135deg, var(--accent-1), var(--accent-3)); }
.gradient-bg-2 { background: linear-gradient(135deg, var(--accent-2), var(--accent-4)); }
.gradient-bg-3 { background: linear-gradient(135deg, #6366f1, #8b5cf6); }
.gradient-bg-4 { background: linear-gradient(135deg, var(--accent-3), var(--accent-4)); }

.tool-card h4 {
  font-size: 1.1rem;
  margin-bottom: 8px;
  font-weight: 600;
}

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

/* --- Calculators Shared Styles --- */
.calculator-card {
  max-width: 600px;
  margin: 0 auto;
  padding: 2.5rem;
}

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

.input-group label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
  font-weight: 500;
}

input[type="number"],
input[type="text"],
input[type="date"],
select {
  width: 100%;
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  padding: 14px 16px;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-family: var(--font-main);
  outline: none;
  transition: var(--transition-smooth);
}

input:focus, select:focus {
  border-color: var(--glass-border-focus);
  background: rgba(0,0,0,0.4);
  box-shadow: 0 0 0 2px rgba(58,123,213,0.2);
}

input::placeholder {
  color: var(--text-muted);
}

/* Hide spin buttons */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type=number] {
  -moz-appearance: textfield;
}

.input-with-unit, .input-with-icon {
  display: flex;
  align-items: center;
  position: relative;
  width: 100%;
}

.input-with-icon span {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 1.1rem;
  pointer-events: none;
  z-index: 2;
  line-height: 1;
}

.input-with-icon input {
  padding-left: 44px !important;
  padding-right: 16px !important;
}

.input-with-unit select {
  position: absolute;
  right: 6px;
  width: auto;
  min-width: 70px;
  background: rgba(255,255,255,0.05);
  border: none;
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
  appearance: none;
  text-align: center;
}

.input-with-unit select option {
  background: var(--bg-dark);
  color: var(--text-primary);
}

.primary-btn {
  width: 100%;
  padding: 16px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--accent-1), var(--accent-3));
  color: white;
  font-weight: 600;
  font-size: 1rem;
  margin-top: 1rem;
  transition: var(--transition-smooth);
  box-shadow: 0 0 30px rgba(139, 92, 246, 0.15);
  position: relative;
  overflow: hidden;
}

.primary-btn::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 150%; height: 150%;
  background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 60%);
  transform: translate(-50%, -50%) scale(0);
  transition: transform 0.6s ease-out;
}

.primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 60px rgba(139, 92, 246, 0.25);
  background: linear-gradient(135deg, var(--accent-2), var(--accent-4));
}

.primary-btn:hover::before {
  transform: translate(-50%, -50%) scale(1);
}

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

.result-box {
  margin-top: 2rem;
  padding: 1.5rem;
  background: rgba(255,255,255,0.03);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255,255,255,0.05);
  text-align: center;
}

.result-box.hidden {
  display: none;
}

/* BMI specifics */
.result-value {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--accent-1);
  margin-bottom: 4px;
}
.result-label {
  font-size: 1.1rem;
  color: var(--text-primary);
  font-weight: 600;
}
.bmi-suggestions {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px dashed rgba(255,255,255,0.1);
  text-align: left;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}
.bmi-suggestions ul {
  padding-left: 1.2rem;
  margin-top: 0.5rem;
}
.bmi-suggestions li {
  margin-bottom: 0.5rem;
}

/* Age specifics */
.result-row {
  display: flex;
  justify-content: space-around;
  margin-bottom: 1.5rem;
}
.result-col {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.res-num {
  font-size: 2rem;
  font-weight: 700;
  color: #f2c94c;
}
.res-lbl {
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.next-bday {
  font-size: 0.9rem;
  color: var(--text-muted);
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.05);
}
.next-bday span {
  color: var(--text-primary);
  font-weight: 600;
}

/* Unit Converter specifics */
.tabs {
  display: flex;
  background: rgba(0,0,0,0.2);
  border-radius: var(--radius-md);
  padding: 6px;
  margin-bottom: 2rem;
}
.tab-btn {
  flex: 1;
  padding: 10px;
  border-radius: 10px;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.9rem;
  transition: var(--transition-smooth);
}
.tab-btn.active {
  background: linear-gradient(135deg, var(--accent-1), var(--accent-3));
  color: white;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35);
  border: 1px solid rgba(255,255,255,0.1);
}

.swap-icon {
  width: 40px;
  height: 40px;
  margin: 1rem auto;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
  border: 1px solid rgba(255,255,255,0.05);
}
.swap-icon:hover {
  background: rgba(255,255,255,0.1);
  transform: rotate(180deg);
}
.swap-icon i {
  width: 18px;
  height: 18px;
  color: var(--text-secondary);
}

/* Discount specifics */
.disc-result {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.disc-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.1rem;
  font-weight: 500;
}
.highlight-val {
  font-size: 2rem;
  font-weight: 700;
  color: #a78bfa;
}
.disc-row.savings {
  color: var(--text-secondary);
  font-size: 0.95rem;
  padding-top: 1rem;
  border-top: 1px dashed rgba(255,255,255,0.1);
}
.disc-row.savings span:last-child {
  color: var(--accent-1);
  font-weight: 600;
}

/* --- Blog Specifics --- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}
.blog-card {
  text-decoration: none;
  display: flex;
  flex-direction: column;
}
.blog-card h4 {
  font-size: 1.15rem;
  margin-bottom: 12px;
  color: var(--text-primary);
  font-weight: 700;
}
.blog-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 0;
}

/* --- Main Footer --- */
.main-footer {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.main-footer a {
  color: var(--accent-1);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition-smooth);
}

.main-footer a:hover {
  color: #1ad8ff;
  text-decoration: underline;
}

/* --- Password Options Grid --- */
.pass-options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.95rem;
  color: var(--text-secondary);
  user-select: none;
}
.checkbox-label input {
  accent-color: var(--accent-2);
  width: 16px;
  height: 16px;
  cursor: pointer;
}
#pass-output {
  font-size: clamp(1.3rem, 4vw, 1.8rem);
  word-break: break-all;
  margin-bottom: 1rem;
  color: var(--text-primary);
  letter-spacing: 1px;
}

/* --- Percentage Calc Styles --- */
.percent-block {
  margin-bottom: 1.5rem;
}
.percent-block.divider {
  border-top: 1px dashed rgba(255,255,255,0.1);
  padding-top: 1.5rem;
  margin-top: 1.5rem;
}
.percent-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.percent-text {
  font-size: 1rem;
  color: var(--text-secondary);
  white-space: nowrap;
}
.percent-row input {
  width: 100px;
  flex: 1;
  min-width: 80px;
  padding: 10px 14px;
}
.percent-res {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent-1);
}

/* --- Word Counter Styles --- */
#word-input {
  width: 100%;
  background: rgba(0,0,0,0.25);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  padding: 16px;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 1rem;
  resize: vertical;
  min-height: 150px;
  margin-bottom: 1.5rem;
  outline: none;
  transition: var(--transition-smooth);
}
#word-input:focus {
  border-color: var(--accent-1);
  box-shadow: 0 0 20px rgba(99,102,241,0.2);
}
.stat-row {
  background: rgba(255,255,255,0.03);
  padding: 1.25rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255,255,255,0.05);
}

/* --- GST Calculator Styles --- */
.gst-chips {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 6px;
}
.gst-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  padding: 10px 8px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}
.gst-chip:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(139, 92, 246, 0.3);
  color: #fff;
}
.gst-chip.active {
  background: linear-gradient(135deg, var(--accent-1), var(--accent-3));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}
.gst-split-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
}
.gst-split-col {
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.02);
  padding: 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}
.split-lbl {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}
.split-val {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

/* Tablet (max-width: 1024px) */
@media (max-width: 1024px) {
  :root {
    --sidebar-width: 240px;
  }
  .view-area {
    padding: 1.5rem 2rem 3rem;
  }
  .tools-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }
}

/* Mobile & Tablet Portrait (max-width: 768px) */
@media (max-width: 768px) {
  body {
    overflow-y: auto !important;
    overflow-x: hidden;
    height: auto !important;
    min-height: 100vh;
    cursor: auto !important;
  }

  /* Disable custom cursor & glow on touch screens */
  .custom-cursor,
  .cursor-glow {
    display: none !important;
  }

  .app-container {
    height: auto !important;
    min-height: 100vh;
    flex-direction: column;
    overflow-x: hidden;
  }

  /* Sticky Top Bar & Horizontal Scroll Navigation */
  .sidebar {
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(18, 18, 26, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 0.75rem 1rem;
    border-right: none;
    border-bottom: 1px solid var(--glass-border);
    gap: 0.75rem;
  }

  .logo-area {
    margin-bottom: 0;
    justify-content: flex-start;
    gap: 10px;
  }

  .logo-icon {
    width: 36px;
    height: 36px;
  }
  .logo-icon i {
    width: 18px;
    height: 18px;
  }
  .logo-text h1 {
    font-size: 1.15rem;
  }
  .brand-tag {
    font-size: 0.65rem;
  }

  .nav-menu {
    flex-direction: row;
    gap: 6px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
    padding: 2px 0 6px;
    scrollbar-width: none;
  }
  .nav-menu::-webkit-scrollbar {
    display: none;
  }

  .nav-label {
    display: none;
  }

  .nav-item {
    padding: 8px 14px;
    font-size: 0.85rem;
    white-space: nowrap;
    flex-shrink: 0;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
  }
  .nav-item i {
    width: 16px;
    height: 16px;
  }
  .nav-item.active {
    background: linear-gradient(135deg, var(--accent-1), var(--accent-3));
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35);
  }
  .nav-item.active i {
    color: #fff;
  }

  .sidebar-footer {
    display: none;
  }

  /* Main Content Adjustments */
  .main-content {
    flex: 1;
    overflow: visible !important;
    height: auto !important;
    width: 100%;
  }

  .top-header {
    padding: 1.25rem 1rem 0.5rem;
  }
  .header-title h2 {
    font-size: 1.6rem;
  }
  .header-title p {
    font-size: 0.85rem;
  }

  .view-area {
    overflow: visible !important;
    height: auto !important;
    padding: 0.75rem 1rem 3rem;
  }

  .welcome-banner {
    padding: 1.25rem 1rem;
    margin-bottom: 1.25rem;
  }
  .welcome-text h3 {
    font-size: 1.3rem;
  }
  .welcome-text p {
    font-size: 0.88rem;
  }

  /* Grids and Cards */
  .tools-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .tool-card {
    padding: 1.25rem 1rem;
  }

  .calculator-card {
    padding: 1.25rem 1rem;
    max-width: 100%;
    border-radius: var(--radius-md);
  }

  /* Form Elements on Mobile */
  .input-group label {
    font-size: 0.88rem;
    margin-bottom: 6px;
  }
  .input-group input,
  .input-group select {
    font-size: 1rem; /* Prevent iOS automatic zoom */
    padding: 12px 14px;
  }
  .input-with-icon input {
    padding-left: 44px !important;
    padding-right: 16px !important;
  }
  .input-with-unit input {
    padding-left: 14px !important;
    padding-right: 85px !important;
  }
  .input-with-unit select {
    right: 4px;
    padding: 8px 8px;
    font-size: 0.85rem;
  }

  /* Unit Converter on Mobile */
  .converter-wrap {
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
  }
  .converter-wrap .input-group {
    width: 100%;
  }
  .swap-icon {
    margin: 0.5rem auto;
    width: 36px;
    height: 36px;
    transform: rotate(90deg);
  }
  .swap-icon:hover {
    transform: rotate(270deg);
  }

  /* Stats Row & Results on Mobile */
  .result-row {
    margin-bottom: 1rem;
  }
  .res-num {
    font-size: 1.5rem;
  }
  .res-lbl {
    font-size: 0.7rem;
  }
  .result-value {
    font-size: 2rem;
  }
  .result-label {
    font-size: 1rem;
  }

  /* Blogs Grid on Mobile */
  .blog-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  /* Footer on Mobile */
  .main-footer {
    margin-top: 3rem;
    padding-top: 1.5rem;
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }
}

/* Small Phones (max-width: 480px) */
@media (max-width: 480px) {
  .header-title h2 {
    font-size: 1.4rem;
  }
  .pass-options-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
  }
  .percent-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  .percent-row input {
    width: 100%;
  }
  .primary-btn {
    padding: 14px;
    font-size: 0.95rem;
  }
}

