*{box-sizing:border-box}
:root{
  --bg:#070b12;
  --panel:#0d1420;
  --panel-2:#111a27;
  --line:#1f2a3a;
  --text:#edf4ff;
  --muted:#8c9ab0;
  --accent:#5b8cff;
  --accent-2:#7c5cff;
  --success:#36d399;
  --shadow:0 18px 50px rgba(0,0,0,.28);
}
html,body{margin:0;min-height:100%;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;background:radial-gradient(circle at 30% -10%,rgba(91,140,255,.12),transparent 34%),var(--bg);color:var(--text)}
button,input{font:inherit}
button{cursor:pointer}
.hidden{display:none!important}

/* AUTH */
.auth-shell{min-height:100vh;max-width:1280px;margin:auto;padding:34px 28px;display:flex;flex-direction:column}
.auth-brand,.header-brand{display:flex;align-items:center;gap:12px}
.brand-mark{width:44px;height:44px;border-radius:13px;display:grid;place-items:center;font-weight:900;letter-spacing:.5px;background:linear-gradient(135deg,var(--accent),var(--accent-2));box-shadow:0 12px 30px rgba(91,140,255,.22)}
.brand-mark.small{width:38px;height:38px;border-radius:11px;font-size:13px}
.brand-name{font-weight:850;letter-spacing:-.02em}
.brand-subtitle{font-size:11px;color:var(--muted);margin-top:2px;letter-spacing:.08em;text-transform:uppercase}
.auth-grid{flex:1;display:grid;grid-template-columns:1.25fr .75fr;gap:70px;align-items:center;max-width:1080px;margin:40px auto 70px;width:100%}
.auth-copy{max-width:670px}
.eyebrow{font-size:11px;font-weight:800;letter-spacing:.16em;color:#8ea9ff}
.auth-copy h1{font-size:clamp(42px,5.5vw,76px);line-height:.98;letter-spacing:-.055em;margin:18px 0 20px}
.auth-copy p{font-size:18px;line-height:1.65;color:var(--muted);max-width:610px}
.feature-row{display:flex;gap:10px;flex-wrap:wrap;margin-top:28px}
.feature-row span{padding:10px 13px;border:1px solid var(--line);border-radius:999px;background:rgba(17,26,39,.55);color:#b9c6d9;font-size:13px}
.auth-card{background:linear-gradient(180deg,rgba(17,26,39,.94),rgba(11,17,27,.96));border:1px solid var(--line);border-radius:24px;padding:26px;box-shadow:var(--shadow);backdrop-filter:blur(10px)}
.auth-tabs{display:grid;grid-template-columns:1fr 1fr;gap:6px;padding:5px;background:#09101a;border-radius:12px;margin-bottom:24px}
.tab{border:0;background:transparent;color:var(--muted);padding:11px;border-radius:9px}
.tab.active{background:#172337;color:#fff}
.auth-form{display:flex;flex-direction:column;gap:9px}
.auth-form label{font-size:12px;color:#9aabc0;margin-top:6px}
.auth-form input{border:1px solid var(--line);background:#0a111b;color:#fff;border-radius:11px;padding:13px 14px;outline:none}
.auth-form input:focus{border-color:#496fce;box-shadow:0 0 0 3px rgba(91,140,255,.10)}
.primary{border:0;border-radius:11px;padding:13px 15px;background:linear-gradient(135deg,var(--accent),var(--accent-2));color:#fff;font-weight:800;margin-top:10px}
.auth-message{min-height:22px;color:#ff8d8d;font-size:13px;margin-top:12px}
.auth-note{font-size:11px;line-height:1.55;color:#68788d;border-top:1px solid var(--line);padding-top:14px;margin-top:16px}

/* LIBRARY */
.library-shell{min-height:100vh}
.library-header{height:74px;border-bottom:1px solid var(--line);background:rgba(7,11,18,.92);backdrop-filter:blur(12px);position:sticky;top:0;z-index:30;display:flex;align-items:center;justify-content:space-between;padding:0 30px}
.header-actions{display:flex;align-items:center;gap:10px}
.user-badge{font-size:12px;color:#b9c6d9;background:#0d1420;border:1px solid var(--line);border-radius:999px;padding:9px 11px}
.ghost{border:1px solid var(--line);background:#0d1420;color:#b9c6d9;border-radius:10px;padding:9px 12px}
.library-main{max-width:1250px;margin:auto;padding:30px 26px 70px}
.search-hero{text-align:center;padding:58px 0 38px}
.search-hero h1{font-size:clamp(34px,5vw,58px);line-height:1.02;letter-spacing:-.045em;margin:14px 0 10px}
.search-hero p{color:var(--muted);margin:0}
.search-box{max-width:860px;margin:28px auto 14px;display:flex;align-items:center;gap:10px;padding:7px;background:#0b121d;border:1px solid #26344a;border-radius:16px;box-shadow:0 22px 60px rgba(0,0,0,.25)}
.search-icon{font-size:25px;color:#64748b;padding-left:10px}
.search-box input{flex:1;border:0;outline:none;background:transparent;color:#fff;font-size:17px;padding:15px 4px;min-width:0}
.search-button{border:0;background:linear-gradient(135deg,var(--accent),var(--accent-2));color:#fff;font-weight:800;padding:13px 18px;border-radius:11px}
.quick-searches{display:flex;justify-content:center;flex-wrap:wrap;gap:8px;margin-top:12px}
.quick-searches button{border:1px solid var(--line);background:#0d1420;color:#93a4bb;border-radius:999px;padding:8px 11px;font-size:12px}
.quick-searches button:hover{border-color:#385387;color:#fff}
.results-head{display:flex;justify-content:space-between;align-items:end;border-top:1px solid var(--line);padding-top:24px;margin-top:18px}
.results-head h2{margin:0;font-size:20px}
.results-head span{color:var(--muted);font-size:12px}
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(245px,1fr));gap:18px;margin-top:18px}
.model-card{background:linear-gradient(180deg,#101927,#0d1420);border:1px solid var(--line);border-radius:18px;overflow:hidden;box-shadow:0 10px 35px rgba(0,0,0,.16);transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease}
.model-card:hover{transform:translateY(-3px);border-color:#34486b;box-shadow:0 18px 50px rgba(0,0,0,.25)}
.model-preview{position:relative;aspect-ratio:1/1;background:radial-gradient(circle at 50% 35%,#1b2739,#0a1019);overflow:hidden}
.model-preview img{width:100%;height:100%;object-fit:cover;display:block}
.format-badge{position:absolute;left:12px;top:12px;padding:6px 8px;border-radius:8px;background:rgba(5,9,15,.78);border:1px solid rgba(255,255,255,.10);font-size:10px;font-weight:850;letter-spacing:.09em}
.noimage{height:100%;display:grid;place-items:center;text-align:center;color:#7488a5}
.noimage span{display:block;font-weight:900;font-size:34px;letter-spacing:.08em}
.noimage small{display:block;font-size:11px;margin-top:6px}
.model-body{padding:15px}
.model-body h3{font-size:15px;line-height:1.35;margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.model-meta{display:flex;justify-content:space-between;gap:8px;color:#718198;font-size:11px;margin-top:8px}
.model-desc{color:#92a1b5;font-size:12px;line-height:1.5;margin:9px 0 0;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.download-button{display:flex;justify-content:center;align-items:center;gap:8px;margin-top:13px;text-decoration:none;color:#fff;background:#16243a;border:1px solid #263b5e;padding:10px 12px;border-radius:10px;font-size:12px;font-weight:800}
.download-button:hover{background:#1a2c47;border-color:#38598b}
.empty{grid-column:1/-1;text-align:center;color:var(--muted);padding:90px 20px}
.empty-icon{font-size:44px;color:#53657e}.empty h3{margin:10px 0 7px;color:#d9e3ef}.empty p{margin:0;color:#6f8097}

@media(max-width:900px){
  .auth-grid{grid-template-columns:1fr;gap:30px;margin-top:35px}
  .auth-copy h1{font-size:48px}
}
@media(max-width:650px){
  .auth-shell{padding:20px 16px}
  .auth-copy h1{font-size:38px}
  .auth-copy p{font-size:15px}
  .library-header{padding:0 15px}
  .library-main{padding:15px}
  .search-hero{padding-top:40px}
  .search-box{flex-wrap:wrap;padding:8px}
  .search-box input{width:100%;flex-basis:100%}
  .search-button{width:100%}
  .grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
}
@media(max-width:470px){
  .grid{grid-template-columns:1fr}
  .header-actions .user-badge{display:none}
}
