@charset "UTF-8";
@import url("vn_font_global.css");

/* CSS Document */
body{
  margin:0;
  background: none;   /* ✅ để slideshow.php quyết định background theo slot */
  overflow:hidden;
  font-family: 'Be Vietnam Pro', Arial, 'Helvetica Neue', Helvetica, sans-serif !important;
  min-height:100vh;
}
#bg-overlay{
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

#main-bg {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;

    object-fit: contain;       /* ĐẢM BẢO HIỂN THỊ ĐẦY ĐỦ, KHÔNG CẮT */
    object-position: center center;

    opacity: 2.78;
    z-index: 1;
    pointer-events: none;
}

    #playBtn {
        position:fixed; left:50%; top:50%; 
        transform:translate(-50%,-50%);
        z-index:100; background:#CCFF66;
        border:none; border-radius:100px;
        box-shadow:0 8px 32px #0004;
        padding:22px 46px;
        font-size:1.7rem;
        font-weight:800;
        color:#da373c;
        letter-spacing:3px;
        cursor:pointer;
        transition: box-shadow .2s;
        display: flex;
        align-items: center;
        gap: 20px;
        font-family: 'Bungee', 'Be Vietnam Pro', Arial, sans-serif !important;
    }
    #playBtn:hover { box-shadow:0 4px 18px #0007; background:#f9f5fa;}
    #slideshow-wrap { position:fixed; left:0;top:0;width:100vw;height:100vh;overflow:hidden;z-index:2;}
    .photo-fly { 
        position:absolute; 
        border-radius:11px; 
        box-shadow:0 3px 10px #0004; 
        border:0.8px solid #fff; 
        transition:all 0.72s cubic-bezier(.22,.61,.36,1), opacity 0.8s;
    }
.photo-fly:hover {
    z-index: 10;
    transform: scale(9.5);
    box-shadow: 0 2px 10px #333;
}
/* Chỉ chỉnh dòng chữ cảm ơn — không ảnh hưởng phần ảnh */
#msg-congrats{
  position: fixed;
  left: 5px;
  right: 5px;
  top: auto !important;              /* bỏ cố định giữa màn hình */
  bottom: clamp(22px, 12vh, 84px);    /* neo gần đáy, cách linh hoạt theo viewport */
  z-index: 50;
  text-align: center;

  font-size: 3.0vw;
  font-weight: 900;
  color: #FFFF00;
  text-shadow: 0 6px 24px #000a, 0 2px 8px #f357;

  opacity: 0;
  transform: scale(0.9);
  transition: all 1.1s cubic-bezier(.1,.91,.12,1.15);
  letter-spacing: 3px;
  font-family: 'Pacifico', 'Bungee', cursive, sans-serif !important;

  pointer-events: none;               /* không chặn click vào các phần khác */
}

/* Responsive nhỏ: chữ to hơn chút nhưng vẫn neo đáy */
@media (max-width:700px){
  #msg-congrats{ font-size: 7vw; bottom: clamp(12px, 7vh, 72px); }
}

#backHomeBtn {
    position: fixed;
    top: 24px;
    left: 30px;
    z-index: 1001;
    display: flex;
    align-items: center;
    gap: 5px;
    background: linear-gradient(90deg, #d33439 60%, #e75b2d 100%);
    color: #fff !important;
    font-family: 'Be Vietnam Pro', Arial, sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    padding: 10px 22px 10px 16px;
    border-radius: 32px;
    box-shadow: 0 4px 16px #0004;
    text-decoration: none !important;
    transition: background 0.18s, box-shadow 0.18s, transform .12s;
}
#backHomeBtn:hover {
    background: linear-gradient(90deg, #e75b2d 0%, #d33439 100%);
    box-shadow: 0 2px 8px #0006;
    transform: translateY(-2px) scale(1.05);
}
@media (max-width:700px){
    #backHomeBtn {
        top: 8px;
        left: 8px;
        font-size: 1rem;
        padding: 7px 14px 7px 10px;
    }
}
#topbar-nav {
    position: fixed;
    left: 0; top: 0;
    width: 100vw;
    z-index: 1000;
    display: flex;
    align-items: center;
   
    box-shadow: 0 2px 16px #2463 0 1px 0 #e3e7ef;
    padding: 7px 18px 7px 14px;
    min-height: 58px;
    gap: 18px;
}
#logo-topbar {
    height: 58px;
    width: auto;
    display: block;
}
.btn-home {
	background: #CCFF00;
    font-weight: 700;
    font-size: 1.1rem;
    border-radius: 24px;
    padding: 8px 22px 8px 17px;
    box-shadow: 0 2px 8px #0031;
    transition: background .18s;
    margin-left: 7px;
	text-decoration: none;
}
.btn-home:hover {
    background: #e3e9f7;
    color: #125a98;
    text-decoration: none;
}
@media (max-width: 650px) {
    #topbar-nav {padding: 6px 6vw 6px 3vw;}
    #logo-topbar {height: 28px;}
    .btn-home {font-size: 1em; padding: 7px 15px;}
}
body { padding-top: 64px; } /* tránh topbar che nội dung */

@keyframes photoHighlight {
    0%   { box-shadow:0 0 0 0 #ffd900cc, 0 0 12px #fff; transform: scale(2);}
    30%  { box-shadow:0 0 28px 12px #fffad2, 0 0 36px #fff; transform: scale(2.55);}
    60%  { box-shadow:0 0 18px 2px #ffd900cc, 0 0 10px #fff; transform: scale(2.18);}
    100% { box-shadow:0 0 0 0 #fff0, 0 0 2px #fff; transform: scale(2);}
}
.photo-fly.highlighted {
    z-index: 99 !important;
    animation: photoHighlight 1.1s cubic-bezier(.77, .15, .44, 1.04);
}

/* ===== PANEL DANH SÁCH TRÚNG GIẢI BÊN PHẢI ===== */
.winners-panel {
    position: fixed;

    /* đưa panel lên ngang hàng topbar */
    top: 64px; /* topbar cao 58px → đặt 64px là đẹp */
    right: 10px;

    width: 270px;

    /* không để panel che msg-congrats */
    bottom: 90px;  /* CHỪA CHỖ cho msg-congrats ở đáy */

    z-index: 40;  /* thấp hơn msg-congrats (z-index 50) */

    background: rgba(6, 18, 40, 0.88); /* nhẹ hơn, sang hơn */
    color: #fff;

    border-radius: 18px;
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);

    display: flex;
    flex-direction: column;
    overflow: hidden;

    font-family: 'Be Vietnam Pro', Arial, sans-serif;

    /* cho phép panel ẩn lúc load trang */
    opacity: 1;
    transition: opacity 0.4s ease;
}

/* Ẩn panel trước khi bấm "Bắt đầu" */
.winners-panel.hidden-init {
    opacity: 0;
    pointer-events: none;
}

/* THU GỌN */
.winners-panel.collapsed .winners-body {
    display: none;
}

/* HEADER */
.winners-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: linear-gradient(
        135deg,
        rgba(209, 67, 63, 0.95),
        rgba(236, 146, 32, 0.95)
    );
}

.winners-title {
    font-weight: 800;
    font-size: 0.96rem;
    letter-spacing: 0.5px;
}

.winners-toggle-btn {
    border: none;
    background: rgba(255,255,255,0.16);
    color: #fff;
    font-size: 0.82rem;
    padding: 4px 10px;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
}
.winners-toggle-btn:hover {
    background: rgba(255,255,255,0.28);
    transform: translateY(-1px);
}

/* BODY */
.winners-body {
    padding: 6px 0 8px;
    overflow-y: auto;
}

.winners-list {
    list-style: none;
    margin: 0;
    padding: 0 10px 4px;
    font-size: 0.86rem;
}

.winners-list li {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    padding: 4px 0;
    border-bottom: 1px dashed rgba(255,255,255,0.12);
}
.winners-list li:last-child {
    border-bottom: none;
}

.winner-index {
    flex: 0 0 20px;
    font-weight: 700;
    color: #ffe08a;
}

.winner-main {
    flex: 1;
    min-width: 0;
}

.winner-name {
    display: block;
    font-weight: 600;
    color: #ffffff;
}

.winner-prize {
    display: block;
    font-size: 0.78rem;
    color: #ffe066;
}

.winner-empty {
    padding: 6px 0;
    font-size: 0.82rem;
    color: #ddd;
}

/* ===== MOBILE ===== */
@media (max-width: 720px) {
    .winners-panel {
        width: 70vw;
        right: 4px;
        top: 68px;     /* giữ ngang topbar mobile */
        bottom: 84px;  /* vẫn không che msg-congrats */
    }
}
