/* ==== SCOPE TẤT CẢ TRONG ROOT ==== */
#hlp-crossword {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #333;
}

/* Nền gradient riêng, không phụ thuộc <body> của theme */
#hlp-crossword .hlp-root{
  background: linear-gradient(135deg, #ff6b35 0%, #1e3a8a 100%);
  padding: 20px;
  border-radius: 0;
}

/* Khung chính */
#hlp-crossword .hlp-container{
  max-width: 1200px;
  margin: 0 auto;
  background: #fff;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  overflow: hidden;
}

/* Header */
#hlp-crossword .hlp-header{
  background: linear-gradient(90deg, #ff6b35, #f97316);
  color: #fff;
  padding: 20px;
  text-align: center;
}
#hlp-crossword .hlp-header h1{
  margin: 0;
  font-size: 2.5rem;
  font-weight: 700;
}

#hlp-crossword .hlp-main{ padding:20px }

/* Form + panel + khu game */
#hlp-crossword .hlp-login,
#hlp-crossword .hlp-admin-login,
#hlp-crossword .hlp-admin,
#hlp-crossword .hlp-game,
#hlp-crossword .hlp-results{ display:none }
#hlp-crossword .active{ display:block }

#hlp-crossword .hlp-form-group{ margin-bottom:15px }
#hlp-crossword .hlp-form-group label{
  display:block; margin-bottom:6px; font-weight:700; color:#1e3a8a;
}
#hlp-crossword input[type="text"],
#hlp-crossword input[type="email"],
#hlp-crossword input[type="number"],
#hlp-crossword input[type="password"],
#hlp-crossword textarea,
#hlp-crossword select{
  width:100%; padding:10px; border:2px solid #e5e7eb; border-radius:8px;
  font-size:16px; transition:border-color .3s;
  background:#fff;
}
#hlp-crossword input:focus,
#hlp-crossword textarea:focus,
#hlp-crossword select:focus{ outline:none; border-color:#ff6b35 }

/* Buttons */
#hlp-crossword .hlp-btn{
  display:inline-block; background:#ff6b35; color:#fff; border:none;
  padding:12px 24px; border-radius:8px; font-size:16px; font-weight:700;
  cursor:pointer; transition:all .25s; margin:5px;
}
#hlp-crossword .hlp-btn:hover{ background:#f97316 }
#hlp-crossword .hlp-btn.secondary{ background:#1e3a8a }
#hlp-crossword .hlp-btn.secondary:hover{ background:#1e40af }

/* Grid crossword */
#hlp-crossword .hlp-grid{
  display:grid; grid-template-columns:repeat(16,30px); grid-template-rows:repeat(20,30px);
  gap:1px; background:#333; padding:10px; border-radius:8px; margin:20px 0; justify-content:center;
}
#hlp-crossword .hlp-cell{
  width:30px;height:30px;background:#fff;border:1px solid #ccc;display:flex;align-items:center;
  justify-content:center;font-weight:700;font-size:14px;position:relative;
}
#hlp-crossword .hlp-cell.black{ background:#333 }
#hlp-crossword .hlp-cell.active{ background:#fef3c7;border-color:#ff6b35 }
#hlp-crossword .hlp-cell input{
  width:100%;height:100%;border:none;text-align:center;font-size:14px;font-weight:700;
  background:transparent;text-transform:uppercase;
}
#hlp-crossword .hlp-cell input:focus{ outline:none;background:#fef3c7 }
#hlp-crossword .hlp-num{
  position:absolute; top:1px; left:2px; font-size:10px; color:#666;
}

/* Clues */
#hlp-crossword .hlp-clues{ display:grid; grid-template-columns:1fr 1fr; gap:20px; margin-top:20px }
#hlp-crossword .hlp-clue h3{
  color:#1e3a8a; border-bottom:2px solid #ff6b35; padding-bottom:6px; margin:0 0 8px;
}
#hlp-crossword .hlp-clue-item{ margin-bottom:8px; padding:6px; border-radius:4px; cursor:pointer; transition:background-color .2s }
#hlp-crossword .hlp-clue-item:hover{ background:#f3f4f6 }
#hlp-crossword .hlp-clue-item.active{ background:#fef3c7; border-left:4px solid #ff6b35 }

/* Leaderboard & Score */
#hlp-crossword .hlp-score{
  text-align:center; padding:20px;
  background:linear-gradient(90deg, #10b981, #059669); color:#fff; border-radius:8px; margin:20px 0;
}
#hlp-crossword .hlp-score h2{ margin:0; font-size:2rem }

#hlp-crossword .hlp-lead{
  background:linear-gradient(135deg, #10b981, #059669); color:#fff; border-radius:12px; padding:20px; margin:20px 0;
}
#hlp-crossword .hlp-lead h3{ margin:0 0 15px; text-align:center; font-size:1.5rem }
#hlp-crossword .hlp-lead-item{
  display:flex; align-items:center; background:rgba(255,255,255,0.1); border-radius:8px; padding:12px; margin-bottom:8px;
  transition:background-color .2s;
}
#hlp-crossword .hlp-lead-item:hover{ background:rgba(255,255,255,0.2) }
#hlp-crossword .hlp-rank{ width:40px; text-align:center; font-weight:700; font-size:1.2rem }
#hlp-crossword .hlp-rank.gold{ color:#ffd700 } .hlp-rank.silver{ color:#c0c0c0 } .hlp-rank.bronze{ color:#cd7f32 }
#hlp-crossword .hlp-pinfo{ flex:1; margin-left:15px }
#hlp-crossword .hlp-pname{ font-weight:700; font-size:1.1rem }
#hlp-crossword .hlp-pstats{ font-size:.9rem; opacity:.9 }

#hlp-crossword .hlp-pg{ display:flex; justify-content:center; align-items:center; gap:10px; margin-top:16px }
#hlp-crossword .hlp-pg button{ background:#1e3a8a; color:#fff; border:none; padding:8px 12px; border-radius:6px; cursor:pointer }
#hlp-crossword .hlp-pg button:hover:not(:disabled){ background:#1e40af }
#hlp-crossword .hlp-pg button:disabled{ background:#9ca3af; cursor:not-allowed }
#hlp-crossword .hlp-pg .hlp-page{ font-weight:700; color:#1e3a8a }

/* Loading & Toast */
#hlp-crossword .hlp-loading{ display:none; text-align:center; padding:20px }
#hlp-crossword .hlp-loading.show{ display:block }
#hlp-crossword .hlp-spinner{
  border:4px solid #f3f4f6; border-top:4px solid #ff6b35; border-radius:50%; width:40px; height:40px;
  animation:hlp-spin 1s linear infinite; margin:0 auto 10px;
}
@keyframes hlp-spin{ 0%{transform:rotate(0)} 100%{transform:rotate(360deg)} }

#hlp-crossword .hlp-toast{
  posi
  
.hlp-crossword-container .result-table table {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 0 10px rgba(0,0,0,0.2);
    margin-top: 10px;
}
.hlp-crossword-container .result-table td, 
.hlp-crossword-container .result-table th {
    text-align: center;
}
