/* ==========================================================================
   NEWTOOLS.APP - MODERN TECH & GLASSMORPHISM STYLES
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  --font-main: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  /* Brand Glow Accents */
  --glow-blue: rgba(59, 130, 246, 0.5);
  --glow-cyan: rgba(6, 182, 212, 0.4);
  --glow-purple: rgba(139, 92, 246, 0.4);
  --card-glass-bg: rgba(15, 23, 42, 0.55);
  --card-glass-border: rgba(255, 255, 255, 0.09);
}

html.light {
  --card-glass-bg: rgba(255, 255, 255, 0.75);
  --card-glass-border: rgba(0, 0, 0, 0.08);
}

body {
  font-family: var(--font-main);
  background-color: #060913;
  color: #f1f5f9;
  overflow-x: hidden;
  min-height: 100vh;
  transition: background-color 0.3s ease, color 0.3s ease;
}

html.light body {
  background-color: #f8fafc;
  color: #0f172a;
}

/* --------------------------------------------------------------------------
   Futuristic Glassmorphism Components
   -------------------------------------------------------------------------- */
.glass-panel {
  background: var(--card-glass-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--card-glass-border);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html.light .glass-panel {
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.06);
}

.glass-panel-hover:hover {
  border-color: rgba(56, 189, 248, 0.4);
  transform: translateY(-4px);
  box-shadow: 0 16px 40px 0 rgba(14, 165, 233, 0.18);
}

.glass-input {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f8fafc;
  transition: all 0.2s ease;
}

html.light .glass-input {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.15);
  color: #0f172a;
}

.glass-input:focus {
  border-color: #38bdf8;
  outline: none;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.25);
  background: rgba(255, 255, 255, 0.08);
}

html.light .glass-input:focus {
  background: #ffffff;
}

/* --------------------------------------------------------------------------
   High-Contrast Select & Dropdown Option Styles
   -------------------------------------------------------------------------- */
select.glass-input {
  background-color: #090e1d !important;
  color: #f8fafc !important;
}

select.glass-input option {
  background-color: #090e1d !important;
  color: #ffffff !important;
  padding: 8px 12px;
}

html.light select.glass-input {
  background-color: #ffffff !important;
  color: #0f172a !important;
}

html.light select.glass-input option {
  background-color: #ffffff !important;
  color: #0f172a !important;
}

/* --------------------------------------------------------------------------
   Luminescent Glassmorphic Buttons & Badges
   -------------------------------------------------------------------------- */
.btn-glow-primary {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.88) 0%, rgba(79, 70, 229, 0.85) 50%, rgba(6, 182, 212, 0.88) 100%) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.3) !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-glow-primary:hover {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.98) 0%, rgba(79, 70, 229, 0.95) 50%, rgba(6, 182, 212, 0.98) 100%) !important;
  border-color: rgba(56, 189, 248, 0.6) !important;
  box-shadow: 0 6px 28px rgba(6, 182, 212, 0.55), inset 0 1px 2px rgba(255, 255, 255, 0.45) !important;
  transform: translateY(-2px) scale(1.01);
}

.btn-glow-primary:active {
  transform: scale(0.98);
}

.btn-glass {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2), inset 0 1px 1px rgba(255, 255, 255, 0.12);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

html.light .btn-glass {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.12);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: 0 6px 20px rgba(56, 189, 248, 0.2), inset 0 1px 2px rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

html.light .btn-glass:hover {
  background: rgba(0, 0, 0, 0.09);
  border-color: rgba(2, 132, 199, 0.35);
  transform: translateY(-1px);
}

/* --------------------------------------------------------------------------
   Sub-tab Segmented Button System
   -------------------------------------------------------------------------- */
.subtab-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.125rem;
  border-radius: 0.875rem;
  font-size: 0.8125rem;
  font-weight: 700;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.subtab-pill-btn:hover {
  background: rgba(255, 255, 255, 0.09);
  color: #ffffff;
  border-color: rgba(56, 189, 248, 0.35);
  transform: translateY(-1px);
}

.subtab-pill-btn.active {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.28) 0%, rgba(99, 102, 241, 0.25) 100%) !important;
  border-color: #38bdf8 !important;
  color: #ffffff !important;
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.35), inset 0 1px 1px rgba(255, 255, 255, 0.2) !important;
}

html.light .subtab-pill-btn {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.09);
  color: #64748b;
}

html.light .subtab-pill-btn:hover {
  background: rgba(0, 0, 0, 0.08);
  color: #0f172a;
  border-color: rgba(2, 132, 199, 0.4);
}

html.light .subtab-pill-btn.active {
  background: #ffffff !important;
  border-color: #0284c7 !important;
  color: #0284c7 !important;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.15) !important;
}

/* --------------------------------------------------------------------------
   Ambient Tech Background Lighting
   -------------------------------------------------------------------------- */
.bg-ambient-lights {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.glow-orb-1 {
  position: absolute;
  top: -10%;
  left: 15%;
  width: 650px;
  height: 650px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.18) 0%, rgba(59, 130, 246, 0) 70%);
  filter: blur(95px);
  animation: pulse-slow 10s ease-in-out infinite alternate;
}

.glow-orb-2 {
  position: absolute;
  top: 35%;
  right: -5%;
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.15) 0%, rgba(139, 92, 246, 0) 70%);
  filter: blur(100px);
  animation: pulse-slow 12s ease-in-out infinite alternate-reverse;
}

.glow-orb-3 {
  position: absolute;
  bottom: -10%;
  left: 25%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.14) 0%, rgba(6, 182, 212, 0) 70%);
  filter: blur(90px);
}

html.light .glow-orb-1 {
  background: radial-gradient(circle, rgba(59, 130, 246, 0.08) 0%, rgba(59, 130, 246, 0) 70%);
}
html.light .glow-orb-2 {
  background: radial-gradient(circle, rgba(139, 92, 246, 0.06) 0%, rgba(139, 92, 246, 0) 70%);
}
html.light .glow-orb-3 {
  background: radial-gradient(circle, rgba(6, 182, 212, 0.06) 0%, rgba(6, 182, 212, 0) 70%);
}

@keyframes pulse-slow {
  0% {
    transform: scale(0.9) translate(0, 0);
    opacity: 0.7;
  }
  100% {
    transform: scale(1.15) translate(30px, -20px);
    opacity: 1;
  }
}

@keyframes floatSlow {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-7px);
  }
}

.animate-float-slow {
  animation: floatSlow 5s ease-in-out infinite;
}

/* --------------------------------------------------------------------------
   Drag & Drop Zones
   -------------------------------------------------------------------------- */
.drop-zone {
  border: 2px dashed rgba(255, 255, 255, 0.18);
  border-radius: 1.25rem;
  background: rgba(255, 255, 255, 0.02);
  transition: all 0.25s ease;
}

html.light .drop-zone {
  border-color: rgba(0, 0, 0, 0.18);
  background: rgba(0, 0, 0, 0.015);
}

.drop-zone.dragover {
  border-color: #38bdf8;
  background: rgba(56, 189, 248, 0.08);
  box-shadow: 0 0 25px rgba(56, 189, 248, 0.2);
  transform: scale(1.01);
}

/* --------------------------------------------------------------------------
   Custom Scrollbar
   -------------------------------------------------------------------------- */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.6);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(56, 189, 248, 0.5);
}

/* --------------------------------------------------------------------------
   Toast Notifications
   -------------------------------------------------------------------------- */
#toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  min-width: 280px;
  max-width: 400px;
  padding: 0.9rem 1.25rem;
  border-radius: 1rem;
  backdrop-filter: blur(20px);
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  color: white;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  animation: slide-in 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: all 0.3s ease;
}

html.light .toast {
  background: rgba(255, 255, 255, 0.95);
  color: #0f172a;
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

@keyframes slide-in {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.toast.toast-exit {
  opacity: 0;
  transform: translateY(-10px) scale(0.95);
}

/* --------------------------------------------------------------------------
   Tab Navigation & Tool Active States
   -------------------------------------------------------------------------- */
.tool-tab-btn.active {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.25) 0%, rgba(6, 182, 212, 0.25) 100%);
  border-color: rgba(56, 189, 248, 0.5);
  color: #38bdf8;
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.2);
}

/* Grid gradient badge */
.tech-glow-badge {
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #60a5fa;
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.2);
}

/* Futuristic Hero Background Banner */
.hero-futuristic-container {
  position: relative;
  overflow: hidden;
  border-radius: 2rem;
  padding: 3.5rem 1.5rem 2.5rem 1.5rem;
}

.hero-futuristic-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.40;
  filter: brightness(0.68) contrast(1.15);
  mask-image: radial-gradient(ellipse 90% 85% at 50% 45%, black 40%, rgba(0,0,0,0.5) 70%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 90% 85% at 50% 45%, black 40%, rgba(0,0,0,0.5) 70%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}

.hero-futuristic-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(6, 9, 19, 0.6) 0%, rgba(6, 9, 19, 0.92) 100%);
  pointer-events: none;
  z-index: 1;
}

html.light .hero-futuristic-bg {
  opacity: 0.45;
  filter: brightness(1.1) contrast(1);
}

html.light .hero-futuristic-overlay {
  background: radial-gradient(circle at center, rgba(248, 250, 252, 0.5) 0%, rgba(248, 250, 252, 0.9) 100%);
}

/* 3D Isometric Tool Card Styles */
.tool-card-3d {
  position: relative;
  margin-top: 2.75rem;
  padding-top: 3.25rem;
  padding-bottom: 1.75rem;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  text-align: center;
  border-radius: 1.75rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.tool-card-3d:hover {
  transform: translateY(-8px);
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: 0 20px 45px -10px rgba(14, 165, 233, 0.25);
}

.tool-icon-wrapper-3d {
  position: absolute;
  top: -3rem;
  left: 50%;
  transform: translateX(-50%);
  width: 6.5rem;
  height: 6.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.tool-card-3d:hover .tool-icon-wrapper-3d {
  transform: translateX(-50%) translateY(-8px) scale(1.12);
}

.tool-glow-aura {
  position: absolute;
  width: 7.5rem;
  height: 7.5rem;
  border-radius: 9999px;
  filter: blur(26px);
  pointer-events: none;
  z-index: 0;
  transition: all 0.5s ease;
  opacity: 0.8;
}

.tool-card-3d:hover .tool-glow-aura {
  opacity: 1;
  transform: scale(1.35);
}

/* Floating animation */
@keyframes floatSlow {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-4px); }
}

.animate-float-slow {
  animation: floatSlow 4s ease-in-out infinite;
}

/* Animation utility */
.fade-in {
  animation: fadeIn 0.4s ease forwards;
}

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

/* Ad slots custom styling */
.ad-slot {
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
}
html.light .ad-slot {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.1);
}

/* ==========================================================================
   LIGHT MODE COMPREHENSIVE HIGH-CONTRAST THEME OVERRIDES
   ========================================================================== */
html.light {
  --card-glass-bg: rgba(255, 255, 255, 0.95);
  --card-glass-border: rgba(203, 213, 225, 0.9);
}

html.light body {
  background-color: #f1f5f9;
  color: #0f172a;
}

/* Base Headings & High-Contrast Typography */
html.light .text-white {
  color: #0f172a !important;
}

html.light .text-slate-100,
html.light .text-slate-200,
html.light .text-slate-300 {
  color: #1e293b !important;
}

html.light .text-slate-400 {
  color: #475569 !important;
}

html.light .text-slate-500 {
  color: #64748b !important;
}

html.light .text-slate-600 {
  color: #475569 !important;
}

/* Glass Panels & Modals in Light Mode */
html.light .glass-panel {
  background: rgba(255, 255, 255, 0.95) !important;
  border-color: rgba(226, 232, 240, 0.95) !important;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.04) !important;
}

html.light .header-glass {
  background: rgba(255, 255, 255, 0.9) !important;
  border-bottom: 1px solid rgba(226, 232, 240, 0.9) !important;
}

/* Inputs, Textareas & Selects */
html.light .glass-input {
  background-color: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}

html.light .glass-input::placeholder {
  color: #94a3b8 !important;
}

html.light select.glass-input,
html.light select.glass-input option {
  background-color: #ffffff !important;
  color: #0f172a !important;
}

/* Glass Buttons & Tabs */
html.light .btn-glass {
  background: rgba(241, 245, 249, 0.95) !important;
  border-color: #cbd5e1 !important;
  color: #1e293b !important;
}

html.light .btn-glass:hover {
  background: #ffffff !important;
  color: #0f172a !important;
  border-color: #94a3b8 !important;
}

html.light .calc-tab-btn:not(.active) {
  color: #64748b !important;
}

html.light .calc-tab-btn.active {
  background-color: rgba(14, 165, 233, 0.12) !important;
  color: #0369a1 !important;
}

/* Borders & Separators */
html.light .border-white\/5,
html.light .border-white\/10,
html.light .border-white\/15,
html.light .border-white\/20 {
  border-color: rgba(226, 232, 240, 0.9) !important;
}

html.light .bg-white\/5,
html.light .bg-white\/10,
html.light .bg-white\/\[0\.04\],
html.light .bg-white\/\[0\.05\] {
  background-color: rgba(241, 245, 249, 0.85) !important;
}

/* Custom dark utility overrides in light mode */
html.light .bg-\[\#060913\],
html.light .bg-\[\#070b18\],
html.light .bg-\[\#090e1d\],
html.light .bg-\[\#0b1120\] {
  background-color: #ffffff !important;
}

/* Vibrant Accent Colors adjusted for Light Backgrounds */
html.light .text-sky-400 {
  color: #0284c7 !important;
}
html.light .text-sky-300 {
  color: #0369a1 !important;
}
html.light .text-indigo-400 {
  color: #4f46e5 !important;
}
html.light .text-indigo-300 {
  color: #4338ca !important;
}
html.light .text-emerald-400 {
  color: #059669 !important;
}
html.light .text-emerald-300 {
  color: #047857 !important;
}
html.light .text-rose-400 {
  color: #e11d48 !important;
}
html.light .text-rose-300 {
  color: #be123c !important;
}
html.light .text-amber-400 {
  color: #d97706 !important;
}
html.light .text-amber-300 {
  color: #b45309 !important;
}
html.light .text-cyan-400 {
  color: #0891b2 !important;
}
html.light .text-cyan-300 {
  color: #0e7490 !important;
}

html.light #global-parallax-bg {
  opacity: 0.12 !important;
  filter: brightness(1.15) contrast(1.1) !important;
}

html.light .hero-futuristic-bg {
  opacity: 0.22 !important;
  filter: brightness(1.1) contrast(1.05) !important;
}

/* --------------------------------------------------------------------------
   Tools Dropdown Menu High Contrast & Mobile Overlay
   -------------------------------------------------------------------------- */
#tools-dropdown-menu {
  background: #080d1e !important;
  background-color: #080d1e !important;
  border: 1px solid rgba(56, 189, 248, 0.45) !important;
  box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.95), 0 0 30px rgba(56, 189, 248, 0.2) !important;
  backdrop-filter: blur(30px) !important;
  -webkit-backdrop-filter: blur(30px) !important;
  z-index: 100 !important;
  max-height: 82vh !important;
  overflow-y: auto !important;
  scrollbar-width: thin;
}

#tools-dropdown-menu::-webkit-scrollbar {
  width: 5px;
}
#tools-dropdown-menu::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.3);
}
#tools-dropdown-menu::-webkit-scrollbar-thumb {
  background: rgba(56, 189, 248, 0.3);
  border-radius: 4px;
}

html.light #tools-dropdown-menu {
  background: #ffffff !important;
  background-color: #ffffff !important;
  border: 1px solid rgba(2, 132, 199, 0.3) !important;
  box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.25) !important;
}

/* --------------------------------------------------------------------------
   Independent Hero Slider & Tool Cards Glassmorphism
   -------------------------------------------------------------------------- */
.hero-futuristic-container {
  background: rgba(8, 14, 30, 0.68) !important;
  backdrop-filter: blur(28px) saturate(160%) !important;
  -webkit-backdrop-filter: blur(28px) saturate(160%) !important;
  border: 1px solid rgba(56, 189, 248, 0.3) !important;
  box-shadow: 0 20px 60px -10px rgba(0, 0, 0, 0.7), inset 0 1px 1px rgba(255, 255, 255, 0.15) !important;
}

html.light .hero-futuristic-container {
  background: rgba(255, 255, 255, 0.8) !important;
  backdrop-filter: blur(24px) saturate(160%) !important;
  -webkit-backdrop-filter: blur(24px) saturate(160%) !important;
  border: 1px solid rgba(2, 132, 199, 0.25) !important;
  box-shadow: 0 16px 40px -10px rgba(0, 0, 0, 0.1) !important;
}

.tool-card {
  background: rgba(10, 16, 36, 0.62) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.tool-card:hover {
  background: rgba(14, 23, 52, 0.8) !important;
  border-color: rgba(56, 189, 248, 0.45) !important;
  box-shadow: 0 20px 45px -10px rgba(14, 165, 233, 0.25), 0 0 20px rgba(56, 189, 248, 0.15) !important;
  transform: translateY(-4px);
}

html.light .tool-card {
  background: rgba(255, 255, 255, 0.75) !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05) !important;
}

html.light .tool-card:hover {
  background: #ffffff !important;
  border-color: rgba(2, 132, 199, 0.4) !important;
  box-shadow: 0 20px 40px -10px rgba(2, 132, 199, 0.15) !important;
}

