/* ================= RESET ================= */
*{
  margin:0;
  padding:0;
  box-sizing:border-box;
}

html,body{
  height:100%;
}

/* ================= BODY ================= */
body{
  font-family:Inter;
  background:#121212;
  color:#fff;
  height:100vh;
  overflow:hidden; /* impede scroll global */
}

/* ================= CONTAINER PRINCIPAL ================= */
.page{
  height:100%;
  display:flex;
  flex-direction:column;
  overflow-y:auto;          /* scroll só quando precisar */
  padding-bottom:70px;      /* espaço do footer fixo */
}

/* ================= HEADER FIXO ================= */
header{
  position:fixed;
  top:0;
  left:0;
  width:100%;
  z-index:1000;
  background:#1c1c1c;
  padding:14px;
  box-shadow:0 2px 10px rgba(0,0,0,0.4);
}

.top{
  display:flex;
  align-items:center;
  gap:14px;
}

.logo{
  font-size:22px;
  font-weight:700;
  color:#f5c26b;
}

.search{
  flex:1;
}

.search input{
  width:100%;
  padding:10px 16px;
  border-radius:25px;
  border:none;
  background:#2a2a2a;
  color:#fff;
  outline:none;
}

/* ================= CATEGORIES ================= */
.categories{
  display:flex;
  gap:10px;
  margin-top:12px;
  overflow-x:auto;
}

.cat{
  padding:6px 14px;
  background:#2a2a2a;
  border-radius:20px;
  font-size:13px;
  cursor:pointer;
  white-space:nowrap;
}

.cat.active{
  background:#1e88e5;
}

/* ================= SECTIONS ================= */
.section{
  padding:16px;
  padding-top:90px; /* espaço para o header fixo */
}

#home{
  flex:1;
}

/* ================= APPS GRID ================= */
.apps{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(150px,1fr));
  gap:14px;
}

.app{
  background:#1f1f1f;
  border-radius:16px;
  padding:12px;
  cursor:pointer;
}

.app img{
  width:100%;
  border-radius:14px;
}

.app-name{
  margin-top:8px;
  font-weight:600;
  font-size:14px;
}

.app-meta{
  font-size:12px;
  color:#aaa;
}

.app-info{
  display:flex;
  justify-content:space-between;
  margin-top:6px;
  font-size:12px;
  color:#ccc;
  align-items:center;
}

.app-info div{
  display:flex;
  align-items:center;
  gap:4px;
}

.app-info img{
  width:16px;
  height:16px;
}

/* ================= DETAILS / ABOUT ================= */
#details,
#about{
  display:none;
  padding:16px;
  padding-top:90px;
}

.back{
  color:#4da6ff;
  margin-bottom:12px;
  cursor:pointer;
}

.details-top{
  display:flex;
  gap:14px;
  align-items:center;
}

.details-top img{
  width:90px;
  height:90px;
  border-radius:20px;
}

.install{
  background:#1e88e5;
  padding:15px;
  text-align:center;
  border-radius:18px;
  font-weight:700;
  margin:16px 0;
  cursor:pointer;
}

.screens{
  display:flex;
  gap:12px;
  overflow-x:auto;
}

.screens img{
  height:190px;
  border-radius:18px;
  cursor:pointer;
}

.desc{
  margin-top:16px;
  color:#ccc;
  line-height:1.6;
}

/* ================= AVALIAÇÃO ================= */
.rating-box{
  margin:12px 0;
}

.stars span{
  font-size:26px;
  color:#555;
  cursor:pointer;
}

.stars span.active{
  color:#f5c26b;
}

#rating-msg{
  display:block;
  margin-top:6px;
  font-size:12px;
  color:#aaa;
}

/* ================= COMENTÁRIOS ================= */
.comments{
  margin-top:24px;
}

.comments input,
.comments textarea{
  width:100%;
  background:#2a2a2a;
  border:none;
  border-radius:12px;
  padding:10px;
  color:#fff;
  margin-bottom:10px;
  outline:none;
}

.comments textarea{
  resize:none;
  height:80px;
}

.comments button{
  background:#1e88e5;
  border:none;
  padding:10px;
  width:100%;
  border-radius:14px;
  color:#fff;
  font-weight:600;
  cursor:pointer;
}

.comment{
  background:#1f1f1f;
  padding:12px;
  border-radius:14px;
  margin-top:10px;
}

.comment button{
  background:none;
  border:none;
  color:#4da6ff;
  cursor:pointer;
  padding:0;
}

/* ================= FOOTER FIXO ================= */
footer{
  position:fixed;
  bottom:0;
  left:0;
  width:100%;
  background:#0b0b0b;
  border-top:1px solid #222;
  padding:14px;
  text-align:center;
  font-size:12px;
  color:#777;
  z-index:999;
}

footer a{
  color:#4da6ff;
  text-decoration:none;
}

/* ================= LIGHTBOX ================= */
#lightbox{
  display:none;
  position:fixed;
  z-index:9999;
  top:0;
  left:0;
  width:100%;
  height:100%;
  background:rgba(0,0,0,0.9);
  justify-content:center;
  align-items:center;
}

#lightbox img{
  max-width:90%;
  max-height:90%;
  border-radius:12px;
}

#lightbox .close{
  position:absolute;
  top:20px;
  right:30px;
  font-size:32px;
  color:#fff;
  cursor:pointer;
}

#prev-btn,
#next-btn{
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  background:rgba(0,0,0,0.6);
  border:none;
  color:#fff;
  font-size:36px;
  padding:10px 16px;
  border-radius:50%;
  cursor:pointer;
}

#prev-btn{left:20px}
#next-btn{right:20px}

.installBtn {
  position: relative;
  padding: 12px 20px;
  font-size: 16px;
  cursor: pointer;
  border: none;
  border-radius: 6px;
  color: white;
  background: #00c853;
  overflow: hidden;
  transition: background 0.2s linear;
}

.installBtn span {
  position: relative;
  z-index: 2;
}

.installBtn::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0%;
  background: rgba(255, 255, 255, 0.3);
  z-index: 1;
  transition: width 0.1s linear;
}
