/* ============ LIKEVIET22 v2 - Theme ============ */
:root {
    --lv-primary: #6C5CE7;
    --lv-primary-2: #a363f0;
    --lv-dark: #1e1b4b;
    --lv-bg: #f6f7fb;
    --lv-gradient: linear-gradient(135deg, #6C5CE7 0%, #a363f0 100%);
}

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { max-width: 100%; overflow-x: hidden; }
body {
    font-family: 'Be Vietnam Pro', system-ui, sans-serif;
    background: var(--lv-bg);
    color: #1f2937;
}
/* chống vỡ ngang: không cho phần tử nào tràn quá màn hình */
img, table, pre, .lv-card, .order-card { max-width: 100%; }
/* iOS tự zoom khi focus input nếu font < 16px -> ép tối thiểu 16px trên mobile */
@media (max-width: 767px) {
    input, select, textarea, .form-control, .form-select { font-size: 16px !important; }
}

/* ---------- Navbar ---------- */
.lv-navbar {
    background: var(--lv-dark);
    box-shadow: 0 2px 20px rgba(30, 27, 75, .35);
    padding: .65rem 0;
}
.lv-navbar .nav-link { color: rgba(255,255,255,.85); font-weight: 500; }
.lv-navbar .nav-link:hover { color: #fff; }
.lv-navbar .navbar-brand { color: #fff; font-size: 1.25rem; }
.brand-icon {
    display: inline-flex; width: 34px; height: 34px; border-radius: 10px;
    background: var(--lv-gradient); align-items: center; justify-content: center;
    margin-right: 6px; vertical-align: middle;
}
.demo-bar { background: #fff3cd; color: #664d03; border-bottom: 1px solid #ffe69c; }

/* ---------- Hero ---------- */
.lv-hero {
    background: radial-gradient(1200px 500px at 20% -10%, rgba(163,99,240,.45), transparent),
                radial-gradient(900px 400px at 90% 10%, rgba(108,92,231,.5), transparent),
                var(--lv-dark);
    color: #fff;
    padding: 70px 0 110px;
    position: relative;
}
.lv-hero h1 { font-weight: 800; letter-spacing: -.5px; }
.lv-hero .accent {
    background: linear-gradient(90deg, #fbbf24, #f59e0b);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-stats .stat { text-align: center; }
.hero-stats .stat b { font-size: 1.4rem; display: block; color: #fbbf24; }
.hero-stats .stat span { color: rgba(255,255,255,.7); font-size: .85rem; }

/* ---------- Search box ---------- */
.lv-search {
    max-width: 640px; margin: 28px auto 0; position: relative;
}
.lv-search input {
    width: 100%; border: 0; border-radius: 16px;
    padding: 18px 56px 18px 52px; font-size: 1.05rem;
    box-shadow: 0 20px 50px rgba(0,0,0,.35);
}
.lv-search input:focus { outline: 3px solid rgba(251,191,36,.6); }
.lv-search .search-icon {
    position: absolute; left: 18px; top: 50%; transform: translateY(-50%);
    font-size: 1.3rem; color: var(--lv-primary);
}
.lv-search .search-hint {
    position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
    background: #eef2ff; color: var(--lv-primary); border-radius: 8px;
    padding: 4px 10px; font-size: .75rem; font-weight: 600;
}

/* ---------- Platform pills ---------- */
.platform-pills { margin-top: -54px; position: relative; z-index: 5; }
.platform-pill {
    background: #fff; border-radius: 16px; padding: 14px 10px;
    text-align: center; cursor: pointer; border: 2px solid transparent;
    box-shadow: 0 8px 24px rgba(31,41,55,.08);
    transition: all .2s ease; display: block; color: inherit; text-decoration: none;
}
.platform-pill:hover, .platform-pill.active {
    transform: translateY(-4px);
    border-color: var(--lv-primary);
    box-shadow: 0 14px 30px rgba(108,92,231,.25);
    color: inherit;
}
.platform-pill i { font-size: 1.9rem; display: block; margin-bottom: 4px; }
.platform-pill span { font-weight: 600; font-size: .9rem; }

/* ---------- Service cards ---------- */
.service-card {
    background: #fff; border-radius: 16px; padding: 18px;
    box-shadow: 0 6px 18px rgba(31,41,55,.06);
    transition: all .2s ease; height: 100%;
    display: flex; flex-direction: column; text-decoration: none; color: inherit;
    border: 1px solid #eef0f6;
}
.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 34px rgba(108,92,231,.18);
    border-color: var(--lv-primary);
    color: inherit;
}
.service-card .sv-icon {
    width: 44px; height: 44px; border-radius: 12px; display: flex;
    align-items: center; justify-content: center; font-size: 1.4rem; color: #fff;
    flex-shrink: 0;
}
.service-card h3 { font-size: 1rem; font-weight: 700; margin: 0; }
.service-card .sv-price { color: var(--lv-primary); font-weight: 800; }
.service-card .sv-meta { font-size: .8rem; color: #6b7280; }
.section-title { font-weight: 800; letter-spacing: -.3px; }

/* ---------- Order page ---------- */
.order-card, .lv-card {
    background: #fff; border-radius: 18px;
    box-shadow: 0 8px 26px rgba(31,41,55,.07);
    border: 1px solid #eef0f6;
}
.pack-option {
    border: 2px solid #e5e7eb; border-radius: 14px; padding: 14px;
    cursor: pointer; transition: all .15s ease; margin-bottom: 10px;
}
.pack-option:hover { border-color: var(--lv-primary-2); }
.pack-option.selected { border-color: var(--lv-primary); background: #f5f3ff; }
.pack-option .pack-price { font-weight: 800; color: var(--lv-primary); white-space: nowrap; }
.summary-sticky { position: sticky; top: 84px; }
.total-line { font-size: 1.5rem; font-weight: 800; color: #dc2626; }

.reaction-pick { display: flex; gap: 8px; flex-wrap: wrap; }
.reaction-pick label {
    border: 2px solid #e5e7eb; border-radius: 12px; padding: 8px 14px;
    font-size: 1.3rem; cursor: pointer; transition: all .15s;
}
.reaction-pick input { display: none; }
.reaction-pick input:checked + label { border-color: var(--lv-primary); background: #f5f3ff; transform: scale(1.1); }

/* ---------- Feature / FAQ ---------- */
.feature-box {
    background: #fff; border-radius: 16px; padding: 22px; height: 100%;
    box-shadow: 0 6px 18px rgba(31,41,55,.06); border: 1px solid #eef0f6;
}
.feature-box i { font-size: 2rem; background: var(--lv-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

/* ---------- Blog ---------- */
.post-card {
    background: #fff; border-radius: 16px; overflow: hidden; height: 100%;
    box-shadow: 0 6px 18px rgba(31,41,55,.06); border: 1px solid #eef0f6;
    transition: all .2s; display: flex; flex-direction: column;
}
.post-card:hover { transform: translateY(-4px); box-shadow: 0 16px 34px rgba(108,92,231,.16); }
.post-card h2 a { color: #1f2937; text-decoration: none; font-weight: 700; }
.post-card h2 a:hover { color: var(--lv-primary); }
.post-content { line-height: 1.85; font-size: 1.06rem; }
.post-content h2 { font-size: 1.35rem; font-weight: 700; margin-top: 1.6rem; }
.post-content img { max-width: 100%; border-radius: 12px; }

/* ---------- Auth ---------- */
.auth-wrap { min-height: calc(100vh - 70px); display: flex; align-items: center; background: var(--lv-dark); }
.auth-card { max-width: 440px; width: 100%; margin: 40px auto; border-radius: 20px; }

/* ---------- Footer ---------- */
.lv-footer { background: var(--lv-dark); }
.footer-link { color: rgba(255,255,255,.6); text-decoration: none; font-size: .9rem; display: block; padding: 3px 0; }
.footer-link:hover { color: #fbbf24; }

/* ---------- Misc ---------- */
.btn-lv { background: var(--lv-gradient); color: #fff; border: 0; font-weight: 700; }
.btn-lv:hover { color: #fff; filter: brightness(1.08); }
.progress { height: 8px; border-radius: 99px; }
.qr-box { background: #fff; border: 2px dashed var(--lv-primary); border-radius: 16px; padding: 14px; display: inline-block; }
.copy-chip { cursor: pointer; }
.copy-chip:hover { background: #eef2ff !important; }
.table > :not(caption) > * > * { vertical-align: middle; }

/* ---------- Step number ---------- */
.step-num { display: inline-flex; width: 22px; height: 22px; border-radius: 50%; background: var(--lv-gradient); color: #fff; font-size: .8rem; font-weight: 700; align-items: center; justify-content: center; margin-right: 4px; }
.pack-sv { background: var(--lv-primary); color: #fff; border-radius: 6px; padding: 1px 7px; font-size: .8rem; font-weight: 700; }

/* ---------- Quantity control ---------- */
.qty-control { display: flex; align-items: stretch; max-width: 320px; }
.qty-control .qty-btn { width: 48px; border: 2px solid #e5e7eb; background: #fff; font-size: 1.4rem; font-weight: 700; color: var(--lv-primary); cursor: pointer; line-height: 1; }
.qty-control .qty-btn:first-child { border-radius: 12px 0 0 12px; }
.qty-control .qty-btn:last-child { border-radius: 0 12px 12px 0; }
.qty-control input { border-radius: 0 !important; border-left: 0; border-right: 0; }
.quick-qty { display: flex; gap: 6px; flex-wrap: wrap; }
.chip-qty { border: 1.5px solid #e5e7eb; background: #fff; border-radius: 99px; padding: 4px 14px; font-size: .85rem; cursor: pointer; color: #374151; }
.chip-qty:hover { border-color: var(--lv-primary); color: var(--lv-primary); }

/* ---------- Special boxes ---------- */
.special-box { background: linear-gradient(135deg, #f5f3ff, #faf5ff); border: 1.5px solid #e9e5ff; border-radius: 14px; padding: 16px; }

/* ---------- Reaction pick ---------- */
.reaction-pick { display: flex; gap: 8px; flex-wrap: wrap; }
.reaction-pick input { display: none; }
.reaction-pick label { display: flex; flex-direction: column; align-items: center; gap: 2px; border: 2px solid #e5e7eb; border-radius: 12px; padding: 8px 14px; cursor: pointer; background: #fff; transition: all .15s; min-width: 72px; }
.reaction-pick .re-emoji { font-size: 1.5rem; line-height: 1; }
.reaction-pick .re-name { font-size: .72rem; color: #6b7280; }
.reaction-pick input:checked + label { border-color: var(--lv-primary); background: #f5f3ff; transform: translateY(-2px); }
.reaction-pick input:checked + label .re-name { color: var(--lv-primary); font-weight: 600; }

/* ---------- Time pick ---------- */
.time-pick { display: flex; gap: 8px; flex-wrap: wrap; }
.time-pick input { display: none; }
.time-pick label { border: 2px solid #e5e7eb; border-radius: 10px; padding: 8px 16px; cursor: pointer; background: #fff; font-weight: 600; font-size: .9rem; transition: all .15s; }
.time-pick input:checked + label { border-color: var(--lv-primary); background: #f5f3ff; color: var(--lv-primary); }

.switcher-card { position: sticky; top: 74px; z-index: 20; }

/* ---------- Mini stat ---------- */
.mini-stat { background: #f8f9fe; border-radius: 12px; padding: 12px 8px; display: flex; flex-direction: column; align-items: center; gap: 1px; }
.mini-stat i { font-size: 1.5rem; }
.mini-stat b { font-size: 1.05rem; }
.mini-stat span { font-size: .76rem; color: #6b7280; }

/* ---------- Buy bar (mobile) ---------- */
.buy-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030; background: #fff; box-shadow: 0 -6px 24px rgba(0,0,0,.12); padding: 10px 14px; display: flex; align-items: center; gap: 12px; border-top: 1px solid #eef0f6; padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
.buy-bar .buy-bar-info { line-height: 1.1; white-space: nowrap; }
.buy-bar .btn { padding: 12px 20px; font-weight: 700; }
.has-buybar { padding-bottom: 100px; }

@media (max-width: 991px) {
    .summary-sticky { position: static; }
}
@media (max-width: 768px) {
    .lv-hero { padding: 40px 0 90px; }
    .lv-hero h1 { font-size: 1.55rem; }
    .lv-hero .lead { font-size: .98rem; }
    .platform-pill { padding: 10px 6px; }
    .platform-pill i { font-size: 1.5rem; }
    .platform-pill span { font-size: .78rem; }
    .lv-search input { padding: 15px 16px 15px 46px; font-size: .95rem; }
    .lv-search .search-hint { display: none; }
    .hero-stats .stat b { font-size: 1.15rem; }
    .service-card { padding: 14px; }
    .switcher-card { top: 64px; }
}

/* dashboard cá nhân không overlap, pills về flow thường khi đã đăng nhập */
.platform-pills.pills-flow { margin-top: 1.25rem; }

/* ---------- Order tabs ---------- */
.order-tabs { display: flex; gap: 8px; background: #fff; padding: 6px; border-radius: 14px; box-shadow: 0 6px 18px rgba(31,41,55,.06); border: 1px solid #eef0f6; }
.order-tab { flex: 1; text-align: center; padding: 10px; border-radius: 10px; font-weight: 600; color: #6b7280; text-decoration: none; cursor: default; }
.order-tab.active { background: var(--lv-gradient); color: #fff; }
a.order-tab { cursor: pointer; }
a.order-tab:hover { background: #f5f3ff; color: var(--lv-primary); }

/* ---------- Mini label ---------- */
.lbl-mini { font-size: .8rem; font-weight: 600; color: #6b7280; display: block; margin-bottom: 4px; }

/* ---------- Server info box ---------- */
.server-info { background: #f8f9fe; border: 1px solid #eef0f6; border-radius: 12px; padding: 10px 12px; font-size: .9rem; }
.server-info .pack-price { color: var(--lv-primary); font-weight: 800; white-space: nowrap; }

/* ===== v2.2: banner thông báo + nút liên hệ nổi ===== */
.announce-bar { background: linear-gradient(90deg,#6C5CE7,#a363f0); color:#fff; font-weight:500; font-size:.92rem; }
.announce-bar a { color:#ffe08a; }
/* Nút liên hệ gộp 1 — bấm mới sổ ra */
.lv-contact { position: fixed; right: 16px; bottom: 84px; z-index: 1050; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
@media (min-width: 992px) { .lv-contact { bottom: 24px; } }
.lv-contact-btn { width: 54px; height: 54px; border-radius: 50%; border: 0; background: var(--lv-gradient); color: #fff; font-size: 1.6rem; display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 20px rgba(108,92,231,.45); cursor: pointer; animation: lvpulse 2.2s infinite; }
.lv-contact-list { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; max-height: 0; overflow: hidden; opacity: 0; transform: translateY(10px); transition: all .22s ease; pointer-events: none; }
.lv-contact.open .lv-contact-list { max-height: 360px; opacity: 1; transform: translateY(0); pointer-events: auto; }
.lv-contact.open .lv-contact-btn { animation: none; }
.lv-contact-list a { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 16px 0 12px; border-radius: 24px; color: #fff; font-size: .9rem; font-weight: 600; text-decoration: none; box-shadow: 0 4px 14px rgba(0,0,0,.2); white-space: nowrap; }
.lv-contact-list a i { font-size: 1.25rem; }
@keyframes lvpulse { 0%{box-shadow:0 6px 18px rgba(108,92,231,.35);} 50%{box-shadow:0 6px 26px rgba(108,92,231,.6);} 100%{box-shadow:0 6px 18px rgba(108,92,231,.35);} }

/* ===== v2.3: ghi chú mua hàng + popup ===== */
.buy-note { background:#fff8e6; border:1px solid #ffe6a0; border-radius:12px; font-size:.9rem; color:#6b5800; }
.buy-note p:last-child { margin-bottom:0; }
.lv-popup-overlay { position:fixed; inset:0; background:rgba(0,0,0,.55); z-index:2000; align-items:center; justify-content:center; padding:16px; }
.lv-popup { background:#fff; border-radius:14px; max-width:440px; width:100%; position:relative; box-shadow:0 20px 60px rgba(0,0,0,.3); animation:lvpop .25s ease; max-height:90vh; overflow:auto; }
@keyframes lvpop { from{transform:scale(.9);opacity:0;} to{transform:scale(1);opacity:1;} }
.lv-popup-close { position:absolute; top:8px; right:12px; border:0; background:rgba(0,0,0,.4); color:#fff; width:30px; height:30px; border-radius:50%; font-size:20px; line-height:1; cursor:pointer; z-index:2; }

/* ===== v2.5: Flash sale bar ===== */
.flashsale-bar { background:linear-gradient(90deg,#ff512f,#dd2476); color:#fff; padding:8px 0; font-size:.9rem; box-shadow:0 2px 10px rgba(221,36,118,.35); }
.flashsale-bar .fs-flame { font-size:1.2rem; animation:fsflame 1s infinite alternate; }
@keyframes fsflame { from{transform:scale(1);opacity:.85;} to{transform:scale(1.25);opacity:1;} }
.flashsale-bar .fs-count { background:rgba(0,0,0,.2); padding:2px 10px; border-radius:20px; font-weight:600; }
.flashsale-bar #fsCountdown { font-variant-numeric:tabular-nums; }
.price-base { text-decoration:line-through; color:#9aa; font-size:.85em; margin-right:4px; }
.coupon-line { color:#16a085; }

/* ===== v2.5: loading đặt đơn + đơn mới ===== */
.lv-loader-emoji { font-size:3rem; display:inline-block; animation:lvbounce .8s infinite ease-in-out; }
@keyframes lvbounce { 0%,100%{transform:translateY(0) rotate(-8deg);} 50%{transform:translateY(-14px) rotate(8deg);} }
.recent-new { animation:recentflash 1.6s ease; }
@keyframes recentflash { 0%{background:#d1f7e0;} 100%{background:transparent;} }

/* ===== v2.5: tìm kiếm dịch vụ trong trang mua ===== */
.svc-search-results { position:absolute; left:0; right:0; top:100%; z-index:50; background:#fff; border:1px solid #e3e3ef; border-radius:10px; box-shadow:0 10px 30px rgba(0,0,0,.12); margin-top:4px; max-height:320px; overflow:auto; }
.svc-search-results .ssr-item { display:block; padding:9px 14px; border-bottom:1px solid #f1f1f5; color:#222; text-decoration:none; font-size:.9rem; }
.svc-search-results .ssr-item:last-child { border-bottom:0; }
.svc-search-results a.ssr-item:hover { background:#f5f3ff; }

/* ===== v2.7: nhãn SALE trên card dịch vụ ===== */
.sale-badge { position:absolute; top:10px; right:10px; background:linear-gradient(90deg,#ff512f,#dd2476); color:#fff; font-size:.72rem; font-weight:700; padding:3px 9px; border-radius:20px; box-shadow:0 3px 8px rgba(221,36,118,.4); z-index:2; }
