/**
 * Landing cào thẻ — mobile-first, tông teal theo mockup KNT.
 * Namespace .sscr tránh đụng CSS theme.
 */

.sscr {
    --sscr-primary: #0d9488;
    --sscr-primary-dark: #0f766e;
    --sscr-bg: #d9f2ef;
    --sscr-text: #134e4a;
    max-width: 420px;
    margin: 0 auto;
    padding: 24px 16px 40px;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color: var(--sscr-text);
    text-align: center;
}

.sscr-screen { display: none; }
.sscr-screen.is-active { display: block; animation: sscr-fade .35s ease; }

@keyframes sscr-fade {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
}

.sscr-title {
    font-size: 26px;
    line-height: 1.3;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--sscr-primary-dark);
    margin: 12px 0 20px;
}

.sscr-title--sm { font-size: 20px; }

.sscr-gift { font-size: 72px; margin-top: 12px; }

.sscr-btn {
    display: inline-block;
    width: 100%;
    max-width: 320px;
    padding: 14px 24px;
    border: 0;
    border-radius: 12px;
    background: var(--sscr-primary);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .3px;
    cursor: pointer;
    transition: background .2s, transform .1s;
    text-decoration: none;
    box-sizing: border-box;
}

.sscr-btn:hover { background: var(--sscr-primary-dark); }
.sscr-btn:active { transform: scale(.98); }
.sscr-btn:disabled { opacity: .6; cursor: wait; }

.sscr-btn--outline {
    background: transparent;
    border: 2px solid var(--sscr-primary);
    color: var(--sscr-primary-dark);
}

/* Thẻ cào: vùng giải nằm dưới, canvas phủ lên trên */
.sscr-card {
    position: relative;
    width: 100%;
    max-width: 320px;
    height: 200px;
    margin: 0 auto;
    border-radius: 16px;
    overflow: hidden;
    background: var(--sscr-bg);
    box-shadow: 0 8px 24px rgba(13, 148, 136, .25);
}

.sscr-card__prize {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    padding: 16px;
    cursor: pointer;
}

.sscr-card__prize-lead { font-size: 14px; font-weight: 600; margin: 0; }
.sscr-card__prize-value { font-size: 40px; font-weight: 900; color: var(--sscr-primary-dark); margin: 0; }
.sscr-card__prize-label { font-size: 14px; font-weight: 600; margin: 0; }

.sscr-card__canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    touch-action: none; /* chặn scroll trang khi cào trên mobile */
    cursor: grab;
}

.sscr-hint { font-size: 13px; opacity: .75; margin-top: 12px; }

/* Hộp giải + mã voucher */
.sscr-won-box {
    background: var(--sscr-bg);
    border: 2px dashed var(--sscr-primary);
    border-radius: 14px;
    padding: 20px 16px;
    margin: 16px auto;
    max-width: 320px;
}

.sscr-won-box__value { font-size: 34px; font-weight: 900; color: var(--sscr-primary-dark); margin: 0; }
.sscr-won-box__label { font-size: 14px; font-weight: 600; margin: 4px 0 0; }
.sscr-code { letter-spacing: 2px; font-family: ui-monospace, Consolas, monospace; }

.sscr-meta { font-size: 13px; opacity: .8; }

/* Form */
.sscr-field { display: block; text-align: left; margin-bottom: 14px; }
.sscr-field span { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.sscr-field b { color: #dc2626; }
.sscr-field small { font-weight: 400; opacity: .7; }

.sscr-field input,
.sscr-field select {
    width: 100%;
    padding: 12px 14px;
    font-size: 15px;
    border: 1.5px solid #b6d9d4;
    border-radius: 10px;
    background: #fff;
    color: var(--sscr-text);
    box-sizing: border-box;
}

.sscr-field input:focus,
.sscr-field select:focus {
    outline: none;
    border-color: var(--sscr-primary);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, .15);
}

/* Honeypot: giấu khỏi người thật nhưng bot vẫn "thấy" trong DOM */
.sscr-hp { position: absolute !important; left: -9999px !important; height: 1px; width: 1px; opacity: 0; }

.sscr-error { color: #dc2626; font-size: 14px; font-weight: 600; }

.sscr-check {
    width: 72px;
    height: 72px;
    line-height: 72px;
    margin: 8px auto;
    border-radius: 50%;
    background: var(--sscr-primary);
    color: #fff;
    font-size: 36px;
}

@media (min-width: 600px) {
    .sscr { max-width: 460px; }
    .sscr-title { font-size: 30px; }
    .sscr-card { max-width: 360px; height: 220px; }
}

/* ---- Popup (overlay đè site như modgents.com) ---- */
.sscr-popup {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.sscr-popup[hidden] { display: none; }

.sscr-popup__overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 22, .55);
    backdrop-filter: blur(2px);
    animation: sscr-fade .3s ease;
}

.sscr-popup__dialog {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
    max-height: 92vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
    animation: sscr-pop .35s cubic-bezier(.2, .9, .3, 1.2);
}

/* Trong popup, app không cần padding-top lớn như trang riêng */
.sscr-popup__dialog .sscr { padding-top: 28px; }

@keyframes sscr-pop {
    from { opacity: 0; transform: translateY(20px) scale(.96); }
    to { opacity: 1; transform: none; }
}

.sscr-popup__close {
    position: absolute;
    top: 10px;
    right: 12px;
    z-index: 2;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, .06);
    color: #444;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    transition: background .2s;
}

.sscr-popup__close:hover { background: rgba(0, 0, 0, .12); }

/* --- Thiết kế premium cho mockup KNT --- */
.sscr {
    background: #def5f1; /* Nền xanh mint nhạt đặc trưng của KNT */
    border-radius: 24px;
    box-shadow: 0 12px 36px rgba(13, 148, 136, 0.12);
}

.sscr-logo {
    margin-top: 4px;
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sscr-logo__main {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 32px;
    font-weight: 700;
    color: #0f766e;
    letter-spacing: 4px;
    margin: 0;
    line-height: 1.1;
}

.sscr-logo__img {
    max-width: 160px;
    max-height: 55px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.sscr-gift {
    margin: 32px auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.sscr-gift img {
    width: 100%;
    max-width: 220px;
    height: auto;
    display: block;
    filter: drop-shadow(0 16px 32px rgba(13, 148, 136, 0.18));
    animation: sscr-float 3.5s ease-in-out infinite;
}

@keyframes sscr-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.sscr-btn--intro {
    background: #ffffff !important;
    color: #0d9488 !important;
    border: 1.5px solid rgba(13, 148, 136, 0.15) !important;
    box-shadow: 0 6px 18px rgba(13, 148, 136, 0.1) !important;
    font-weight: 800 !important;
}

.sscr-btn--intro:hover {
    background: #f4fdfc !important;
    color: #0f766e !important;
    transform: translateY(-1px);
    box-shadow: 0 8px 22px rgba(13, 148, 136, 0.15) !important;
}

