:root{
  --bg:#07111d;
  --bg-2:#0f1d30;
  --text:#edf4ff;
  --muted:#a8b7cf;
  --surface:rgba(9,18,32,0.72);
  --surface-strong:rgba(7,15,27,0.84);
  --panel-border:rgba(255,255,255,0.1);
  --tile-border:rgba(255,255,255,0.09);
  --shadow:0 28px 80px rgba(0,0,0,0.32);
  --tile-shadow:0 18px 40px rgba(0,0,0,0.18);
  --checked-gradient:linear-gradient(135deg,#3b82f6,#06b6d4);
  --hero-gradient:linear-gradient(135deg,#12345c,#2668c7 55%,#5ae4ff);
  --accent-rgb:59,130,246;
  --font-body:"Avenir Next","Trebuchet MS","Segoe UI",sans-serif;
  --font-display:"Avenir Next Condensed","Arial Narrow","Avenir Next",sans-serif;
  --radius-xl:34px;
  --radius-lg:24px;
  --radius-md:18px;
}

body.light{
  --bg:#eef3f7;
  --bg-2:#dbe5ef;
  --text:#102033;
  --muted:#5d6d84;
  --surface:rgba(255,255,255,0.82);
  --surface-strong:rgba(255,255,255,0.9);
  --panel-border:rgba(15,23,42,0.08);
  --tile-border:rgba(15,23,42,0.08);
  --shadow:0 20px 60px rgba(46,62,88,0.12);
  --tile-shadow:0 14px 32px rgba(46,62,88,0.08);
}

*{box-sizing:border-box}
html,body{min-height:100%}
body{
  margin:0;
  font-family:var(--font-body);
  color:var(--text);
  background:
    radial-gradient(circle at 14% 16%, rgba(var(--accent-rgb),0.18), transparent 28%),
    radial-gradient(circle at 84% 10%, rgba(255,255,255,0.09), transparent 20%),
    linear-gradient(180deg, var(--bg), var(--bg-2));
  background-attachment:fixed;
}

body::before{
  content:"";
  position:fixed;
  inset:0;
  pointer-events:none;
  opacity:.22;
  background:
    linear-gradient(120deg, rgba(255,255,255,0.08), transparent 24%),
    radial-gradient(circle at 20% 30%, rgba(255,255,255,0.05), transparent 24%),
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size:auto, auto, 22px 22px, 22px 22px;
}

a{color:inherit}
img{max-width:100%}

.wrap,
.grid,
.foot,
.matrix-wrap{
  max-width:1280px;
}

.select,
.btn,
input[type="search"]{
  font:inherit;
}

.btn,
.select,
input[type="search"]{
  border-radius:16px;
  border:1px solid rgba(255,255,255,0.16);
  background:rgba(7,15,27,0.24);
  color:#fff;
  backdrop-filter:blur(12px);
  transition:border-color .2s ease, transform .2s ease, background-color .2s ease, box-shadow .2s ease;
}

.btn:hover,
.select:hover,
input[type="search"]:hover,
.btn:focus-visible,
.select:focus-visible,
input[type="search"]:focus-visible{
  outline:none;
  border-color:rgba(255,255,255,0.34);
  box-shadow:0 0 0 4px rgba(255,255,255,0.08);
}

.btn:active{
  transform:translateY(1px);
}

body.home-page header,
body.bingo-page header{
  background:transparent;
  border:0;
}

body.home-page header{
  padding:24px 18px 0;
}

body.home-page .wrap{
  position:relative;
  overflow:hidden;
  margin:0 auto;
  padding:22px clamp(18px,4vw,40px) clamp(30px,5vw,44px);
  border-radius:40px;
  border:1px solid rgba(255,255,255,0.08);
  background:
    radial-gradient(circle at 20% 18%, rgba(255,255,255,0.13), transparent 20%),
    linear-gradient(140deg, rgba(4,11,23,0.96), rgba(11,24,42,0.9) 50%, rgba(20,45,74,0.88));
  box-shadow:var(--shadow);
}

body.home-page .wrap::before{
  content:"";
  position:absolute;
  inset:auto -8% -24% auto;
  width:360px;
  height:360px;
  border-radius:50%;
  background:radial-gradient(circle, rgba(255,255,255,0.18), rgba(255,255,255,0) 68%);
  pointer-events:none;
}

body.home-page .topbar{
  position:relative;
  z-index:1;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
  padding-bottom:18px;
  border-bottom:1px solid rgba(255,255,255,0.1);
}

body.home-page .controls,
body.home-page .lang-wrap{
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
}

body.home-page .lang-flag{
  width:52px;
  height:36px;
  display:grid;
  place-items:center;
  border-radius:12px;
  border:1px solid rgba(255,255,255,0.16);
  background:rgba(255,255,255,0.08);
  overflow:hidden;
}

body.home-page .btn,
body.home-page .select{
  padding:11px 16px;
  min-height:48px;
}

body.home-page .select{
  min-width:190px;
}

body.home-page .logo-wrap{
  position:relative;
  z-index:1;
  display:grid;
  place-items:center;
  margin:22px auto 18px;
}

body.home-page .logo-wrap::before{
  content:"";
  position:absolute;
  width:min(72vw,560px);
  aspect-ratio:1;
  border-radius:50%;
  background:radial-gradient(circle, rgba(255,255,255,0.18), rgba(255,255,255,0) 70%);
  pointer-events:none;
}

body.home-page .logo-img{
  width:min(500px,90vw);
  height:auto;
  max-height:52vh;
  object-fit:contain;
  display:block;
  filter:drop-shadow(0 22px 42px rgba(0,0,0,0.3));
}

body.home-page .logo-dark{display:block}
body.home-page .logo-light{display:none}
body.light.home-page .logo-dark{display:none}
body.light.home-page .logo-light{display:block}

body.home-page main{
  padding:26px 18px 24px;
}

body.home-page .grid{
  margin:0 auto;
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:18px;
}

body.home-page .card{
  position:relative;
  overflow:hidden;
  display:flex;
  flex-direction:column;
  justify-content:flex-end;
  min-height:192px;
  padding:22px;
  border-radius:28px;
  border:1px solid rgba(255,255,255,0.16);
  box-shadow:var(--tile-shadow);
  text-decoration:none;
  transition:transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

body.home-page .card::before{
  content:"";
  position:absolute;
  inset:0;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.2), transparent 40%),
    radial-gradient(circle at 100% 0%, rgba(255,255,255,0.22), transparent 32%);
  pointer-events:none;
}

body.home-page .card:hover{
  transform:translateY(-5px);
  box-shadow:0 26px 48px rgba(0,0,0,0.2);
}

body.home-page .card h3,
body.home-page .card p{
  position:relative;
  z-index:1;
}

body.home-page .card h3{
  margin:0 0 8px;
  font-family:var(--font-display);
  font-size:30px;
  line-height:0.95;
  letter-spacing:.01em;
  color:#fff;
  text-shadow:0 4px 18px rgba(0,0,0,0.45);
}

body.home-page .card p{
  margin:0;
  max-width:24ch;
  color:rgba(255,255,255,0.95);
  font-size:15px;
  line-height:1.45;
  text-shadow:0 2px 10px rgba(0,0,0,0.35);
}

body.home-page .c1{background:linear-gradient(145deg,#1244a7,#0ea5e9)}
body.home-page .c2{background:linear-gradient(145deg,#d97706,#facc15)}
body.home-page .c3{background:linear-gradient(145deg,#3521b5,#8b5cf6)}
body.home-page .c4{background:linear-gradient(145deg,#0f766e,#22d3ee)}
body.home-page .c5{background:linear-gradient(145deg,#ea580c,#fb7185)}

body.home-page footer{
  padding:0 18px 18px;
  background:transparent;
  border:0;
}

body.home-page .foot{
  margin:0 auto;
  padding:2px 0 0;
}

body.home-page .foot small{
  color:var(--muted);
  font-size:11px;
  line-height:1.35;
}

body.bingo-page header{
  position:sticky;
  top:0;
  z-index:40;
  padding:18px 18px 0;
}

body.bingo-page header .wrap{
  position:relative;
  overflow:hidden;
  margin:0 auto;
  padding:22px clamp(18px,3vw,30px);
  border-radius:34px;
  background:var(--hero-gradient);
  border:1px solid rgba(255,255,255,0.12);
  box-shadow:var(--shadow);
}

body.bingo-page header .wrap::before{
  content:"";
  position:absolute;
  inset:-10% auto auto -10%;
  width:240px;
  height:240px;
  border-radius:50%;
  background:radial-gradient(circle, rgba(255,255,255,0.16), rgba(255,255,255,0) 72%);
  pointer-events:none;
}

body.bingo-page header .wrap::after{
  content:"";
  position:absolute;
  inset:auto -8% -30% auto;
  width:300px;
  height:300px;
  border-radius:50%;
  background:radial-gradient(circle, rgba(255,255,255,0.18), rgba(255,255,255,0) 68%);
  pointer-events:none;
}

body.bingo-page .brand,
body.bingo-page .tools,
body.bingo-page .stats{
  position:relative;
  z-index:1;
}

body.bingo-page .brand{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
}

body.bingo-page .brand-link{
  display:inline-flex;
  flex-direction:column;
  gap:8px;
  text-decoration:none;
}

body.bingo-page .brand-link::before{
  content:"teslabingo.com";
  font-size:11px;
  line-height:1;
  letter-spacing:.28em;
  text-transform:uppercase;
  font-weight:700;
  color:rgba(255,255,255,0.72);
}

body.bingo-page .brand h1{
  margin:0;
  font-family:var(--font-display);
  font-size:clamp(34px,5vw,54px);
  line-height:.94;
  letter-spacing:.01em;
  color:#fff;
  text-shadow:0 10px 26px rgba(0,0,0,0.25);
}

body.bingo-page .tools{
  display:grid;
  gap:12px;
  align-items:center;
  margin-top:20px;
}

body.plates-page .tools,
body.brands-page .tools,
body.highway-page .tools{
  grid-template-columns:minmax(0,1fr) auto auto auto;
}

body.super-page .tools{
  grid-template-columns:minmax(0,1fr) auto auto;
}

body.tesla-page .tools{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}

body.bingo-page .langwrap{
  display:flex;
  align-items:center;
  gap:10px;
}

body.bingo-page .flag-ic{
  width:44px;
  min-width:44px;
  height:32px;
  display:grid;
  place-items:center;
  border-radius:12px;
  background:rgba(255,255,255,0.12);
  border:1px solid rgba(255,255,255,0.14);
  overflow:hidden;
}

body.bingo-page .flag-ic svg{
  width:100%;
  height:100%;
  display:block;
}

body.bingo-page input[type="search"]{
  width:100%;
  min-height:52px;
  padding:14px 16px;
}

body.bingo-page input[type="search"]::placeholder{
  color:rgba(255,255,255,0.76);
}

body.bingo-page .select,
body.bingo-page .btn{
  min-height:52px;
  padding:12px 16px;
  font-weight:600;
}

body.bingo-page .stats{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto auto auto;
  align-items:center;
  gap:12px;
  margin-top:18px;
  padding:14px 16px;
  border-radius:22px;
  background:rgba(7,15,27,0.22);
  border:1px solid rgba(255,255,255,0.14);
  color:#fff;
}

body.bingo-page .bar{
  min-width:0;
  height:12px;
  border-radius:999px;
  overflow:hidden;
  background:rgba(7,15,27,0.34);
  border:1px solid rgba(255,255,255,0.14);
}

body.bingo-page .bar>i{
  display:block;
  height:100%;
  width:0;
  border-radius:999px;
  background:var(--checked-gradient);
}

body.bingo-page main{
  padding:28px 18px 20px;
}

body.bingo-page .grid{
  margin:0 auto;
}

body.bingo-page .tile,
body.tesla-page .hdr,
body.tesla-page .rowhdr,
body.tesla-page .cell{
  border:1px solid var(--tile-border);
  background:var(--surface);
  box-shadow:var(--tile-shadow);
  backdrop-filter:blur(16px);
}

body.bingo-page .tile{
  position:relative;
  overflow:hidden;
  border-radius:22px;
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease, background-color .18s ease;
}

body.bingo-page .tile::before{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(180deg, rgba(255,255,255,0.08), transparent 44%);
  pointer-events:none;
}

body.bingo-page .tile:hover{
  transform:translateY(-3px);
  box-shadow:0 24px 48px rgba(0,0,0,0.2);
}

body.bingo-page .tile.checked,
body.tesla-page .cell.checked{
  background:var(--checked-gradient);
  border-color:rgba(255,255,255,0.2);
  box-shadow:0 22px 44px rgba(var(--accent-rgb),0.24);
  color:#fff;
}

body.bingo-page .tile.checked .title,
body.bingo-page .tile.checked .brand-title,
body.bingo-page .tile.checked .name,
body.bingo-page .tile.checked .code,
body.tesla-page .cell.checked .tick{
  color:#fff;
}

body.plates-page .grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(190px,1fr));
  gap:14px;
}

body.plates-page .tile{
  min-height:128px;
  padding:16px;
}

body.plates-page .meta{
  margin-bottom:8px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
}

body.plates-page .left{
  display:flex;
  align-items:center;
  gap:10px;
}

body.plates-page .code{
  font-weight:800;
  letter-spacing:1px;
  font-size:22px;
}

body.plates-page .code.oval{
  min-width:40px;
  display:inline-block;
  text-align:left;
}

body.plates-page .flag,
body.plates-page .plate{
  line-height:0;
}

body.plates-page .flag.small svg,
body.plates-page .tile .flag svg{
  width:36px !important;
  height:24px !important;
}

body.plates-page .name{
  color:var(--text);
}

body.brands-page .grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(160px,1fr));
  gap:14px;
}

body.brands-page .tile{
  min-height:158px;
  padding:16px 14px;
}

body.brands-page .brand-title{
  font-weight:800;
  font-size:17px;
  line-height:1.15;
  text-align:center;
}

body.brands-page .logo-box{
  line-height:0;
  height:58px;
  display:flex;
  align-items:center;
  justify-content:center;
}

body.brands-page .logo-box img.logo{
  width:96px;
  height:48px;
  object-fit:contain;
}

body.brands-page .name{
  font-size:13px;
  text-align:center;
  color:var(--muted);
  font-style:italic;
}

body.brands-page .logo-fallback{
  display:none;
  min-width:64px;
  height:40px;
  padding:0 10px;
  border-radius:12px;
  border:1px dashed var(--tile-border);
  color:var(--muted);
  align-items:center;
  justify-content:center;
  font-weight:700;
}

body.highway-page .grid,
body.super-page .grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(220px,1fr));
  gap:14px;
}

body.highway-page .tile,
body.super-page .tile{
  min-height:162px;
  padding:16px;
}

body.highway-page .title,
body.super-page .title{
  position:relative;
  z-index:1;
  font-family:var(--font-display);
  font-size:20px;
  line-height:1.05;
  letter-spacing:.01em;
}

body.highway-page .icon-box,
body.super-page .icon-box{
  position:relative;
  z-index:1;
  min-height:74px;
}

body.highway-page .icon-box img.icon,
body.super-page .icon-box img.icon{
  max-width:86px;
  max-height:72px;
  object-fit:contain;
  filter:drop-shadow(0 10px 18px rgba(0,0,0,0.16));
}

body.tesla-page main{
  padding:28px 18px 20px;
}

body.tesla-page .matrix-wrap{
  margin:0 auto;
  padding:20px;
  overflow:auto;
  -webkit-overflow-scrolling:touch;
  border-radius:30px;
  background:var(--surface-strong);
  border:1px solid var(--panel-border);
  box-shadow:var(--shadow);
}

body.tesla-page .matrix{
  display:grid;
  gap:12px;
  align-items:stretch;
  width:max-content;
  min-width:100%;
  grid-template-columns:210px repeat(6,minmax(110px,1fr));
}

body.tesla-page .hdr,
body.tesla-page .rowhdr,
body.tesla-page .cell{
  border-radius:20px;
  padding:14px 12px;
  min-height:72px;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
}

body.tesla-page .hdr{
  position:sticky;
  top:0;
  z-index:5;
  font-weight:800;
  background:rgba(8,16,29,0.88);
}

body.light.tesla-page .hdr,
body.light.tesla-page .rowhdr{
  background:rgba(255,255,255,0.92);
}

body.tesla-page .rowhdr{
  position:sticky;
  left:0;
  z-index:4;
  justify-content:flex-start;
  font-family:var(--font-display);
  font-size:20px;
  line-height:1;
}

body.tesla-page .cell{
  cursor:pointer;
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

body.tesla-page .cell .tick{
  font-size:30px;
  font-weight:900;
  opacity:.18;
}

body.tesla-page .cell:hover{
  transform:translateY(-2px);
}

body.tesla-page .cell.checked{
  color:#0f172a;
}

body.tesla-page .cell.checked .tick{
  color:#0f172a;
  opacity:1;
}

body.tesla-page .cell.void{
  background:transparent;
  border-color:transparent;
  box-shadow:none;
}

body.tesla-page .swatch{
  width:16px;
  height:16px;
  display:inline-block;
  margin-right:8px;
  border-radius:999px;
  border:1px solid rgba(15,23,42,0.16);
  vertical-align:middle;
}

body.tesla-page .sw-WIT{background:#ffffff}
body.tesla-page .sw-ZWART{background:#000000}
body.tesla-page .sw-ZILVER{background:#cfd3d6}
body.tesla-page .sw-DGRIJS{background:#4b5563}
body.tesla-page .sw-BLAUW{background:#1f62ff}
body.tesla-page .sw-ROOD{background:#e11d48}

body.tesla-page .legend{
  margin-top:14px;
  padding:0 2px;
  color:var(--muted);
  font-size:13px;
}

footer{
  background:transparent;
  border:0;
}

body.bingo-page footer{
  padding:0 18px 18px;
}

body.bingo-page .foot{
  margin:0 auto;
  padding:4px 0 0;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
}

body.bingo-page .foot small{
  color:var(--muted);
  font-size:11px;
  line-height:1.35;
}

.plates-page{
  --hero-gradient:linear-gradient(135deg,#0c2f6b,#145fc5 55%,#18c6f7);
  --checked-gradient:linear-gradient(135deg,#1244a7,#06b6d4);
  --accent-rgb:37,99,235;
}

.brands-page{
  --hero-gradient:linear-gradient(135deg,#045f93,#0997cf 55%,#67e8f9);
  --checked-gradient:linear-gradient(135deg,#0284c7,#22d3ee);
  --accent-rgb:14,165,233;
}

.tesla-page{
  --hero-gradient:linear-gradient(135deg,#7c4a02,#d97706 58%,#fde047);
  --checked-gradient:linear-gradient(135deg,#f59e0b,#fde047);
  --accent-rgb:245,158,11;
}

.highway-page{
  --hero-gradient:linear-gradient(135deg,#2e1f8f,#5c32d8 56%,#9f7aea);
  --checked-gradient:linear-gradient(135deg,#4338ca,#8b5cf6);
  --accent-rgb:124,58,237;
}

.super-page{
  --hero-gradient:linear-gradient(135deg,#9a3412,#ea580c 55%,#fb923c);
  --checked-gradient:linear-gradient(135deg,#ea580c,#fb923c);
  --accent-rgb:249,115,22;
}

@media (max-width:980px){
  body.plates-page .tools,
  body.brands-page .tools,
  body.highway-page .tools{
    grid-template-columns:minmax(0,1fr) auto auto;
  }

  body.plates-page .tools .langwrap,
  body.brands-page .tools .langwrap,
  body.highway-page .tools .langwrap{
    grid-column:span 2;
  }

  body.tesla-page .matrix{
    grid-template-columns:170px repeat(6,minmax(96px,1fr));
  }
}

@media (max-width:760px){
  body.home-page header,
  body.bingo-page header,
  body.home-page main,
  body.bingo-page main,
  body.home-page footer,
  body.bingo-page footer{
    padding-left:14px;
    padding-right:14px;
  }

  body.bingo-page .brand h1{
    font-size:clamp(28px,8vw,40px);
  }

  body.bingo-page .tools,
  body.super-page .tools{
    grid-template-columns:1fr;
  }

  body.bingo-page .langwrap,
  body.bingo-page .select,
  body.bingo-page .btn{
    width:100%;
  }

  body.bingo-page .stats{
    grid-template-columns:1fr auto auto;
  }

  body.bingo-page .stats .btn{
    grid-column:1 / -1;
  }

  body.tesla-page .tools{
    flex-direction:column;
    align-items:stretch;
  }

  body.tesla-page .matrix-wrap{
    padding:14px;
  }

  body.tesla-page .matrix{
    grid-template-columns:150px repeat(6,minmax(86px,1fr));
    gap:10px;
  }

  body.tesla-page .hdr,
  body.tesla-page .rowhdr,
  body.tesla-page .cell{
    min-height:62px;
    border-radius:16px;
  }

  body.bingo-page .foot,
  body.home-page .foot{
    flex-direction:column;
    align-items:flex-start;
  }
}

@media (max-width:520px){
  body.home-page .card{
    min-height:170px;
  }

  body.plates-page .grid,
  body.brands-page .grid,
  body.highway-page .grid,
  body.super-page .grid{
    grid-template-columns:1fr;
  }

  body.bingo-page .stats{
    grid-template-columns:1fr auto;
  }

  body.bingo-page .stats .bar{
    grid-column:1 / -1;
  }
}
