body { background: #f8fafc; font-family: 'Nunito', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif; color:#111827; margin:0; }
.container { max-width: 1100px; margin: 0 auto; }
.btn { appearance:none; border:1px solid #e5e7eb; background:#fff; color:#111827; border-radius:12px; padding:10px 14px; font-weight:800; }

/* Instructions scribble overlay */
.instruction-step { position: relative; }
/* Legacy neutral progress overlay (kept for compatibility) */
.instruction-step .scribble { position:absolute; left:0; top:0; height:100%; width:0%; pointer-events:none; background: repeating-linear-gradient(-45deg, rgba(2,6,23,.08) 0 4px, rgba(2,6,23,.16) 4px 8px); border-radius:6px; transition: width .25s ease; }
.instruction-step.done .scribble { width:100%; }
.instruction-step.partial .scribble { width: var(--cover, 0%); }
/* New neutral progress overlay used by oyun.php */
.instruction-step .scribble-progress { position:absolute; left:0; top:0px; height:100%; width:0%; pointer-events:none; background: repeating-linear-gradient(-45deg, rgba(2,6,23,.08) 0 4px, rgba(2,6,23,.16) 4px 8px); border-radius:9px; transition: width .25s ease; }
.instruction-step.done .scribble-progress { width:100%; }
.instruction-step.partial .scribble-progress { width: var(--cover, 0%); }
/* Per-unit correctness overlay (green/red pieces) */
.instruction-step .scribble-color { position:absolute; inset:0; pointer-events:none; display:flex; border-radius:10px; overflow:hidden; top:0px; }
.instruction-step .scribble-color .unit { flex:1 0 0; }
.instruction-step .scribble-color .unit.is-correct { background: rgba(22,163,74,.40); box-shadow: inset 0 0 0 0px rgba(22,163,74,.35); }
.instruction-step .scribble-color .unit.is-wrong { background: rgba(239,68,68,.40); box-shadow: inset 0 0 0 0px rgba(239,68,68,.35); }
/* Wrong line highlight */
.grid-line.wrong { background-color: #ef4444 !important; box-shadow: 0 0 0 2px rgba(239,68,68,.5); box-shadow: 0 6px 20px rgba(245, 158, 11, 0.2),
  0 3px 10px rgba(245, 158, 11, 0.1);}
.grid-line.correct { background-color: #16a34a !important; box-shadow: 0 0 0 2px rgba(22,163,74,.35); }
/* Wrong step highlight in instructions */
.instruction-step.wrong { background: rgba(239,68,68,.10); border-radius: 6px; box-shadow: inset 0 0 0 2px rgba(239,68,68,.35); }
.instruction-step.correct { background: rgba(22,163,74,.10); border-radius: 6px; box-shadow: inset 0 0 0 2px rgba(22,163,74,.35); }
/* Coach highlight for steps */
.instruction-step.coach-highlight { box-shadow: 0 0 0 3px rgba(99,102,241,.4), inset 0 0 0 2px rgba(99,102,241,.8); border-radius: 6px; }
/* Top progress bar */
.top-progress { display:flex; align-items:center; justify-content:center; gap:10px; padding:8px 12px; margin:10px auto; background:#ffffff; border:1px solid #e5e7eb; border-radius:999px; box-shadow: 0 4px 14px rgba(2,6,23,.06); width: fit-content; }
.top-progress .dot { width:34px; height:34px; border-radius:999px; border:2px solid #e5e7eb; background:#fff; color:#111827; display:flex; align-items:center; justify-content:center; font-weight:800; cursor:pointer; }
.top-progress .dot.done { background:#23c111; color:#fff; border-color:#16a34a; }
.top-progress .dot.current { box-shadow: 0 0 0 3px rgba(156,204,46,.25);border-color: #9ccc2e;} 
.top-progress .dot.locked { background:#f8fafc; color:#94a3b8; border-color:#e5e7eb; cursor:not-allowed; }

/* Grid controls styling */
.grid-controls .btn-group { display:flex; gap:32px; background:#ffffff; border:1px solid #e5e7eb; border-radius:12px; padding:6px; box-shadow: 0 4px 14px rgba(2,6,23,.06); }
.grid-controls .control-btn { width:40px; height:40px; display:inline-flex; align-items:center; justify-content:center; border:0; background:transparent; color:#334155; border-radius:8px; cursor:pointer; }
.grid-controls .control-btn:hover { background:#f1f5f9; }
.grid-controls .control-btn.accent-btn { background:#16a34a; color:#fff; width:90px;}
.grid-controls .control-btn.accent-btn:hover { background:#15803d; }
  .grid-controls .control-btn.primary-btn { background:#6366f1; color:#fff; }
  .grid-controls .control-btn.primary-btn:hover { background:#4f46e5; }
  .grid-controls .control-btn.hint-btn { background:#fbbf24; color:#fff; }
  .grid-controls .control-btn.hint-btn:hover { background:#f59e0b; }

  .grid-controls {
    padding: 20px 40px 0px !important;
  }


/* Guided Coach cursor */
.coach-cursor { position: absolute; width: 22px; height: 32px; pointer-events: none; z-index: 9999; transform: translate(-15%, -10%); color:#111827; }
.coach-cursor svg { width: 100%; height: 100%; filter: drop-shadow(0 2px 3px rgba(0,0,0,.25)); }
.coach-cursor.click::after { content:""; position:absolute; left:50%; top:50%; width:8px; height:8px; margin:-4px 0 0 -4px; border-radius:999px; background: rgba(99,102,241,.9); animation: coachRipple .6s ease-out; }
@keyframes coachRipple { 0%{ opacity: .9; transform: scale(0); } 100%{ opacity:0; transform: scale(5); } }
.coach-tooltip { position:absolute; padding:8px 10px; background:#111827; color:#fff; font-size:12px; border-radius:8px; white-space:nowrap; transform: translate(-50%, -140%); box-shadow: 0 8px 20px rgba(0,0,0,.15); z-index: 10000; }
.coach-tooltip::after { content:""; position:absolute; left:50%; bottom:-6px; width:0; height:0; border-left:6px solid transparent; border-right:6px solid transparent; border-top:6px solid #111827; transform: translateX(-50%); }
/* Pulse highlight for targets */
.coach-pulse { position: relative; }
.coach-pulse::before { content: ""; position: absolute; inset: -6px; border-radius: 50%; box-shadow: 0 0 0 0 rgba(99,102,241,.55); animation: coachPulse 1.2s ease-out infinite; }
@keyframes coachPulse { 0% { box-shadow: 0 0 0 0 rgba(99,102,241,.55); } 100% { box-shadow: 0 0 0 14px rgba(99,102,241,0); } }

/* Coach grid-top message panel */
.coach-message { position: absolute; z-index: 10001; padding: 10px 14px; background: #111827; color: #fff; border-radius: 10px; font-size: 13px; font-weight: 700; box-shadow: 0 10px 24px rgba(0,0,0,.2); transform: translateX(-50%); }
.coach-message .close { margin-left: 10px; background: transparent; border: 0; color: #fff; cursor: pointer; }
  

#instructions-panel {
 
  min-height: 172px !important;
  }

#result-modal .yk-modal-close {
  position: absolute;
  right: 24px;
  top: 24px;
  width: 32px;
  height: 32px;
  border-radius: 16px;
  border: none;
  background: rgba(0,0,0,.1);
  color: #64748b;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all .2s;
}

#result-modal .yk-modal-close:hover {
  background: rgba(0,0,0,.15);
  transform: scale(1.1);
}

#result-modal.is-success .result-icon { background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%); }
#result-modal.is-fail .result-icon { background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%); }

#result-modal .yk-modal-dialog { 
    width: 480px; 
    max-width: calc(100% - 24px); 
    border-radius: 24px; 
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,.12);
    border: 1px solid rgba(0,0,0,.08);
  }
  
  #result-modal .yk-modal-header { 
    padding: 28px 32px 20px;
    text-align: center;
    border: none;
    position: relative;
  }
  
  #result-modal .yk-modal-body { 
    padding: 0 32px 32px;
    text-align: center;
    background: #fff;
  }
  
  #result-modal .yk-modal-footer { 
    padding: 0 32px 32px;
    border: none;
    background: #fff;
    display: flex;
    gap: 12px;
    justify-content: center;
  }
  
  #result-modal .result-icon {
    width: 120px;
    height: 120px;
    margin: 0 auto 24px;
    border-radius: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: #fff;
    position: relative;
    box-shadow: 0 12px 24px rgba(0,0,0,.12);
  }
  
  #result-modal .result-icon i {
    animation: bounceIn .6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  }
  
  @keyframes bounceIn {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
  }
  
  #result-modal .result-title { 
    font-size: 32px;
    line-height: 1.2;
    font-weight: 800;
    margin: 0 0 12px;
    color: #1e293b;
  }
  
  #result-modal .result-desc { 
    font-size: 18px;
    line-height: 1.5;
    color: #64748b;
    margin: 0;
  }
  
  #result-modal .sparkles {
    position: absolute;
    inset: 0;
    pointer-events: none;
  }
  
  #result-modal .sparkle {
    position: absolute;
    animation: sparkle 1.4s linear infinite;
    color: #fbbf24;
    opacity: 0;
  }
  
  #result-modal .sparkle:nth-child(1) { left: 10%; top: 20%; animation-delay: 0s; }
  #result-modal .sparkle:nth-child(2) { left: 20%; top: 80%; animation-delay: 0.2s; }
  #result-modal .sparkle:nth-child(3) { left: 80%; top: 15%; animation-delay: 0.4s; }
  #result-modal .sparkle:nth-child(4) { left: 85%; top: 70%; animation-delay: 0.6s; }
  #result-modal .sparkle:nth-child(5) { left: 50%; top: 10%; animation-delay: 0.8s; }
  
  @keyframes sparkle {
    0% { transform: scale(0) rotate(0deg); opacity: 0; }
    50% { transform: scale(1) rotate(180deg); opacity: 1; }
    100% { transform: scale(0) rotate(360deg); opacity: 0; }
  }

