.sgtg-container{width:100%;max-width:1400px;margin:20px auto;padding:0 20px}
.sgtg-toolbar{display:flex;gap:12px;align-items:center;margin-bottom:16px}
.sgtg-toolbar.sticky{position:sticky;top:10px;z-index:50;background:rgba(17,17,17,0.65);backdrop-filter:blur(6px);padding:10px;border-radius:12px;border:1px solid rgba(230,57,70,.35)}
.sgtg-search{flex:1;min-width:240px;padding:12px;border:1px solid #e63946;border-radius:10px;background:rgba(255,255,255,0.05);color:#fff}
.sgtg-search:focus{outline:none;border-color:#ff4d5a;box-shadow:0 0 8px rgba(230,57,70,.6)}
/* Select nativo (fallback) */
.sgtg-select{min-width:220px;padding:12px 40px 12px 12px;border:1px solid #e63946;border-radius:10px;background:rgba(255,255,255,0.05);color:#fff;-webkit-appearance:none;-moz-appearance:none;appearance:none;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23e63946' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-position:right 12px center;background-size:18px}
.sgtg-select:focus{outline:none;border-color:#ff4d5a;box-shadow:0 0 8px rgba(230,57,70,.6)}
/* Dropdown custom */
.sgtg-custom{position:relative;min-width:220px}
.sgtg-custom .sgtg-selected{padding:12px;border:1px solid #e63946;border-radius:10px;background:rgba(255,255,255,0.05);color:#fff;cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:10px}
.sgtg-custom .sgtg-selected:after{content:"";width:18px;height:18px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23e63946' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");background-size:18px;background-repeat:no-repeat}
.sgtg-custom .sgtg-options{position:absolute;top:calc(100% + 6px);left:0;right:0;background:rgba(20,20,20,0.95);backdrop-filter:blur(6px);border:1px solid rgba(230,57,70,.35);border-radius:12px;box-shadow:0 8px 20px rgba(0,0,0,.45);max-height:320px;overflow-y:auto;display:none;z-index:9999}
.sgtg-custom.open .sgtg-options{display:block}
.sgtg-custom .sgtg-option{padding:10px 12px;color:#fff;cursor:pointer}
.sgtg-custom .sgtg-option:hover{background:rgba(230,57,70,.12)}
.sgtg-custom .sgtg-option.active{background:rgba(230,57,70,.22);color:#fff;border-left:3px solid #e63946}

/* Cards */
.sgtg-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:28px}
.sgtg-card{position:relative;background:rgba(255,255,255,0.08);border-radius:16px;overflow:hidden;backdrop-filter:blur(10px);box-shadow:0 8px 16px rgba(0,0,0,.3);transition:transform .2s}
.sgtg-card:hover{transform:translateY(-4px)}
.sgtg-card::before{content:"";position:absolute;inset:0;border-radius:16px;padding:2px;background:linear-gradient(90deg,#e63946,#ff4d5a,#e63946);background-size:300% 300%;-webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);-webkit-mask-composite:xor;mask-composite:exclude;z-index:1;animation:border-move 3s linear infinite;opacity:0;transition:opacity .3s}
.sgtg-card:hover::before{opacity:1}
@keyframes border-move{0%{background-position:0% 50%}100%{background-position:100% 50%}}
/* Media + skeleton */
.sgtg-media{position:relative}
.sgtg-skel{position:absolute;inset:0;background:linear-gradient(90deg,rgba(255,255,255,0.06),rgba(255,255,255,0.12),rgba(255,255,255,0.06));background-size:200% 100%;animation:sgtg-shimmer 1.2s infinite;filter:blur(0.3px)}
@keyframes sgtg-shimmer{0%{background-position:0% 0}100%{background-position:200% 0}}
.sgtg-media.loaded .sgtg-skel{opacity:0;visibility:hidden;transition:opacity .35s ease}
.sgtg-logo{width:100%;height:100%;object-fit:cover;display:block;position:absolute;inset:0}
.sgtg-info{padding:14px;text-align:center;position:relative;z-index:2;background:rgba(0,0,0,.25)}
.sgtg-title{font-size:20px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;margin:0 0 10px;font-weight:700;color:#e63946}
.sgtg-info p{margin:4px 0;font-size:14px;color:#ddd}
.sgtg-peak .sgtg-dot{display:inline-block;width:10px;height:10px;border-radius:50%;background:#10e055;box-shadow:0 0 8px rgba(16,224,85,0.9);margin-right:8px;animation:sgtg-blink 1.3s infinite ease-in-out}
@keyframes sgtg-blink{0%,100%{opacity:1}50%{opacity:.2}}
.sgtg-links{margin-top:8px;display:flex;gap:8px;justify-content:center;flex-wrap:wrap}
.sgtg-btn{padding:8px 12px;border:1px solid #e63946;border-radius:10px;background:rgba(255,255,255,0.06);color:#fff;text-decoration:none;font-size:13px}
.sgtg-btn:hover{background:rgba(230,57,70,0.15)}
.sgtg-btn.alt{border-color:#ff6b6b}

/* --- Uniform image aspect ratio so all cards (including fallbacks) match height --- */
.sgtg-media{
  position:relative;
  aspect-ratio: 616 / 353; /* ~1.75, close to Steam 'capsule_616x353' */
  overflow:hidden;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
}
.sgtg-media img.sgtg-logo{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover; /* ensure SVG/PNG fill without bars */
}
.sgtg-media .sgtg-skel{position:absolute; inset:0;}

@media (max-width:520px){.sgtg-title{font-size:16px}}


/* ===== Responsive toolbar/search/selects (mobile) ===== */
@media (max-width: 768px){
  .sgtg-toolbar{
    flex-wrap: wrap;
    gap: 10px;
    padding: 8px;
    top: calc(env(safe-area-inset-top, 0px) + 8px);
    z-index: 60;
  }
  .sgtg-search{
    flex: 1 1 100%;
    min-width: 0;
    width: 100%;
    font-size: 16px; /* evita zoom en iOS al enfocar */
  }
  .sgtg-select{
    width: 100%;
  }
  .sgtg-custom{
    width: 100%;
    min-width: 0;
  }
  .sgtg-custom .sgtg-selected{
    width: 100%;
  }
  .sgtg-custom .sgtg-options{
    max-height: 50vh;
  }
}
