/* RESET */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: linear-gradient(to right, #eef2ff, #f8fafc);
  color: #111;
}

/* NAVBAR */
.navbar {
  position: sticky;
  top: 0;
  background: rgba(255,255,255,0.9);
  display: flex;
  align-items: center;
  padding: 15px 30px;
  gap: 20px;
  z-index: 1000;
}

.logo {
  font-weight: bold;
  font-size: 20px;
}

.navbar a {
  text-decoration: none;
  color: #333;
  margin: 0 10px;
}

.search {
  flex: 1;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #ddd;
}

/* HERO */
.hero {
  text-align: center;
  padding: 60px 20px;
}

.hero h1 {
  font-size: 38px;
}

/* SECTIONS */
.section {
  padding: 40px 20px;
}

/* GRID */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px,1fr));
  gap: 20px;
}

/* HOMEPAGE TOOL CARDS */
.tool-card {
  background: white;
  padding: 25px;
  border-radius: 14px;
  transition: 0.3s;
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

.tool-card:hover {
  transform: translateY(-6px);
}

.icon {
  font-size: 30px;
}

/* LINKS */
.card-link {
  text-decoration: none;
  color: inherit;
}

/* ===== TOOL PAGE FIX (IMPORTANT) ===== */

/* TOOL PAGE WRAPPER */
.tool-container {
  max-width: 500px;
  margin: 40px auto;
  padding: 20px;
}

/* TOOL CARD (SEPARATE FROM HOMEPAGE CARD) */
.calculator-card {
  background: white;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* INPUTS */
.calculator-card input {
  width: 100%;
  padding: 12px;
  margin: 10px 0;
  border-radius: 6px;
  border: 1px solid #ddd;
}

/* BUTTON */
.calculator-card button {
  width: 100%;
  padding: 12px;
  background: #4f46e5;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.calculator-card button:hover {
  background: #4338ca;
}

/* RESULT */
.result-box {
  margin-top: 20px;
  padding: 15px;
  background: #eef2ff;
  border-radius: 8px;
  text-align: center;
}

/* CONTENT (SEO SECTIONS) */
.content {
  max-width: 800px;
  margin: 40px auto;
  padding: 0 20px;
}

/* TABLE */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

td, th {
  border: 1px solid #ddd;
  padding: 10px;
}

/* FOOTER */
.footer {
  background: #111827;
  color: #d1d5db;
  margin-top: 60px;
  padding-top: 40px;
}

.footer-container {
  max-width: 1200px;
  margin: auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 30px;
  padding: 0 20px;
}

.footer h3, .footer h4 {
  color: #ffffff;
  margin-bottom: 15px;
}

.footer p {
  font-size: 14px;
  line-height: 1.6;
}

.footer ul {
  list-style: none;
  padding: 0;
}

.footer ul li {
  margin-bottom: 8px;
}

.footer a {
  color: #9ca3af;
  text-decoration: none;
}

.footer a:hover {
  color: #ffffff;
}

.footer-bottom {
  text-align: center;
  border-top: 1px solid #374151;
  margin-top: 30px;
  padding: 15px;
  font-size: 14px;
}

/* DARK MODE */
.dark {
  background: #020617;
  color: white;
}

.dark .navbar {
  background: rgba(30,41,59,0.9);
}

.dark .tool-card,
.dark .calculator-card {
  background: #1e293b;
  color: white;
}

.dark input {
  background: #0f172a;
  color: white;
  border: 1px solid #334155;
}

.dark .result-box {
  background: #1e293b;
}

/* FIXED WRAPPER (NO CONFLICT) */
.tool-wrapper {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}


/* ===============================
   ULTRA PREMIUM DESIGN SYSTEM
================================ */

/* ROOT COLORS (easy future scaling) */
:root {
  --primary: #4f46e5;
  --secondary: #7c3aed;
  --accent: #22c55e;
  --bg-soft: #f8fafc;
  --glass: rgba(255,255,255,0.6);
  --border: rgba(0,0,0,0.06);
}

/* GLOBAL SMOOTHNESS */
* {
  transition: all 0.25s cubic-bezier(.4,0,.2,1);
}

/* BODY DEPTH */
body {
  background: radial-gradient(circle at top, #eef2ff, #f8fafc);
}

/* ===============================
   NAVBAR (APPLE / CRED STYLE)
================================ */
.navbar {
  background: rgba(255,255,255,0.65);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 8px 30px rgba(0,0,0,0.05);
}

.logo {
  font-weight: 700;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* NAV LINKS */
.navbar a {
  position: relative;
}

.navbar a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0%;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transition: 0.3s;
}

.navbar a:hover::after {
  width: 100%;
}

/* SEARCH */
.search {
  background: var(--glass);
  border: 1px solid var(--border);
}

.search:focus {
  box-shadow: 0 0 0 3px rgba(79,70,229,0.2);
  background: #fff;
}

/* ===============================
   HERO (GRADIENT TEXT + GLOW)
================================ */
.hero h1 {
  font-size: 42px;
  font-weight: 800;
  background: linear-gradient(90deg, var(--primary), var(--secondary), #06b6d4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  color: #64748b;
}

/* ===============================
   CARD SYSTEM (GLASS + DEPTH)
================================ */
.tool-card,
.calculator-card {
  background: var(--glass);
  border: 1px solid var(--border);
  box-shadow: 0 20px 50px rgba(0,0,0,0.08);
}

/* HOVER FLOAT */
.tool-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 30px 60px rgba(0,0,0,0.15);
}

/* ===============================
   INPUTS (MODERN SOFT UI)
================================ */
.calculator-card input {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
}

.calculator-card input:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(79,70,229,0.15);
}

/* ===============================
   BUTTONS (GRADIENT + MICRO UX)
================================ */
.calculator-card button {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  position: relative;
  overflow: hidden;
}

/* SHINE EFFECT */
.calculator-card button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.4), transparent);
  transition: 0.6s;
}

.calculator-card button:hover::before {
  left: 100%;
}

.calculator-card button:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 30px rgba(79,70,229,0.35);
}

/* ===============================
   RESULT BOX (HIGHLIGHTED OUTPUT)
================================ */
.result-box {
  background: linear-gradient(135deg, #eef2ff, #e0f2fe);
  border: 1px solid #c7d2fe;
  font-size: 20px;
  font-weight: 600;
}

/* ===============================
   TABLES (MODERN LOOK)
================================ */
table {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0,0,0,0.05);
}

th {
  background: linear-gradient(90deg, var(--primary), var(--secondary));
}

td:hover {
  background: #eef2ff;
}

/* ===============================
   FOOTER (PREMIUM DARK)
================================ */
.footer {
  background: linear-gradient(135deg, #020617, #0f172a);
}

.footer a:hover {
  color: #a5b4fc;
}

/* ===============================
   DARK MODE (NEXT LEVEL)
================================ */
.dark {
  background: radial-gradient(circle at top, #020617, #000);
}

.dark .navbar {
  background: rgba(15,23,42,0.7);
}

.dark .tool-card,
.dark .calculator-card {
  background: rgba(30,41,59,0.6);
  border: 1px solid rgba(255,255,255,0.08);
}

.dark input {
  background: rgba(15,23,42,0.8);
}

.dark .result-box {
  background: linear-gradient(135deg, rgba(99,102,241,0.15), rgba(56,189,248,0.1));
}

/* ===============================
   MICRO INTERACTIONS
================================ */

/* BUTTON CLICK FEEDBACK */
button:active {
  transform: scale(0.96);
}

/* SMOOTH SCROLL */
html {
  scroll-behavior: smooth;
}

/* SCROLLBAR (PREMIUM TOUCH) */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--primary), var(--secondary));
  border-radius: 10px;
}