/* =========================================================
   PTK Lotto Stat Predictor - SAFE UI
   v1.6.1
========================================================= */

:root{
  --ptk-lotto-bg:#090909;
  --ptk-lotto-card:rgba(18,18,18,.88);
  --ptk-lotto-card-soft:rgba(28,18,18,.72);
  --ptk-lotto-text:#f6f1e8;
  --ptk-lotto-muted:#c9bda9;
  --ptk-lotto-gold:#d9b66d;
  --ptk-lotto-gold-soft:#f0d08a;
  --ptk-lotto-blood:#7f1d1d;
  --ptk-lotto-blood-dark:#4a0d0d;
  --ptk-lotto-border:rgba(217,182,109,.18);
  --ptk-lotto-shadow:0 18px 48px rgba(0,0,0,.28);
}

.ptk-lotto-wrap,
.ptk-lotto-wrap *{box-sizing:border-box}

.ptk-lotto-wrap{
  width:100%;
  max-width:1100px;
  margin:0 auto;
  padding:18px 0;
  color:var(--ptk-lotto-text);
}

.ptk-lotto-card,
.ptk-lotto-extra-card{
  background:linear-gradient(180deg,rgba(18,18,18,.92),rgba(8,8,8,.9));
  border:1px solid var(--ptk-lotto-border);
  border-radius:20px;
  padding:20px;
  margin:0 0 18px;
  box-shadow:var(--ptk-lotto-shadow);
  backdrop-filter:blur(6px);
}

.ptk-lotto-card h2,
.ptk-lotto-card h3,
.ptk-lotto-extra-card h4{color:#fff;margin:0 0 12px;line-height:1.25}

.ptk-lotto-eyebrow,
.ptk-lotto-admin-kicker{
  color:var(--ptk-lotto-gold-soft);
  font-size:12px;
  font-weight:800;
  letter-spacing:.04em;
  text-transform:uppercase;
  margin:0 0 8px;
}

.ptk-lotto-muted,
.ptk-lotto-note{color:var(--ptk-lotto-muted);font-size:13px;line-height:1.7}
.ptk-lotto-note{margin:16px 0 0}

/* =========================================================
   TABS - DARK BLOOD RED / MOBILE AUTO WIDTH
========================================================= */

.ptk-lotto-tabs{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:10px;
  flex-wrap:wrap;
  margin:0 0 18px;
}

.ptk-lotto-tab-btn{
  appearance:none;
  width:auto!important;
  min-width:auto!important;
  flex:0 0 auto!important;
  border:1px solid rgba(120,35,35,.48)!important;
  background:linear-gradient(180deg,#1a0f10,#0d0708)!important;
  color:#e8b6b6!important;
  border-radius:14px;
  padding:10px 16px;
  font-size:14px;
  font-weight:800;
  line-height:1.2;
  cursor:pointer;
  transition:transform .18s ease,background .18s ease,border-color .18s ease,box-shadow .18s ease;
  box-shadow:0 10px 24px rgba(0,0,0,.34),inset 0 1px 0 rgba(255,255,255,.03)!important;
}

.ptk-lotto-tab-btn:hover{
  transform:translateY(-1px);
  border-color:rgba(170,65,65,.75)!important;
  background:linear-gradient(180deg,#241214,#13090a)!important;
  color:#ffd7d7!important;
}

.ptk-lotto-tab-btn.is-active{
  background:linear-gradient(180deg,var(--ptk-lotto-blood),var(--ptk-lotto-blood-dark))!important;
  color:#fff!important;
  border-color:rgba(255,120,120,.38)!important;
  box-shadow:0 14px 30px rgba(80,10,10,.34),inset 0 1px 0 rgba(255,255,255,.08)!important;
}

.ptk-lotto-tab-panel{display:none}
.ptk-lotto-tab-panel.is-active{display:block}

/* =========================================================
   CHECK FORM / BUTTONS
========================================================= */

.ptk-lotto-check-form{
  display:grid;
  grid-template-columns:minmax(170px,1fr) minmax(150px,220px) auto;
  gap:10px;
  align-items:center;
}

.ptk-lotto-check-form input,
.ptk-lotto-check-form select{
  width:100%;
  min-height:44px;
  border-radius:14px;
  border:1px solid rgba(217,182,109,.18);
  background:rgba(0,0,0,.42);
  color:#fff;
  padding:0 14px;
  outline:none;
}

.ptk-lotto-check-form input:focus,
.ptk-lotto-check-form select:focus{border-color:rgba(217,182,109,.55);box-shadow:0 0 0 3px rgba(217,182,109,.08)}

.ptk-lotto-check-form button,
.ptk-lotto-check-btn,
.ptk-lotto-search-btn,
.ptk-lotto-login-btn{
  min-height:44px;
  border:1px solid rgba(255,120,120,.35)!important;
  border-radius:14px;
  background:linear-gradient(180deg,var(--ptk-lotto-blood),var(--ptk-lotto-blood-dark))!important;
  color:#fff!important;
  padding:0 18px;
  font-size:14px;
  font-weight:900;
  text-decoration:none!important;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  box-shadow:0 12px 26px rgba(80,10,10,.32),inset 0 1px 0 rgba(255,255,255,.08)!important;
}

.ptk-lotto-check-form button:hover,
.ptk-lotto-login-btn:hover{filter:brightness(1.08);color:#fff!important}

.ptk-lotto-check-result,
.ptk-lotto-fav-notice{
  margin:14px 0 0;
  padding:14px 16px;
  border-radius:16px;
  line-height:1.7;
  border:1px solid rgba(255,255,255,.08);
}

.ptk-lotto-check-result.is-win,
.ptk-lotto-fav-notice.is-win{
  background:rgba(17,94,52,.18);
  border-color:rgba(80,220,150,.25);
  color:#d8ffe9;
}

.ptk-lotto-check-result.is-bad,
.ptk-lotto-fav-notice.is-bad{
  background:rgba(127,29,29,.16);
  border-color:rgba(255,120,120,.22);
  color:#ffd4d4;
}

/* =========================================================
   RESULTS / PRIZE AMOUNTS
========================================================= */

.ptk-lotto-results{display:grid;grid-template-columns:1fr;gap:14px}
.ptk-lotto-result-group{padding:16px;border-radius:18px;background:rgba(255,255,255,.035);border:1px solid rgba(255,255,255,.07)}
.ptk-lotto-result-group h3{display:flex;justify-content:space-between;gap:10px;align-items:center;margin:0 0 8px;color:#fff}
.ptk-lotto-result-group h3 span{font-size:12px;color:var(--ptk-lotto-muted);font-weight:700}
.ptk-lotto-prize-amount{display:inline-flex;margin:0 0 12px;padding:5px 10px;border-radius:999px;background:rgba(217,182,109,.12);border:1px solid rgba(217,182,109,.20);color:#f4d997;font-size:12px;font-weight:800}
.ptk-lotto-number-grid{display:flex;flex-wrap:wrap;gap:8px}
.ptk-lotto-number-grid span,
.ptk-lotto-chip-number{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:34px;
  padding:6px 11px;
  border-radius:12px;
  background:rgba(0,0,0,.42);
  border:1px solid rgba(217,182,109,.18);
  color:#fff;
  font-weight:900;
  letter-spacing:.04em;
}

/* =========================================================
   PREDICTION / FAVORITES
========================================================= */

.ptk-lotto-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.ptk-lotto-pred-card{margin:0}
.ptk-lotto-pred-row{margin:0 0 14px}
.ptk-lotto-pred-row strong{display:block;margin:0 0 8px;color:#f7dfad}
.ptk-lotto-chip-list{display:flex;flex-wrap:wrap;gap:8px}
.ptk-lotto-chip-with-action{display:inline-flex;align-items:center;gap:6px;flex-wrap:nowrap}
.ptk-lotto-fav-toggle{
  display:inline-flex;
  align-items:center;
  min-height:30px;
  padding:5px 9px;
  border-radius:10px;
  border:1px solid rgba(255,120,120,.30)!important;
  background:linear-gradient(180deg,#191010,#0b0707)!important;
  color:#ffdada!important;
  text-decoration:none!important;
  font-size:12px;
  font-weight:900;
}
.ptk-lotto-fav-toggle.is-saved{background:rgba(20,80,55,.25)!important;border-color:rgba(80,220,150,.25)!important;color:#d8ffe9!important}
.ptk-lotto-fav-toggle.is-login{background:linear-gradient(180deg,var(--ptk-lotto-blood),var(--ptk-lotto-blood-dark))!important;color:#fff!important}
.ptk-lotto-fav-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:12px}
.ptk-lotto-fav-item{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px;border-radius:16px;border:1px solid rgba(255,255,255,.08);background:rgba(255,255,255,.035)}
.ptk-lotto-fav-main{display:flex;flex-direction:column;align-items:flex-start;gap:7px;min-width:0}
.ptk-lotto-fav-type{display:inline-flex;width:fit-content;max-width:100%;padding:4px 8px;border-radius:999px;background:rgba(127,29,29,.24);border:1px solid rgba(255,120,120,.22);color:#ffd4d4;font-size:11px;font-weight:900;line-height:1.2;white-space:nowrap}
.ptk-lotto-fav-number{display:block;font-size:28px;font-weight:950;color:#fff;line-height:1;letter-spacing:.04em;margin:0}
.ptk-lotto-fav-meta{display:block;color:var(--ptk-lotto-muted);font-size:12px;margin:0 0 10px}
.ptk-lotto-delete-fav{flex:0 0 auto;color:#ffdada!important;text-decoration:none!important;font-size:12px;font-weight:900;padding:7px 10px;border-radius:10px;border:1px solid rgba(255,120,120,.22);background:rgba(127,29,29,.16)}

.ptk-lotto-pred-hit-card{border-color:rgba(80,220,150,.26);background:linear-gradient(180deg,rgba(15,80,55,.25),rgba(8,8,8,.9))}
.ptk-lotto-hit-list{display:flex;flex-wrap:wrap;gap:10px}
.ptk-lotto-hit-item{display:flex;align-items:center;gap:8px;padding:10px 12px;border-radius:14px;background:rgba(0,0,0,.32);border:1px solid rgba(80,220,150,.22)}
.ptk-lotto-hit-number{font-size:18px;font-weight:900;color:#d8ffe9}.ptk-lotto-hit-meta{font-size:12px;color:#b9e7ce}

/* =========================================================
   ADMIN LIGHT POLISH
========================================================= */
.ptk-lotto-admin-hero,.ptk-lotto-admin-panel,.ptk-lotto-admin-action-card,.ptk-lotto-admin-card{background:#fff;border:1px solid #e5e5e5;border-radius:14px;padding:18px;margin:0 0 16px;box-shadow:0 8px 22px rgba(0,0,0,.04)}
.ptk-lotto-admin-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:14px;margin:16px 0}.ptk-lotto-admin-card span{display:block;color:#666}.ptk-lotto-admin-card strong{display:block;font-size:24px;margin:6px 0}.ptk-lotto-admin-actions{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:16px}.ptk-lotto-admin-inline{display:flex;gap:8px;margin-top:12px}.ptk-lotto-ok{color:#087d3f;font-weight:700}.ptk-lotto-warn{color:#a86a00;font-weight:700}.ptk-lotto-admin-field-grid{display:grid;grid-template-columns:minmax(0,2fr) minmax(180px,1fr);gap:16px}.ptk-lotto-admin-media-row{display:flex;gap:8px;flex-wrap:wrap}.ptk-lotto-admin-bg-preview{width:100%;height:120px;border-radius:14px;background-size:cover;background-position:center;margin:12px 0;border:1px solid #ddd}

@media (max-width:768px){
  .ptk-lotto-wrap{padding:12px 0}
  .ptk-lotto-tabs{gap:8px;justify-content:flex-start}
  .ptk-lotto-tab-btn{width:auto!important;min-width:auto!important;flex:none!important;padding:9px 14px;font-size:13px}
  .ptk-lotto-check-form{grid-template-columns:1fr}
  .ptk-lotto-grid{grid-template-columns:1fr}
  .ptk-lotto-card{padding:16px;border-radius:18px}
  .ptk-lotto-chip-with-action{flex-wrap:wrap}
  .ptk-lotto-admin-field-grid{grid-template-columns:1fr}
}

/* =========================================================
   PTK LOTTO N3 RESULT BLOCK - SOFT BLUE OFFICIAL
========================================================= */

.ptk-lotto-group-n3{
  background:linear-gradient(180deg,rgba(230,246,255,.11),rgba(130,190,225,.075)) !important;
  border:1px solid rgba(150,215,255,.28) !important;
  box-shadow:
    0 12px 28px rgba(0,0,0,.16),
    inset 0 1px 0 rgba(255,255,255,.06) !important;
}

.ptk-lotto-group-n3 h3{
  align-items:flex-start;
  flex-wrap:wrap;
  gap:8px 12px;
}

.ptk-lotto-n3-title-main{
  display:inline-flex;
  align-items:center;
  flex-wrap:wrap;
  gap:8px;
  color:#dff4ff;
}

.ptk-lotto-n3-title-main em{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:3px 8px;
  border-radius:999px;
  background:linear-gradient(180deg,#58c7ff,#1976a8);
  color:#fff;
  font-size:11px;
  font-style:normal;
  font-weight:900;
  line-height:1.2;
  box-shadow:0 8px 16px rgba(25,118,168,.22);
}

.ptk-lotto-n3-source{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:5px 10px;
  border-radius:999px;
  background:rgba(5,35,55,.46);
  border:1px solid rgba(150,215,255,.24);
  color:#bfeeff !important;
  font-size:12px;
  font-weight:900;
  line-height:1.2;
  text-decoration:none !important;
}

.ptk-lotto-n3-source:hover{
  color:#fff !important;
  border-color:rgba(190,235,255,.45);
}

.ptk-lotto-n3-note{
  margin:0 0 12px;
  color:#bfe3f2;
  font-size:12px;
  line-height:1.55;
}

.ptk-lotto-n3-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(190px,1fr));
  gap:12px;
}

.ptk-lotto-n3-box{
  padding:13px;
  border-radius:16px;
  background:rgba(0,0,0,.28);
  border:1px solid rgba(150,215,255,.18);
}

.ptk-lotto-n3-box strong{
  display:block;
  margin:0 0 7px;
  color:#e6f7ff;
  font-size:14px;
}

.ptk-lotto-n3-box small{
  display:inline-flex;
  margin:0 0 9px;
  padding:4px 8px;
  border-radius:999px;
  background:rgba(255,255,255,.055);
  border:1px solid rgba(255,255,255,.08);
  color:#cbefff;
  font-size:11px;
  font-weight:800;
}

/* =========================================================
   PTK LOTTO ADMIN WIDTH SAFE FIX
========================================================= */

.ptk-lotto-admin-wrap,
.ptk-lotto-admin-page,
.wrap.ptk-lotto-admin-wrap{
    width:auto !important;
    max-width:none !important;

    margin-right:24px !important;
    padding-right:24px !important;

    box-sizing:border-box;
}

.ptk-lotto-admin-grid,
.ptk-lotto-admin-card,
.ptk-lotto-admin-section{
    box-sizing:border-box;
}

@media (max-width:782px){

    .ptk-lotto-admin-wrap,
    .ptk-lotto-admin-page,
    .wrap.ptk-lotto-admin-wrap{
        margin-right:12px !important;
        padding-right:12px !important;
    }

}

.ptk-lotto-tabs-placeholder{
    height:0;
}

.ptk-lotto-tabs.is-sticky-js{
    position:fixed;

    top:72px;
    left:0;
    right:0;

    z-index:999;

    display:flex;
    justify-content:center;
    gap:8px;

    padding:10px 14px;

    background:rgba(10,10,10,.82);

    backdrop-filter:blur(12px);
    -webkit-backdrop-filter:blur(12px);

    border-bottom:1px solid rgba(232,196,120,.16);

    box-shadow:
        0 10px 24px rgba(0,0,0,.28);
}

.ptk-lotto-tabs.is-sticky-js{

    position:fixed;

    top:62px !important;

    left:0;
    right:0;

    z-index:9980;

    padding:10px 14px;

    background:rgba(10,10,10,.88);

    backdrop-filter:blur(12px);
    -webkit-backdrop-filter:blur(12px);

    border-bottom:1px solid rgba(232,196,120,.12);

    box-shadow:
        0 10px 24px rgba(0,0,0,.24);
}

/* =========================================================
   PTK LOTTO NOTICE SPACING + AUTO HIDE
========================================================= */

.ptk-lotto-wrap .notice,
.ptk-lotto-wrap .updated,
.ptk-lotto-wrap .ptk-notice,
.ptk-lotto-wrap .ptk-lotto-notice,
.ptk-lotto-wrap .ptk-lotto-alert,
.ptk-lotto-wrap .ptk-lotto-message,
.ptk-lotto-wrap [class*="notice"],
.ptk-lotto-wrap [class*="message"],
.ptk-lotto-wrap [class*="alert"]{
    margin:16px 0 20px !important;

    transition:
        opacity .35s ease,
        transform .35s ease,
        max-height .35s ease,
        margin .35s ease,
        padding .35s ease;
}

/* กันชิดแท็บ */
.ptk-lotto-tabs + .notice,
.ptk-lotto-tabs + .updated,
.ptk-lotto-tabs + .ptk-notice,
.ptk-lotto-tabs + .ptk-lotto-notice,
.ptk-lotto-tabs + .ptk-lotto-alert,
.ptk-lotto-tabs + .ptk-lotto-message,
.ptk-lotto-tabs + [class*="notice"],
.ptk-lotto-tabs + [class*="message"],
.ptk-lotto-tabs + [class*="alert"]{
    margin-top:22px !important;
}

.ptk-lotto-auto-hide{
    opacity:0 !important;
    transform:translateY(-8px) !important;
    max-height:0 !important;
    margin-top:0 !important;
    margin-bottom:0 !important;
    padding-top:0 !important;
    padding-bottom:0 !important;
    overflow:hidden !important;
}

/* =========================================================
   PTK LOTTO NOTICE ANIMATION
========================================================= */

@keyframes ptkNoticeIn{

    0%{
        opacity:0;
        transform:
            translateY(-14px)
            scale(.96);
    }

    60%{
        opacity:1;
        transform:
            translateY(2px)
            scale(1.01);
    }

    100%{
        opacity:1;
        transform:
            translateY(0)
            scale(1);
    }

}

@keyframes ptkNoticeGlow{

    0%{
        box-shadow:
            0 0 0 rgba(255,210,120,0);
    }

    50%{
        box-shadow:
            0 0 22px rgba(255,210,120,.16);
    }

    100%{
        box-shadow:
            0 0 0 rgba(255,210,120,0);
    }

}



/* =========================================================
   NOTICE BASE
========================================================= */

.ptk-lotto-wrap .notice,
.ptk-lotto-wrap .updated,
.ptk-lotto-wrap .ptk-notice,
.ptk-lotto-wrap .ptk-lotto-notice,
.ptk-lotto-wrap .ptk-lotto-alert,
.ptk-lotto-wrap .ptk-lotto-message,
.ptk-lotto-wrap [class*="notice"],
.ptk-lotto-wrap [class*="message"],
.ptk-lotto-wrap [class*="alert"]{

    animation:
        ptkNoticeIn .42s cubic-bezier(.22,1,.36,1),
        ptkNoticeGlow 2.8s ease-in-out infinite;

    transition:
        opacity .42s ease,
        transform .42s ease,
        max-height .42s ease,
        margin .42s ease,
        padding .42s ease;

    will-change:
        opacity,
        transform;
}



/* =========================================================
   HIDE STATE
========================================================= */

.ptk-lotto-auto-hide{

    opacity:0 !important;

    transform:
        translateY(-10px)
        scale(.96) !important;

    max-height:0 !important;

    margin-top:0 !important;
    margin-bottom:0 !important;

    padding-top:0 !important;
    padding-bottom:0 !important;

    overflow:hidden !important;

    pointer-events:none;
}