@import url(https://www.dafont.com/bethany-elingston.font);
*
{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
    font-family: -apple-system, BlinkMacSystemFont,
        "Segoe UI", "Noto Sans", Helvetica, Arial,
        sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
}
button, a {
  border: none;
  outline: none;
  box-shadow: none;
}
body
{
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}
.card{
    position: relative;
    width: 350px;
    height: 190px;
    background: #333;
    transition: 0.5s;
}
.card:hover{
    height: 450px;
}
.card .lines{
    position: absolute;
    inset: 0;
    background: #000;
    overflow: hidden;
}
.card .lines::before{
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 120px;
    background: linear-gradient(transparent, #45f3ff, #45f3ff, #45f3ff, transparent);
    animation: animate 4s linear infinite;
}

@keyframes animate
{
    0%
    {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    100%
    {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.card .lines::after{
    content: '';
    position: absolute;
    inset: 3px;
    background: #292929;
}

.card .imgBx{
    position: absolute;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 150px;
    background: #000;
    transition: 0.5s;
    z-index: 10;
    overflow: hidden
}

.card:hover .imgBx{
    width: 250px;
    height: 250px;
}

.card .imgBx::before{
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 500px;
    height: 150px;
    transform: translate(-50%, -50%);
    background: linear-gradient(transparent, #ff3c7b, #ff3c7b, #ff3c7b, transparent);
    animation: animate2 6s linear infinite;
}

@keyframes animate2
{
    0%
    {
        transform: translate(-50%, -50%) rotate(360deg);
    }
    100%
    {
        transform: translate(-50%, -50%) rotate(0deg);
    }
}

.card .imgBx::after{
    content: '';
    position: absolute;
    inset: 3px;
    background: #292929;
}

.card .imgBx img{
    position: absolute;
    z-index: 1;
    top: 10px;
    left: 10px;
    width: calc(100% - 20px);
    height: calc(100% - 20px);
    border-radius: 4px;
}

.card .content{
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    overflow: hidden
}

.card .content .details{
    padding: 40px;
    text-align: center;
    width: 100%;
    transition: 0.5s;
    transform: translateY(155px);
}
.card .content .details .title {
    margin-bottom: 15px; 
  }
.card:hover .content .details{
    transform: translateY(0px);
}
.card .content .details h2{
    font-family: 'Bethany Elingston', cursive;
    font-size: 1.25em;
    font-weight: 600;
    color: #45f3ff;
    line-height: 1.2em;
}
.card .content .details h2 span{
    font-family: 'Bethany Elingston', cursive;
    font-size: 0.75em;
    font-weight: 500;
    color: #fff;
}
.card .content .details .data {
    min-height: 58px;          
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-bottom: 20px;       
  }
.card .content .details .data h3{
    font-size: 1em;
    color: #45f3ff;
    line-height: 1.2em;
    font-weight: 600;
}
.card .content .details .data h3 span{
    font-size: 0.85em;
    font-weight: 400;
    color: #fff;
}
.card .content .details .actionBtn{
    display: flex;
    justify-content: space-between;
    gap: 20px
}
.card .content .details .actionBtn button{
    padding: 10px 30px;
    border: none;
    outline: none;
    font-size: 1em;
    font-weight: 500;
    background: #45f3ff;
    color: #222;
    border-radius: 5px;
    cursor: pointer;
    transition: 0.3s
}
.card .content .details .actionBtn button:nth-child(2){
    background: #fff;
}
.card .content .details .actionBtn button:hover{
    opacity: 1;
}

/* Background Effect */
body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
    position: relative;
}

/* Particle mặc định */
body::before,
body::after {
    content: '';
    position: absolute;
    top: -50px;
    width: 200%;
    height: 200%;
    z-index: -1;
    pointer-events: none;
    transition: opacity 1s ease;
}

/* Particle1 */
body::before {
    background-image: radial-gradient(#ffffff 1px, transparent 1px);
    background-size: 50px 50px;
    animation: particles 5s linear infinite;
    opacity: 1;
}

/* Particle2 */
body::after {
    background-image: radial-gradient(#ff3c7b 1px, transparent 1px);
    background-size: 50px 50px;
    animation: particles2 5s linear infinite;
    opacity: 0;
}

/* Khi bật particle2 */
body.particle2::before {
    opacity: 0;
}
body.particle2::after {
    opacity: 1;
}

/* Keyframes */
@keyframes particles {
    from { transform: translateX(0) translateY(0); }
    to   { transform: translateX(-100px) translateY(-100px); }
}
@keyframes particles2 {
    from { transform: translateX(0) translateY(0); }
    to   { transform: translateX(-100px) translateY(-100px); }
}

/* Các quy tắc CSS hiện có của .card và .actionBtn button */

/* Base style: tất cả hộp thoại Undertale dùng chung */
  .undertale-dialogue {
    background: #000;
    border: 2px solid #fff;
    padding: 10px 15px;
    box-sizing: border-box;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
  }
  /* Áp dụng riêng cho Info Discord */
  .undertale-dialogue[data-text*="Discord profile"] {
    border-color: #7289da; /* màu Discord */
    color: #7289da;
    box-shadow: 0 0 6px #7289da, 0 0 12px #99aaff inset;
    animation: pulse-discord 1.5s infinite ease-in-out;
  }

  /* Hover riêng */
  .undertale-dialogue[data-text*="Discord profile"]:hover {
    color: #f8d985;
    border-color: #f8f4f4;
    text-shadow: 0 0 6px #f6ecec, 0 0 12px #f7f2f2;
  }
  @keyframes pulse-discord {
    0%   { box-shadow: 0 0 4px #99aaff, 0 0 8px #7289da inset; }
    50%  { box-shadow: 0 0 12px #7289da, 0 0 20px #99aaff inset; }
    100% { box-shadow: 0 0 4px #99aaff, 0 0 8px #7289da inset; }
  }
   
  .undertale-dialogue p {
    color: #fff;
    font-size: 1.1em;
    font-family: 'Press Start 2P', cursive;
    margin: 0;
    white-space: pre-wrap; 
  }
  
  /* dialogue hover box */
  .undertale-dialogue-box {
    position: fixed;
    bottom: 10vh;
    left: 50%;
    transform: translateX(-50%) translateY(8px); 
    width: 90%;
    max-width: 400px;
    background: #000;
    border: 2px solid #fff;
    padding: 12px 14px;
    box-sizing: border-box;
    text-align: center;
    display: flex;                 
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 0;                    
    visibility: hidden;
    pointer-events: none;          
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0s linear 0.22s;
  }

  /* trạng thái hiện */
  .undertale-dialogue-box.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0); /* trượt nhẹ lên */
    transition: opacity 0.22s ease, transform 0.22s ease;
  }

  .undertale-dialogue-box p {
    color: #fe2929;
    font-size: 1.05em;
    font-family: 'Press Start 2P', cursive;
    margin: 0;
    white-space: pre-wrap;
  }
 
  .dialogue-column {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 20px; /* khoảng cách đều giữa các box */
  }
  
  .dialogue-column .undertale-dialogue {
    min-width: 250px;
    max-width: 380px;
    height: auto;
  }

  /* CSS cho nút Secret */
  :root{
    --bg1: #050505;
    --bg2: #090909;
    --c1: #00f0ff;   
    --c2: #ff2dcb;   
    --border-dark: #0b3f64;
  }

  /* Base button */
  .secret-btn{
    position: fixed;
    bottom: 10px;
    right: 1%;
    padding: 12px 22px;
    border-radius: 10px;
    cursor: pointer;
    z-index: 1000;
    border: 2px solid transparent;
    background-image:
      linear-gradient(var(--bg1), var(--bg2)),                 
      linear-gradient(90deg, var(--c1), var(--c2));            
    background-origin: padding-box, border-box;
    background-clip: padding-box, border-box;
    box-shadow:
      0 6px 18px rgba(0,0,0,0.6),                             
      0 0 10px rgba(0,255,255,0.06) ease-in-out;               
    overflow: visible;
    transform: translateY(10px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .28s ease, transform .28s ease, box-shadow .25s ease;
    font-family: monospace;
    -webkit-font-smoothing: antialiased;
  }

  .secret-btn.show{
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .secret-btn > span{
    position: relative;
    display: inline-block;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-size: 12px;
    background: linear-gradient(90deg, var(--c1), #9a00ff, var(--c2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 6px rgba(0,255,255,0.12), 0 0 10px rgba(255,45,203,0.06);
    z-index: 3;
    pointer-events: none;
  }

  .secret-btn::before{
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 10px;
    z-index: 1;
    pointer-events: none;
    box-shadow: inset 0 0 12px rgba(0,255,255,0.04), inset 0 0 18px rgba(255,45,203,0.03);
    transition: box-shadow .35s ease;
  }

  .secret-btn::after{
    content: "";
    position: absolute;
    inset: -8px;
    border-radius: 14px;
    z-index: 0;
    pointer-events: none;
    background:
      radial-gradient(circle at 10% 20%, rgba(0,255,255,0.06), transparent 12%),
      radial-gradient(circle at 90% 80%, rgba(255,45,203,0.05), transparent 14%);
    filter: blur(12px) saturate(120%);
    opacity: .9;
    transition: filter .4s ease, opacity .4s ease;
  }

  .secret-btn:hover{
    transform: translateY(-2px);
    box-shadow:
      0 12px 30px rgba(0,0,0,0.7),
      0 0 28px rgba(0,255,255,0.12);
  }

  .secret-btn:hover::before{
    box-shadow: inset 0 0 20px rgba(0,255,255,0.12), inset 0 0 28px rgba(255,45,203,0.08);
  }

  .secret-btn:hover::after{
    filter: blur(14px) saturate(140%);
    opacity: 1;
  }

  /* subtle pulsing neon animation for the outer bloom */
  @keyframes neonPulse {
    0%   { transform: translateZ(0) scale(1); opacity: .85; filter: blur(12px) saturate(100%); }
    50%  { transform: translateZ(0) scale(1.02); opacity: 1;   filter: blur(16px) saturate(130%); }
    100% { transform: translateZ(0) scale(1); opacity: .85; filter: blur(12px) saturate(100%); }
  }
  .secret-btn.show::after{
    animation: neonPulse 2.8s ease-in-out infinite;
  }

  /* small accessible focus style */
  .secret-btn:focus{
    outline: none;
    box-shadow: 0 0 0 4px rgba(0,255,255,0.06);
  }
  
  .dialogue-column.left .undertale-dialogue {
    transform: translateX(-200%); /* ẩn ra ngoài trái */
  }
  .dialogue-column.right .undertale-dialogue {
    transform: translateX(200%); /* ẩn ra ngoài phải */
  }
  
  .dialogue-column.show .undertale-dialogue {
    opacity: 1;
    transform: translateX(0); /* trượt vào */
  }
  
  /* Ẩn tooltip cũ */
  .actionBtn button .tooltip-text {
    display: none;
  }
  
  .card-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px; /* khoảng cách giữa card và cột hộp thoại */
    position: relative;
  }
  
  .dialogue-column {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 20px;
  }

  #closeBtn {
    background: #ff3c7b;
    color: #fff;
  }
  .undertale-dialogue a {
    color: #fff;
    font-size: 1.1em;
    font-family: 'Press Start 2P', cursive;
    text-decoration: none; 
  }
  .undertale-dialogue:hover {
    color: #ff0;
    text-shadow: 0 0 6px #ff0, 0 0 12px #fff;
    border-color: #ff0;
  } 
  
  .undertale-dialogue a:hover {
    text-decoration: underline; 
  }
  @keyframes pulse-red {
    0% { box-shadow: 0 0 4px #ff5050, 0 0 8px #ff2929 inset; }
    50% { box-shadow: 0 0 12px #ff8080, 0 0 20px #ff5050 inset; }
    100% { box-shadow: 0 0 4px #ff5050, 0 0 8px #ff2929 inset; }
  }
  
  .undertale-dialogue.secret {
    border-color: #ff2929;      
    color: #ff5050;             
    box-shadow: 0 0 8px #ff2929, 0 0 16px #ff5050 inset; /* glow đỏ */
    animation: pulse-red 1.5s infinite ease-in-out;
  }

  .undertale-dialogue.secret:hover {
    color: #ff8080;
    border-color: #ff8080;
    text-shadow: 0 0 6px #ff5050, 0 0 12px #ff2929;
  }

  @keyframes pulse-cyan {
    0%   { box-shadow: 0 0 4px #00ffff, 0 0 8px #00cccc inset; }
    50%  { box-shadow: 0 0 12px #66ffff, 0 0 20px #00e6e6 inset; }
    100% { box-shadow: 0 0 4px #00ffff, 0 0 8px #00cccc inset; }
  }
  .undertale-dialogue.secret:has(> #turnOffBtn) {
    border-color: #10defe;      
    color: #00ffff;             
    box-shadow: 0 0 8px #00e6e6, 0 0 16px #00cccc inset; 
    animation: pulse-cyan 1.5s infinite ease-in-out;
  }
  .undertale-dialogue.secret:has(> #turnOffBtn):hover {
    color: #a1adf7;
    border-color: #66ffff;
  }
  /* Hover: đổi màu + text-shadow cho button */
  .undertale-dialogue.secret:has(> #turnOffBtn):hover > #turnOffBtn {
    color: #defafa;
    text-shadow: 0 0 6px #0afffb, 0 0 14px #66ffff;
  }
  
  .undertale-dialogue button {
    background: none;       
    border: none;           
    color: #fff;           
    font-size: 1.1em;
    font-family: 'Press Start 2P', cursive;
    text-decoration: none;
    cursor: pointer;        
    padding: 0;             
  }
  
  .undertale-dialogue button:hover {
    text-decoration: underline; 
  }

  .undertale-dialogue {
    pointer-events: none;
  }
  
  .undertale-dialogue.show {
    pointer-events: auto;
  }

  .undertale-dialogue.disabled {
    pointer-events: none !important;
    opacity: 0.75; 
    cursor: default;
  }
  
  .secret-btn.disabled {
    pointer-events: none !important;
    opacity: 0.6;
    transform: none !important;
  }

  .card.force-open {
    height: 450px; 
  }
  
  .card.force-open .imgBx {
    width: 250px;
    height: 250px;
  }
  
  .card.force-open .content .details {
    transform: translateY(0px);
  }
  @keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
  }
  
  .actionBtn button:hover {
    animation: bounce 0.3s ease;
  }

  .undertale-lyric-box {
    position: fixed;
    bottom: 90vh;
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    width: 90%;
    max-width: 500px;
    background: rgba(0, 0, 0, 0.85);
    border: 2px solid #fff;
    padding: 14px 18px;
    box-sizing: border-box;
    text-align: center;
    display: flex;                 
    align-items: center;
    justify-content: center;
    z-index: 120;
    opacity: 0;                    
    visibility: hidden;
    pointer-events: none;
    box-shadow: 0 0 6px #00f0ff, 0 0 12px #0088ff inset; 
    transition: opacity 0.4s ease, transform 0.4s ease, visibility 0s linear 0.4s, box-shadow 0.3s ease;
  }
  
  @keyframes deeperGlow {
    0%, 100% { box-shadow: 0 0 8px #ff2929, 0 0 16px rgba(255, 0, 255, 0.5) inset; }
    50% { box-shadow: 0 0 16px #ff2929, 0 0 24px rgba(255, 0, 255, 0.7) inset; }
  }
  
  .undertale-lyric-box.deeper-lore {
    animation: deeperGlow 1s infinite alternate;
  }
  .undertale-lyric-box.deeper-lore p {
    color: #ff2929;
    text-shadow: 0 0 6px #ff2929, 0 0 12px #ff5050;
  }
  .undertale-lyric-box.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
    transition: opacity 0.4s ease, transform 0.4s ease;
  }
  
  .undertale-lyric-box p {
    color: #00f0ff;
    font-size: 1em;
    font-family: 'Press Start 2P', cursive;
    margin: 0;
    text-shadow: 0 0 6px #00f0ff, 0 0 12px #0088ff;
  }

  #musicVideoOverlay {
    position: fixed;
    inset: 0;
    z-index: 500; /* cao hơn background, thấp hơn UI */
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 1s ease, visibility 0s linear 1s
  }
  
  #musicVideoOverlay.show {
    opacity: 0.7;
    visibility: visible;
    transition: opacity 1s ease, visibility 0s linear 0s;
  }

  #musicVideoOverlay.ghost {
    opacity: 0.5;
    visibility: visible;
    transition: opacity 1s ease, visibility 0s linear 0s;
  }
  
  #musicVideoOverlay video {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  
  #musicVideoOverlay .dark-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
  }
  
  /* Glitch effect cho nút TURN OFF */
#turnOffBtn.glitch {
  position: relative;
  color: white;
  animation: glitch-skew 0.3s linear infinite;
}

#turnOffBtn.glitch::before,
#turnOffBtn.glitch::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  width: 100%;
  overflow: hidden;
  clip: rect(0, 900px, 0, 0);
}

#turnOffBtn.glitch::before {
  animation: glitch-top 0.7s linear infinite;
  color: #f00;
}

#turnOffBtn.glitch::after {
  animation: glitch-bottom 0.7s linear infinite;
  color: #0ff;
}

@keyframes glitch-skew {
  0% { transform: skew(0deg); }
  20% { transform: skew(5deg); }
  40% { transform: skew(-5deg); }
  60% { transform: skew(3deg); }
  80% { transform: skew(-3deg); }
  100% { transform: skew(0deg); }
}

@keyframes glitch-top {
  0% { clip: rect(0, 9999px, 0, 0); }
  10% { clip: rect(0, 9999px, 10px, 0); transform: translate(-2px, -2px); }
  30% { clip: rect(0, 9999px, 5px, 0); transform: translate(2px, 2px); }
  50% { clip: rect(0, 9999px, 12px, 0); transform: translate(-2px, 1px); }
  70% { clip: rect(0, 9999px, 3px, 0); transform: translate(1px, -1px); }
  100% { clip: rect(0, 9999px, 0, 0); transform: translate(0, 0); }
}

@keyframes glitch-bottom {
  0% { clip: rect(0, 9999px, 0, 0); }
  10% { clip: rect(5px, 9999px, 15px, 0); transform: translate(2px, 2px); }
  30% { clip: rect(2px, 9999px, 8px, 0); transform: translate(-2px, -1px); }
  50% { clip: rect(8px, 9999px, 20px, 0); transform: translate(1px, 2px); }
  70% { clip: rect(4px, 9999px, 12px, 0); transform: translate(-1px, 1px); }
  100% { clip: rect(0, 9999px, 0, 0); transform: translate(0, 0); }
}

.noticeText {
  position: fixed;
  left: 1vh;
  bottom: 0%;
  background: none;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
  color: #fff;
  padding: 10px 20px;
  border-radius: 8px;
  font-family: 'Press Start 2P', cursive;
  white-space: nowrap;
  z-index: 9999;
  transform: translateX(-100%);
  pointer-events: none;
}

.noticeText.show {
  animation: slideIn 0.8s forwards;
}

.noticeText.hide {
  animation: slideOut 0.8s forwards;
}

@keyframes slideIn {
  from { transform: translateX(-100%); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

@keyframes slideOut {
  from { transform: translateX(0); opacity: 1; }
  to   { transform: translateX(-100%); opacity: 0; }
}