/*
Theme Name: minigame.vn
Theme URI: https://minigame.vn
Author: Kết Nối Số
Description: Theme landing cho minigame.vn, nền tảng gamification marketing của Kết Nối Số.
Version: 1.0.2
Requires at least: 6.5
Requires PHP: 8.0
Text Domain: minigame
*/

:root {
	--grape: #4B1FA8;
	--grape-deep: #2E0F78;
	--lilac: #F1ECFF;
	--candy: #FF3D7F;
	--candy-dark: #E0225F;
	--sun: #FFC22E;
	--mint: #16B989;
	--ink: #1C1433;
	--ink-2: #463D5E;
	--muted: #6E6688;
	--line: #DDD4F3;
	--display: "Baloo 2", system-ui, sans-serif;
	--body: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", sans-serif;
	--wrap: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; font-family: var(--body); font-size: 16.5px; line-height: 1.65; color: var(--ink); background: #fff; }
img, svg { max-width: 100%; height: auto; }
a { color: var(--grape); text-underline-offset: 3px; }
a:hover { color: var(--candy-dark); }
:focus-visible { outline: 3px solid var(--candy); outline-offset: 2px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.wrap.narrow { max-width: 800px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: #fff; padding: 10px 14px; }

h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: 1.08; letter-spacing: -.01em; margin: 0 0 .45em; text-wrap: balance; }
h1 { font-size: clamp(2.3rem, 5.2vw, 4rem); }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.75rem); }
h3 { font-size: 1.4rem; font-weight: 700; line-height: 1.2; }
p { margin: 0 0 1em; }
.lead { font-size: 1.15rem; max-width: 54ch; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 24px; border: 2px solid var(--ink); border-radius: 999px; background: #fff; color: var(--ink); font: 700 1rem/1 var(--body); text-decoration: none; cursor: pointer; transition: transform .12s, background .15s, box-shadow .15s; }
.btn:hover { color: var(--ink); transform: translateY(-1px); box-shadow: 0 3px 0 var(--ink); }
.btn:active { transform: translateY(1px); box-shadow: none; }
.btn-primary, .btn-candy { background: var(--candy); border-color: var(--candy); color: #fff; }
.btn-primary:hover, .btn-candy:hover { color: #fff; background: var(--candy-dark); border-color: var(--candy-dark); box-shadow: none; }
.btn-sun { background: var(--sun); border-color: var(--ink); color: var(--ink); box-shadow: 0 4px 0 var(--ink); }
.btn-sun:hover { box-shadow: 0 5px 0 var(--ink); }
.btn-ghost { background: transparent; border-color: rgba(255,255,255,.6); color: #fff; }
.btn-ghost:hover { color: #fff; background: rgba(255,255,255,.1); box-shadow: none; }
.btn-sm { min-height: 40px; padding: 0 18px; font-size: .95rem; }
.btn[disabled] { opacity: .7; cursor: progress; transform: none; }

/* Header */
.site-head { position: sticky; top: 0; z-index: 30; background: rgba(255,255,255,.95); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 70px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--grape); text-decoration: none; }
.brand svg { width: 40px; height: 40px; flex: none; }
.brand-name { font-family: var(--display); font-weight: 800; font-size: 1.65rem; line-height: 1; letter-spacing: -.02em; padding-top: 4px; }
.brand-name .tld { color: var(--candy); }
.site-nav { display: flex; align-items: center; gap: 26px; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 24px; }
.site-nav li a { color: var(--ink); text-decoration: none; font-weight: 600; }
.site-nav li a:hover, .site-nav .current-menu-item > a { color: var(--candy-dark); }
.nav-toggle { display: none; min-height: 40px; padding: 0 16px; border: 2px solid var(--ink); border-radius: 999px; background: #fff; font: 700 .95rem var(--body); color: var(--ink); }
@media (max-width: 880px) {
	.nav-toggle { display: inline-flex; align-items: center; }
	.site-nav { display: none; position: absolute; top: 70px; left: 0; right: 0; flex-direction: column; align-items: flex-start; gap: 18px; padding: 20px 24px 24px; background: #fff; border-bottom: 1px solid var(--line); }
	.site-nav.open { display: flex; }
	.site-nav ul { flex-direction: column; gap: 14px; }
}

/* Hero */
.hero { position: relative; overflow: hidden; padding: 64px 0 80px; background: var(--grape); color: #EDE6FF; }
.hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 78% 42%, #6A3BD6 0, transparent 46%); pointer-events: none; }
.hero-grid { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.hero h1 { color: #fff; }
.badge { display: inline-block; margin-bottom: 18px; padding: 6px 14px; border-radius: 999px; background: var(--mint); color: #062F23; font-weight: 700; font-size: .92rem; }
.actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
@media (max-width: 940px) { .hero-grid { grid-template-columns: 1fr; } }

/* Wheel */
.wheel { display: flex; flex-direction: column; align-items: center; }
.wheel-stage { position: relative; width: min(100%, 400px); }
.wheel-disc { display: block; width: 100%; filter: drop-shadow(0 10px 0 rgba(20, 6, 60, .45)); }
.wheel-rot { transform-origin: 160px 160px; transform-box: view-box; }
.wheel-label { font-family: var(--display); font-weight: 800; font-size: 16px; }
.wheel-pointer { position: absolute; top: -14px; left: 50%; width: 44px; transform: translateX(-50%); }
.wheel-panel { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 26px; text-align: center; }
.btn-spin { min-width: 180px; font-size: 1.1rem; }
.wheel-result { min-height: 1.6em; margin: 0; color: #fff; font-size: 1.05rem; }
.wheel-result strong { color: var(--sun); font-family: var(--display); font-size: 1.35rem; }
.odds { margin-top: 14px; width: min(100%, 400px); color: #D9CCFF; font-size: .92rem; }
.odds summary { cursor: pointer; text-align: center; text-decoration: underline; text-underline-offset: 3px; }
.odds ul { list-style: none; margin: 12px 0 0; padding: 14px 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 20px; background: rgba(20, 6, 60, .35); border-radius: 12px; }
.odds li { display: flex; align-items: center; gap: 8px; }
.odds b { margin-left: auto; color: #fff; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; box-shadow: 0 0 0 1.5px #fff; }

/* Sections */
.section { padding: 88px 0; }
.section--lilac { background: var(--lilac); }
.section--grape { background: var(--grape-deep); color: #E3D9FF; }
.section--grape h2 { color: #fff; }
.section--grape a { color: var(--sun); }
.section-head { max-width: 680px; margin-bottom: 44px; }
.section-head p { color: var(--muted); font-size: 1.08rem; }

/* Games */
.games { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.game { padding: 26px 22px 24px; border: 2px solid var(--ink); border-radius: 18px; background: #fff; }
.game h3 { margin-bottom: 10px; }
.game-goal { font-weight: 600; }
.game p:last-child { margin: 0; color: var(--ink-2); }
.game-status { display: inline-block; margin-bottom: 14px; padding: 3px 10px; border-radius: 999px; font-size: .82rem; font-weight: 700; background: var(--lilac); color: var(--grape); }
.game--wheel { background: var(--sun); box-shadow: 6px 6px 0 var(--ink); }
.game--wheel .game-status { background: var(--ink); color: var(--sun); }
@media (max-width: 1000px) { .games { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .games { grid-template-columns: 1fr; } }

/* Flow: chuỗi thao tác thật nên đánh số */
.flow { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; counter-reset: f; }
.flow li { position: relative; counter-increment: f; }
.flow li::before { content: counter(f); display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 16px; border: 2px solid var(--ink); border-radius: 50%; background: #fff; font-family: var(--display); font-weight: 800; font-size: 1.5rem; color: var(--grape); position: relative; z-index: 1; }
.flow li:not(:last-child)::after { content: ""; position: absolute; top: 26px; left: 52px; right: -16px; border-top: 2px dashed var(--grape); }
.flow li:last-child::before { background: var(--candy); color: #fff; border-color: var(--candy); }
.flow h3 { font-size: 1.25rem; margin-bottom: 6px; }
.flow p { margin: 0; color: var(--ink-2); font-size: .97rem; padding-right: 8px; }
@media (max-width: 900px) {
	.flow { grid-template-columns: 1fr; gap: 0; }
	.flow li { padding: 0 0 26px 72px; min-height: 78px; }
	.flow li::before { position: absolute; left: 0; top: 0; margin: 0; }
	.flow li:not(:last-child)::after { top: 52px; bottom: 0; left: 25px; right: auto; border-top: 0; border-left: 2px dashed var(--grape); }
}

/* Features */
.feature-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 56px; align-items: start; }
.features { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; }
.features div { padding: 18px 0; border-top: 2px solid var(--ink); }
.features dt { font-family: var(--display); font-weight: 700; font-size: 1.2rem; line-height: 1.25; margin-bottom: 4px; }
.features dd { margin: 0; color: var(--ink-2); }
@media (max-width: 940px) { .feature-grid { grid-template-columns: 1fr; gap: 0; } }
@media (max-width: 560px) { .features { grid-template-columns: 1fr; } }

/* Plans */
.plans { display: grid; grid-template-columns: 1fr 1.08fr 1fr; gap: 20px; align-items: stretch; }
.plan { position: relative; padding: 30px 26px; border: 2px solid var(--ink); border-radius: 18px; background: #fff; }
.plan--pick { background: var(--grape); color: #EDE6FF; border-color: var(--grape); box-shadow: 6px 6px 0 var(--ink); }
.plan--pick h3, .plan--pick .price { color: #fff; }
.plan-tag { position: absolute; top: -15px; left: 22px; margin: 0; padding: 4px 12px; border-radius: 999px; background: var(--sun); color: var(--ink); font-weight: 700; font-size: .85rem; border: 2px solid var(--ink); }
.price { font-family: var(--display); font-weight: 800; font-size: clamp(1.35rem, 2.1vw, 1.65rem); line-height: 1.15; color: var(--grape); margin-bottom: 8px; }
.price span { display: block; font-family: var(--body); font-weight: 500; font-size: .95rem; color: var(--muted); }
.plan--pick .price span { color: #CDBDFF; }
.plan-for { padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.plan--pick .plan-for { border-color: rgba(255,255,255,.2); }
.plan ul { list-style: none; margin: 0; padding: 0; }
.plan li { position: relative; padding-left: 26px; margin-bottom: 8px; }
.plan li::before { content: ""; position: absolute; left: 2px; top: .5em; width: 12px; height: 7px; border-left: 2.5px solid var(--mint); border-bottom: 2.5px solid var(--mint); transform: rotate(-45deg); }
.plans-note { margin-top: 28px; color: var(--ink-2); }
@media (max-width: 900px) { .plans { grid-template-columns: 1fr; gap: 28px; } }

/* Signup + forms */
.signup-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 56px; align-items: start; }
.signup-form { padding: 30px; border-radius: 18px; background: #fff; color: var(--ink); box-shadow: 8px 8px 0 var(--candy); }
@media (max-width: 900px) { .signup-grid { grid-template-columns: 1fr; gap: 28px; } }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; margin-bottom: 20px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field--wide { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: .93rem; }
.field input, .field textarea, .field select { width: 100%; padding: 12px 14px; border: 2px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); font: inherit; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--grape); box-shadow: 0 0 0 3px rgba(75,31,168,.18); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.notice { margin: 0 0 18px; padding: 12px 16px; border-radius: 12px; font-weight: 600; }
.notice.ok { background: #DDF7EE; color: #075C42; }
.notice.err { background: #FFE3EC; color: #A3123F; }
.lead-form .btn { width: 100%; }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } .signup-form { padding: 22px; } }

/* Page / post */
.page-head { padding: 60px 0 40px; background: var(--lilac); }
.prose { max-width: 740px; margin: 0 auto; padding: 48px 24px 88px; }
.prose h2 { font-size: 1.8rem; margin-top: 1.6em; }
.prose h3 { margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.25em; }
.prose li { margin-bottom: .35em; }
.prose blockquote { margin: 1.5em 0; padding: 14px 20px; border-radius: 12px; background: var(--lilac); }
.prose table { width: 100%; border-collapse: collapse; margin: 1.5em 0; font-size: .95rem; }
.prose th, .prose td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.prose .page-form { margin-top: 40px; padding: 28px; border: 2px solid var(--ink); border-radius: 18px; }
.entry-cover { margin: 32px auto 0; }
.card-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); font-size: .9rem; margin-bottom: 10px; }
.card-cat { font-weight: 700; color: var(--candy-dark); text-decoration: none; }
.list-wrap { padding-top: 48px; padding-bottom: 88px; }
.post-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 36px 28px; }
.card-thumb img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 14px; margin-bottom: 14px; }
.card-title { font-size: 1.45rem; margin-bottom: 8px; }
.card-title a { color: var(--ink); text-decoration: none; }
.card-title a:hover { color: var(--grape); }
.card-excerpt { color: var(--ink-2); margin: 0; }
.empty { padding: 40px 0; }
.nav-links { display: flex; gap: 10px; margin-top: 48px; }
.nav-links .page-numbers { padding: 8px 14px; border: 2px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--ink); }
.nav-links .current { background: var(--grape); color: #fff; border-color: var(--grape); }
.search-form { display: flex; gap: 8px; margin-bottom: 20px; }
.search-form input[type=search] { flex: 1; padding: 12px 14px; border: 2px solid var(--line); border-radius: 12px; font: inherit; }
.search-form input[type=submit] { padding: 0 18px; border: 0; border-radius: 999px; background: var(--grape); color: #fff; font: 700 1rem var(--body); }

/* Footer */
.site-foot { background: var(--ink); color: #B7AED0; padding: 60px 0 28px; font-size: .95rem; }
.site-foot a { color: #fff; }
.foot-grid { display: grid; grid-template-columns: 1.2fr 1fr 1.3fr; gap: 48px; padding-bottom: 40px; border-bottom: 1px solid #352B52; }
.foot-brand .brand { color: #fff; margin-bottom: 14px; }
.foot-brand p { max-width: 34ch; }
.foot-col h2 { font-family: var(--body); font-size: 1rem; font-weight: 700; color: #fff; margin-bottom: 14px; }
.foot-col ul { list-style: none; margin: 0; padding: 0; }
.foot-col li { margin-bottom: 10px; }
.company-dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0; }
.company-dl dt { color: #8E84AA; }
.company-dl dd { margin: 0; color: #E8E2F7; }
.foot-legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 22px; font-size: .88rem; }
.foot-legal p { margin: 0; }
.foot-menu { list-style: none; display: flex; flex-wrap: wrap; gap: 18px; margin: 0; padding: 0; }
.foot-menu a { color: #B7AED0; }
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr; gap: 32px; } }
.alignwide { max-width: 1100px; margin-left: auto; margin-right: auto; }
