:root{
  --text: #ffffff;
  --muted: rgba(255,255,255,.78);
  --glass: rgba(255,255,255,.14);
  --glass2: rgba(255,255,255,.10);
  --stroke: rgba(255,255,255,.18);
  --shadow: 0 18px 60px rgba(0,0,0,.45);
  --accent: #ff2d7d;
  --accent2: #ff4ea6;
}

*{ box-sizing: border-box; }
html, body{ height: 100%; }
body{
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  overflow-x: hidden;
}

/* Background */
.bg{
  position: fixed;
  inset: 0;
  background: url("bg.png") center/cover no-repeat; /* dùng bg.png */
  filter: blur(6px);
  transform: scale(1.05);
  z-index: -2;
}
.bg-overlay{
  position: fixed;
  inset: 0;
  background:
    radial-gradient(1200px 700px at 50% 35%, rgba(0,0,0,.15), rgba(0,0,0,.65)),
    linear-gradient(to bottom, rgba(0,0,0,.30), rgba(0,0,0,.65));
  z-index: -1;
}

/* Topbar */
.topbar{
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 18px 22px;
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

.brand{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  user-select: none;
}

/* Chỉ giữ chữ, không dùng logo */
.brand__name{
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  opacity: .95;
}

/* Hero */
.hero{
  min-height: 100vh;
  display: flex;                 /* gọn hơn cho desktop */
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 16px 60px;       /* giảm khoảng cách tổng */
}

.title{
  font-size: clamp(40px, 6vw, 64px);
  line-height: 1.05;
  margin: 0 0 8px;               /* gần hơn */
  font-weight: 800;
  text-shadow: 0 8px 30px rgba(0,0,0,.4);
}

.subtitle{
  margin: 0 0 22px;              /* gần hơn */
  color: var(--muted);
  font-size: 14.5px;
}

/* Countdown (Desktop/Tablet) */
.countdown{
  display: grid;
  grid-auto-flow: column;
  gap: 14px;
  margin: 6px 0 22px;            /* gần hơn */
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.timebox{
  width: 98px;
  padding: 14px 12px 12px;
  border-radius: 10px;
  background: linear-gradient(180deg, var(--glass), var(--glass2));
  border: 1px solid var(--stroke);
  box-shadow: 0 10px 30px rgba(0,0,0,.28);
  backdrop-filter: blur(10px);
}

.timebox__value{
  font-size: 28px;
  font-weight: 800;
  letter-spacing: .5px;
}

.timebox__label{
  margin-top: 6px;
  font-size: 12px;
  color: rgba(255,255,255,.72);
}

/* Buttons */
.actions{
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: center;
  margin-top: 10px;
  flex-wrap: wrap;
}

.btn{
  appearance: none;
  border: 0;
  cursor: pointer;
  font-weight: 800;
  letter-spacing: .6px;
  border-radius: 6px;
  padding: 11px 18px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform .12s ease, filter .12s ease, background .12s ease, border-color .12s ease;
}

.btn:active{ transform: translateY(1px); }

.btn--primary{
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  color: #fff;
  box-shadow: 0 12px 26px rgba(255,45,125,.18);
}

.btn--ghost{
  background: transparent;
  color: rgba(255,255,255,.92);
  border: 1px solid rgba(255,255,255,.38);
}

.btn--small{
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.24);
  color: rgba(255,255,255,.92);
  padding: 10px 14px;
  font-weight: 700;
}

/* Modal */
.modal{
  position: fixed;
  inset: 0;
  display: none;
  z-index: 50;
}

.modal.is-open{ display: block; }

.modal__backdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(2px);
}

.modal__panel{
  position: relative;

  width: 420px;              /* hẹp lại */
  max-width: 92vw;           /* nếu màn nhỏ thì co vừa */
  height: auto;
  max-height: 80vh;          /* không vượt quá màn hình */

  margin: 100px auto 0;

  background: rgba(20, 20, 28, .60);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 16px;       /* bo góc mềm hơn */
  box-shadow: 0 25px 70px rgba(0,0,0,.55);
  backdrop-filter: blur(16px);

  opacity: 0;
  transform: translateY(-30px);

  display: flex;
  flex-direction: column;
}

/* Animate open */
.modal.is-open .modal__panel{
  animation: slideDownFade .5s ease forwards;
}

@keyframes slideDownFade{
  to{
    opacity: 1;
    transform: translateY(0);
  }
}

.modal__header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 14px 10px 14px;
  border-bottom: 1px solid rgba(255,255,255,.10);
}

.modal__titlewrap{
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.modal__icon{
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.14);
}

.modal__title{
  margin: 0;
  font-size: 16px;
  font-weight: 800;
}

.modal__close{
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.9);
  cursor: pointer;
}

.modal__body{
  padding: 14px 16px 16px;
  color: rgba(255,255,255,.86);
  font-size: 14px;
  line-height: 1.55;

  overflow: auto;                 /* cho phép vuốt */
  -webkit-overflow-scrolling: touch;
}

.modal__body ul{
  margin: 10px 0 0 18px;
  padding: 0;
}

.modal__footer{
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}

/* ===== Mobile tweaks ===== */
@media (max-width: 520px){
  .hero{
    padding: 96px 14px 44px;
  }

  .title{
    margin-bottom: 4px;
  }

  .subtitle{
    margin-bottom: 16px;
  }

  /* Countdown dạng lưới 2x2 */
  .countdown{
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 8px 0 18px;
    width: min(420px, 92vw);
  }

  .timebox{
    width: 100%;
    padding: 14px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
  }

  .timebox__value{
    font-size: 30px;
    line-height: 1;
  }

  .timebox__label{
    margin-top: 8px;
    font-size: 12px;
    text-align: center;
  }

  .actions{
    margin-top: 10px;
    gap: 10px;
  }

  .btn{
    padding: 12px 18px;
  }

  .modal__header{
    position: sticky;
    top: 0;
    background: rgba(20, 20, 28, .72);
    backdrop-filter: blur(12px);
    z-index: 2;
  }
}