/* ============================================================
 *  HOME PAGE
 * ============================================================ */

/* ----- Hero ----- */
.hero {
  text-align: center;
  padding: 40px 0 32px;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 18px; border-radius: 999px;
  background: rgba(15, 29, 52, 0.55);
  border: 1.5px solid rgba(148, 163, 184, 0.25);
  font-family: 'Press Start 2P', monospace;
  font-size: 9px; letter-spacing: 2px;
  color: var(--ranmelle-gold); text-transform: uppercase;
  margin-bottom: 28px;
}
.hero-badge .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 10px var(--success);
  animation: pulse-dot 1.6s ease-in-out infinite;
}
@keyframes pulse-dot { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.5;transform:scale(.7)} }

.hero-title {
  font-family: 'Bungee', cursive;
  font-size: clamp(50px, 11vw, 130px);
  line-height: .9; letter-spacing: -2px;
  margin: 0;
  background: linear-gradient(180deg, #fef3c7 0%, #fde68a 45%, var(--ranmelle-gold) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 6px 0 rgba(0, 0, 0, .55));
}
.hero-title .row { display: block; }
.hero-title .story {
  font-style: italic;
  background: linear-gradient(180deg, #93c5fd 0%, var(--ranmelle-blue) 60%, var(--ranmelle-blue-dark) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-tagline {
  margin: 22px auto 0;
  max-width: 620px;
  font-size: clamp(14px, 1.5vw, 17px);
  color: var(--ranmelle-text-soft); line-height: 1.6;
}

.hero-actions {
  margin-top: 32px;
  display: inline-flex; gap: 14px; flex-wrap: wrap;
  justify-content: center;
}
.btn-cta-large {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 32px; border-radius: 999px;
  font-weight: 700; font-size: 16px; color: #fff;
  background: linear-gradient(180deg, var(--ranmelle-blue) 0%, var(--ranmelle-blue-dark) 100%);
  box-shadow: 0 10px 28px rgba(100, 148, 232, .35), inset 0 1px 0 rgba(255,255,255,.45);
  transition: all .3s cubic-bezier(.2,.8,.2,1);
  position: relative; overflow: hidden;
}
.btn-cta-large:hover {
  transform: translateY(-3px); color: #fff;
  background: linear-gradient(180deg, var(--ranmelle-blue-dark) 0%, #4d7ed6 100%);
  box-shadow: 0 16px 36px rgba(100, 148, 232, .5), inset 0 1px 0 rgba(255,255,255,.55);
}
.btn-discord-large {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 32px; border-radius: 999px;
  font-weight: 700; font-size: 16px; color: #fff;
  background: linear-gradient(180deg, #5865F2 0%, #4752C4 100%);
  box-shadow: 0 10px 28px rgba(88,101,242,.35), inset 0 1px 0 rgba(255,255,255,.35);
  transition: all .3s cubic-bezier(.2,.8,.2,1);
}
.btn-discord-large:hover {
  transform: translateY(-3px); color: #fff;
  box-shadow: 0 16px 36px rgba(88,101,242,.55), inset 0 1px 0 rgba(255,255,255,.45);
}

/* ----- Stats row ----- */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 44px 0 32px;
}
.stat-card {
  display: flex; align-items: center; gap: 14px;
  padding: 18px 20px;
  background: var(--panel-bg);
  border: 1.5px solid var(--panel-border);
  border-radius: 14px;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: transform .25s, border-color .25s;
}
.stat-card:hover { transform: translateY(-3px); border-color: rgba(241, 185, 79, .4); }
.stat-icon {
  width: 46px; height: 46px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(241, 185, 79, .15);
  color: var(--maple-gold);
  flex-shrink: 0;
}
.stat-online { background: rgba(74, 222, 128, .15); color: var(--success); }
.stat-players { background: rgba(96, 165, 250, .15); color: #93c5fd; }
.stat-version { background: rgba(241, 185, 79, .15); color: var(--maple-orange); }
.stat-rate { background: rgba(100, 148, 232, .15); color: #fca5a5; }

.stat-label {
  font-size: 11px; font-weight: 600;
  letter-spacing: 1.5px; text-transform: uppercase;
  color: rgba(255, 244, 220, .55);
  margin-bottom: 4px;
}
.stat-value {
  font-family: 'Bungee', cursive;
  font-size: 18px;
  color: var(--cream);
  display: flex; align-items: center; gap: 8px;
}
.val-online { color: var(--success); }
.val-offline { color: var(--error); }
.stat-extra {
  font-family: 'Quicksand', sans-serif;
  font-size: 11px; font-weight: 600;
  color: rgba(168, 189, 216, 0.55);
}

/* ----- Home grid: News + Top players ----- */
.home-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 20px;
  margin-bottom: 40px;
}
.panel-tag {
  font-size: 10px; font-weight: 700;
  padding: 4px 10px; border-radius: 6px;
  background: rgba(100, 148, 232, .2);
  color: #fca5a5; letter-spacing: 1.5px;
  text-transform: uppercase;
}
.panel-link {
  font-size: 13px; font-weight: 600;
  color: var(--maple-gold);
}

/* News */
.news-item {
  display: block;
  padding: 18px 0;
  border-bottom: 1px solid rgba(255, 244, 220, .08);
  text-decoration: none;
  color: inherit;
  position: relative;
  transition: padding-left .25s cubic-bezier(.2, .8, .2, 1);
}
.news-item:last-child { border-bottom: none; padding-bottom: 0; }
.news-item:first-child { padding-top: 0; }

/* Clickable variant (anchor) */
.news-item-link {
  cursor: pointer;
  border-radius: 8px;
  margin: 0 -12px;
  padding-left: 12px;
  padding-right: 12px;
}
.news-item-link:hover {
  background: rgba(241, 185, 79, .06);
  padding-left: 18px;
}
.news-item-link:hover .news-title {
  color: var(--maple-gold);
}
.news-item-link:hover .news-readmore {
  transform: translateX(4px);
  opacity: 1;
}

.news-date {
  font-family: 'Press Start 2P', monospace;
  font-size: 9px; color: var(--maple-gold);
  letter-spacing: 1.5px; margin-bottom: 8px;
}
.news-title {
  font-family: 'Quicksand', sans-serif;
  font-size: 18px; font-weight: 700;
  color: var(--cream); margin-bottom: 6px;
  transition: color .2s;
}
.news-item p {
  font-size: 14px; line-height: 1.55;
  color: var(--ranmelle-text-soft);
  margin-bottom: 8px;
}
.news-readmore {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: var(--maple-gold);
  opacity: .7;
  transition: all .2s;
}

/* Top players */
.rank-list {
  list-style: none;
  display: flex; flex-direction: column; gap: 10px;
}
.rank-item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px;
  background: rgba(11, 10, 35, .4);
  border: 1.5px solid rgba(255, 244, 220, .08);
  border-radius: 12px;
  transition: all .25s;
}
.rank-item:hover { border-color: rgba(241, 185, 79, .3); transform: translateX(3px); }
.rank-pos {
  font-family: 'Bungee', cursive; font-size: 22px;
  width: 32px; text-align: center;
  color: rgba(168, 189, 216, 0.55);
}
.rank-1 .rank-pos { color: var(--maple-gold); text-shadow: 0 0 12px rgba(241, 185, 79, .5); }
.rank-2 .rank-pos { color: #d1d5db; }
.rank-3 .rank-pos { color: #d97706; }
.rank-info { flex: 1; }
.rank-name {
  font-weight: 700; font-size: 15px;
  color: var(--cream); margin-bottom: 2px;
}
.rank-meta {
  font-size: 12px;
  color: var(--ranmelle-text-soft);
}
.rank-job { color: var(--maple-gold); }
.rank-sep { margin: 0 6px; opacity: .4; }
.rank-crown { font-size: 24px; line-height: 1; }
.empty-state {
  text-align: center; padding: 32px 0;
  color: rgba(168, 189, 216, 0.55); font-size: 14px;
}

/* ----- Features ----- */
.features { margin-top: 56px; }
.features .section-title { text-align: center; }
.feature-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 18px; margin-top: 28px;
}
.feature-card {
  text-align: center;
  padding: 28px 22px;
  background: var(--panel-bg);
  border: 1.5px solid var(--panel-border);
  border-radius: 16px;
  transition: all .3s cubic-bezier(.2,.8,.2,1);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.feature-card:hover {
  transform: translateY(-6px);
  border-color: rgba(241, 185, 79, .5);
  box-shadow: 0 20px 40px rgba(0, 0, 0, .3);
}
.feature-emoji {
  font-size: 44px; margin-bottom: 14px;
  filter: drop-shadow(0 4px 10px rgba(241, 185, 79, .4));
}
.feature-card h3 {
  font-family: 'Quicksand', sans-serif;
  font-size: 17px; font-weight: 700;
  color: var(--cream); margin-bottom: 8px;
}
.feature-card p {
  font-size: 13px; line-height: 1.55;
  color: rgba(255, 244, 220, .7);
}

/* Responsive */
@media (max-width: 1000px) {
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .home-grid { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .stats-row { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr; }
  .hero { padding: 20px 0; }
  .btn-cta-large, .btn-discord-large { width: 100%; justify-content: center; }
  .hero-actions { flex-direction: column; width: 100%; }
}

/* ===== News item với thumbnail ===== */
.news-item-has-thumb {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.news-item-thumb {
  flex: 0 0 120px;
  width: 120px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(11, 10, 35, 0.5);
  position: relative;
}
.news-item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform .3s ease;
  image-rendering: auto;
}
.news-item-has-thumb:hover .news-item-thumb img {
  transform: scale(1.08);
}
.news-item-body {
  flex: 1;
  min-width: 0;
}
/* Khi có thumb, padding-left hover không cần đẩy nữa */
.news-item-has-thumb.news-item-link:hover {
  padding-left: 12px;
}

@media (max-width: 540px) {
  .news-item-thumb {
    flex-basis: 88px;
    width: 88px;
    height: 64px;
  }
}
