
  body {
    font-family: 'Poppins', sans-serif;
    background: #000 url('../assets/bgnoel.jpg') center top / cover no-repeat fixed;
    color: #fff;
    margin: 0;
    padding: 20px;
    text-align: center;
    min-width: 320px;
    position: relative;
    overflow-x: hidden;
  }
  
  /* Android scroll fix */
  html {
    overflow-x: hidden;
    -webkit-tap-highlight-color: transparent;
  }
  
  html, body {
    overscroll-behavior: none;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Overlay tối cho text dễ đọc */
  body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: -1;
    pointer-events: none;
  }
  h1 {
    color: #ffcc00;
    font-size: 28px;
    text-transform: uppercase;
    margin-bottom: 8px;
  }
  p { color: #aaa; font-size: 15px; margin-bottom: 25px; }
  h2 {
    color: #ffcc00;
    font-size: 24px;
    text-transform: uppercase;
    margin: 25px 0 15px;
  }
  h3 {
    color: #ffcc00;
    font-size: 20px;
    margin: 15px 0 10px;
  }
  
  /* Responsive adjustments */
  @media (max-width: 768px) {
    body { 
      padding: 12px;
      -webkit-text-size-adjust: 100%; /* Prevent text zoom on Android */
    }
    h1 { font-size: 22px; line-height: 1.3; }
    h2 { font-size: 20px; margin: 20px 0 12px; }
    h3 { font-size: 18px; margin: 12px 0 8px; }
    p { font-size: 13px; margin-bottom: 20px; }
  }
  
  @media (max-width: 480px) {
    body { 
      padding: 8px;
      -webkit-text-size-adjust: 100%;
    }
    h1 { font-size: 18px; line-height: 1.2; }
    h2 { font-size: 17px; margin: 15px 0 10px; }
    h3 { font-size: 16px; margin: 10px 0 6px; }
    p { font-size: 12px; margin-bottom: 15px; }
  }
  
  @media (max-width: 375px) {
    body { padding: 5px; }
    h1 { font-size: 16px; line-height: 1.2; }
    h2 { font-size: 15px; margin: 12px 0 8px; }
    h3 { font-size: 14px; margin: 8px 0 5px; }
    p { font-size: 11px; margin-bottom: 12px; }
  }

  /* Banner băng chuyền */
  .expert-marquee {
    width: 100%;
    overflow: hidden;
    position: relative;
    background: radial-gradient(circle at top, #111 0%, #000 100%);
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(255,255,255,0.15);
    margin: 0 auto 25px;
    max-width: 1080px;
  }
  .marquee-track {
    display: flex;
    width: max-content;
    animation: scrollMarquee 40s linear infinite;
  }
  .marquee-track img {
    height: 220px;
    width: auto;
    border-radius: 10px;
    margin-right: 12px;
    object-fit: cover;
    transition: transform 0.3s ease;
  }
  .marquee-track img:hover { transform: scale(1.05); }
  @keyframes scrollMarquee {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
  }
  @media (max-width:768px) {
    .marquee-track img { height: 140px; margin-right: 8px; }
  }

  /* ================= HIỆU ỨNG TUYẾT RƠI ================= */
  .snowflake {
    position: fixed;
    top: -10px;
    z-index: 9999;
    user-select: none;
    cursor: default;
    animation-name: snowfall;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    pointer-events: none;
  }

  @keyframes snowfall {
    0% {
      transform: translateY(0) rotate(0deg);
      opacity: 1;
    }
    100% {
      transform: translateY(100vh) rotate(360deg);
      opacity: 0.8;
    }
  }

  .snowflake:nth-child(odd) {
    animation-name: snowfallSway;
  }

  @keyframes snowfallSway {
    0% {
      transform: translateY(0) translateX(0) rotate(0deg);
      opacity: 1;
    }
    50% {
      transform: translateY(50vh) translateX(50px) rotate(180deg);
    }
    100% {
      transform: translateY(100vh) translateX(-50px) rotate(360deg);
      opacity: 0.8;
    }
  }

  /* Buttons */
  .menu {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
  }
  .menu button {
    background: #ffcc00;
    color: #000;
    border: none;
    padding: 10px 20px;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.3s;
    font-size: 14px;
  }
  .menu button:hover { background: #ffaa00; }
  
  @media (max-width: 480px) {
    .menu { gap: 8px; margin-bottom: 15px; }
    .menu button { padding: 8px 14px; font-size: 12px; border-radius: 6px; }
  }
  
  @media (max-width: 375px) {
    .menu { gap: 6px; margin-bottom: 12px; }
    .menu button { padding: 7px 12px; font-size: 11px; border-radius: 5px; }
  }

  /* Table */
  table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 25px;
  }
  th, td {
    border: 1px solid rgba(255,255,255,0.1);
    padding: 10px;
    text-align: center;
  }
  th {
    background: #ffcc00;
    color: #000;
    text-transform: uppercase;
  }
  
  /* Table Wrapper - Scroll horizontal */
  .table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  }
  .table-wrapper::-webkit-scrollbar {
    height: 8px;
  }
  .table-wrapper::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.05);
    border-radius: 4px;
  }
  .table-wrapper::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, #ffcc00, #ffaa00);
    border-radius: 4px;
  }
  .table-wrapper::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(90deg, #ffaa00, #ff8800);
  }
  
  /* Schedule Table specific */
  .schedule-table {
    min-width: 750px; /* Không cho table co quá nhỏ */
  }
  
  /* Table responsiveness */
  @media (max-width: 992px) {
    table { font-size: 14px; }
    th, td { padding: 8px 6px; }
    .schedule-table { min-width: 700px; }
  }
  
  @media (max-width: 768px) {
    table { font-size: 13px; }
    th, td { padding: 7px 5px; }
    .schedule-table { min-width: 550px; }
    /* Ẩn cột Casino và Nhóm trên tablet */
    .hide-mobile { display: none; }
  }
  
  @media (max-width: 480px) {
    table { font-size: 11px; }
    th, td { padding: 6px 4px; }
    .schedule-table { min-width: 420px; }
    /* Ẩn thêm cột Tỉ Lệ trên mobile nhỏ */
    .hide-small { display: none; }
  }
  
  @media (max-width: 375px) {
    table { font-size: 10px; }
    th, td { padding: 5px 3px; }
    .schedule-table { min-width: 350px; }
  }
  
  /* Top5 Table - Compact size */
  .top5-table {
    min-width: 450px;
  }
  @media (max-width: 768px) {
    .top5-table { min-width: 380px; }
  }
  @media (max-width: 480px) {
    .top5-table { min-width: 320px; }
  }
  @media (max-width: 375px) {
    .top5-table { min-width: 280px; }
  }
  
  /* History Table - Compact size */
  .history-table {
    min-width: 450px;
  }
  @media (max-width: 768px) {
    .history-table { min-width: 380px; }
  }
  @media (max-width: 480px) {
    .history-table { min-width: 300px; }
  }
  @media (max-width: 375px) {
    .history-table { min-width: 260px; }
  }
  
  .rank-top1 {background:linear-gradient(90deg,#ffeb3b,#ffd700);color:#000;font-weight:bold;}
  .rank-top2 {background:linear-gradient(90deg,#c0c0c0,#e0e0e0);color:#000;font-weight:bold;}
  .rank-top3 {background:linear-gradient(90deg,#cd7f32,#d9a066);color:#000;font-weight:bold;}

  /* Popup base */
  .popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    width: 100dvw;
    height: 100vh;
    height: 100dvh;
    background: rgba(0,0,0,0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    overflow-y: auto;
    overflow-x: hidden;
    /* Ngăn scroll và giựt */
    overscroll-behavior: none;
    -webkit-overflow-scrolling: touch;
    /* Android specific */
    touch-action: none;
    -webkit-tap-highlight-color: transparent;
  }
  
  /* Ưu tiên modal điểm danh nằm trên cùng, cao hơn banner nổi */
  #diemdanhModal { z-index: 12000; }
  
  /* Điểm danh modal - responsive iframe */
  #diemdanhModal .popup-content {
    padding: 0;
    overflow: hidden;
    max-width: 960px;
    width: 95%;
    max-height: 90vh;
    max-height: 90dvh;
    position: relative;
  }
  
  #diemdanhModal iframe {
    width: 100%;
    height: 80vh;
    height: 80dvh;
    border: 0;
    display: block;
  }
  
  @media (max-width: 768px) {
    #diemdanhModal .popup-content {
      max-width: 95%;
      width: 95%;
      max-height: 92dvh;
    }
    #diemdanhModal iframe {
      height: 85dvh;
    }
  }
  
  @media (max-width: 480px) {
    #diemdanhModal .popup-content {
      max-width: 100%;
      width: 100%;
      max-height: 95dvh;
      border-radius: 8px;
    }
    #diemdanhModal iframe {
      height: 88dvh;
    }
  }
  
  @media (max-width: 375px) {
    #diemdanhModal .popup-content {
      border-radius: 6px;
      max-height: 98dvh;
    }
    #diemdanhModal iframe {
      height: 91dvh;
    }
  }
  
  /* Popup Rules - responsive text */
  #popupRules .popup-content {
    max-width: 800px;
    text-align: left;
  }
  
  #popupRules .popup-content > div {
    line-height: 1.6;
    font-size: 15px;
    color: #ddd;
  }
  
  #popupRules .popup-content p {
    margin-bottom: 12px;
    word-break: break-word;
  }
  
  #popupRules .popup-content b {
    color: #ffcc00;
    font-weight: bold;
  }
  
  @media (max-width: 768px) {
    #popupRules .popup-content {
      max-width: 95%;
    }
    #popupRules .popup-content > div {
      font-size: 14px;
      line-height: 1.5;
    }
    #popupRules .popup-content p {
      margin-bottom: 10px;
    }
  }
  
  @media (max-width: 480px) {
    #popupRules .popup-content > div {
      font-size: 13px;
      line-height: 1.5;
    }
    #popupRules .popup-content p {
      margin-bottom: 9px;
    }
  }
  
  @media (max-width: 375px) {
    #popupRules .popup-content > div {
      font-size: 12px;
      line-height: 1.4;
    }
    #popupRules .popup-content p {
      margin-bottom: 8px;
    }
  }
  
  /* Popup Vote - tabs wrapper responsive */
  #popupVote .popup-content {
    max-width: 920px;
  }
  
  #popupVote .tab-content {
    margin-top: 15px;
  }
  
  @media (max-width: 768px) {
    #popupVote .popup-content {
      max-width: 95%;
    }
  }
  
  @media (max-width: 480px) {
    #popupVote .tab-content {
      margin-top: 12px;
    }
  }
  
  /* Popup History - simple text container */
  #popupHistory .popup-content {
    max-width: 850px;
  }
  
  #historyContent {
    font-size: 14px;
    line-height: 1.6;
    color: #ddd;
  }
  
  @media (max-width: 768px) {
    #historyContent {
      font-size: 13px;
    }
  }
  
  @media (max-width: 480px) {
    #historyContent {
      font-size: 12px;
      line-height: 1.5;
    }
  }
  
  @media (max-width: 375px) {
    #historyContent {
      font-size: 11px;
      line-height: 1.4;
    }
  }
  
  .popup-content {
    background: #111;
    border: 2px solid #ffcc00;
    border-radius: 12px;
    padding: 18px;
    max-width: 900px;
    width: 95%;
    max-height: 85vh;
    max-height: 85dvh;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    margin: auto;
    /* Smooth scrolling */
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    /* Prevent layout shift */
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    /* Android touch */
    touch-action: pan-y;
    /* Text readability */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
  
  @media (max-width: 768px) {
    .popup-content { 
      padding: 15px; 
      max-width: 95%; 
      width: 95%;
      max-height: 90dvh;
      font-size: 14px;
    }
  }
  
  @media (max-width: 480px) {
    .popup-content { 
      padding: 12px; 
      max-width: 98%; 
      width: 98%;
      border-radius: 10px;
      max-height: 92dvh;
      font-size: 13px;
    }
  }
  
  @media (max-width: 375px) {
    .popup-content { 
      padding: 10px; 
      max-width: 100%; 
      width: 100%;
      border-radius: 8px;
      max-height: 95dvh;
      font-size: 12px;
      border-width: 1.5px;
    }
  }
  
  /* Popup headings responsive */
  .popup-content h3 {
    font-size: 20px;
    line-height: 1.3;
    margin-bottom: 15px;
    word-break: break-word;
  }
  
  @media (max-width: 768px) {
    .popup-content h3 { 
      font-size: 18px; 
      margin-bottom: 12px;
    }
  }
  
  @media (max-width: 480px) {
    .popup-content h3 { 
      font-size: 16px; 
      margin-bottom: 10px;
      line-height: 1.2;
    }
  }
  
  @media (max-width: 375px) {
    .popup-content h3 { 
      font-size: 14px; 
      margin-bottom: 8px;
    }
  }
  
  /* Popup paragraphs responsive */
  .popup-content p {
    line-height: 1.6;
    word-break: break-word;
  }
  
  @media (max-width: 480px) {
    .popup-content p {
      line-height: 1.5;
      font-size: 13px;
    }
  }
  
  @media (max-width: 375px) {
    .popup-content p {
      font-size: 12px;
      line-height: 1.4;
    }
  }
  
  /* Popup buttons responsive */
  .popup-content button:not(.tab-btn):not(.close-btn) {
    min-width: 80px;
    padding: 10px 16px;
    font-size: 14px;
    transition: all 0.3s ease;
  }
  
  @media (max-width: 768px) {
    .popup-content button:not(.tab-btn):not(.close-btn) {
      min-width: 70px;
      padding: 9px 14px;
      font-size: 13px;
    }
  }
  
  @media (max-width: 480px) {
    .popup-content button:not(.tab-btn):not(.close-btn) {
      min-width: 60px;
      padding: 8px 12px;
      font-size: 12px;
    }
  }
  
  @media (max-width: 375px) {
    .popup-content button:not(.tab-btn):not(.close-btn) {
      min-width: 50px;
      padding: 7px 10px;
      font-size: 11px;
    }
  }
  
  /* Popup inputs responsive */
  .popup-content input[type="text"],
  .popup-content input[type="email"],
  .popup-content input[type="password"],
  .popup-content input[type="number"] {
    font-size: 14px;
    padding: 10px;
    box-sizing: border-box;
  }
  
  @media (max-width: 768px) {
    .popup-content input[type="text"],
    .popup-content input[type="email"],
    .popup-content input[type="password"],
    .popup-content input[type="number"] {
      font-size: 13px;
      padding: 9px;
    }
  }
  
  @media (max-width: 480px) {
    .popup-content input[type="text"],
    .popup-content input[type="email"],
    .popup-content input[type="password"],
    .popup-content input[type="number"] {
      font-size: 13px;
      padding: 8px;
    }
  }
  
  @media (max-width: 375px) {
    .popup-content input[type="text"],
    .popup-content input[type="email"],
    .popup-content input[type="password"],
    .popup-content input[type="number"] {
      font-size: 12px;
      padding: 7px;
    }
  }
  
  /* Safe area support for notch devices */
  @supports (padding: max(0px)) {
    .popup-content {
      padding-left: max(18px, env(safe-area-inset-left));
      padding-right: max(18px, env(safe-area-inset-right));
      padding-top: max(18px, env(safe-area-inset-top));
      padding-bottom: max(18px, env(safe-area-inset-bottom));
    }
    
    .close-btn {
      right: max(15px, env(safe-area-inset-right));
      top: max(10px, env(safe-area-inset-top));
    }
    
    @media (max-width: 480px) {
      .popup-content {
        padding-left: max(12px, env(safe-area-inset-left));
        padding-right: max(12px, env(safe-area-inset-right));
      }
    }
  }
  
  /* Landscape mode for popups */
  @media (max-height: 600px) and (orientation: landscape) {
    .popup-content {
      max-height: 95dvh;
      padding: 12px;
    }
    .popup-content h3 {
      font-size: 16px;
      margin-bottom: 8px;
    }
    .popup-content p {
      font-size: 12px;
      line-height: 1.4;
      margin-bottom: 6px;
    }
    .close-btn {
      font-size: 20px;
      top: 5px;
      right: 10px;
    }
  }
  
  @media (max-height: 500px) and (orientation: landscape) {
    .popup-content {
      max-height: 98dvh;
      padding: 10px;
      border-radius: 8px;
    }
    .popup-content h3 {
      font-size: 14px;
      margin-bottom: 6px;
    }
    .popup-content p {
      font-size: 11px;
      margin-bottom: 4px;
    }
  }
  
  .popup-content::-webkit-scrollbar { width: 4px; }
  .popup-content::-webkit-scrollbar-thumb { background: rgba(255,204,0,0.3); border-radius: 2px; }
  .popup-content::-webkit-scrollbar-track { background: transparent; }
  .popup-content::-webkit-scrollbar-thumb:hover { background: rgba(255,204,0,0.6); }
  .close-btn {
    position: absolute;
    top: 10px; right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #ffcc00;
    transition: transform 0.2s ease, color 0.2s ease;
    font-weight: bold;
  }
  .close-btn:hover {
    transform: scale(1.2) rotate(90deg);
    color: #ffaa00;
  }
  
  @media (max-width: 768px) {
    .close-btn { font-size: 22px; top: 8px; right: 12px; }
  }
  
  @media (max-width: 480px) {
    .close-btn { font-size: 20px; top: 6px; right: 10px; }
  }
  
  @media (max-width: 375px) {
    .close-btn { font-size: 18px; top: 5px; right: 8px; }
  }
  /* === Scrollbar hiện đại, mảnh, tối giản === */
  html {
    scrollbar-gutter: stable both-edges;
    scrollbar-width: thin;                 /* Firefox */
    scrollbar-color: rgba(255,204,0,0.3) transparent;      /* Firefox */
  }
  /* WebKit (Chrome, Edge, Safari) - Global */
  ::-webkit-scrollbar { width: 4px; height: 4px; }
  ::-webkit-scrollbar-track {
    background: transparent;
  }
  ::-webkit-scrollbar-thumb {
    background: rgba(255,204,0,0.3);
    border-radius: 2px;
  }
  ::-webkit-scrollbar-thumb:hover {
    background: rgba(255,204,0,0.6);
  }
  /* Thanh cuộn ngang cho vùng tràn ngang */
  .table-wrapper::-webkit-scrollbar { height: 4px; }
  .table-wrapper { scrollbar-width: thin; scrollbar-color: rgba(255,204,0,0.3) transparent; }
  /* Popup nội dung có cuộn */
  .popup-content { scrollbar-width: thin; scrollbar-color: rgba(255,204,0,0.3) transparent; }
  .popup-content::-webkit-scrollbar { width: 4px; }
  .popup-content::-webkit-scrollbar-thumb { background: rgba(255,204,0,0.3); border-radius: 2px; }
  .popup-content::-webkit-scrollbar-track { background: transparent; }
  .popup-content::-webkit-scrollbar-thumb:hover { background: rgba(255,204,0,0.6); }

  /* Popup đăng nhập VN78 */
  #popupLogin .popup-content { max-width: 420px; text-align: left; }
  #popupLogin label { display:block; margin:8px 0 4px; color:#ddd; }
  #popupLogin input { width:100%; padding:10px; border-radius:8px; border:1px solid #444; background:#0f0f0f; color:#fff; }
  #popupLogin .actions { margin-top:12px; display:flex; gap:10px; justify-content:flex-end; }
  #popupLogin .actions button { padding:10px 14px; border-radius:8px; border:none; font-weight:700; cursor:pointer; }
  #btnLoginConfirm { background:#ffcc00; color:#000; }
  #btnLoginCancel { background:#222; color:#fff; }
  
  /* Spinner dùng chung cho loader */
  .spinner { width:36px; height:36px; border:4px solid rgba(255,255,255,0.2); border-top-color:#ffcc00; border-radius:50%; animation:spin .8s linear infinite; }
  @keyframes spin { to { transform: rotate(360deg); } }

  /* ===== 🎯 FLOATING BUTTON NHIỆM VỤ - HIỆU ỨNG CỰC ĐỈNH ===== */
  .mission-floating-btn {
    position: fixed;
    top: 140px;
    right: -20px;
    transform: none;
    width: 230px;
    height: auto;
    cursor: pointer;
    z-index: 900; /* Thấp hơn popup (1000) để không che popup thông báo */
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    animation: slideIn 0.6s ease, shake 2s ease-in-out infinite;
    filter: drop-shadow(0 0 10px rgba(255,255,255,0.4));
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  .mission-floating-btn:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 0 25px rgba(255,204,0,1));
  }
  .mission-floating-btn:active {
    transform: scale(0.95);
  }
  .mission-float-img {
    width: 100%;
    height: auto;
    object-fit: contain;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 3;
    animation: glowPulse 2s infinite;
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
  }
  .mission-float-img.active {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
  }
  .mission-floating-btn .close-btn {
    position: absolute;
    top: 15px;
    right: 5px;
    transform: none;
    background: rgba(255,204,0,0.95);
    color: #000;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    text-align: center;
    line-height: 30px;
    font-weight: bold;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 0 15px rgba(255,204,0,0.8), 0 2px 8px rgba(0,0,0,0.3);
    transition: .25s;
    z-index: 999999;
    border: 2px solid rgba(0,0,0,0.3);
  }
  .mission-floating-btn .close-btn:hover {
    background: #ffaa00;
    transform: scale(1.15) rotate(90deg);
    box-shadow: 0 0 25px rgba(255,204,0,1), 0 4px 12px rgba(0,0,0,0.4);
  }
  /* Đã bỏ hiệu ứng glow-ring, pulse-ring, sparkles */
  @keyframes missionFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
  }
  @keyframes missionRotateSubtle {
    0%, 100% { transform: rotate(-2deg); }
    50% { transform: rotate(2deg); }
  }
  @keyframes missionBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
  }
  /* Đã bỏ animation missionGlowPulse, missionPulseExpand, missionSparkleOrbit */
  @media (max-width: 768px) {
    .mission-floating-btn { width: 170px; top: 100px; right: -15px; }
    .mission-floating-btn .close-btn { width: 28px; height: 28px; top: 12px; right: 4px; line-height: 26px; font-size: 16px; }
  }
  @media (max-width: 480px) {
    .mission-floating-btn { width: 140px; top: 80px; right: -12px; }
    .mission-floating-btn .close-btn { width: 26px; height: 26px; top: 10px; right: 3px; line-height: 24px; font-size: 14px; }
  }
  @media (max-width: 375px) {
    .mission-floating-btn { width: 120px; top: 70px; right: -10px; }
    .mission-floating-btn .close-btn { width: 24px; height: 24px; top: 8px; right: 2px; line-height: 22px; font-size: 12px; }
  }
  @media (prefers-reduced-motion: reduce) {
    .mission-floating-btn { animation: none; }
    .mission-float-img { animation: none; transition: none; }
  }

  /* Grid chuyên gia */
  .grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-top: 15px;
  }
  .expert-card {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 8px;
    transition: 0.3s;
  }
  
  @media (max-width: 992px) {
    .grid { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
  }
  
  @media (max-width: 768px) {
    .grid { 
      grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
      gap: 10px; 
    }
    .expert-card { padding: 6px; }
  }
  
  @media (max-width: 480px) {
    .grid { 
      grid-template-columns: repeat(3, 1fr); /* 3 cột cố định cho mobile */
      gap: 8px; 
    }
    .expert-card { 
      padding: 5px;
      border-radius: 6px;
    }
    .expert-card img { 
      height: auto;
      aspect-ratio: 3/4;
      min-height: 100px;
    }
    .expert-card p { 
      font-size: 11px; 
      margin: 5px 0 3px;
      line-height: 1.2;
    }
    .expert-card button { 
      padding: 5px 8px; 
      font-size: 11px;
      width: 100%;
      border-radius: 4px;
    }
  }
  
  @media (max-width: 375px) {
    .grid { 
      grid-template-columns: repeat(3, 1fr); /* 3 cột cho màn hình nhỏ */
      gap: 6px; 
    }
    .expert-card { 
      padding: 4px;
      border-radius: 5px;
    }
    .expert-card img { 
      height: auto;
      aspect-ratio: 3/4;
      min-height: 85px;
    }
    .expert-card p { 
      font-size: 10px; 
      margin: 4px 0 2px;
      line-height: 1.1;
    }
    .expert-card button { 
      padding: 4px 6px; 
      font-size: 10px;
      width: 100%;
    }
  }
  .expert-card:hover {
    border-color: #ffcc00;
    transform: scale(1.03);
  }
  .expert-card img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 8px;
  }
  .expert-card p {
    margin: 7px 0 4px;
    color: #ffcc00;
    font-weight: bold;
    font-size: 13px;
  }
  .expert-card button {
    background: #ffcc00;
    color: #000;
    border: none;
    padding: 5px 9px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    font-size: 13px;
  }
  .expert-card button:hover { background: #ffaa00; }

  /* Popup xác nhận vote */
  #confirmBox .popup-content {
    max-width:450px;
    text-align:center;
    padding: 25px 20px;
  }
  
  #confirmBox h3 {
    margin-bottom: 15px;
    color: #ffcc00;
  }
  
  #confirmBox p {
    margin-bottom: 15px;
    line-height: 1.5;
    color: #ddd;
  }
  
  #confirmBox input {
    width:90%;
    max-width: 350px;
    padding:12px;
    border-radius:8px;
    border:2px solid #444;
    background: #0a0a0a;
    color: #fff;
    margin:10px 0;
    font-size:15px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
  }
  
  #confirmBox input:focus {
    outline: none;
    border-color: #ffcc00;
  }
  
  #confirmBox input::placeholder {
    color: #666;
  }
  
  #confirmBox button {
    margin:8px;
    background:#ffcc00;
    color:#000;
    padding:12px 24px;
    border:none;
    border-radius:8px;
    font-weight:bold;
    cursor:pointer;
    font-size:15px;
    transition: all 0.3s ease;
    min-width: 100px;
  }
  
  #confirmBox button:hover {
    background:#ffaa00;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255,204,0,0.3);
  }
  
  #confirmBox button:active {
    transform: translateY(0);
  }
  
  #confirmBox button:last-child {
    background: #333;
    color: #fff;
  }
  
  #confirmBox button:last-child:hover {
    background: #444;
  }
  
  @media (max-width: 768px) {
    #confirmBox .popup-content { 
      max-width: 90%; 
      padding: 20px 18px;
    }
    #confirmBox input { 
      width: 100%;
      padding: 10px;
      font-size: 14px; 
    }
    #confirmBox button { 
      padding: 10px 20px; 
      font-size: 14px; 
      margin: 6px; 
      min-width: 90px;
    }
  }
  
  @media (max-width: 480px) {
    #confirmBox .popup-content { 
      max-width: 95%; 
      width: 95%;
      padding: 18px 15px;
    }
    #confirmBox input { 
      width: 100%;
      padding: 9px; 
      font-size: 13px;
    }
    #confirmBox button { 
      padding: 9px 16px; 
      font-size: 13px; 
      margin: 5px;
      min-width: 80px;
    }
  }
  
  @media (max-width: 375px) {
    #confirmBox .popup-content {
      padding: 15px 12px;
    }
    #confirmBox input { 
      padding: 8px; 
      font-size: 12px;
    }
    #confirmBox button { 
      padding: 8px 14px; 
      font-size: 12px; 
      margin: 4px;
      min-width: 70px;
    }
    #confirmBox div {
      display: flex;
      flex-direction: column;
      gap: 6px;
    }
    #confirmBox button {
      width: 100%;
      margin: 0;
    }
  }
  /* ======================= CHỮ CHẠY DƯỚI BANNER ======================= */
.vote-ticker {
  width: 100%;
  background: linear-gradient(90deg, #000, #111, #000);
  overflow: hidden;
  height: 40px;
  display: flex;
  align-items: center;
  border-top: 1px solid #ffcc00;
  border-bottom: 1px solid #ffcc00;
  margin: 10px auto 25px;
  box-shadow: 0 0 15px rgba(255,204,0,0.2);
}
.ticker-track {
  display: inline-flex;
  white-space: nowrap;
  animation: tickerScroll 80s linear infinite;
  min-width: 200%;
}
.ticker-item {
  margin-right: 60px;
  font-size: 15px;
  color: #ffcc00;
  font-weight: 600;
  text-shadow: 0 0 8px rgba(255,255,0,0.4);
}
@keyframes tickerScroll {
  from { transform: translateX(100%); }
  to { transform: translateX(-100%); }
}
.tab-btn {
  background:#222;
  border:1px solid #ffcc00;
  color:#ffcc00;
  padding:8px 16px;
  border-radius:6px;
  cursor:pointer;
  font-weight:bold;
  font-size:14px;
  transition: all 0.3s ease;
  white-space: nowrap;
}
.tab-btn:hover {
  background:#333;
  transform: translateY(-2px);
}
.tab-btn.active {
  background:#ffcc00;
  color:#000;
}

@media (max-width: 768px) {
  .tab-btn {
    padding: 7px 14px;
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .tab-btn {
    padding: 6px 12px;
    font-size: 12px;
  }
}

@media (max-width: 375px) {
  .tab-btn {
    padding: 5px 10px;
    font-size: 11px;
  }
}
/* ❤️ Tim bay */
.heart-float {
  position: fixed;
  font-size: 22px;
  pointer-events: none;
  z-index: 5000;
  animation: heartRise 2s ease-out forwards;
}
@keyframes heartRise {
  0% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-150px) scale(1.8); }
}

/* =================== CHECKIN 7 DAYS STYLES =================== */
.checkin-7days-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 15px;
  margin-top: 20px;
}

.checkin-day-item {
  background: linear-gradient(135deg, rgba(255, 204, 0, 0.1), rgba(255, 140, 0, 0.05));
  border: 2px solid rgba(255, 204, 0, 0.3);
  border-radius: 12px;
  padding: 15px;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.checkin-day-item::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,204,0,0.1) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s;
}

.checkin-day-item:hover::before {
  opacity: 1;
}

.checkin-day-item:hover {
  transform: translateY(-5px);
  border-color: #ffcc00;
  box-shadow: 0 8px 20px rgba(255, 204, 0, 0.3);
}

.checkin-day-item.status-locked {
  opacity: 0.6;
  background: linear-gradient(135deg, rgba(100, 100, 100, 0.2), rgba(50, 50, 50, 0.1));
  border-color: rgba(150, 150, 150, 0.3);
}

.checkin-day-item.status-ready {
  background: linear-gradient(135deg, rgba(255, 204, 0, 0.3), rgba(255, 140, 0, 0.2));
  border-color: #ffcc00;
  box-shadow: 0 0 20px rgba(255, 204, 0, 0.4);
  animation: pulseReady 2s ease-in-out infinite;
}

.checkin-day-item.status-claimed {
  background: linear-gradient(135deg, rgba(0, 255, 0, 0.2), rgba(0, 200, 0, 0.1));
  border-color: #00ff00;
}

.day-badge {
  font-size: 15px;
  font-weight: 700;
  color: #ffcc00;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.day-reward {
  font-size: 20px;
  font-weight: bold;
  color: #ffd700;
  margin: 12px 0;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.day-status {
  font-size: 13px;
  color: #aaa;
  margin-top: 10px;
  padding: 6px 10px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.3);
  font-weight: 600;
}

.checkin-day-item.status-ready .day-status {
  color: #ffcc00;
  background: rgba(255, 204, 0, 0.2);
}

.checkin-day-item.status-claimed .day-status {
  color: #00ff00;
  background: rgba(0, 255, 0, 0.1);
}

.checkin-action-btn {
  background: linear-gradient(135deg, #ffcc00, #ff9900);
  color: #000;
  padding: 15px 40px;
  border: none;
  border-radius: 10px;
  font-weight: bold;
  font-size: 16px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 15px rgba(255, 204, 0, 0.4);
  transition: all 0.3s ease;
}

.checkin-action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 204, 0, 0.6);
}

.checkin-action-btn:active {
  transform: translateY(0);
}

#checkin7DaysMsg.success {
  background: rgba(0, 255, 0, 0.15);
  border: 2px solid #00ff00;
  color: #00ff00;
  font-weight: 600;
}

#checkin7DaysMsg.error {
  background: rgba(255, 0, 0, 0.15);
  border: 2px solid #ff3333;
  color: #ff3333;
  font-weight: 600;
}

@keyframes pulseReady {
  0%, 100% {
    box-shadow: 0 0 20px rgba(255, 204, 0, 0.4);
  }
  50% {
    box-shadow: 0 0 30px rgba(255, 204, 0, 0.7), 0 0 40px rgba(255, 204, 0, 0.3);
  }
}

/* =================== CHECKIN DESCRIPTION SECTION =================== */
.checkin-description-section {
  margin-top: 25px;
  padding: 20px;
  background: linear-gradient(135deg, rgba(255,204,0,0.08), rgba(255,140,0,0.05));
  border: 2px solid rgba(255,204,0,0.3);
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.checkin-desc-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid rgba(255,204,0,0.3);
}

.checkin-desc-icon {
  font-size: 32px;
  animation: bounce 2s ease-in-out infinite;
}

.checkin-desc-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  background: linear-gradient(135deg, #ffcc00, #ffd700, #ffaa00);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.checkin-desc-content {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.checkin-desc-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  background: rgba(0,0,0,0.2);
  border-radius: 10px;
  border-left: 4px solid #ffcc00;
  transition: all 0.3s ease;
}

.checkin-desc-item:hover {
  background: rgba(255,204,0,0.1);
  transform: translateX(5px);
}

.checkin-item-icon {
  font-size: 24px;
  min-width: 24px;
  margin-top: 2px;
}

.checkin-item-text {
  flex: 1;
  color: #ddd;
  font-size: 14px;
  line-height: 1.6;
}

.checkin-item-text strong {
  color: #ffcc00;
  display: block;
  margin-bottom: 5px;
  font-size: 15px;
}

.checkin-item-text p {
  margin: 0;
  color: #bbb;
}

.checkin-desc-warning {
  margin-top: 20px;
  padding: 15px;
  background: linear-gradient(135deg, rgba(255,100,100,0.15), rgba(255,150,0,0.1));
  border: 2px solid rgba(255,100,100,0.4);
  border-radius: 10px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.warning-icon {
  font-size: 28px;
  animation: warningPulse 2s ease-in-out infinite;
}

.warning-content {
  flex: 1;
  color: #ffcc00;
}

.warning-content strong {
  display: block;
  margin-bottom: 10px;
  font-size: 15px;
  color: #ff9999;
}

.warning-content ul {
  margin: 0;
  padding-left: 20px;
  color: #ddd;
  font-size: 13px;
  line-height: 1.8;
}

.warning-content ul li {
  margin-bottom: 5px;
}

@keyframes warningPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.1); opacity: 0.8; }
}

@media (max-width: 768px) {
  .checkin-7days-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  
  .checkin-day-item {
    padding: 12px;
  }
  
  .day-reward {
    font-size: 18px;
  }
  
  .checkin-action-btn {
    padding: 12px 30px;
    font-size: 14px;
  }
  
  .checkin-description-section {
    padding: 15px;
  }
  
  .checkin-desc-header h3 {
    font-size: 16px;
  }
  
  .checkin-desc-icon {
    font-size: 28px;
  }
  
  .checkin-item-text {
    font-size: 13px;
  }
  
  .checkin-item-text strong {
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .checkin-desc-item {
    flex-direction: column;
    gap: 8px;
  }
  
  .checkin-desc-warning {
    flex-direction: column;
    gap: 10px;
  }
  
  .warning-content ul {
    font-size: 12px;
  }
}

/* ===== 🎬 INTRO VIDEO OVERLAY - RESPONSIVE ===== */
#introOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  width: 100dvw; /* Dynamic viewport width */
  height: 100vh;
  height: 100dvh; /* Dynamic viewport height */
  background: #000;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease;
  overflow: hidden;
  /* Ngăn scroll và bounce */
  overscroll-behavior: none;
  -webkit-overflow-scrolling: touch;
  /* Android specific */
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
}

#introOverlay.hidden {
  opacity: 0;
  pointer-events: none;
}

#introVideo {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover; /* Luôn fill màn hình, không có thanh đen */
  background: #000;
  display: block;
  z-index: 1;
  /* Hardware acceleration để mượt hơn */
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* Nút bỏ qua - Desktop */
.skip-intro {
  position: absolute;
  bottom: 30px;
  right: 30px;
  background: rgba(255, 204, 0, 0.9);
  color: #000;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 100000;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  -webkit-tap-highlight-color: transparent; /* Bỏ highlight khi tap trên mobile */
}
.skip-intro:hover {
  background: #ffcc00;
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(255, 204, 0, 0.6);
}
.skip-intro:active {
  transform: scale(0.98); /* Feedback khi click/tap */
}

/* Tablet (768px) */
@media (max-width: 768px) {
  #introOverlay {
    width: 100vw;
    height: 100vh;
  }
  
  #introVideo {
    position: fixed;
    width: 100vw !important;
    height: 100vh !important;
    object-fit: cover;
  }
  
  .skip-intro {
    bottom: 20px;
    right: 20px;
    padding: 10px 20px;
    font-size: 14px;
  }
}

/* Mobile (480px) */
@media (max-width: 480px) {
  #introOverlay {
    width: 100vw;
    height: 100vh;
  }
  
  #introVideo {
    position: fixed;
    width: 100vw !important;
    height: 100vh !important;
    min-width: 100vw;
    min-height: 100vh;
    object-fit: cover;
  }
  
  .skip-intro {
    bottom: 15px;
    right: 15px;
    padding: 8px 16px;
    font-size: 13px;
  }
}

/* Small Mobile (375px) */
@media (max-width: 375px) {
  .skip-intro {
    bottom: 12px;
    right: 12px;
    padding: 7px 14px;
    font-size: 12px;
  }
}

/* Landscape mode - Mobile ngang */
@media (max-width: 926px) and (orientation: landscape) {
  #introOverlay {
    width: 100vw;
    height: 100vh;
  }
  
  #introVideo {
    width: 100vw;
    height: 100vh;
    object-fit: cover;
  }
  
  .skip-intro {
    bottom: 10px;
    right: 10px;
    padding: 6px 12px;
    font-size: 12px;
  }
}

/* iOS Safari specific fixes */
@supports (-webkit-touch-callout: none) {
  #introOverlay {
    height: -webkit-fill-available;
    min-height: -webkit-fill-available;
  }
  
  #introVideo {
    height: -webkit-fill-available;
  }
}

/* Start Overlay */
.start-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  cursor: pointer;
  transition: opacity 0.5s ease;
  /* Prevent bounce */
  overscroll-behavior: none;
  -webkit-overflow-scrolling: touch;
}

.start-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.start-content {
  text-align: center;
  animation: startPulse 2s ease-in-out infinite;
}

.start-icon {
  font-size: 100px;
  margin-bottom: 20px;
  filter: drop-shadow(0 0 20px rgba(255, 204, 0, 0.5));
}

.start-text {
  font-size: 32px;
  font-weight: bold;
  color: #ffcc00;
  text-shadow: 0 0 20px rgba(255, 204, 0, 0.8);
  margin-bottom: 10px;
  letter-spacing: 2px;
}

.start-subtext {
  font-size: 18px;
  color: #fff;
  opacity: 0.9;
}

@keyframes startPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@media (max-width: 768px) {
  .start-icon { font-size: 80px; }
  .start-text { font-size: 26px; }
  .start-subtext { font-size: 16px; }
}

@media (max-width: 480px) {
  .start-icon { font-size: 60px; margin-bottom: 15px; }
  .start-text { font-size: 22px; }
  .start-subtext { font-size: 14px; }
}

/* iPhone X/11/12/13/14 notch - Safe area */
@supports (padding: max(0px)) {
  .skip-intro {
    bottom: max(30px, env(safe-area-inset-bottom));
    right: max(30px, env(safe-area-inset-right));
  }
  @media (max-width: 768px) {
    .skip-intro {
      bottom: max(20px, env(safe-area-inset-bottom));
      right: max(20px, env(safe-area-inset-right));
    }
  }
  @media (max-width: 480px) {
    .skip-intro {
      bottom: max(15px, env(safe-area-inset-bottom));
      right: max(15px, env(safe-area-inset-right));
    }
  }
}


/* ==================== NEXT SECTION ==================== */


/* ================= GHÉP CHỮ POPUP (ĐẸP HƠN) ================= */
.ghepchu-popup {
  display: none !important; /* ẨN POPUP GHÉP CHỮ */
  position: fixed;
  top: 65%;
  right: 0;
  transform: translateY(-50%);
  z-index: 9999;
  animation: slideIn 0.6s ease, shake 2s ease-in-out infinite; /* 👈 Thêm lắc lư */
}
.ghepchu-popup img {
  width: 230px;
  cursor: pointer;
  filter: drop-shadow(0 0 10px rgba(255,255,255,0.4));
  transition: transform 0.3s ease, filter 0.3s ease;
  animation: glowPulse 2s infinite; /* 👈 Thêm nhấp nháy nhẹ */
}
.ghepchu-popup img:hover {
  transform: scale(1.05);
  filter: drop-shadow(0 0 25px rgba(255,204,0,1));
}

/* ✖ Nút đóng ở giữa bên phải */
.ghepchu-popup .close-btn {
  position: absolute;
  top: 50%;
  right: -16px;
  transform: translateY(-50%);
  background: #ffcc00;
  color: #000;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  text-align: center;
  line-height: 30px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 0 12px rgba(255,204,0,0.6);
  transition: 0.25s;
}
.ghepchu-popup .close-btn:hover {
  background: #ffaa00;
  transform: translateY(-50%) scale(1.15);
  box-shadow: 0 0 18px rgba(255,204,0,1);
}

/* 🔁 Keyframes hiệu ứng */
@keyframes slideIn {
  from { opacity: 0; transform: translateX(100%); }
  to { opacity: 1; transform: translateX(0); }
}

/* Lắc lư nhẹ */
@keyframes shake {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(2deg); }
  50% { transform: rotate(-2deg); }
  75% { transform: rotate(2deg); }
}

/* Hiệu ứng nhấp nháy ánh vàng */
@keyframes glowPulse {
  0%, 100% { filter: drop-shadow(0 0 10px rgba(255,204,0,0.4)); }
  50% { filter: drop-shadow(0 0 25px rgba(255,204,0,0.9)); }
}

@media (max-width:768px){
  .ghepchu-popup img{width:160px;}
  .ghepchu-popup .close-btn{width:26px;height:26px;right:-12px;line-height:26px;}
}
/* Tôn trọng người dùng muốn giảm chuyển động */
@media (prefers-reduced-motion: reduce) {
  .ghepchu-popup { animation: none; }
  .ghepchu-popup img { animation: none; transition: none; }
}

/* ================= ĐIỂM DANH POPUP - ĐÃ GỘP VÀO CAROUSEL ================= */
/* CSS cũ của .diemdanh-popup đã được xóa vì đã gộp vào missionFloatingBtn */

/* ================= PK3 POPUP - CƯỢC TO THẮNG LỚN ================= */
.pk3-popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(6px);
  z-index: 10000;
  display: none; /* Ẩn mặc định, JavaScript sẽ hiển thị */
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.pk3-popup-container {
  position: relative;
  display: flex;
  max-width: 1040px;
  width: 90%;
  background: #000;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 0 40px rgba(255, 204, 0, 0.5);
  animation: slideUp 0.5s ease;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(50px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Tuyết rơi trong popup */
.pk3-popup-overlay .snowflake-popup {
  position: absolute;
  top: -10px;
  z-index: 10;
  user-select: none;
  cursor: default;
  animation-name: snowfallPopup;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  pointer-events: none;
}

@keyframes snowfallPopup {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotate(360deg);
    opacity: 0.8;
  }
}

.pk3-popup-overlay .snowflake-popup:nth-child(odd) {
  animation-name: snowfallSwayPopup;
}

@keyframes snowfallSwayPopup {
  0% {
    transform: translateY(0) translateX(0) rotate(0deg);
    opacity: 1;
  }
  50% {
    transform: translateY(50vh) translateX(30px) rotate(180deg);
  }
  100% {
    transform: translateY(100vh) translateX(-30px) rotate(360deg);
    opacity: 0.8;
  }
}

/* Nút đóng */
.pk3-close-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  background: #ffcc00;
  color: #000;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 15px rgba(255, 204, 0, 0.8);
  transition: all 0.3s ease;
}

.pk3-close-btn:hover {
  background: #ffd700;
  transform: rotate(90deg) scale(1.1);
  box-shadow: 0 0 25px rgba(255, 204, 0, 1);
}

/* Sidebar bên trái với tabs */
.pk3-sidebar {
  width: 150px;
  background: linear-gradient(180deg, #1a1a1a 0%, #000 100%);
  display: flex;
  flex-direction: column;
  padding: 10px 0;
  gap: 8px;
  position: relative;
  overflow-y: auto;
  overflow-x: hidden;
}

.pk3-sidebar::-webkit-scrollbar {
  width: 4px;
}

.pk3-sidebar::-webkit-scrollbar-thumb {
  background: rgba(255,204,0,0.3);
  border-radius: 2px;
}

.pk3-sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.pk3-sidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(255,204,0,0.6);
}

/* Tab item */
.pk3-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 15px 10px;
  background: rgba(255, 204, 0, 0.1);
  border-left: 3px solid transparent;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.pk3-tab::before {
  content: '';
  position: absolute;
  left: -100%;
  top: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,204,0,0.2), transparent);
  transition: left 0.3s ease;
}

.pk3-tab:hover::before {
  left: 100%;
}

.pk3-tab:hover {
  background: rgba(255, 204, 0, 0.2);
  border-left-color: #ffcc00;
}

.pk3-tab.active {
  background: linear-gradient(90deg, rgba(255,204,0,0.3) 0%, rgba(255,204,0,0.1) 100%);
  border-left-color: #ffcc00;
  box-shadow: 0 0 10px rgba(255, 204, 0, 0.3);
}

.pk3-tab .tab-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.pk3-tab .tab-text {
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1.3;
  text-align: left;
}

.pk3-tab.active .tab-text {
  color: #ffcc00;
  text-shadow: 0 0 8px rgba(255, 204, 0, 0.5);
}

@keyframes shine {
  from { transform: translateX(-100%) translateY(-100%); }
  to { transform: translateX(100%) translateY(100%); }
}

/* Wrapper nội dung bên phải */
.pk3-content-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  padding: 10px;
  position: relative;
  overflow: hidden;
}

/* Panel nội dung */
.pk3-content-panel {
  display: none;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
}

.pk3-content-panel.active {
  display: flex;
}

/* Hình ảnh chính */
.pk3-main-image {
  max-width: 100%;
  max-height: 720px;
  width: auto;
  height: auto;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.3s ease, filter 0.3s ease;
  filter: drop-shadow(0 0 15px rgba(255, 204, 0, 0.3));
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

.pk3-main-image:hover {
  transform: scale(1.02);
  filter: drop-shadow(0 0 30px rgba(255, 204, 0, 0.6));
}

/* Trạng thái đang cập nhật */
.pk3-updating {
  text-align: center;
  padding: 60px 40px;
}

.pk3-updating .updating-icon {
  font-size: 80px;
  margin-bottom: 25px;
  animation: spin 2s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.pk3-updating h3 {
  color: #ffcc00;
  font-size: 32px;
  font-weight: 900;
  margin: 0 0 15px 0;
  text-transform: uppercase;
  text-shadow: 0 0 10px rgba(255, 204, 0, 0.5);
}

.pk3-updating p {
  color: #ccc;
  font-size: 18px;
  line-height: 1.6;
  margin: 0;
}

/* Responsive cho tablet */
@media (max-width: 768px) {
  .pk3-popup-container {
    flex-direction: column;
    width: 95%;
    max-width: 600px;
  }
  
  .pk3-sidebar {
    width: 100%;
    flex-direction: row;
    padding: 8px;
    gap: 6px;
  }
  
  .pk3-tab {
    flex-direction: column;
    padding: 10px 8px;
    flex: 1;
    text-align: center;
    border-left: none;
    border-top: 3px solid transparent;
  }
  
  .pk3-tab.active {
    border-top-color: #ffcc00;
    border-left: none;
  }
  
  .pk3-tab .tab-icon {
    font-size: 20px;
  }
  
  .pk3-tab .tab-text {
    font-size: 11px;
    text-align: center;
  }
  
  .pk3-content-wrapper {
    padding: 15px;
  }
  
  .pk3-main-image {
    max-height: 500px;
  }
  
  .pk3-updating {
    padding: 40px 20px;
  }
  
  .pk3-updating .updating-icon {
    font-size: 60px;
  }
  
  .pk3-updating h3 {
    font-size: 24px;
  }
  
  .pk3-updating p {
    font-size: 16px;
  }
  
  .pk3-close-btn {
    width: 36px;
    height: 36px;
    font-size: 20px;
    top: 10px;
    right: 10px;
  }
}

/* Responsive cho mobile */
@media (max-width: 480px) {
  .pk3-popup-container {
    width: 96%;
    border-radius: 15px;
  }
  
  .pk3-sidebar {
    padding: 6px;
    gap: 4px;
  }
  
  .pk3-tab {
    padding: 8px 6px;
  }
  
  .pk3-tab .tab-icon {
    font-size: 18px;
  }
  
  .pk3-tab .tab-text {
    font-size: 10px;
  }
  
  .pk3-content-wrapper {
    padding: 10px;
  }
  
  .pk3-main-image {
    max-height: 400px;
    border-radius: 8px;
  }
  
  .pk3-updating {
    padding: 30px 15px;
  }
  
  .pk3-updating .updating-icon {
    font-size: 48px;
  }
  
  .pk3-updating h3 {
    font-size: 20px;
  }
  
  .pk3-updating p {
    font-size: 14px;
  }
  
  .pk3-close-btn {
    width: 32px;
    height: 32px;
    font-size: 18px;
    top: 8px;
    right: 8px;
  }
}

/* Accessibility - giảm chuyển động */
@media (prefers-reduced-motion: reduce) {
  .pk3-popup-overlay,
  .pk3-popup-container,
  .pk3-close-btn,
  .pk3-image-wrapper img {
    animation: none;
    transition: none;
  }
  
  .pk3-sidebar::before {
    animation: none;
  }
}

/* ================= PK3 ALERT - ĐANG CẬP NHẬT ================= */
.pk3-alert-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  z-index: 10001;
  display: none;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

.pk3-alert-box {
  background: linear-gradient(135deg, #1a1a1a 0%, #000 100%);
  border: 2px solid #ffcc00;
  border-radius: 20px;
  padding: 40px 30px;
  text-align: center;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 0 40px rgba(255, 204, 0, 0.5);
  animation: bounceIn 0.5s ease;
  position: relative;
  overflow: hidden;
}

.pk3-alert-box::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent 30%, rgba(255,204,0,0.1) 50%, transparent 70%);
  animation: shine 3s infinite;
}

@keyframes bounceIn {
  0% { opacity: 0; transform: scale(0.5); }
  50% { transform: scale(1.05); }
  100% { opacity: 1; transform: scale(1); }
}

.pk3-alert-icon {
  font-size: 64px;
  margin-bottom: 20px;
  animation: spin 2s linear infinite;
  position: relative;
  z-index: 1;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.pk3-alert-box h3 {
  color: #ffcc00;
  font-size: 28px;
  font-weight: 900;
  margin: 0 0 15px 0;
  text-transform: uppercase;
  text-shadow: 0 0 10px rgba(255, 204, 0, 0.5);
  position: relative;
  z-index: 1;
}

.pk3-alert-box p {
  color: #ccc;
  font-size: 16px;
  line-height: 1.6;
  margin: 0 0 30px 0;
  position: relative;
  z-index: 1;
}

.pk3-alert-btn {
  background: linear-gradient(135deg, #ffcc00 0%, #ff9900 100%);
  color: #000;
  border: none;
  border-radius: 10px;
  padding: 12px 40px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  text-transform: uppercase;
  box-shadow: 0 4px 15px rgba(255, 204, 0, 0.4);
  transition: all 0.3s ease;
  position: relative;
  z-index: 1;
}

.pk3-alert-btn:hover {
  background: linear-gradient(135deg, #ffd700 0%, #ffaa00 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 204, 0, 0.6);
}

.pk3-alert-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(255, 204, 0, 0.4);
}

/* Responsive cho mobile */
@media (max-width: 480px) {
  .pk3-alert-box {
    padding: 30px 20px;
    max-width: 320px;
  }
  
  .pk3-alert-icon {
    font-size: 48px;
    margin-bottom: 15px;
  }
  
  .pk3-alert-box h3 {
    font-size: 22px;
    margin-bottom: 12px;
  }
  
  .pk3-alert-box p {
    font-size: 14px;
    margin-bottom: 25px;
  }
  
  .pk3-alert-btn {
    padding: 10px 30px;
    font-size: 14px;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  .pk3-alert-overlay,
  .pk3-alert-box,
  .pk3-alert-icon {
    animation: none;
  }
  
  .pk3-alert-box::before {
    animation: none;
  }
}

/* ================= GAMESHOW CONFIRM POPUP ================= */
.gameshow-confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(8px);
  z-index: 10002;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

.gameshow-confirm-box {
  background: linear-gradient(135deg, #1a1a1a 0%, #000 100%);
  border: 3px solid #ffcc00;
  border-radius: 25px;
  padding: 50px 40px;
  text-align: center;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 0 50px rgba(255, 204, 0, 0.6);
  animation: bounceIn 0.5s ease;
  position: relative;
  overflow: hidden;
}

.gameshow-confirm-box::before {
  content: '🎄';
  position: absolute;
  font-size: 150px;
  opacity: 0.05;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(1.1); }
}

.gameshow-confirm-box h2 {
  color: #ffcc00;
  font-size: 32px;
  font-weight: 900;
  margin: 0 0 20px 0;
  text-transform: uppercase;
  text-shadow: 0 0 15px rgba(255, 204, 0, 0.7);
  position: relative;
  z-index: 1;
}

.gameshow-confirm-box p {
  color: #fff;
  font-size: 20px;
  line-height: 1.6;
  margin: 0 0 35px 0;
  position: relative;
  z-index: 1;
  font-weight: 600;
}

.confirm-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.confirm-buttons button {
  padding: 15px 45px;
  font-size: 18px;
  font-weight: bold;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  text-transform: uppercase;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.btn-yes {
  background: linear-gradient(135deg, #00ff00 0%, #00cc00 100%);
  color: #000;
}

.btn-yes:hover {
  background: linear-gradient(135deg, #00ff33 0%, #00dd00 100%);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 255, 0, 0.5);
}

.btn-no {
  background: linear-gradient(135deg, #ff3333 0%, #cc0000 100%);
  color: #fff;
}

.btn-no:hover {
  background: linear-gradient(135deg, #ff5555 0%, #dd0000 100%);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(255, 0, 0, 0.5);
}

/* ================= GAMESHOW LOGIN POPUP ================= */
.gameshow-login-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
  z-index: 10003;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

.gameshow-login-box {
  background: linear-gradient(135deg, #1a1a1a 0%, #000 100%);
  border: 3px solid #ffcc00;
  border-radius: 25px;
  padding: 50px 40px;
  text-align: center;
  max-width: 550px;
  width: 90%;
  box-shadow: 0 0 60px rgba(255, 204, 0, 0.7);
  animation: slideUp 0.5s ease;
  position: relative;
  overflow: hidden;
}

.gameshow-login-box::before {
  content: '🎮';
  position: absolute;
  font-size: 180px;
  opacity: 0.05;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-15deg);
}

.gameshow-close-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  background: #ffcc00;
  color: #000;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 22px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(255, 204, 0, 0.5);
  z-index: 1;
}

.gameshow-close-btn:hover {
  background: #ffd700;
  transform: rotate(90deg) scale(1.1);
  box-shadow: 0 4px 15px rgba(255, 204, 0, 0.7);
}

.gameshow-login-box h2 {
  color: #ffcc00;
  font-size: 28px;
  font-weight: 900;
  margin: 0 0 15px 0;
  text-transform: uppercase;
  text-shadow: 0 0 15px rgba(255, 204, 0, 0.7);
  position: relative;
  z-index: 1;
}

.gameshow-login-box p {
  color: #ccc;
  font-size: 16px;
  line-height: 1.6;
  margin: 0 0 30px 0;
  position: relative;
  z-index: 1;
}

.login-form {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.login-form input {
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 204, 0, 0.3);
  border-radius: 10px;
  padding: 15px 20px;
  font-size: 16px;
  color: #fff;
  text-align: center;
  transition: all 0.3s ease;
}

.login-form input:focus {
  outline: none;
  border-color: #ffcc00;
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 20px rgba(255, 204, 0, 0.3);
}

.login-form input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.login-form button {
  background: linear-gradient(135deg, #ffcc00 0%, #ff9900 100%);
  color: #000;
  border: none;
  border-radius: 12px;
  padding: 15px 40px;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  text-transform: uppercase;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(255, 204, 0, 0.4);
}

.login-form button:hover {
  background: linear-gradient(135deg, #ffd700 0%, #ffaa00 100%);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(255, 204, 0, 0.6);
}

.login-form button:active {
  transform: translateY(0);
}

#gameshowLoginMsg {
  margin-top: 20px;
  padding: 15px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: bold;
  text-align: center;
  min-height: 20px;
  position: relative;
  z-index: 1;
}

#gameshowLoginMsg.success {
  background: rgba(0, 255, 0, 0.1);
  border: 2px solid #00ff00;
  color: #00ff00;
  animation: successPulse 0.5s ease;
}

#gameshowLoginMsg.error {
  background: rgba(255, 0, 0, 0.1);
  border: 2px solid #ff3333;
  color: #ff3333;
  animation: shake 0.5s ease;
}

@keyframes successPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-10px); }
  75% { transform: translateX(10px); }
}

/* Responsive for gameshow popups */
@media (max-width: 768px) {
  .gameshow-confirm-box,
  .gameshow-login-box {
    padding: 35px 25px;
    max-width: 90%;
  }
  
  .gameshow-confirm-box h2 {
    font-size: 24px;
  }
  
  .gameshow-confirm-box p {
    font-size: 16px;
  }
  
  .confirm-buttons {
    flex-direction: column;
    gap: 15px;
  }
  
  .confirm-buttons button {
    width: 100%;
    padding: 12px 30px;
    font-size: 16px;
  }
  
  .gameshow-login-box h2 {
    font-size: 22px;
  }
  
  .gameshow-login-box p {
    font-size: 14px;
  }
  
  .login-form input,
  .login-form button {
    font-size: 15px;
    padding: 12px 18px;
  }
}

@media (max-width: 480px) {
  .gameshow-confirm-box::before,
  .gameshow-login-box::before {
    font-size: 100px;
  }
  
  .gameshow-confirm-box {
    padding: 30px 20px;
  }
  
  .gameshow-confirm-box h2 {
    font-size: 20px;
  }
  
  .gameshow-login-box {
    padding: 30px 20px;
  }
  
  .gameshow-close-btn {
    width: 35px;
    height: 35px;
    font-size: 18px;
  }
}

/* ================= MISSION POPUP ================= */
.mission-popup-overlay{position:fixed;inset:0;background:rgba(0,0,0,0.95);backdrop-filter:blur(10px);z-index:10004;display:flex;align-items:center;justify-content:center;animation:fadeIn .3s ease}
.mission-popup-box{background:linear-gradient(135deg,#1a1a1a 0%,#000 100%);border:3px solid #ffcc00;border-radius:25px;padding:40px 30px;max-width:900px;width:95%;max-height:85vh;box-shadow:0 0 60px rgba(255,204,0,0.8);animation:slideUp .5s ease;position:relative;overflow:hidden}
.mission-popup-box::before{content:'🎯';position:absolute;font-size:200px;opacity:0.03;top:50%;left:50%;transform:translate(-50%,-50%) rotate(-10deg)}
.mission-close-btn{position:absolute;top:15px;right:15px;background:#ffcc00;color:#000;border:none;border-radius:50%;width:45px;height:45px;font-size:24px;font-weight:bold;cursor:pointer;transition:all .3s ease;box-shadow:0 2px 10px rgba(255,204,0,0.5);z-index:1}
.mission-close-btn:hover{background:#ffd700;transform:rotate(90deg) scale(1.1);box-shadow:0 4px 15px rgba(255,204,0,0.8)}
.mission-refresh-btn{position:absolute;top:15px;right:70px;background:linear-gradient(135deg,#00c853,#00e676);color:white;border:none;border-radius:50%;width:45px;height:45px;font-size:22px;cursor:pointer;transition:all .3s ease;box-shadow:0 2px 10px rgba(0,200,83,0.5);z-index:1}
.mission-refresh-btn:hover{background:linear-gradient(135deg,#00e676,#69f0ae);transform:rotate(180deg) scale(1.1);box-shadow:0 4px 15px rgba(0,200,83,0.8)}
.mission-refresh-btn:active{animation:spin .6s ease-in-out}
@keyframes spin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}
.mission-popup-box h2{color:#ffcc00;font-size:28px;font-weight:900;margin:0 0 10px 0;text-transform:uppercase;text-align:center;text-shadow:0 0 20px rgba(255,204,0,0.8);position:relative;z-index:1}
.mission-subtitle{color:#ccc;font-size:14px;text-align:center;margin:0 0 15px 0;position:relative;z-index:1}
.mission-tabs{display:flex;gap:10px;margin-bottom:20px;justify-content:center;position:relative;z-index:1}
.mission-tab{flex:1;padding:12px 20px;background:rgba(255,255,255,0.05);color:#ccc;border:2px solid rgba(255,204,0,0.3);border-radius:10px;font-size:16px;font-weight:600;cursor:pointer;transition:all .3s ease;text-transform:uppercase}
.mission-tab:hover{background:rgba(255,204,0,0.1);border-color:rgba(255,204,0,0.5);color:#ffcc00}
.mission-tab.active{background:linear-gradient(135deg,#ffcc00,#ffd700);color:#000;border-color:#ffcc00;box-shadow:0 4px 15px rgba(255,204,0,0.5);font-weight:700}
.mission-scroll{max-height:55vh;overflow-y:auto;padding-right:10px;position:relative;z-index:1}
.mission-scroll::-webkit-scrollbar{width:4px}
.mission-scroll::-webkit-scrollbar-thumb{background:rgba(255,204,0,0.3);border-radius:2px}
.mission-scroll::-webkit-scrollbar-track{background:transparent}
.mission-scroll::-webkit-scrollbar-thumb:hover{background:rgba(255,204,0,0.6)}
.mission-item{background:rgba(255,255,255,0.05);border:2px solid rgba(255,204,0,0.3);border-radius:15px;padding:15px;margin-bottom:12px;display:flex;align-items:center;justify-content:space-between;transition:all .3s ease;position:relative;overflow:hidden}
.mission-item:hover{border-color:rgba(255,204,0,0.6);background:rgba(255,255,255,0.08);transform:translateX(5px)}
.mission-item.claimed{opacity:0.6;border-color:rgba(255,255,255,0.2);background:rgba(0,0,255,0.1)}
.mission-item.ready{border-color:#00ff00;background:rgba(0,255,0,0.08);box-shadow:0 0 20px rgba(0,255,0,0.3)}
.mission-info{flex:1}
.mission-level{color:#ffcc00;font-size:18px;font-weight:bold;margin-bottom:5px}
.mission-requirement{color:#fff;font-size:15px;margin-bottom:3px}
.mission-reward{color:#0f0;font-size:16px;font-weight:bold}
.mission-btn{padding:12px 30px;font-size:16px;font-weight:bold;border:none;border-radius:10px;cursor:pointer;text-transform:uppercase;transition:all .3s ease;min-width:120px}
.mission-btn.locked{background:linear-gradient(135deg,#666 0%,#444 100%);color:#999;cursor:not-allowed}
.mission-btn.ready{background:linear-gradient(135deg,#00ff00 0%,#00cc00 100%);color:#000;animation:glowGreen 1.5s infinite}
.mission-btn.ready:hover{transform:translateY(-3px) scale(1.05);box-shadow:0 6px 20px rgba(0,255,0,0.6)}
.mission-btn.claimed{background:linear-gradient(135deg,#0088ff 0%,#0066cc 100%);color:#fff;cursor:default}
@keyframes glowGreen{0%,100%{box-shadow:0 0 10px rgba(0,255,0,0.5)}50%{box-shadow:0 0 25px rgba(0,255,0,0.8)}}
.mission-user-msg{margin-top:20px;padding:15px;border-radius:10px;font-size:16px;font-weight:bold;text-align:center;min-height:20px;position:relative;z-index:1}
.mission-user-msg.success{background:rgba(0,255,0,0.15);border:2px solid #00ff00;color:#00ff00;animation:successPulse .5s ease}
.mission-user-msg.error{background:rgba(255,0,0,0.15);border:2px solid #ff3333;color:#ff3333;animation:shake .5s ease}

/* Mission Description Section */
.mission-description-section{margin-top:25px;padding:20px;background:linear-gradient(135deg,rgba(255,204,0,0.08),rgba(255,140,0,0.05));border:2px solid rgba(255,204,0,0.3);border-radius:15px;box-shadow:0 4px 15px rgba(0,0,0,0.3),inset 0 1px 0 rgba(255,255,255,0.1);position:relative;overflow:hidden}
.mission-description-section::before{content:'';position:absolute;top:-50%;right:-50%;width:200%;height:200%;background:radial-gradient(circle,rgba(255,204,0,0.05) 0%,transparent 70%);animation:rotateGlow 20s linear infinite;pointer-events:none}
.mission-desc-header{display:flex;align-items:center;gap:12px;margin-bottom:20px;padding-bottom:15px;border-bottom:2px solid rgba(255,204,0,0.3)}
.mission-desc-header .mission-desc-icon{font-size:32px;animation:bounce 2s ease-in-out infinite}
.mission-desc-header h3{margin:0;font-size:20px;font-weight:800;background:linear-gradient(135deg,#ffcc00,#ffd700,#ffaa00);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text;text-transform:uppercase;letter-spacing:0.5px;text-shadow:0 2px 10px rgba(255,204,0,0.3)}
.mission-desc-content{position:relative;z-index:1}
.mission-desc-item{margin-bottom:18px;padding:15px;background:rgba(0,0,0,0.4);border-left:4px solid #ffcc00;border-radius:8px;transition:all 0.3s ease}
.mission-desc-item:hover{transform:translateX(5px);background:rgba(0,0,0,0.6);border-left-color:#ffd700;box-shadow:0 4px 12px rgba(255,204,0,0.2)}
.mission-desc-item.warning{border-left-color:#ff6b00;background:rgba(255,107,0,0.1)}
.mission-desc-item.warning:hover{border-left-color:#ff8800;background:rgba(255,107,0,0.15)}
.mission-desc-label{display:flex;align-items:center;gap:10px;margin-bottom:10px}
.mission-desc-label .icon{font-size:22px;animation:pulse 2s ease-in-out infinite}
.mission-desc-label strong{font-size:16px;color:#ffcc00;font-weight:700;text-transform:uppercase;letter-spacing:0.5px}
.mission-desc-item p{margin:0;color:#ddd;font-size:14px;line-height:1.7;text-align:justify}
.mission-desc-item p strong{color:#ffd700;font-weight:700}
.mission-desc-item p em{color:#aaa;font-style:italic;display:block;margin-top:8px;font-size:13px;padding-left:15px;border-left:2px solid rgba(255,204,0,0.3)}
.mission-desc-footer{margin-top:20px;padding-top:15px;border-top:2px solid rgba(255,204,0,0.2)}
.mission-event-time{display:flex;align-items:center;gap:10px;padding:12px;background:linear-gradient(135deg,rgba(255,204,0,0.15),rgba(255,140,0,0.1));border-radius:8px;border:1px solid rgba(255,204,0,0.4)}
.mission-event-time .icon{font-size:24px}
.mission-event-time strong{color:#ffcc00;font-weight:700;margin-right:8px}
.mission-event-time{color:#fff;font-size:14px}

@keyframes rotateGlow{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}
@keyframes bounce{0%,100%{transform:translateY(0)}50%{transform:translateY(-5px)}}
@keyframes pulse{0%,100%{transform:scale(1)}50%{transform:scale(1.1)}}

.mission-history-table{width:100%;border-collapse:collapse;margin-top:10px}
.mission-history-table th{background:linear-gradient(135deg,#ffcc00,#ffd700);color:#000;padding:12px 8px;font-size:14px;font-weight:700;text-transform:uppercase;border-bottom:2px solid #ffcc00}
.mission-history-table td{padding:12px 8px;border-bottom:1px solid rgba(255,255,255,0.1);color:#ddd;font-size:14px}
.mission-history-table tr:hover{background:rgba(255,204,0,0.05)}
.mission-history-empty{text-align:center;padding:40px 20px;color:#999;font-size:16px}
.mission-history-level{display:inline-block;background:linear-gradient(135deg,#ff6b00,#ff8800);color:#fff;padding:4px 10px;border-radius:12px;font-weight:700;font-size:13px}
.mission-history-reward{color:#00ff00;font-weight:700;font-size:16px}
@media (max-width:768px){.mission-popup-box{padding:30px 20px;max-width:95%}.mission-popup-box h2{font-size:22px}.mission-item{flex-direction:column;align-items:flex-start;gap:12px}.mission-btn{width:100%}.mission-desc-header h3{font-size:17px}.mission-desc-header .mission-desc-icon{font-size:26px}.mission-desc-item{padding:12px}.mission-desc-label strong{font-size:14px}.mission-desc-item p{font-size:13px}.mission-event-time{flex-direction:column;align-items:flex-start;gap:8px;font-size:13px}}
@media (max-width:480px){.mission-popup-box::before{font-size:80px;opacity:0.02}.mission-popup-box{padding:20px 12px;max-width:98%;width:98%;max-height:92vh;border-width:2px}.mission-popup-box h2{font-size:20px;margin-bottom:8px}.mission-subtitle{font-size:12px;margin-bottom:12px}.mission-close-btn{width:35px;height:35px;font-size:18px;top:10px;right:10px}.mission-refresh-btn{width:35px;height:35px;font-size:16px;right:52px;top:10px}.mission-tabs{gap:6px;margin-bottom:15px}.mission-tab{padding:8px 12px;font-size:13px;border-radius:8px}.mission-scroll{max-height:60vh;padding-right:5px}.mission-scroll::-webkit-scrollbar{width:5px}.mission-item{padding:12px;margin-bottom:10px;gap:10px}.mission-level{font-size:15px}.mission-requirement{font-size:13px}.mission-reward{font-size:14px}.mission-btn{padding:10px 20px;font-size:14px;min-width:100px}.mission-history-table{font-size:11px}.mission-history-table th{padding:8px 4px;font-size:11px}.mission-history-table td{padding:8px 4px;font-size:11px}.mission-history-level{padding:3px 8px;font-size:11px}.mission-history-reward{font-size:13px}.mission-user-msg{padding:12px;font-size:14px;margin-top:15px}}
@media (max-width:375px){.mission-popup-box{padding:18px 10px}.mission-popup-box h2{font-size:18px}.mission-tab{padding:7px 10px;font-size:12px}.mission-close-btn,.mission-refresh-btn{width:32px;height:32px}.mission-refresh-btn{right:48px;font-size:14px}.mission-close-btn{font-size:16px}.mission-item{padding:10px}.mission-level{font-size:14px}.mission-requirement,.mission-reward{font-size:12px}.mission-btn{padding:8px 16px;font-size:13px;min-width:90px}.mission-history-table th,.mission-history-table td{padding:6px 3px;font-size:10px}}

/* 🎆 Countdown Header (Bên ngoài bang.png) */
.countdown-header {
  text-align: center;
  max-width: 800px;
  margin: 20px auto 15px;
}
.countdown-header #phaseTitle {
  color: #ffcc00;
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 10px;
  text-shadow: 0 0 15px rgba(255,204,0,0.6), 2px 2px 6px rgba(0,0,0,0.9);
  animation: pulse 2s ease-in-out infinite;
}
.countdown-header .phase-subtitle {
  color: #ffffff;
  font-size: 15px;
  margin: 8px 0;
  text-shadow: 0 0 10px rgba(0,0,0,0.9), 2px 2px 4px rgba(0,0,0,1);
  font-weight: 500;
}
.countdown-header .next-milestone {
  color: #88aaff;
  font-size: 14px;
  margin-top: 8px;
  text-shadow: 0 0 10px rgba(0,0,0,0.9), 2px 2px 4px rgba(0,0,0,1);
  font-weight: 500;
}

/* 🎨 Countdown Section (Bang.png container) */
.countdown-section {
  position: relative;
  margin: 0 auto;
  max-width: 750px;
  aspect-ratio: 920 / 720;
  background: url('../assets/bang.png') center center / contain no-repeat;
  background-size: 100% 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}
.countdown-inner {
  width: 85%;
  padding: 0 5%;
  display: flex;
  flex-direction: column;
  gap: 25px;
  align-items: center;
}
/* Progress Wrapper */
.progress-wrapper {
  width: 100%;
  max-width: 600px;
}
.progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: #fff;
  margin-bottom: 8px;
  text-shadow: 0 0 8px rgba(0,0,0,0.9), 2px 2px 4px rgba(0,0,0,1);
  font-weight: 600;
}
.progress-bar-bg {
  background: rgba(10,5,0,0.85);
  border: 2px solid rgba(255,204,0,0.7);
  border-radius: 10px;
  height: 18px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 0 15px rgba(255,204,0,0.5), inset 0 0 10px rgba(0,0,0,0.6);
}
.progress-fill {
  background: linear-gradient(90deg,#ffcc00,#ffaa00);
  width: 0%;
  height: 100%;
  transition: width .6s ease;
  box-shadow: 0 0 25px rgba(255,204,0,0.9);
}

/* Countdown Timer */
.countdown-timer {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  width: 100%;
  max-width: 600px;
}
.countdown-timer div {
  background: rgba(20, 10, 0, 0.85);
  border: 2px solid rgba(255, 204, 0, 0.7);
  border-radius: 12px;
  padding: 18px 8px;
  width: 100%;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(5px);
  box-shadow: 0 0 20px rgba(255, 204, 0, 0.4), inset 0 0 15px rgba(255, 204, 0, 0.1);
}

/* Responsive for Countdown - Tablet */
@media (max-width: 768px) {
  .countdown-header {
    max-width: 90%;
    margin: 15px auto 12px;
  }
  .countdown-header #phaseTitle { font-size: 20px; }
  .countdown-header .phase-subtitle { font-size: 12px; }
  .countdown-header .next-milestone { font-size: 12px; }
  
  .countdown-section {
    max-width: 85%;
  }
  .countdown-inner {
    width: 88%;
    gap: 20px;
  }
  .progress-labels { font-size: 12px; }
  .progress-bar-bg { height: 16px; }
  
  .countdown-timer { 
    gap: 15px;
  }
  .countdown-timer div {
    padding: 14px 6px;
  }
  .countdown-timer span { font-size: 26px; }
  .countdown-timer label { font-size: 12px; }
}

/* Responsive for Countdown - Mobile */
@media (max-width: 480px) {
  .countdown-header {
    max-width: 95%;
    margin: 12px auto 10px;
  }
  .countdown-header #phaseTitle { font-size: 18px; }
  .countdown-header .phase-subtitle { font-size: 11px; margin: 4px 0; }
  .countdown-header .next-milestone { font-size: 11px; margin-top: 6px; }
  
  .countdown-section {
    max-width: 98%;
  }
  .countdown-inner {
    width: 92%;
    gap: 15px;
  }
  .progress-labels { font-size: 11px; margin-bottom: 6px; }
  .progress-bar-bg { height: 14px; }
  
  .countdown-timer { 
    gap: 10px;
  }
  .countdown-timer div {
    padding: 10px 4px;
    border-radius: 8px;
  }
  .countdown-timer span { font-size: 20px; }
  .countdown-timer label { font-size: 10px; }
}

/* Responsive for Countdown - Small Mobile */
@media (max-width: 375px) {
  .countdown-header {
    max-width: 98%;
    margin: 10px auto 8px;
  }
  .countdown-header #phaseTitle { font-size: 16px; }
  .countdown-header .phase-subtitle { font-size: 10px; margin: 3px 0; }
  .countdown-header .next-milestone { font-size: 10px; margin-top: 5px; }
  
  .countdown-section {
    max-width: 100%;
  }
  .countdown-inner {
    width: 95%;
    gap: 12px;
  }
  .progress-labels { font-size: 10px; margin-bottom: 5px; }
  .progress-bar-bg { height: 12px; border-width: 1px; }
  
  .countdown-timer { 
    gap: 8px;
  }
  .countdown-timer div {
    padding: 8px 3px;
    border-radius: 6px;
    border-width: 1px;
  }
  .countdown-timer span { font-size: 18px; }
  .countdown-timer label { font-size: 9px; }
}
.countdown-timer div:hover {
  transform: scale(1.08);
  border-color: #ffcc00;
}
.countdown-timer span {
  font-size: 28px;
  color: #ffcc00;
  font-weight: 700;
  display: block;
}
.countdown-timer label {
  color: #aaa;
  font-size: 13px;
}
#fireworksCanvas {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
}


/* ==================== NEXT SECTION ==================== */


/* Overlay container for red envelope rain */
:root { --lixi-w: 64px; --lixi-h: 88px; }
#lixiRain {
  position: fixed;
  pointer-events: none; /* allow clicks to pass except on envelopes */
  inset: 0;
  z-index: 3000; /* above content, below modals like diemdanh (z 12000) */
}
.lixi-envelope {
  position: absolute;
  top: -10%;
  width: var(--lixi-w); height: var(--lixi-h);
  background: url('../assets/lixi.png') center/contain no-repeat;
  animation: lixiFall linear forwards;
  pointer-events: auto; /* clickable */
  cursor: pointer;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.4));
}
@media (max-width:768px){ :root{ --lixi-w: 52px; --lixi-h: 72px; } }
@keyframes lixiFall {
  0% { transform: translateY(-120%) rotate(0deg); opacity: 0.9; }
  100% { transform: translateY(120vh) rotate(180deg); opacity: 1; }
}

/* Popup result for lixi */
#lixiPopup {
  position: fixed; inset: 0; background: rgba(0,0,0,0.65);
  display: none; align-items: center; justify-content: center; z-index: 11000;
}
#lixiPopup .box {
  background: #111; border: 2px solid #ffcc00; border-radius: 14px; padding: 22px; width: 92%; max-width: 420px; text-align: center;
  box-shadow: 0 0 25px rgba(255,204,0,0.35);
}
#lixiPopup h3 { color:#ffcc00; margin: 6px 0 10px; }
#lixiPopup .prize { color:#fff; font-size: 18px; margin-bottom: 14px; }
#lixiClose { background:#ffcc00; color:#000; border:none; border-radius:8px; padding:8px 16px; font-weight:700; cursor:pointer; }
/* Thông báo Lì xì: modal kiểu toast ở giữa màn hình */
#lixiToastBackdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.35); opacity: 0; pointer-events: none; z-index: 10980; transition: opacity .25s ease; display: none; }
#lixiToastBackdrop.show { display: block; opacity: 1; pointer-events: auto; }
#lixiToast {
  position: fixed; top: 50%; left: 50%;
  transform: translate(-50%, -40%) scale(0.96);
  background: linear-gradient(180deg, rgba(30,30,30,.98), rgba(20,20,20,.98));
  border: 2px solid #ffcc00; color:#fff;
  padding: clamp(14px, 4vw, 24px);
  border-radius: 16px; z-index: 10990; display: none;
  box-shadow: 0 12px 30px rgba(0,0,0,0.45), 0 0 24px rgba(255,204,0,0.25);
  text-align: center;
  max-width: min(92vw, 520px);
  width: auto;
  font-size: clamp(18px, 4.6vw, 28px);
  font-weight: 800;
  line-height: 1.25;
}
#lixiToast .sub { margin-top: 6px; font-size: clamp(12px, 3.2vw, 14px); font-weight: 500; opacity: .9; }
.lixiToast-show { animation: lixiToastIn .28s ease-out forwards; }
.lixiToast-hide { animation: lixiToastOut .22s ease-in forwards; }
@keyframes lixiToastIn { from { opacity:0; transform: translate(-50%, -42%) scale(0.96);} to { opacity:1; transform: translate(-50%, -50%) scale(1);} }
@keyframes lixiToastOut { from { opacity:1; transform: translate(-50%, -50%) scale(1);} to { opacity:0; transform: translate(-50%, -60%) scale(0.98);} }


/* ==================== NEXT SECTION ==================== */


/* Nút điều khiển nhạc */
.music-control {
  position: fixed;
  bottom: 30px;
  left: 30px;  /* Chuyển sang trái */
  z-index: 10500;  /* Cao hơn mọi thứ */
}

.music-control button {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffcc00, #ff9900);
  border: 3px solid rgba(255, 204, 0, 0.5);
  color: #000;
  font-size: 28px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(255, 204, 0, 0.4),
              0 0 30px rgba(255, 204, 0, 0.2);
  transition: all 0.3s ease;
  animation: musicPulse 2s ease-in-out infinite;
}

.music-control button:hover {
  transform: scale(1.1) rotate(15deg);
  box-shadow: 0 6px 20px rgba(255, 204, 0, 0.6),
              0 0 40px rgba(255, 204, 0, 0.4);
}

.music-control button.muted {
  background: linear-gradient(135deg, #666, #444);
  border-color: rgba(100, 100, 100, 0.5);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  animation: none;
}

@keyframes musicPulse {
  0%, 100% {
    box-shadow: 0 4px 15px rgba(255, 204, 0, 0.4),
                0 0 30px rgba(255, 204, 0, 0.2);
  }
  50% {
    box-shadow: 0 6px 20px rgba(255, 204, 0, 0.6),
                0 0 40px rgba(255, 204, 0, 0.4);
  }
}

/* Responsive */
@media (max-width: 768px) {
  .music-control {
    bottom: 20px;
    left: 20px;  /* Giữ bên trái */
  }
  
  .music-control button {
    width: 50px;
    height: 50px;
    font-size: 24px;
  }
}

@media (max-width: 480px) {
  .music-control {
    bottom: 15px;
    left: 15px;
  }
  
  .music-control button {
    width: 45px;
    height: 45px;
    font-size: 20px;
    border-width: 2px;
  }
}

@media (max-width: 375px) {
  .music-control {
    bottom: 12px;
    left: 12px;
  }
  
  .music-control button {
    width: 40px;
    height: 40px;
    font-size: 18px;
    border-width: 2px;
  }
}

/* ==========================================
   🎄 POPUP PHÓNG TO HÌNH SỰ KIỆN NOEL
   ========================================== */

.sukien-detail-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 99999;
  backdrop-filter: blur(10px);
  animation: fadeIn 0.3s ease;
}

.sukien-detail-container {
  position: relative;
  max-width: 95%;
  max-height: 95vh;
  display: flex;
  justify-content: center;
  align-items: center;
  animation: zoomIn 0.4s ease;
}

.sukien-detail-image {
  max-width: 100%;
  max-height: 95vh;
  width: auto;
  height: auto;
  border-radius: 15px;
  box-shadow: 0 10px 50px rgba(255, 215, 0, 0.4);
  border: 3px solid rgba(255, 215, 0, 0.3);
}

.sukien-close-btn {
  position: absolute;
  top: -50px;
  right: 0;
  background: linear-gradient(135deg, #ff4444, #cc0000);
  color: white;
  border: none;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  z-index: 100000;
  box-shadow: 0 4px 15px rgba(255, 68, 68, 0.5);
  transition: all 0.3s ease;
  display: flex;
  justify-content: center;
  align-items: center;
}

.sukien-close-btn:hover {
  background: linear-gradient(135deg, #ff6666, #ff0000);
  transform: rotate(90deg) scale(1.1);
  box-shadow: 0 6px 20px rgba(255, 68, 68, 0.7);
}

/* Responsive cho tablet */
@media (max-width: 768px) {
  .sukien-detail-container {
    max-width: 90%;
    max-height: 90vh;
  }
  
  .sukien-detail-image {
    max-height: 90vh;
    border-radius: 12px;
    border-width: 2px;
  }
  
  .sukien-close-btn {
    top: -45px;
    width: 42px;
    height: 42px;
    font-size: 22px;
  }
}

/* Responsive cho mobile */
@media (max-width: 480px) {
  .sukien-detail-container {
    max-width: 95%;
    max-height: 85vh;
  }
  
  .sukien-detail-image {
    max-height: 85vh;
    border-radius: 10px;
    border-width: 2px;
  }
  
  .sukien-close-btn {
    top: 10px;
    right: 10px;
    width: 38px;
    height: 38px;
    font-size: 20px;
  }
}

/* Responsive cho màn hình rất nhỏ */
@media (max-width: 375px) {
  .sukien-detail-container {
    max-width: 98%;
    max-height: 80vh;
  }
  
  .sukien-detail-image {
    max-height: 80vh;
    border-radius: 8px;
  }
  
  .sukien-close-btn {
    top: 5px;
    right: 5px;
    width: 35px;
    height: 35px;
    font-size: 18px;
  }
}

