:root{
  --community-bg:#303e58;
  /* --community-bg:#ffffff; */
  --community-surface:#f7f7f7;
  --community-surface-2:#fafafa;
  --community-text:#ffffff;
  --community-muted:#b5b0b0;
  --community-line:#e7e7e7;
  --community-shadow:0 8px 24px rgba(17,17,17,.06);
  --community-color:rgb(26, 61, 116);
}

body{
  background:var(--community-bg);
  color:var(--community-text);
}

.community-page{
  background:var(--community-bg);
}

.community-hero{
  padding:42px 0 26px;
  border-bottom:1px solid var(--community-line);
}

.community-hero-grid{
  display:grid;
  grid-template-columns:minmax(0,1.2fr) minmax(320px,.8fr);
  gap:28px;
  align-items:start;
}

.community-kicker,
.section-kicker{
  margin:0 0 12px;
  font-size:12px;
  font-weight:700;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:var(--community-muted);
}

.community-hero h1{
  margin:0 0 14px;
  font-size:clamp(34px, 5vw, 56px);
  line-height:1.05;
  letter-spacing:-.03em;
}

.community-lead{
  margin:0 0 20px;
  max-width:700px;
  color:var(--community-muted);
  font-size:17px;
  line-height:1.7;
}

.community-search{
  display:flex;
  gap:12px;
  margin-bottom:18px;
}

.community-search input{
  flex:1;
  min-height:52px;
  padding:0 16px;
  border:1px solid var(--community-line);
  border-radius:14px;
  outline:none;
  background:#fff;
  font-size:15px;
}

.community-search button{
  min-width:120px;
  min-height:52px;
  border:none;
  border-radius:14px;
  background:#111;
  color:#fff;
  font-weight:700;
  cursor:pointer;
}

.hero-links{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
}

.hero-link{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:42px;
  padding:0 14px;
  border:1px solid var(--community-line);
  border-radius:12px;
  text-decoration:none;
  color:black;
  background:#fff;
}

.community-panel{
  border:1px solid var(--community-line);
  border-radius:20px;
  background:var(--community-surface-2);
  padding:18px;
  box-shadow:var(--community-shadow);
}

.panel-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  margin-bottom:16px;
}

.panel-head h2{
  margin:0;
  font-size:20px;
}

.quick-links{
  display:grid;
  gap:12px;
}

.quick-card{
  display:block;
  padding:16px;
  border:1px solid var(--community-line);
  border-radius:16px;
  text-decoration:none;
  color:inherit;
  background:#fff;
}

.quick-card-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:8px;
}

.quick-title{
  font-weight:700;
}

.quick-card p{
  margin:0;
  color:var(--community-muted);
  line-height:1.6;
}

.community-strip{
  padding:28px 0 10px;
}

.simple-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:18px;
  margin-bottom:20px;
}

.simple-head h2{
  margin:0;
  font-size:30px;
  line-height:1.1;
  letter-spacing:-.02em;
}

.simple-head .muted{
  max-width:520px;
}
.strip-grid,
.card-grid{
  display:grid;
  grid-template-columns:repeat(3, minmax(0,1fr));
  gap:18px;
}

.strip-card,
.card.simple-card{
  border:1px solid rgba(255,255,255,0.08);
  border-radius:18px;
  background-color: var(--community-bg);
  box-shadow:0 8px 24px rgba(0,0,0,0.25);
}

.strip-card{
  padding:20px;
}

.strip-card h3{
  margin:0 0 8px;
  font-size:22px;
  line-height:1.2;
}

.strip-card p{
  margin:0;
  color:var(--community-muted);
  line-height:1.6;
}

.section.community-section{
  padding:22px 0 10px;
}

.simple-card{
  padding:18px;
}

.simple-card .card-title{
  margin:0;
}

.rank-head{
  margin-bottom:18px;
}

.rank-grid{
  grid-template-columns:repeat(3, minmax(0,1fr));
}

.rank-card{
  position:relative;
  padding:22px;
  color: #efe9e9;
}

.rank-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:14px;
}

.rank-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:54px;
  height:32px;
  padding:0 12px;
  border:1px solid var(--community-line);
  border-radius:999px;
  font-size:13px;
  font-weight:800;
  background:#111;
  color:#686565;
}

.rank-views{
  font-size:13px;
  color:var(--community-muted);
  white-space:nowrap;
}

.rank-card h3{
  margin:0 0 8px;
  font-size:22px;
  line-height:1.2;
}

.rank-card p{
  margin:0 0 16px;
  line-height:1.6;
  color:var(--community-muted);
}

.rank-card .link{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:40px;
  padding:0 14px;
  border-radius:12px;
  text-decoration:none;
  color:var(--community-text);
  background:var(--community-bg)
}
.rank-card .link:hover{
   border:1px solid var(--community-line);
  color:#fff;
}
.rank-1 .rank-badge{
  background:#111;
  color:#fff;
}

.rank-2 .rank-badge,
.rank-3 .rank-badge{
  background:#fff;
  color:#111;
}

.muted{
  color:var(--community-muted);
}

.small{
  font-size:13px;
}
/* ---------- */

.songs-list{
  display:flex;
  flex-direction:column;
  gap:10px;
  height:320px;
  overflow-y:auto;
  padding-right:6px;
  scroll-behavior:smooth;
}
.songs-list::-webkit-scrollbar{
  width:10px;
}

.songs-list::-webkit-scrollbar-track{
  background:transparent;
}

.songs-list::-webkit-scrollbar-thumb{
  background:#d0d0d0;
  border-radius:999px;
  border:2px solid transparent;
  background-clip:padding-box;
}

.songs-list::-webkit-scrollbar-thumb:hover{
  background:#b8b8b8;
  border:2px solid transparent;
  background-clip:padding-box;
}

.listItem{
  display:block;
  /* padding:14px 14px; */
  /* border:1px solid var(--community-line); */
  border-radius:14px;
  text-decoration:none;
  color:var(--community-color);
  /* background:#fff; */
  transition:background .2s ease, border-color .2s ease, transform .2s ease;
}

.listItem:hover{
  /* background:#f7f7f7; */
  /* border-color:#d8d8d8; */
  color: rgb(77, 139, 238);
  transform:translateY(-1px);
}

/* .listItemTitle{
  font-weight:700;
  line-height:1.4;
  margin:0;
} */

/* .list-empty{
  padding:14px;
  border:1px dashed var(--community-line);
  border-radius:14px;
  background:#fff;
} */

@media (max-width: 980px){
  .community-hero-grid{
    grid-template-columns:1fr;
  }

  .strip-grid,
  .card-grid,
  .rank-grid{
    grid-template-columns:1fr;
  }

  .simple-head{
    align-items:flex-start;
    flex-direction:column;
  }

  .rank-top{
    align-items:flex-start;
    flex-direction:column;
  }

  .rank-views{
    white-space:normal;
  }

  .community-search{
    flex-direction:column;
  }

  .community-search button{
    width:100%;
  }
}
/* ===== RESPONSIVE BUTTON ===== */

/* Default (desktop giữ nguyên) */
.community-search button,
.hero-link,
.rank-card .link{
  min-height:48px;
  padding:0 16px;
  font-size:15px;
}

/* Tablet */
@media (max-width: 980px){
  .community-search button,
  .hero-link,
  .rank-card .link{
    min-height:44px;
    padding:0 14px;
    font-size:14px;
  }
}

/* Mobile */
@media (max-width: 600px){
  .community-search{
    display:flex;
    flex-direction:row;
    align-items:center;
    gap:10px;
  }

  #songSearchInput{
    flex:1;
    min-width:0;
    min-height:44px;
  }

  .community-search button{
    flex:0 0 auto;
    min-width:96px;
    min-height:44px;
    width:auto;
    margin-left:auto;
  }

  .hero-link,
  .rank-card .link{
    min-height:40px;
    padding:0 12px;
    font-size:13px;
    border-radius:10px;
  }
}