/**
 * MultiTools Hub - Modern, Premium Design System
 * Features: Cyber-Glass Aesthetics, HSL Gradients, Smooth Transitions, Dark Mode First
 */

:root {
   /* Color Palette - HSL based for easier modification */
   --p-hue: 240;
   /* Royal Blue */
   --primary: hsl(var(--p-hue), 90%, 65%);
   --primary-alt: hsl(var(--p-hue), 100%, 75%);
   --secondary: hsl(190, 80%, 55%);
   --accent: hsl(300, 85%, 65%);

   /* Dark Mode First Default Values */
   --bg-main: hsl(var(--p-hue), 40%, 4%);
   --bg-card: hsla(var(--p-hue), 40%, 12%, 0.85);
   --text-main: hsl(var(--p-hue), 20%, 96%);
   --text-muted: hsl(var(--p-hue), 15%, 75%);
   --border: hsla(var(--p-hue), 20%, 30%, 0.6);
   --glass-blur: blur(25px);
   --shadow: 0 15px 50px rgba(0, 0, 0, 0.45);
}

[data-theme="light"] {
   --bg-main: hsl(var(--p-hue), 30%, 96%);
   --bg-card: hsla(var(--p-hue), 30%, 100%, 0.9);
   --text-main: hsl(var(--p-hue), 60%, 10%);
   --text-muted: hsl(var(--p-hue), 25%, 45%);
   --border: hsla(var(--p-hue), 20%, 80%, 0.7);
   --shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

* {
   margin: 0;
   padding: 0;
   box-sizing: border-box;
   transition: background-color 0.4s ease, border-color 0.4s ease, color 0.4s ease, transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Background animated circles */
body::before {
   content: '';
   position: fixed;
   top: -10%;
   right: -10%;
   width: 60%;
   height: 60%;
   background: radial-gradient(circle, hsla(var(--p-hue), 90%, 60%, 0.05), transparent 70%);
   filter: blur(80px);
   z-index: -1;
   animation: pulseBg 10s ease-in-out infinite;
}

body::after {
   content: '';
   position: fixed;
   bottom: -10%;
   left: -10%;
   width: 50%;
   height: 50%;
   background: radial-gradient(circle, hsla(190, 80%, 55%, 0.05), transparent 70%);
   filter: blur(80px);
   z-index: -1;
   animation: pulseBg 12s ease-in-out infinite reverse;
}

@keyframes pulseBg {

   0%,
   100% {
      transform: scale(1) translate(0, 0);
   }

   50% {
      transform: scale(1.1) translate(2%, 2%);
   }
}

/* Typography */
h1,
h2,
h3,
h4 {
   font-family: 'Outfit', sans-serif;
   letter-spacing: -0.02em;
}

.container {
   max-width: 1400px;
   margin: 0 auto;
   padding: 0 5%;
}

/* Navbar */
header {
   position: sticky;
   top: 15px;
   z-index: 1000;
   margin-bottom: 50px;
}

.nav-inner {
   background: var(--bg-card);
   backdrop-filter: var(--glass-blur);
   border: 1px solid var(--border);
   border-radius: 20px;
   height: 75px;
   display: flex;
   align-items: center;
   justify-content: space-between;
   padding: 0 40px;
   box-shadow: var(--shadow);
}

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

.nav-links {
   display: flex;
   gap: 35px;
   list-style: none;
}

.nav-links a {
   font-weight: 600;
   color: var(--text-main);
   text-decoration: none;
   opacity: 0.8;
}

.nav-links a:hover {
   opacity: 1;
   color: var(--primary);
}

/* Hero Section */
.hero-section {
   padding: 80px 0 50px;
   text-align: center;
}

.hero-section h1 {
   font-size: 4.5rem;
   margin-bottom: 25px;
   line-height: 1.1;
}

.hero-section p {
   color: var(--text-muted);
   font-size: 1.3rem;
   max-width: 700px;
   margin: 0 auto 50px;
}

/* Search Box */
.search-wrapper {
   max-width: 750px;
   margin: 0 auto;
   position: relative;
   background: var(--bg-card);
   border: 1px solid var(--border);
   border-radius: 100px;
   box-shadow: var(--shadow);
}

.search-wrapper input {
   width: 100%;
   background: transparent;
   border: none;
   padding: 18px 25px 18px 60px;
   font-size: 1.2rem;
   color: var(--text-main);
   outline: none;
}

.search-wrapper i {
   position: absolute;
   left: 25px;
   top: 50%;
   transform: translateY(-50%);
   color: var(--primary);
   font-size: 1.4rem;
}

/* Category Tabs */
.category-tabs {
   display: flex;
   justify-content: center;
   gap: 15px;
   flex-wrap: wrap;
   margin: 60px 0;
}

.category-label {
   padding: 14px 28px;
   background: var(--bg-card);
   border: 1px solid var(--border);
   border-radius: 50px;
   cursor: pointer;
   font-weight: 700;
   color: var(--text-muted);
}

.category-label.active,
.category-label:hover {
   background: var(--primary);
   color: white;
   border-color: var(--primary);
   transform: translateY(-5px);
   box-shadow: 0 10px 30px hsla(var(--p-hue), 90%, 65%, 0.35);
}

/* Tool Cards */
.tool-grid {
   display: grid;
   grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
   gap: 40px;
   margin-bottom: 100px;
}

.tool-card {
   background: var(--bg-card);
   border: 1px solid var(--border);
   border-radius: 35px;
   padding: 45px;
   backdrop-filter: var(--glass-blur);
   text-align: center;
   text-decoration: none;
   position: relative;
   overflow: hidden;
}

.tool-card::before {
   content: '';
   position: absolute;
   top: 0;
   left: 0;
   width: 100%;
   height: 100%;
   background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.05), transparent);
   transform: translateX(-100%);
   transition: 0.6s;
}

.tool-card:hover::before {
   transform: translateX(100%);
}

.tool-card i {
   font-size: 3.2rem;
   margin-bottom: 30px;
   background: linear-gradient(135deg, var(--primary), var(--secondary));
   -webkit-background-clip: text;
   background-clip: text;
   -webkit-text-fill-color: transparent;
}

.tool-card h3 {
   font-size: 1.5rem;
   color: var(--text-main);
   margin-bottom: 15px;
}

.tool-card p {
   color: var(--text-muted);
   font-size: 1rem;
}

.tool-card:hover {
   transform: translateY(-15px) scale(1.03);
   border-color: var(--primary);
   box-shadow: 0 40px 80px rgba(0, 0, 0, 0.25);
}

/* Theme Button */
.theme-btn {
   width: 50px;
   height: 50px;
   border-radius: 15px;
   background: var(--bg-main);
   border: 1px solid var(--border);
   cursor: pointer;
   color: var(--primary);
   font-size: 1.3rem;
}

/* Animations */
.fade-in {
   animation: slideUp 0.6s ease forwards;
}

@keyframes slideUp {
   from {
      opacity: 0;
      transform: translateY(30px);
   }

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

/* Workspace */
.tool-workspace {
   background: var(--bg-card);
   border: 1px solid var(--border);
   padding: 60px;
   border-radius: 40px;
   margin: 40px 0;
}

.form-control {
   background: rgba(255, 255, 255, 0.03);
   border: 2px solid var(--border);
   border-radius: 20px;
   padding: 25px;
   color: var(--text-main);
   width: 100%;
}

.form-control:focus {
   border-color: var(--primary);
   background: rgba(var(--p-hue), 90%, 65%, 0.05);
}

/* Responsive */
@media (max-width: 768px) {
   .container {
      padding: 0 8%;
   }

   .hero-section h1 {
      font-size: 2.8rem;
   }

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

   .nav-links {
      display: none;
   }
}