/* ═══════════════════════════════════════════════════
   Lucky Wheel – Frontend Styles
   ═══════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@700;800;900&family=Be+Vietnam+Pro:wght@400;500;600&display=swap');

.lw-container {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    font-family: 'Be Vietnam Pro', sans-serif;
    background: #0f0c29;
    overflow: hidden;
}

/* ── Floating particles background ────────────── */
.lw-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}
.lw-particle {
    position: absolute;
    border-radius: 50%;
}

/* Bubbles */
.lw-p-bubble {
    opacity: 0.15;
    animation: lw-float linear infinite;
}
@keyframes lw-float {
    0%   { transform: translateY(100vh) rotate(0deg); opacity: 0.1; }
    50%  { opacity: 0.2; }
    100% { transform: translateY(-120px) rotate(720deg); opacity: 0; }
}

/* Stars */
.lw-p-star {
    background: #fff;
    border-radius: 50%;
    animation: lw-twinkle ease-in-out infinite;
    opacity: 0;
}
@keyframes lw-twinkle {
    0%,100% { opacity:0; transform:scale(0.5); }
    50%      { opacity:1; transform:scale(1.2); }
}
.lw-p-shoot {
    position:absolute; width:80px; height:2px;
    background:linear-gradient(90deg,#fff,transparent);
    border-radius:2px;
    animation: lw-shoot linear forwards;
    opacity:0;
}
@keyframes lw-shoot {
    0%   { opacity:1; transform:translate(0,0) rotate(-30deg); }
    100% { opacity:0; transform:translate(200px,80px) rotate(-30deg); }
}

/* Snow */
.lw-p-snow {
    background: rgba(255,255,255,0.85);
    border-radius: 50%;
    animation: lw-snow linear infinite;
    opacity: 0;
}
@keyframes lw-snow {
    0%   { transform:translateY(-20px) translateX(0); opacity:0; }
    10%  { opacity:0.8; }
    90%  { opacity:0.6; }
    100% { transform:translateY(110vh) translateX(40px); opacity:0; }
}

/* Fireworks sparks */
.lw-p-spark {
    width:6px; height:6px;
    border-radius:50%;
    animation: lw-spark ease-out forwards;
    opacity:1;
}
@keyframes lw-spark {
    0%   { transform:translate(0,0) scale(1); opacity:1; }
    100% { transform:translate(var(--tx),var(--ty)) scale(0); opacity:0; }
}

/* Confetti */
.lw-p-confetti {
    border-radius: 2px;
    opacity: 0;
    animation: lw-confetti-fall linear infinite;
}
@keyframes lw-confetti-fall {
    0%   { transform:translateY(-20px) rotateZ(0deg); opacity:0; }
    10%  { opacity:0.9; }
    90%  { opacity:0.7; }
    100% { transform:translateY(110vh) rotateZ(720deg); opacity:0; }
}

/* ── Header ───────────────────────────────────── */
.lw-header {
    text-align: center;
    margin-bottom: 28px;
    position: relative;
    z-index: 2;
}
.lw-title {
    font-family: 'Nunito', sans-serif;
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 900;
    color: #fff;
    text-shadow: 0 0 40px rgba(108,99,255,0.8), 0 2px 10px rgba(0,0,0,0.5);
    margin: 0 0 8px;
    letter-spacing: -0.5px;
}
.lw-subtitle {
    color: rgba(255,255,255,0.72);
    font-size: 1.05rem;
    margin: 0;
}

/* ── Player form ──────────────────────────────── */
.lw-player-form {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-bottom: 24px;
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 520px;
}
.lw-input-wrap input {
    padding: 13px 20px;
    border-radius: 50px;
    border: 2px solid rgba(255,255,255,0.18);
    background: rgba(255,255,255,0.08);
    color: #fff;
    font-size: 1rem;
    font-family: inherit;
    width: 220px;
    outline: none;
    backdrop-filter: blur(8px);
    transition: border-color 0.3s, background 0.3s;
}
.lw-input-wrap input::placeholder { color: rgba(255,255,255,0.45); }
.lw-input-wrap input:focus {
    border-color: #6c63ff;
    background: rgba(108,99,255,0.15);
}

/* ── Wheel section ────────────────────────────── */
.lw-wheel-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
    position: relative;
    z-index: 2;
}

.lw-wheel-outer {
    position: relative;
    width: min(460px, calc(100vw - 48px));
    height: min(460px, calc(100vw - 48px));
    /* no heavy filter - keeps wheel bright */
}

/* Glow ring - behind canvas */
.lw-wheel-glow {
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, #FF6B6B,#FFD93D,#6BCB77,#4D96FF,#FF6B6B);
    animation: lw-rotate 8s linear infinite;
    opacity: 0.3;
    filter: blur(14px);
    z-index: 0;
}
@keyframes lw-rotate {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* Canvas sits above glow */
.lw-canvas {
    border-radius: 50%;
    display: block;
    width: 100% !important;
    height: 100% !important;
    cursor: default;
    position: relative;
    z-index: 1;
}
/* Pointer arrow */
.lw-pointer {
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 18px solid transparent;
    border-right: 18px solid transparent;
    border-top: 36px solid #FFD700;
    z-index: 10;
    filter: drop-shadow(0 4px 8px rgba(255,215,0,0.8));
    animation: lw-pointer-pulse 1.5s ease-in-out infinite;
}
@keyframes lw-pointer-pulse {
    0%,100% { transform: translateX(-50%) scale(1); }
    50%      { transform: translateX(-50%) scale(1.12); }
}

/* ── Spin button ──────────────────────────────── */
.lw-spin-btn {
    padding: 18px 56px;
    border-radius: 100px;
    border: none;
    background: linear-gradient(135deg, #6c63ff 0%, #f093fb 100%);
    color: #fff;
    font-family: 'Nunito', sans-serif;
    font-size: 1.3rem;
    font-weight: 900;
    cursor: pointer;
    letter-spacing: 1px;
    text-transform: uppercase;
    box-shadow: 0 8px 32px rgba(108,99,255,0.55), 0 2px 8px rgba(0,0,0,0.3);
    transition: transform 0.15s, box-shadow 0.15s, opacity 0.3s;
    position: relative;
    overflow: hidden;
}
.lw-spin-btn::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -60%;
    width: 60%;
    height: 200%;
    background: rgba(255,255,255,0.25);
    transform: skewX(-20deg);
    transition: left 0.5s;
}
.lw-spin-btn:hover::before { left: 130%; }
.lw-spin-btn:hover { transform: translateY(-3px) scale(1.03); box-shadow: 0 14px 40px rgba(108,99,255,0.7); }
.lw-spin-btn:active { transform: scale(0.97); }
.lw-spin-btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

/* ── Modal ────────────────────────────────────── */
.lw-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lw-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(6px);
    animation: lw-fade-in 0.3s ease;
}
@keyframes lw-fade-in { from { opacity: 0; } to { opacity: 1; } }

.lw-modal-box {
    position: relative;
    background: #1a1a2e;
    border: 2px solid rgba(255,255,255,0.12);
    border-radius: 28px;
    padding: 48px 40px 40px;
    text-align: center;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 24px 80px rgba(0,0,0,0.6), 0 0 60px rgba(108,99,255,0.35);
    animation: lw-modal-in 0.5s cubic-bezier(0.34,1.56,0.64,1);
    overflow: hidden;
}
@keyframes lw-modal-in {
    from { opacity: 0; transform: scale(0.6) translateY(40px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.lw-confetti-zone {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}
.lw-confetti-piece {
    position: absolute;
    width: 10px;
    height: 10px;
    animation: lw-confetti-fall 1.6s ease-in forwards;
    border-radius: 2px;
}
@keyframes lw-confetti-fall {
    0%   { transform: translateY(-20px) rotate(0deg); opacity: 1; }
    100% { transform: translateY(420px) rotate(540deg); opacity: 0; }
}

.lw-modal-icon {
    font-size: 4rem;
    line-height: 1;
    margin-bottom: 16px;
    animation: lw-bounce-in 0.6s 0.2s cubic-bezier(0.34,1.56,0.64,1) both;
}
@keyframes lw-bounce-in {
    from { transform: scale(0); }
    to   { transform: scale(1); }
}

.lw-modal-title {
    color: #fff;
    font-family: 'Nunito', sans-serif;
    font-size: 1.8rem;
    font-weight: 900;
    margin: 0 0 12px;
}
.lw-modal-prize {
    font-size: 1.5rem;
    font-weight: 800;
    color: #FFD700;
    text-shadow: 0 0 20px rgba(255,215,0,0.6);
    margin-bottom: 10px;
    font-family: 'Nunito', sans-serif;
}
.lw-modal-desc {
    color: rgba(255,255,255,0.65);
    font-size: 0.95rem;
    margin: 0 0 28px;
    line-height: 1.5;
}
.lw-modal-close {
    padding: 14px 42px;
    border-radius: 100px;
    border: none;
    background: linear-gradient(135deg, #6c63ff, #f093fb);
    color: #fff;
    font-family: 'Nunito', sans-serif;
    font-size: 1.1rem;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    box-shadow: 0 6px 24px rgba(108,99,255,0.5);
}
.lw-modal-close:hover { transform: translateY(-2px); box-shadow: 0 10px 32px rgba(108,99,255,0.7); }

/* ── Responsive ───────────────────────────────── */
@media (max-width: 500px) {
    .lw-spin-btn { padding: 15px 40px; font-size: 1.1rem; }
    .lw-input-wrap input { width: 260px; }
}

/* ═══════════════════════════════════════════════════
   PLAYER INFO POPUP
═══════════════════════════════════════════════════ */
.lw-info-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999998;
    align-items: center;
    justify-content: center;
}
.lw-info-modal .lw-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.82);
    backdrop-filter: blur(8px);
}
.lw-info-box {
    position: relative;
    background: linear-gradient(145deg, #1a1a2e 0%, #16213e 100%);
    border: 2px solid rgba(108,99,255,0.4);
    border-radius: 28px;
    padding: 36px 32px 32px;
    max-width: 420px;
    width: 92%;
    box-shadow: 0 30px 100px rgba(0,0,0,0.7), 0 0 80px rgba(108,99,255,0.25);
    transform: scale(0.85) translateY(30px);
    opacity: 0;
    transition: transform 0.38s cubic-bezier(0.34,1.56,0.64,1), opacity 0.28s ease;
}
.lw-modal-visible .lw-info-box {
    transform: scale(1) translateY(0);
    opacity: 1;
}
.lw-info-header {
    text-align: center;
    margin-bottom: 24px;
}
.lw-info-icon {
    font-size: 3rem;
    margin-bottom: 10px;
    animation: lw-bounce-in 0.5s 0.1s cubic-bezier(0.34,1.56,0.64,1) both;
}
.lw-info-title {
    font-family: 'Nunito', sans-serif;
    font-size: 1.6rem;
    font-weight: 900;
    color: #fff;
    margin: 0 0 6px;
}
.lw-info-sub {
    color: rgba(255,255,255,0.55);
    font-size: 0.9rem;
    margin: 0;
}

/* Fields */
.lw-form-fields { display: flex; flex-direction: column; gap: 14px; margin-bottom: 22px; }
.lw-field-wrap { display: flex; flex-direction: column; gap: 5px; }
.lw-field-label { font-size: 0.88rem; font-weight: 600; color: rgba(255,255,255,0.75); }
.lw-req  { color: #f093fb; margin-left: 2px; }
.lw-opt  { color: rgba(255,255,255,0.38); font-weight: 400; font-size: 0.82em; }
.lw-field-input {
    padding: 12px 16px;
    border-radius: 12px;
    border: 2px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.06);
    color: #fff;
    font-size: 0.97rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.25s, background 0.25s, box-shadow 0.25s;
}
.lw-field-input::placeholder { color: rgba(255,255,255,0.3); }
.lw-field-input:focus {
    border-color: #6c63ff;
    background: rgba(108,99,255,0.12);
    box-shadow: 0 0 0 3px rgba(108,99,255,0.2);
}
.lw-field-input.lw-field-error {
    border-color: #ff6b6b;
    box-shadow: 0 0 0 3px rgba(255,107,107,0.2);
}
.lw-field-err { color: #ff6b6b; font-size: 0.8rem; min-height: 1em; }
.lw-voucher-input { letter-spacing: 1px; font-weight: 600; }

.lw-info-submit {
    width: 100%;
    padding: 15px;
    border-radius: 14px;
    border: none;
    background: linear-gradient(135deg, #6c63ff 0%, #f093fb 100%);
    color: #fff;
    font-family: 'Nunito', sans-serif;
    font-size: 1.15rem;
    font-weight: 900;
    cursor: pointer;
    letter-spacing: 0.5px;
    box-shadow: 0 8px 30px rgba(108,99,255,0.5);
    transition: transform 0.15s, box-shadow 0.15s;
    position: relative;
    overflow: hidden;
}
.lw-info-submit::before {
    content: '';
    position: absolute;
    top: -50%; left: -60%;
    width: 60%; height: 200%;
    background: rgba(255,255,255,0.2);
    transform: skewX(-20deg);
    transition: left 0.5s;
}
.lw-info-submit:hover::before { left: 130%; }
.lw-info-submit:hover { transform: translateY(-2px); box-shadow: 0 14px 40px rgba(108,99,255,0.65); }
.lw-info-submit:active { transform: scale(0.98); }

/* ═══════════════════════════════════════════════
   POINTS MODAL
═══════════════════════════════════════════════ */
.lw-pts-box {
    position: relative;
    background: linear-gradient(145deg, #0d1b2a 0%, #1b2838 100%);
    border: 2px solid rgba(255,215,0,0.35);
    border-radius: 28px;
    padding: 44px 36px 36px;
    max-width: 400px;
    width: 92%;
    text-align: center;
    box-shadow: 0 30px 90px rgba(0,0,0,0.7), 0 0 80px rgba(255,215,0,0.15);
    animation: lw-modal-in 0.5s cubic-bezier(0.34,1.56,0.64,1);
    overflow: hidden;
}
.lw-pts-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}
.lw-pt-particle {
    position: absolute;
    top: 10%;
    font-family: 'Nunito', sans-serif;
    font-size: 1.1rem;
    font-weight: 900;
    opacity: 0;
    animation: lw-pt-fly 1.8s ease-out forwards;
}
@keyframes lw-pt-fly {
    0%   { opacity: 1; transform: translateY(0) scale(1); }
    60%  { opacity: 1; }
    100% { opacity: 0; transform: translateY(-140px) scale(0.6); }
}
.lw-pts-icon {
    font-size: 3.5rem;
    margin-bottom: 10px;
    animation: lw-bounce-in 0.55s 0.15s cubic-bezier(0.34,1.56,0.64,1) both;
    filter: drop-shadow(0 0 16px rgba(255,215,0,0.7));
}
.lw-pts-title {
    font-family: 'Nunito', sans-serif;
    font-size: 1.5rem;
    font-weight: 900;
    color: #fff;
    margin: 0 0 14px;
}
.lw-pts-earned {
    font-family: 'Nunito', sans-serif;
    font-size: 3rem;
    font-weight: 900;
    color: #FFD700;
    text-shadow: 0 0 30px rgba(255,215,0,0.8);
    line-height: 1;
    margin-bottom: 10px;
    animation: lw-pts-pop 0.5s 0.3s cubic-bezier(0.34,1.56,0.64,1) both;
}
@keyframes lw-pts-pop {
    from { transform: scale(0.4); opacity: 0; }
    to   { transform: scale(1);   opacity: 1; }
}
.lw-pts-prize {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.6);
    margin-bottom: 8px;
}
.lw-pts-total {
    display: inline-block;
    background: rgba(255,215,0,0.12);
    border: 1px solid rgba(255,215,0,0.3);
    border-radius: 100px;
    padding: 5px 18px;
    font-family: 'Nunito', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: #FFD700;
    margin-bottom: 16px;
}
.lw-pts-note {
    color: rgba(255,255,255,0.42);
    font-size: 0.82rem;
    line-height: 1.5;
    margin: 0 0 24px;
}
.lw-pts-close {
    padding: 13px 40px;
    border-radius: 100px;
    border: none;
    background: linear-gradient(135deg, #f7971e, #FFD700);
    color: #1a1a2e;
    font-family: 'Nunito', sans-serif;
    font-size: 1.05rem;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 6px 24px rgba(247,151,30,0.45);
    transition: transform 0.15s, box-shadow 0.15s;
}
.lw-pts-close:hover { transform: translateY(-2px); box-shadow: 0 10px 32px rgba(247,151,30,0.65); }

/* ═══════════════════════════════════════════════════
   SMART WHEEL – inline in page, no body injection
═══════════════════════════════════════════════════ */
.lw-smart-wrapper {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    overflow-x: hidden;
    background: #0f0c29;
    font-family: 'Be Vietnam Pro', sans-serif;
    box-sizing: border-box;
}

/* ── Phone entry screen ── */
.lw-smart-phone-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    width: 100%;
    padding: 60px 40px;
    position: relative;
    z-index: 2;
    text-align: center;
    box-sizing: border-box;
}
.lw-smart-logo {
    font-size: 4.5rem;
    margin-bottom: 12px;
    animation: lw-bounce-in 0.6s cubic-bezier(0.34,1.56,0.64,1);
    filter: drop-shadow(0 0 24px rgba(108,99,255,0.7));
}
.lw-smart-form {
    width: 100%;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 32px;
}
.lw-smart-phone-screen .lw-field-label {
    color: rgba(255,255,255,0.82);
    font-size: 0.92rem;
    font-weight: 600;
    text-align: left;
    display: block;
    margin-bottom: 6px;
}
.lw-smart-phone-screen .lw-field-input {
    width: 100%;
    padding: 14px 18px;
    border-radius: 14px;
    border: 2px solid rgba(255,255,255,0.14);
    background: rgba(255,255,255,0.07);
    color: #fff;
    font-size: 1.05rem;
    font-family: inherit;
    outline: none;
    transition: border-color .25s, background .25s, box-shadow .25s;
    box-sizing: border-box;
}
.lw-smart-phone-screen .lw-field-input::placeholder { color: rgba(255,255,255,0.3); }
.lw-smart-phone-screen .lw-field-input:focus {
    border-color: #6c63ff;
    background: rgba(108,99,255,0.13);
    box-shadow: 0 0 0 3px rgba(108,99,255,0.22);
}
.lw-smart-phone-screen .lw-field-input.lw-field-error {
    border-color: #ff6b6b;
    box-shadow: 0 0 0 3px rgba(255,107,107,0.2);
}
.lw-smart-phone-screen .lw-field-err {
    color: #ff6b6b; font-size: .82rem; text-align: left; margin-top: 4px; display: block;
}
.lw-smart-submit {
    width: 100%;
    padding: 16px;
    border-radius: 14px;
    border: none;
    background: linear-gradient(135deg, #6c63ff 0%, #f093fb 100%);
    color: #fff;
    font-family: 'Nunito', sans-serif;
    font-size: 1.2rem;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 8px 30px rgba(108,99,255,0.5);
    transition: transform .15s, box-shadow .15s;
    margin-top: 4px;
}
.lw-smart-submit:hover  { transform: translateY(-2px); box-shadow: 0 12px 36px rgba(108,99,255,0.65); }
.lw-smart-submit:active { transform: scale(0.98); }
.lw-smart-submit:disabled { opacity: .6; cursor: not-allowed; transform: none; }

/* ── Points banner ── */
.lw-smart-points-banner {
    position: relative; z-index: 10;
    width: calc(100% - 48px); max-width: 560px;
    margin: 20px auto 0;
    padding: 16px 24px;
    background: linear-gradient(135deg,rgba(247,151,30,.2),rgba(255,215,0,.1));
    border: 2px solid rgba(255,215,0,.4);
    border-radius: 18px;
    display: flex; align-items: center; justify-content: space-between; gap: 14px;
    box-shadow: 0 4px 24px rgba(255,215,0,.1);
}
.lw-pts-banner-inner { display:flex; align-items:center; gap:16px; flex-wrap:wrap; }
.lw-pts-banner-label { font-size:.88rem; color:rgba(255,255,255,.6); font-weight:600; }
.lw-pts-banner-value {
    font-family:'Nunito',sans-serif; font-size:2rem; font-weight:900;
    color:#FFD700; text-shadow:0 0 24px rgba(255,215,0,.65); line-height:1;
}
.lw-pts-banner-name { font-size:.85rem; color:rgba(255,255,255,.48); }
.lw-pts-banner-change {
    padding:8px 18px; border-radius:20px;
    border:1.5px solid rgba(255,255,255,.22);
    background:transparent; color:rgba(255,255,255,.6);
    font-size:.83rem; cursor:pointer; white-space:nowrap;
    transition:all .2s; font-family:inherit;
}
.lw-pts-banner-change:hover { border-color:rgba(255,255,255,.5); color:#fff; background:rgba(255,255,255,.07); }
@keyframes lw-pts-pulse { 0%,100%{transform:scale(1)} 50%{transform:scale(1.15)} }
.lw-pts-banner-pulse .lw-pts-banner-value { animation:lw-pts-pulse .6s ease; }

/* ── Wheel area ── */
.lw-smart-wheel-area { width:100%; position:relative; z-index:2; }
.lw-smart-wheel-area .lw-container { min-height:unset; background:transparent !important; padding:28px 24px 48px; }

/* ── Loading ── */
.lw-smart-loading { display:flex;flex-direction:column;align-items:center;justify-content:center;padding:80px 20px;color:rgba(255,255,255,.55);font-size:1rem;gap:18px; }
.lw-smart-spinner { width:48px;height:48px;border:4px solid rgba(108,99,255,.22);border-top-color:#6c63ff;border-radius:50%;animation:lw-spin-anim .8s linear infinite; }
@keyframes lw-spin-anim { to{transform:rotate(360deg)} }

@media (max-width: 600px) {
    .lw-smart-phone-screen  { padding: 48px 24px; }
    .lw-smart-points-banner { width:calc(100% - 32px); flex-direction:column; align-items:flex-start; gap:10px; }
    .lw-pts-banner-value    { font-size: 1.6rem; }
}

/* ═══════════════════════════════════════════════════
   HISTORY WIDGET
═══════════════════════════════════════════════════ */
.lw-history-wrapper {
    font-family: 'Be Vietnam Pro', sans-serif;
    max-width: 640px;
    margin: 0 auto;
}
.lw-history-title {
    font-family: 'Nunito', sans-serif;
    font-size: 1.3rem;
    font-weight: 800;
    margin: 0 0 16px;
    color: #1d2327;
}
.lw-history-form {
    display: flex;
    gap: 10px;
    align-items: center;
}
.lw-history-input {
    flex: 1;
    padding: 13px 18px;
    border-radius: 12px;
    border: 2px solid #e5e7eb;
    font-size: 1rem;
    font-family: inherit;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}
.lw-history-input:focus { border-color: #6c63ff; box-shadow: 0 0 0 3px rgba(108,99,255,.15); }
.lw-history-btn {
    padding: 13px 24px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, #6c63ff, #f093fb);
    color: #fff;
    font-family: 'Nunito', sans-serif;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;
    transition: transform .15s, box-shadow .15s;
    box-shadow: 0 4px 16px rgba(108,99,255,.4);
}
.lw-history-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(108,99,255,.5); }
.lw-history-btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.lw-history-err { color: #ef4444; font-size: .88rem; margin-top: 8px; display: none; }

/* Results */
.lw-history-results { margin-top: 20px; }
.lw-hist-header {
    background: linear-gradient(135deg, #f0edff, #fce8ff);
    border: 2px solid rgba(108,99,255,.2);
    border-radius: 14px;
    padding: 16px 20px;
    margin-bottom: 16px;
}
.lw-hist-phone { font-size: 1rem; font-weight: 600; color: #374151; margin-bottom: 8px; }
.lw-hist-stats { display: flex; gap: 16px; flex-wrap: wrap; }
.lw-hist-stat { font-size: .88rem; color: #555; background: #fff; padding: 4px 12px; border-radius: 20px; }
.lw-hist-pts { color: #92400e; background: #fef3c7; font-weight: 700; }
.lw-hist-empty { text-align: center; color: #999; padding: 32px 0; }
.lw-hist-list { display: flex; flex-direction: column; gap: 10px; }
.lw-hist-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: #fff;
    border: 1.5px solid #f0f0f0;
    border-radius: 12px;
    padding: 14px 18px;
    transition: box-shadow .15s;
}
.lw-hist-row:hover { box-shadow: 0 2px 12px rgba(0,0,0,.07); }
.lw-hist-row-left { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lw-hist-mode-badge {
    font-size: .78rem; font-weight: 700; padding: 3px 10px;
    border-radius: 20px; white-space: nowrap;
}
.lw-hist-mode-prize   { background: #d1fae5; color: #065f46; }
.lw-hist-mode-points  { background: #fef3c7; color: #92400e; }
.lw-hist-mode-manual  { background: #f3f4f6; color: #6b7280; }
.lw-hist-prize { font-size: .95rem; color: #1d2327; }
.lw-hist-pts-badge { font-size: .8rem; font-weight: 700; color: #f7971e; }
.lw-hist-time { font-size: .8rem; color: #9ca3af; white-space: nowrap; }

@media (max-width: 500px) {
    .lw-history-form { flex-direction: column; align-items: stretch; }
    .lw-history-btn  { width: 100%; }
    .lw-hist-row     { flex-direction: column; align-items: flex-start; gap: 6px; }
    .lw-hist-time    { font-size: .75rem; }
}
