/* ===============================
   GLOBAL VARIABLES
   =============================== */

:root{
  --bg:#0b1220;
  --panel:#0f1a30;
  --card:#101c34;
  --text:#e7edf6;
  --muted:#a8b3c7;
  --border:rgba(255,255,255,.10);
  --accent:#77b5ff;
  --accent2:#9bffcd;
  --shadow: 0 10px 30px rgba(0,0,0,.30);
  --radius:18px;
}

/* ===============================
   RESET / BASE
   =============================== */

*{ box-sizing:border-box; }
html,body{ height:100%; }

body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial,
               "Apple Color Emoji","Segoe UI Emoji";
  background: var(--bg);
  color:var(--text);
}

/* Fixed, continuous background (NO banding / restart) */
body::before{
  content:"";
  position:fixed;
  inset:0;
  z-index:-1;
  background:
    radial-gradient(1200px 700px at 15% -10%, rgba(119,181,255,.22), transparent 60%),
    radial-gradient(900px 600px at 85% 0%, rgba(155,255,205,.16), transparent 55%),
    radial-gradient(1200px 900px at 50% 120%, rgba(119,181,255,.10), transparent 55%),
    linear-gradient(180deg, rgba(255,255,255,.03), transparent 35%);
}

a{ color:inherit; text-decoration:none; }
.small{ font-size:12px; color:var(--muted); }
.muted{ color:var(--muted); }

/* ===============================
   LAYOUT CONTAINERS
   =============================== */

.container{
  max-width:1100px;
  margin: 18px auto 36px;
  padding: 0 16px;
}

.card{
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  border:1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}

.hr{
  height:1px;
  background: var(--border);
  margin: 16px 0;
}

/* ===============================
   TOPBAR
   =============================== */

.topbar{
  position: sticky;
  top:0;
  z-index:10;
  backdrop-filter: blur(10px);
  background: rgba(11,18,32,.70);
  border-bottom:1px solid var(--border);
}

.topbar-inner{
  max-width:1100px;
  margin:0 auto;
  padding: 12px 16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}

.brand{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:0;
}

.logo{
  width:38px;
  height:38px;
  border-radius:14px;
  display:grid;
  place-items:center;
  background: linear-gradient(135deg, rgba(119,181,255,.35), rgba(155,255,205,.22));
  border:1px solid var(--border);
  font-weight:800;
}

.brand-name{
  font-weight:800;
  letter-spacing:.2px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  max-width: 65vw;
}

.brand-tagline{
  font-size:12px;
  color:var(--muted);
  margin-top:2px;
}

.lang-form{
  display:flex;
  align-items:center;
  gap:8px;
  margin:0;
}

/* ===============================
   INPUTS / CONTROLS
   =============================== */

select, input{
  background: rgba(255,255,255,.06);
  border:1px solid var(--border);
  color:var(--text);
  border-radius: 12px;
  padding: 10px 12px;
  outline:none;
}

select{ padding: 9px 10px; }

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 10px 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(119,181,255,.35), rgba(119,181,255,.18));
  border:1px solid rgba(119,181,255,.35);
  font-weight:700;
}

/* ===============================
   HOMEPAGE
   =============================== */

.hero{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:16px;
  margin-bottom: 16px;
}

.hero h1{ margin:0 0 6px; font-size:28px; }
.hero p{ margin:0; }

.search{
  width: 320px;
  max-width: 100%;
}

.grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

@media (max-width: 900px){
  .grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px){
  .grid{ grid-template-columns: 1fr; }
  .hero{ flex-direction:column; align-items:stretch; }
  .search{ width:100%; }
}

/* Tool cards (homepage) */

.tool-card{
  background: rgba(255,255,255,.05);
  border:1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 0 10px 20px rgba(0,0,0,.18);
  transition: transform .15s ease, border-color .15s ease;
  display:flex;
  flex-direction:column;
  gap: 12px;
}

.tool-card:hover{
  transform: translateY(-2px);
  border-color: rgba(119,181,255,.35);
}

.tool-card-top{
  display:flex;
  align-items:center;
  gap: 12px;
}

.tool-icon{
  width:38px;
  height:38px;
  border-radius: 14px;
  display:grid;
  place-items:center;
  background: rgba(255,255,255,.06);
  border:1px solid var(--border);
  font-size:18px;
}

.tool-title{ font-weight:700; }

.tool-card-bottom{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-top:auto;
}

.pill{
  display:inline-block;
  padding: 7px 10px;
  border-radius: 999px;
  border:1px solid var(--border);
  color: var(--muted);
  background: rgba(255,255,255,.04);
}

/* ===============================
   TOOL PAGE LAYOUT
   =============================== */

.shell{
  display:grid;
  grid-template-columns: 280px 1fr;
  gap: 14px;
  align-items:start;
}

@media (max-width: 900px){
  .shell{ grid-template-columns: 1fr; }
}

/* Sidebar */

.sidebar{
  position: sticky;
  top: 74px;
  padding: 14px;
}

.sidebar h3{
  margin: 0 0 10px;
  font-size: 13px;
  color:var(--muted);
  font-weight:700;
  letter-spacing:.2px;
}

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

.nav a{
  display:flex;
  align-items:center;
  gap:10px;
  padding: 10px 10px;
  border-radius: 14px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.04);
}

.nav a:hover{
  border-color: rgba(119,181,255,.35);
}

.nav a.active{
  border-color: rgba(119,181,255,.55);
  background: rgba(119,181,255,.12);
}

.nav-icon{
  width:28px;
  height:28px;
  border-radius: 10px;
  display:grid;
  place-items:center;
  border:1px solid var(--border);
  background: rgba(255,255,255,.04);
  font-size:14px;
}

.nav-title{
  font-weight:700;
  font-size:13px;
  line-height:1.2;
}

/* ===============================
   PRINT
   =============================== */

@media print{
  .sidebar,
  .topbar{
    display:none !important;
  }
  .container{
    max-width:100% !important;
  }
}
