/* HunHax Python Terminal. Tüm kurallar .hhpy altında, tema stillerinden etkilenmez. */
.hhpy{
  --bg:#050905;--panel:#081008;--fg:#3dff74;--dim:#1f9e45;--line:#16642d;--err:#ff6b5e;
  --btn:#0b1d0e;--btn-fg:#3dff74;--glow:0 0 6px rgba(61,255,116,.5);--r:6px;--gap:0;--pad:0;
  box-sizing:border-box;margin:1.5em 0;color:var(--fg);
  font:14px/1.55 ui-monospace,"Cascadia Mono",Consolas,Menlo,"DejaVu Sans Mono",monospace;
}
.hhpy *,.hhpy *::before,.hhpy *::after{box-sizing:border-box}

/* Renkli cam */
.hhpy[data-theme=glass]{
  --bg:transparent;--panel:rgba(255,255,255,.11);--fg:#fff;--dim:rgba(255,255,255,.72);
  --line:rgba(255,255,255,.3);--err:#ffd0cc;--btn:rgba(255,255,255,.16);--btn-fg:#fff;
  --glow:none;--r:22px;--gap:14px;--pad:0 14px 14px;
}

.hhpy-win{position:relative;overflow:hidden;background:var(--bg);border:1px solid var(--line);border-radius:var(--r);
  box-shadow:0 0 28px rgba(61,255,116,.12);text-shadow:var(--glow)}
.hhpy[data-theme=terminal] .hhpy-win::after{content:"";position:absolute;inset:0;pointer-events:none;z-index:3;
  background:repeating-linear-gradient(0deg,rgba(0,0,0,.2) 0 1px,transparent 1px 3px),
             radial-gradient(ellipse at center,transparent 60%,rgba(0,0,0,.45) 100%)}
.hhpy[data-theme=glass] .hhpy-win{
  background:
    radial-gradient(circle at 12% 18%,#ff4fa3 0,transparent 42%),
    radial-gradient(circle at 88% 12%,#ffb340 0,transparent 38%),
    radial-gradient(circle at 80% 90%,#19d3c5 0,transparent 45%),
    linear-gradient(135deg,#5b2bd6,#2a62f0);
  border-color:rgba(255,255,255,.35);box-shadow:0 24px 70px rgba(70,40,200,.4)}

.hhpy-bar{display:flex;align-items:center;gap:12px;padding:10px 14px}
.hhpy-dots{display:flex;gap:7px}
.hhpy-dots i{width:11px;height:11px;border-radius:50%;background:#ff5f56;display:block}
.hhpy-dots i:nth-child(2){background:#ffbd2e}.hhpy-dots i:nth-child(3){background:#27c93f}
.hhpy[data-theme=terminal] .hhpy-dots i{background:var(--dim);opacity:.8}
.hhpy-title{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--dim)}
.hhpy-status{color:var(--dim);white-space:nowrap}
.hhpy-status::before{content:"● ";color:var(--fg)}

.hhpy-tools{display:flex;flex-wrap:wrap;gap:8px;padding:0 14px 12px}
.hhpy button{all:unset;box-sizing:border-box;cursor:pointer;padding:5px 14px;border:1px solid var(--line);
  border-radius:calc(var(--r) / 2);background:var(--btn);color:var(--btn-fg);font:inherit;text-shadow:var(--glow);
  transition:filter .15s,transform .1s}
.hhpy[data-theme=glass] button{border-radius:999px;backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px)}
.hhpy button:hover:not(:disabled){filter:brightness(1.35)}
.hhpy button:active:not(:disabled){transform:translateY(1px)}
.hhpy button:disabled{opacity:.38;cursor:default}
.hhpy button:focus-visible,.hhpy summary:focus-visible{outline:2px solid var(--fg);outline-offset:2px}
.hhpy button[data-act=run]{border-color:var(--fg)}
.hhpy[data-theme=glass] button[data-act=run]{background:linear-gradient(90deg,#ff6fb5,#8a6bff);border-color:rgba(255,255,255,.55)}

.hhpy-grid{display:grid;grid-template-columns:1fr 1fr;gap:var(--gap);padding:var(--pad)}
.hhpy-pane{min-width:0;display:flex;flex-direction:column;background:var(--panel);border:1px solid var(--line);border-radius:calc(var(--r) / 2)}
.hhpy[data-theme=glass] .hhpy-pane{border-radius:16px;backdrop-filter:blur(18px) saturate(140%);-webkit-backdrop-filter:blur(18px) saturate(140%);overflow:hidden}
.hhpy[data-theme=terminal] .hhpy-pane{border-radius:0;border-width:1px 0 0 0}
.hhpy[data-theme=terminal] .hhpy-pane+.hhpy-pane{border-left-width:1px}
.hhpy-label{padding:5px 14px;color:var(--dim);border-bottom:1px solid var(--line)}

.hhpy-file{display:flex;align-items:center;gap:8px}
.hhpy input.hhpy-name{all:unset;box-sizing:border-box;flex:1;min-width:0;font:inherit;line-height:1.55;color:var(--fg);
  caret-color:var(--fg);text-shadow:var(--glow);border-bottom:1px dashed var(--line);cursor:text}
.hhpy input.hhpy-name:hover{border-bottom-color:var(--dim)}
.hhpy input.hhpy-name:focus-visible{border-bottom:1px solid var(--fg);outline:0}
.hhpy-editor{display:flex;height:var(--hhpy-h);overflow:hidden}
.hhpy-gutter{all:unset;display:block;box-sizing:content-box;width:3ch;min-width:3ch;padding:10px 8px;text-align:right;
  color:var(--dim);opacity:.65;border-right:1px solid var(--line);overflow:hidden;white-space:pre;
  font:inherit;line-height:1.55;user-select:none}
.hhpy textarea{all:unset;display:block;box-sizing:border-box;white-space:pre;overflow:auto;font:inherit;line-height:1.55;
  tab-size:4;color:var(--fg);caret-color:var(--fg);text-shadow:var(--glow)}
.hhpy textarea.hhpy-code{flex:1;min-width:0;padding:10px 12px}
.hhpy textarea.hhpy-code::selection,.hhpy textarea.hhpy-in::selection{background:var(--fg);color:#000}
.hhpy textarea:focus-visible{background:rgba(255,255,255,.04)}

.hhpy-stdin{border-top:1px solid var(--line)}
.hhpy-stdin summary{cursor:pointer;padding:6px 14px;color:var(--dim)}
.hhpy textarea.hhpy-in{width:100%;height:6em;padding:8px 14px;border-top:1px solid var(--line)}
.hhpy textarea::placeholder{color:var(--dim);opacity:.7}

.hhpy-out{all:unset;display:block;box-sizing:border-box;height:calc(var(--hhpy-h) + 2.2em);overflow:auto;padding:10px 14px;
  white-space:pre-wrap;word-break:break-word;font:inherit;line-height:1.55;text-shadow:var(--glow)}
.hhpy-out:empty::before{content:"$ ▌";animation:hhpy-blink 1.1s steps(1) infinite;color:var(--dim)}
.hhpy-out .e{color:var(--err)}
.hhpy-out .d{color:var(--dim)}
@keyframes hhpy-blink{50%{opacity:0}}

.hhpy-foot{padding:8px 14px 10px;color:var(--dim);font-size:12px}
.hhpy[data-theme=glass] .hhpy-foot{padding-top:0}

@media (max-width:760px){
  .hhpy-grid{grid-template-columns:1fr}
  .hhpy[data-theme=terminal] .hhpy-pane+.hhpy-pane{border-left-width:0;border-top-width:1px}
  .hhpy-out{height:240px}
}
@media (prefers-reduced-motion:reduce){.hhpy-out:empty::before{animation:none}}
