@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700;900&family=Lato:wght@300;400;700&display=swap');

/* ── KART ── */
.kk-root { width:100%; max-width:560px; margin:0 auto; font-family:'Lato',Arial,sans-serif; }
.kk-root *, .kk-root *::before, .kk-root *::after { box-sizing:border-box; margin:0; padding:0; }

/* Mobilde çift dokunma/basılı tutma ile metin seçimi veya büyüteç menüsü açılmasın */
.kk-root, .kk-root *,
.kk-modal-wrap, .kk-modal-wrap * {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

.kk-card {
    position:relative; border-radius:20px; overflow:hidden;
    background:#0e0706;
    box-shadow:0 20px 60px rgba(0,0,0,.5), 0 0 0 1px rgba(197,155,51,.2);
}
.kk-card::before {
    content:''; position:absolute; inset:0; pointer-events:none;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(139,69,19,.35) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(197,155,51,.2)  0%, transparent 50%),
        radial-gradient(ellipse at 60% 80%, rgba(42,21,8,.8)     0%, transparent 60%);
}
.kk-card-inner {
    position:relative; z-index:1;
    display:grid; grid-template-columns:1fr 1fr; min-height:280px;
}

/* Görsel bölüm */
.kk-visual {
    position:relative; display:flex; flex-direction:column;
    align-items:center; justify-content:center;
    padding:28px 16px 20px; gap:10px;
    border-right:1px solid rgba(197,155,51,.15);
}
.kk-bean-row { display:flex; align-items:flex-end; justify-content:center; gap:6px; }
.kk-bean-item { display:flex; flex-direction:column; align-items:center; gap:6px; }
.kk-bean-img {
    width:46px; height:56px; object-fit:contain;
    filter:drop-shadow(0 4px 10px rgba(0,0,0,.7));
    animation:kkBeanFloat 3s ease-in-out infinite;
    transition:transform .2s;
}
.kk-bean-item:nth-child(1) .kk-bean-img { animation-delay:0s; }
.kk-bean-item:nth-child(2) .kk-bean-img { animation-delay:.3s; }
.kk-bean-item:nth-child(3) .kk-bean-img { animation-delay:.6s; width:54px; height:64px; }
.kk-bean-item:nth-child(4) .kk-bean-img { animation-delay:.9s; }
.kk-bean-item:nth-child(5) .kk-bean-img { animation-delay:1.2s; }
.kk-bean-item:hover .kk-bean-img { transform:translateY(-6px) scale(1.08); }
@keyframes kkBeanFloat { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-6px)} }
.kk-bean-label { font-size:9px; letter-spacing:.06em; text-transform:uppercase; color:rgba(245,230,200,.5); white-space:nowrap; }
.kk-bean-arrow { color:rgba(197,155,51,.4); font-size:14px; margin-bottom:20px; flex-shrink:0; }

.kk-flame { position:absolute; bottom:12px; left:50%; transform:translateX(-50%); width:36px; height:44px; pointer-events:none; opacity:.7; }
.kk-fl { position:absolute; bottom:0; left:50%; transform:translateX(-50%); border-radius:50% 50% 45% 45%/60% 60% 40% 40%; filter:blur(1.5px); }
.kk-fl-o { width:32px; height:44px; background:radial-gradient(ellipse at 50% 90%,#ff6a00,#ff3d00 40%,transparent 75%); animation:kkFlame .5s ease-in-out infinite alternate; }
.kk-fl-m { width:20px; height:32px; background:radial-gradient(ellipse at 50% 90%,#ffb300,#ff8f00 45%,transparent 80%); animation:kkFlame .35s ease-in-out infinite alternate-reverse; }
.kk-fl-i { width:9px;  height:20px; background:radial-gradient(ellipse at 50% 85%,#fff59d,#ffd54f 50%,transparent 85%); animation:kkFlame .25s ease-in-out infinite alternate; }
@keyframes kkFlame { 0%{transform:translateX(-50%) scaleY(.92) scaleX(1)} 100%{transform:translateX(-50%) scaleY(1.1) scaleX(.9)} }

/* Metin bölüm */
.kk-text { padding:32px 24px 28px; display:flex; flex-direction:column; justify-content:space-between; color:#f5e6c8; }
.kk-label { font-size:10px; letter-spacing:.2em; text-transform:uppercase; color:#c59b33; opacity:.8; margin-bottom:10px; }
.kk-title { font-family:'Playfair Display',Georgia,serif; font-size:26px; font-weight:900; line-height:1.15; color:#f5e6c8; margin-bottom:12px; }
.kk-title span { color:#c59b33; display:block; }
.kk-desc { font-size:13px; line-height:1.6; color:rgba(245,230,200,.7); margin-bottom:20px; flex-grow:1; }
.kk-meta { display:flex; gap:8px; flex-wrap:wrap; margin-bottom:22px; }
.kk-badge { font-size:11px; padding:4px 10px; border-radius:999px; border:1px solid rgba(197,155,51,.4); color:rgba(245,230,200,.75); background:rgba(197,155,51,.08); }

.kk-play-btn {
    display:inline-flex; align-items:center; gap:10px; padding:13px 22px;
    background:linear-gradient(135deg,#c59b33,#a07820);
    color:#0e0706; font-family:'Lato',Arial,sans-serif; font-size:14px; font-weight:700;
    letter-spacing:.05em; text-transform:uppercase; border:none; border-radius:12px;
    cursor:pointer; width:fit-content;
    transition:transform .15s, box-shadow .15s, filter .15s;
    box-shadow:0 4px 20px rgba(197,155,51,.35);
}
.kk-play-btn:hover { transform:translateY(-2px); box-shadow:0 8px 28px rgba(197,155,51,.5); filter:brightness(1.1); }
.kk-play-btn:active { transform:translateY(0); }
.kk-play-icon { width:18px; height:18px; background:#0e0706; border-radius:50%; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.kk-play-icon::after { content:''; display:block; width:0; height:0; border-top:5px solid transparent; border-bottom:5px solid transparent; border-left:8px solid #c59b33; margin-left:2px; }

.kk-footer { position:relative; z-index:1; display:flex; justify-content:space-between; align-items:center; padding:12px 24px; border-top:1px solid rgba(197,155,51,.1); background:rgba(0,0,0,.2); }
.kk-footer-text { font-size:11px; color:rgba(245,230,200,.4); }
.kk-dots { display:flex; gap:5px; }
.kk-dot { width:7px; height:7px; border-radius:50%; background:#c59b33; opacity:.3; animation:kkDot 2s ease-in-out infinite; }
.kk-dot:nth-child(2){animation-delay:.3s} .kk-dot:nth-child(3){animation-delay:.6s}
@keyframes kkDot { 0%,100%{opacity:.3;transform:scale(1)} 50%{opacity:.9;transform:scale(1.3)} }

/* ── MODAL ── */
.kk-modal-wrap {
    display:none; position:fixed; inset:0; z-index:99999;
    align-items:center; justify-content:center; padding:16px;
    background:rgba(8,4,2,.88); backdrop-filter:blur(6px); -webkit-backdrop-filter:blur(6px);
}
.kk-modal-wrap.open { display:flex; animation:kkModalIn .25s ease; }
@keyframes kkModalIn { from{opacity:0} to{opacity:1} }

.kk-modal-box {
    position:relative; width:100%; max-width:980px; max-height:92vh;
    border-radius:20px; overflow-y:auto;
    box-shadow:0 30px 80px rgba(0,0,0,.7), 0 0 0 1px rgba(197,155,51,.25);
    animation:kkModalUp .3s cubic-bezier(.18,.89,.32,1.1);
    background:radial-gradient(circle at 50% 20%, #2a1511, #0e0706);
    color:#f0e0c8;
}

.kk-close {
    position:absolute !important;
    top:12px !important;
    right:12px !important;
    z-index:100001 !important;
    width:36px !important;
    height:36px !important;
    background:rgba(255,255,255,0.15) !important;
    border:1.5px solid rgba(255,255,255,0.5) !important;
    border-radius:50% !important;
    color:#fff !important;
    font-size:16px !important;
    font-weight:bold !important;
    line-height:36px !important;
    text-align:center !important;
    display:block !important;
    cursor:pointer !important;
    font-family:Arial,sans-serif !important;
    visibility:visible !important;
    opacity:1 !important;
    padding:0 !important;
    margin:0 !important;
    box-sizing:border-box !important;
    text-decoration:none !important;
    user-select:none;
    transition:background .15s;
}
.kk-close:hover {
    background:rgba(200,50,50,.85) !important;
    color:#fff !important;
}

.kk-game-wrap {
    color:white; padding:16px;
    display:flex; justify-content:center; align-items:flex-start;
    min-height:500px;
}

/* Mobil */
@media(max-width:520px){
    .kk-card-inner { grid-template-columns:1fr; }
    /* .kk-visual, JS tarafından .kk-text içine (başlık ile buton arasına) taşınır */
    .kk-visual { border-right:none; border-top:1px solid rgba(197,155,51,.15); border-bottom:1px solid rgba(197,155,51,.15); padding:14px 12px; margin:6px 0; }
    .kk-bean-img { width:36px; height:44px; }
    .kk-bean-item:nth-child(3) .kk-bean-img { width:42px; height:52px; }
    .kk-bean-row { gap:3px; }
    .kk-bean-arrow { font-size:11px; margin-bottom:16px; }
    .kk-title { font-size:22px; }
}
@keyframes kkModalUp { from{transform:translateY(40px) scale(.97);opacity:0} to{transform:translateY(0) scale(1);opacity:1} }

/* ════════════════════════════════════════
   TUTORIAL (ADIMLAMA)
════════════════════════════════════════ */

/* Vurgulanan öğe — parlak çerçeve + nabız */
.kk-tut-highlight {
    position: relative;
    z-index: 100002 !important;
    box-shadow: 0 0 0 4px rgba(247,201,72,0.9), 0 0 24px 6px rgba(247,201,72,0.6) !important;
    border-radius: 12px;
    animation: kkTutPulse 1.4s ease-in-out infinite;
}

@keyframes kkTutPulse {
    0%, 100% { box-shadow: 0 0 0 4px rgba(247,201,72,0.9), 0 0 20px 4px rgba(247,201,72,0.5) !important; }
    50%       { box-shadow: 0 0 0 6px rgba(247,201,72,1), 0 0 32px 10px rgba(247,201,72,0.75) !important; }
}

/* Coachmark baloncuğu */
.kk-coachmark {
    position: absolute;
    z-index: 100003;
    width: min(280px, 78vw);
    background: linear-gradient(145deg, #2a1c14, #160e09);
    border: 1.5px solid rgba(247,201,72,0.55);
    border-radius: 16px;
    padding: 16px 18px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.7);
    color: #f5e6c8;
    font-family: 'Lato', Arial, sans-serif;
    animation: kkCoachIn 0.3s cubic-bezier(0.18,0.89,0.32,1.28);
}

@keyframes kkCoachIn {
    from { opacity: 0; transform: scale(0.85); }
    to   { opacity: 1; transform: scale(1); }
}

.kk-coach-title {
    font-size: 16px;
    font-weight: 700;
    color: #f7c948;
    margin-bottom: 7px;
}

.kk-coach-text {
    font-size: 13px;
    line-height: 1.5;
    opacity: 0.92;
    margin-bottom: 14px;
}

.kk-coach-text b { color: #f7c948; }

.kk-coach-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.kk-coach-skip {
    width: auto !important;
    margin: 0 !important;
    padding: 6px 12px !important;
    background: transparent !important;
    color: rgba(245,230,200,0.5) !important;
    font-size: 12px !important;
    border: none !important;
    cursor: pointer;
    text-decoration: underline;
    font-weight: 400 !important;
}

.kk-coach-skip:hover { color: rgba(245,230,200,0.9) !important; }

.kk-coach-next {
    width: auto !important;
    margin: 0 !important;
    padding: 8px 18px !important;
    background: linear-gradient(135deg, #c59b33, #a07820) !important;
    color: #1a0d09 !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    border: none !important;
    border-radius: 10px !important;
    cursor: pointer;
}

/* Baloncuk oku — yöne göre */
.kk-coachmark::after {
    content: '';
    position: absolute;
    width: 0; height: 0;
    border: 9px solid transparent;
}
.kk-coachmark.place-bottom::after {
    top: -18px; left: 50%; transform: translateX(-50%);
    border-bottom-color: rgba(247,201,72,0.55);
}
.kk-coachmark.place-top::after {
    bottom: -18px; left: 50%; transform: translateX(-50%);
    border-top-color: rgba(247,201,72,0.55);
}
.kk-coachmark.place-left::after {
    right: -18px; top: 50%; transform: translateY(-50%);
    border-left-color: rgba(247,201,72,0.55);
}
.kk-coachmark.place-right::after {
    left: -18px; top: 50%; transform: translateY(-50%);
    border-right-color: rgba(247,201,72,0.55);
}

/* ══ EK: Çarpı butonu — modal içinde fixed, hareket etmez ══ */
#kkCloseBtn.kk-close {
    position: fixed !important;
    top: 16px !important;
    right: 16px !important;
    z-index: 999999 !important;
}

/* ══ EK: Widget bakiye & giriş bilgileri ══ */
.kk-balance-info {
    font-size: 12px;
    color: rgba(245,230,200,0.6);
    margin-top: 8px;
    text-align: center;
}
.kk-balance-info b { color: #f7c948; }

.kk-no-pts, .kk-login-msg {
    padding: 14px 16px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(197,155,51,0.25);
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.6;
    color: rgba(245,230,200,0.8);
}
.kk-no-pts b, .kk-login-msg b { color: #f7c948; }
.kk-login-msg a { color: #c59b33; text-decoration: underline; }

/* ════════════════════════════════════════
   GİRİŞ YAP BUTONU (üye olmayan kullanıcı)
════════════════════════════════════════ */
.kk-login-msg {
    text-align: center;
}
.kk-login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 18px 24px;
    background: linear-gradient(135deg, #c59b33, #a07820);
    color: #1a0d09 !important;
    font-family: 'Lato', Arial, sans-serif;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    text-decoration: none !important;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    box-shadow: 0 6px 24px rgba(197,155,51,0.4);
    transition: transform 0.15s, box-shadow 0.15s, filter 0.15s;
}
.kk-login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 32px rgba(197,155,51,0.55);
    filter: brightness(1.08);
    color: #1a0d09 !important;
}
.kk-login-btn:active { transform: translateY(0); }
.kk-login-btn-icon { font-size: 19px; line-height: 1; }
.kk-login-note {
    font-size: 12px;
    opacity: 0.6;
    margin-top: 10px;
    color: rgba(245,230,200,0.7);
}

/* Mobilde biraz daha büyük dokunma alanı */
@media (max-width: 520px) {
    .kk-login-btn { padding: 20px; font-size: 16px; }
}
