:root{
  --bg:#121212;
  --surface:#1e1e1e;
  --surface-2:#242424;
  --text:#e8e8e8;
  --muted:#a0a0a0;
  --border:#333;
  --shadow: 0 10px 24px rgba(0,0,0,.25), 0 4px 12px rgba(0,0,0,.15);
}
body.light-mode{
  /* 90% gray overall as requested */
  --bg:#e5e5e5;         /* page background */
  --surface:#e5e5e5;    /* card/speechbox same as background */
  --surface-2:#f2f2f2;  /* slight lift areas */
  --text:#1a1a1a;
  --muted:#555;
  --border:#d0d0d0;
  --shadow: 0 10px 24px rgba(0,0,0,.15), 0 4px 12px rgba(0,0,0,.08);
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0; background:var(--bg); color:var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
}
@media (prefers-reduced-motion:no-preference){
  html, body, .topnav, .sidebar, .game, .icon-game, .speechbox, .modal .modal-content, .overlay img {
    transition: background-color .24s ease, color .24s ease, border-color .24s ease, box-shadow .24s ease, transform .2s ease, opacity .2s ease;
  }
}

/* Top nav */
.topnav{
  height:48px; display:flex; align-items:center; justify-content:space-between;
  background:var(--surface-2); border-bottom:1px solid var(--border); padding:0 12px;
  position:sticky; top:0; z-index:5;
}
.brand{display:flex; align-items:center; gap:8px}
.roblox-logo{height:22px}
.roblox-logo--light{display:none}
body.light-mode .roblox-logo--dark{display:none}
body.light-mode .roblox-logo--light{display:block}
.site-title{font-weight:700; letter-spacing:.3px}

.nav-item{
  background:transparent; color:var(--text); border:1px solid var(--border);
  padding:6px 10px; border-radius:10px; cursor:pointer; font-weight:600;
}
.nav-item:hover{box-shadow:var(--shadow)}

/* Layout */
.layout{display:flex; align-items:stretch; min-height:calc(100vh - 48px)}
.sidebar{
  width:190px; background:var(--surface-2); border-right:1px solid var(--border);
  padding:12px; display:flex; flex-direction:column; gap:10px; min-height:100%;
}
.side-btn{
  background:transparent; color:var(--text); border:1px solid var(--border);
  padding:10px 12px; border-radius:12px; cursor:pointer; font-weight:600; letter-spacing:.2px;
}
.side-btn:hover{box-shadow:var(--shadow)}
.main{flex:1; padding:16px}

/* Sections */
.section{margin:18px 0 28px}
.section-title{margin:0 0 12px; font-size:20px}

/* Grids */
.grid{display:grid; grid-template-columns:repeat(4,1fr); gap:14px}
.icon-grid{display:grid; grid-template-columns:repeat(6,1fr); gap:12px}
@media (max-width: 1200px){ .grid{grid-template-columns:repeat(3,1fr)} .icon-grid{grid-template-columns:repeat(5,1fr)} }
@media (max-width: 900px){ .grid{grid-template-columns:repeat(2,1fr)} .icon-grid{grid-template-columns:repeat(4,1fr)} }
@media (max-width: 600px){ .grid{grid-template-columns:1fr} .icon-grid{grid-template-columns:repeat(3,1fr)} }

.game, .icon-game{
  background:var(--surface); border:1px solid var(--border); border-radius:16px;
  overflow:hidden; box-shadow:none; transform:translateZ(0);
}
.game:hover, .icon-game:hover{ transform:scale(1.03); box-shadow: var(--shadow); }

.thumb{aspect-ratio:16/9; background:var(--surface-2); overflow:hidden}
.icon-game .thumb{aspect-ratio:1/1}
.thumb img{width:100%; height:100%; object-fit:cover; display:block}
.info{padding:10px 12px}
.title{font-weight:600}
.meta{color:var(--muted); font-size:13px}

/* Review strip */
.profile-section{display:grid; grid-template-columns:repeat(6,1fr); gap:12px}
.profile-card{
  text-align:center; background:var(--surface); border:1px solid var(--border);
  border-radius:16px; padding:12px 8px; cursor:pointer;
}
.profile-pic{
  width:92px; height:92px; margin:0 auto 8px; border-radius:50%;
  background-size:cover; background-position:center; background-color:#333; border:2px solid #777;
  display:flex; align-items:center; justify-content:center; color:#ddd; font-weight:700;
}
body.light-mode .profile-pic{ background-color:#cfcfcf; color:#333; border-color:#999; }
.username{font-weight:600; margin-bottom:6px}
.speechbox{
  display:inline-block; padding:6px 10px; border-radius:18px;
  background:var(--surface); /* same as card in both modes */
  border:1px solid var(--border);
}
.star{display:inline-block; width:12px; height:12px; mask:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox=\"0 0 24 24\"><path d=\"M12 2l3.09 6.26 6.91.99-5 4.87 1.18 6.88L12 17.77 5.82 21l1.18-6.88-5-4.87 6.91-.99L12 2z\"/></svg>') no-repeat center / contain; -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox=\"0 0 24 24\"><path d=\"M12 2l3.09 6.26 6.91.99-5 4.87 1.18 6.88L12 17.77 5.82 21l1.18-6.88-5-4.87 6.91-.99L12 2z\"/></svg>') no-repeat center / contain; background:#888; margin:0 1px}
.star.full{background:#ffd348}
.star.half{background:linear-gradient(90deg, #ffd348 50%, #888 50%)}

/* Overlay */
.overlay{ position:fixed; inset:0; display:flex; align-items:center; justify-content:center;
  background:rgba(0,0,0,.75); opacity:0; visibility:hidden; pointer-events:none; z-index:20;
}
.overlay.show{ opacity:1; visibility:visible; pointer-events:auto; }
.overlay img{ max-width:70vw; max-height:70vh; border-radius:12px; }

/* Backdrop blur for modals */
.backdrop{ position:fixed; inset:0; display:none; backdrop-filter:blur(6px); -webkit-backdrop-filter:blur(6px);
  background:rgba(0,0,0,.2); z-index:30;
}
.backdrop.show{ display:block; }

/* Modals */
.modal{ position:fixed; inset:0; display:none; align-items:center; justify-content:center; z-index:40; }
.modal.show{ display:flex; }
.modal-content{
  background:var(--surface-2); border:1px solid var(--border); color:var(--text);
  border-radius:14px; padding:14px; width:min(92vw, 520px); max-height:80vh; overflow:auto;
  box-shadow:var(--shadow);
}
.close-btn{ position:absolute; right:10px; top:8px; border:none; background:transparent; color:var(--text); font-size:20px; cursor:pointer}

/* Larger terms modal */
.terms-content{ width:min(92vw, 980px); }
.terms-body{ margin-top:8px; max-height:calc(80vh - 70px); overflow:auto; }

/* Review modal transition */
@media (prefers-reduced-motion:no-preference){
  .review-content{ opacity:0; transform: translateY(12px) scale(.98); }
  #reviewModal.show .review-content{ opacity:1; transform:none; }
}
.review-layout{ display:grid; grid-template-columns:120px 1fr; gap:16px; align-items:start }
.review-avatar{
  width:120px; height:120px; border-radius:50%; background-size:cover; background-position:center;
  background-color:#333; border:3px solid #777; display:flex; align-items:center; justify-content:center; color:#ddd; font-weight:700;
}
body.light-mode .review-avatar{ background-color:#cfcfcf; color:#333; border-color:#999 }
.review-text{ border:2px solid var(--border); border-radius:10px; padding:12px; }

/* Utilities */
.hidden{display:none}
a{color:inherit}


/* Bigger stars without growing the pill */
:root { --star-size: 16px; }   /* try 16–18px */

.profile-card .speechbox {      /* keep the pill height about the same */
  padding: 4px 10px;            /* was 6px 10px */
}

.profile-card .speechbox .star {
  width: var(--star-size);
  height: var(--star-size);
  margin: 0 1px;
  vertical-align: middle;
}




/* Fallback for older browsers that ignore mask:inherit */
@supports not (mask: inherit){
  body.light-mode .profile-card .speechbox .star{
    filter: drop-shadow(0 0 0.8px rgba(0,0,0,.9));
  }
}




/* Lock page scroll when any modal is open */
body.modal-open { overflow: hidden; }

/* Single scrollbar inside the T&C only */
.modal .modal-content { overflow: hidden; }  /* was auto */
.terms-body { max-height: calc(80vh - 70px); overflow: auto; }  /* keep content scroll here */


/* Bigger Review Modal */
#reviewModal .modal-content,
#reviewModal .review-content{
  width: min(92vw, 920px);   /* was ~520px */
  max-height: 85vh;          /* a little taller room */
}

/* Roomier layout inside the modal */
#reviewModal .review-layout{
  grid-template-columns: 160px 1fr;  /* avatar | content */
  gap: 20px;
}

/* Larger avatar to match the bigger modal (optional) */
#reviewModal .review-avatar{
  width: 160px;
  height: 160px;
}

/* Let the review text breathe inside the taller modal */
#reviewModal .review-text{
  max-height: calc(85vh - 160px);
  line-height: 1.5;
  font-size: 1rem;           /* adjust if you want larger/smaller copy */
}

/* Mobile fallback so it stays comfy on small screens */
@media (max-width: 600px){
  #reviewModal .review-layout{
    grid-template-columns: 1fr;
  }
  #reviewModal .review-avatar{
    margin-inline: auto;
  }
}


/* 8 profile cards per row on wide screens */
@media (min-width: 1400px){
  .profile-section{
    grid-template-columns: repeat(8, 1fr);  /* was 6 */
  }

  /* Slightly tighter card to fit eight comfortably */
  .profile-card{ padding: 10px 8px; }
  .profile-pic{ width: 86px; height: 86px; }       /* was ~92px */
  .username{ font-size: 14px; }                    /* a hair smaller */
  .profile-card .speechbox{ padding: 4px 8px; }    /* keep pill height similar */
}

