/* Python Dedektifi — ortak oyun temasının (../ortak/oyun.css: ses düğmesi, konfeti, veli kutusu) üstüne. */
.python-game-page { --pd-ink: #1e1b4b; --pd-purple: #5f57f0; --pd-teal: #0f9f94; --pd-yellow: #f2a516; --pd-red: #c2410c; --pd-line: #e3e6ef; --pd-muted: #4b4f63; --pd-code-bg: #1e1b4b; --pd-code-fg: #f5f3ff; --pd-code-ln: #a5a1d8; background: #f6f5ff; }
.python-game-page .rr-wrap { max-width: 760px; }
#python-oyun { color: var(--pd-ink); }
#python-oyun .hidden { display: none !important; }
#python-oyun [hidden] { display: none !important; }

.pd-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 8px 0 14px; }
.pd-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.pd-badge { display: grid; place-items: center; flex: none; width: 56px; height: 56px; border-radius: 18px; background: var(--pd-code-bg); font-size: 1.9rem; }
.pd-title h1 { margin: 0; font-size: clamp(1.5rem, 5vw, 2.1rem); line-height: 1.1; }
.pd-sub { margin: 4px 0 0; color: var(--pd-muted); font-weight: 600; }
.pd-sub span { display: inline-block; padding: 2px 10px; border-radius: 999px; background: #ece9ff; color: #4338ca; font-size: .85rem; font-weight: 800; }
.python-game-page .pd-sound { width: 56px; height: 56px; }

.pd-card { position: relative; padding: 20px; border-radius: 22px; background: #fff; box-shadow: 0 18px 44px -30px rgba(30, 27, 75, .45); }
.pd-card h2 { margin: 0 0 10px; }
.pd-card p { line-height: 1.55; }
.pd-muted { color: var(--pd-muted); }
.pd-earned { padding: 10px 14px; border-radius: 14px; background: #fff7e0; font-weight: 800; }
.pd-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
#python-oyun .pd-primary, #python-oyun .pd-secondary { min-height: 56px; padding: 0 22px; font-size: 1.05rem; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; }
#python-oyun .pd-primary { border: 0; background: var(--pd-yellow); color: var(--pd-ink); box-shadow: 0 4px 0 #b45309; font-weight: 900; cursor: pointer; }
#python-oyun .pd-primary:active { transform: translateY(2px); box-shadow: 0 2px 0 #b45309; }

/* İlerleme: 15 nokta */
.pd-dots { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; padding: 0; list-style: none; }
.pd-dot { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--pd-line); background: #fff; color: var(--pd-muted); font-size: .8rem; font-weight: 900; }
.pd-dot.is-first { border-color: var(--pd-teal); background: var(--pd-teal); color: #fff; }
.pd-dot.is-done { border-color: var(--pd-yellow); background: #fff3d6; color: #92400e; }
.pd-dot.is-current { border-color: var(--pd-purple); box-shadow: 0 0 0 3px rgba(95, 87, 240, .25); color: var(--pd-purple); }

.pd-q-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; align-items: center; margin-bottom: 8px; }
.pd-chip { padding: 4px 12px; border-radius: 999px; background: #ece9ff; color: #4338ca; font-weight: 800; font-size: .9rem; }
.pd-count { color: var(--pd-muted); font-weight: 800; }
.pd-q-title { font-size: clamp(1.15rem, 3.6vw, 1.4rem); line-height: 1.35; }
.pd-q-title:focus { outline: none; }

/* Kod görünümü: tek renk şeması, satır numarası, büyük yazı; satırlar ≤ 32 karakter → yatay kaydırma yok */
.pd-code { margin: 12px 0; padding: 12px 10px; border-radius: 16px; background: var(--pd-code-bg); color: var(--pd-code-fg); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "DejaVu Sans Mono", "Liberation Mono", monospace; font-size: 20px; line-height: 1.6; overflow: hidden; white-space: pre; tab-size: 4; }
.pd-line { display: flex; align-items: baseline; gap: 10px; min-height: 1.6em; border-radius: 8px; }
.pd-line code { font: inherit; letter-spacing: inherit; color: inherit; background: none; padding: 0; white-space: pre; }
.pd-ln { flex: none; width: 1.2em; text-align: right; color: var(--pd-code-ln); user-select: none; }
.pd-blank { display: inline-block; min-width: 2.6em; padding: 0 4px; border-radius: 6px; background: var(--pd-yellow); color: var(--pd-ink); text-align: center; font-weight: 800; }
.pd-blank.is-filled { background: #5eead4; }
/* Hatalı satırı bul: her satır dokunulabilir düğme */
.pd-code--lines { display: grid; gap: 4px; padding: 8px 6px; }
.pd-line-btn { box-sizing: border-box; letter-spacing: inherit; width: 100%; min-height: 48px; padding: 6px 4px; border: 2px solid transparent; background: rgba(255, 255, 255, .04); color: inherit; font: inherit; text-align: left; cursor: pointer; touch-action: manipulation; }
.pd-line-btn:hover:not(:disabled) { border-color: rgba(255, 255, 255, .35); }
.pd-line-btn:focus-visible { outline: 3px solid var(--pd-yellow); outline-offset: 1px; }
.pd-line-btn:disabled { cursor: default; }
.pd-line-btn.is-bug { border-color: #fb923c; background: rgba(251, 146, 60, .18); text-decoration: line-through; text-decoration-color: #fb923c; }
.pd-line-btn.is-wrong { border-color: rgba(255, 255, 255, .25); opacity: .7; }
.pd-fix { box-sizing: border-box; padding: 6px 4px; border: 2px solid #5eead4; background: rgba(94, 234, 212, .15); }
.pd-fix .pd-ln { color: #5eead4; }

/* Seçenekler (button) */
.pd-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 4px 0 12px; }
.pd-option { display: flex; align-items: center; gap: 10px; min-height: 64px; padding: 10px 12px; border: 2px solid var(--pd-line); border-radius: 16px; background: #fff; color: var(--pd-ink); font: inherit; text-align: left; cursor: pointer; touch-action: manipulation; }
.pd-option:hover:not(:disabled) { border-color: var(--pd-purple); }
.pd-option:focus-visible { outline: 4px solid var(--pd-purple); outline-offset: 2px; }
.pd-option:disabled { cursor: default; }
.pd-option-key { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 10px; background: #ece9ff; color: #4338ca; font-weight: 900; }
.pd-option-text { min-width: 0; overflow-wrap: anywhere; font-weight: 700; }
.is-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "DejaVu Sans Mono", "Liberation Mono", monospace; white-space: pre-wrap; font-size: 1.1rem; font-weight: 700; }
.pd-option.is-correct { border-color: var(--pd-teal); background: #e6fffa; }
.pd-option.is-correct .pd-option-key { background: var(--pd-teal); color: #fff; }
.pd-option.is-wrong { border-color: #fdba74; background: #fff7ed; }
.pd-options--bosluk { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pd-options--bosluk .pd-option { justify-content: center; }

.pd-hint-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
#python-oyun .pd-hint-btn { min-height: 48px; padding: 0 16px; border-radius: 999px; }
.pd-hint { margin: 0; padding: 8px 12px; border-radius: 12px; background: #fff7e0; color: #78350f; font-weight: 700; }

.pd-feedback { margin-top: 14px; padding: 14px 16px; border-radius: 16px; }
.pd-feedback.is-correct { background: #ecfdf5; border: 2px solid #99f6e4; }
.pd-feedback.is-wrong { background: #fff7ed; border: 2px solid #fed7aa; }
.pd-feedback p { margin: 0 0 6px; }
.pd-feedback-title { font-size: 1.15rem; font-weight: 900; }
.pd-answer { display: inline-block; padding: 0 6px; border-radius: 6px; background: #fff; }

.pd-finish { text-align: center; overflow: hidden; }
.pd-finish:focus { outline: none; }
.pd-rozet { display: grid; place-items: center; width: 96px; height: 96px; margin: 0 auto 8px; border-radius: 50%; background: radial-gradient(circle at 30% 30%, #fff7e0, #f2a516); font-size: 3rem; box-shadow: 0 10px 24px -12px rgba(180, 83, 9, .6); }
.pd-score { font-size: 1.2rem; }
.pd-rozet-ad { font-size: 1.1rem; }
.pd-finish .pd-actions { justify-content: center; }
.pd-finish .rr-parent { margin-top: 18px; text-align: left; }

@media (max-width: 640px) {
    .python-game-page .rr-wrap { padding-left: 10px; padding-right: 10px; }
    .pd-card { padding: 14px 12px; border-radius: 18px; }
    /* 375 px telefonda 32 karakterlik satır taşmasın: kenar boşlukları dar, yazı ≥ 18 px */
    .pd-code { margin-left: -12px; margin-right: -12px; padding: 10px 6px; border-radius: 0; font-size: 18px; letter-spacing: -0.05em; }
    .pd-line { gap: 4px; }
    .pd-ln { width: 14px; font-size: 13px; letter-spacing: 0; }
    .pd-code--lines { padding: 6px 2px; gap: 3px; }
    .pd-line-btn, .pd-fix { padding: 6px 2px; }
    .pd-options { grid-template-columns: 1fr; }
    .pd-options--bosluk { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .pd-dot { width: 26px; height: 26px; font-size: .72rem; }
    .pd-dots { gap: 4px; }
}
@media (prefers-reduced-motion: reduce) {
    #python-oyun * { transition: none !important; animation: none !important; }
}
.pd-options--bosluk .is-mono { font-size: 1.45rem; }
