/* ====================== POWER SHELL WINDOW ====================== */
.wt-window {
  width: 100%;
  max-width: 660px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 24px 60px rgba(0,0,0,.45);
  background: #012456;
  font-family: Consolas, "Cascadia Mono", "Courier New", monospace;
}

.wt-titlebar {
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  background: #1e1e1e;
  color: #d7d7d7;
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.wt-titlebar__left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.wt-appicon {
  font-size: 13px;
  opacity: .85;
}

.wt-tab {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 14px;
  border-radius: 8px 8px 0 0;
  background: transparent;
  color: #cfcfcf;
  font-size: 12px;
  font-weight: 600;
}

.wt-tab--active {
  background: #012456;
  color: #ffffff;
}

.wt-titlebar__right {
  display: flex;
  align-items: center;
  gap: 2px;
}

.wt-winbtn {
  width: 34px;
  height: 28px;
  display: grid;
  place-items: center;
  font-size: 12px;
  color: #cfcfcf;
  border-radius: 6px;
  opacity: .9;
}

.wt-body {
  min-height: 420px;
  padding: 18px;
  color: #ffffff;
  background: #012456;
}

.wt-output {
  margin: 0 0 12px 0;
  min-height: 290px;
  max-height: 290px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 14px;
  line-height: 1.62;
  color: #f7f7f7;
  scrollbar-width: none;                    /* Firefox */
  -ms-overflow-style: none;                 /* IE + Edge vechi */
}

.wt-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  line-height: 1.6;
  background: transparent;
  border: none;
  padding: 8px 0 0 0;
}

.wt-input-wrap {
  position: relative;
  flex: 1;
  background: transparent;
  border: none;
  padding: 0;
}

#psInput {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  color: #ffffff;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.6;
  padding: 0 4px;
}

/* Forțează eliminarea oricărui contur */
#psInput:focus,
#psInput:active {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
}

.ps-terminal__help {
  margin-top: 16px;
  font-size: 12px;
  color: rgba(255,255,255,.7);
  line-height: 1.5;
}

@keyframes wtBlink {
  50% { opacity: 0; }
}

.wt-line-cmd    { color: #ffffff; }
.wt-line-out    { color: #f7f7f7; }
.wt-line-accent { color: #d8f0ff; }
.wt-line-warn   { color: #ffe08a; }

/* ====================== CERT VIEWER (PANOU DREAPTA) ====================== */
.cert-viewer {
  min-height: 460px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.10);
  background:
    radial-gradient(500px 160px at 20% 0%, rgba(124,92,255,.10), transparent 60%),
    radial-gradient(500px 160px at 80% 0%, rgba(255,178,0,.08), transparent 60%),
    rgba(8,12,24,.92);
  box-shadow: 0 20px 50px rgba(0,0,0,.35);
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.cert-viewer__holo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  opacity: .9;
  transition: opacity .3s ease;
  z-index: 0;
}

.cert-viewer.has-image .cert-viewer__holo {
  opacity: 0;
  pointer-events: none;
}

.cert-viewer__placeholder,
.cert-viewer__image {
  position: relative;
  z-index: 1;
}

.cert-viewer__placeholder {
  color: rgba(255,255,255,.76);
  font-size: 14px;
  text-align: center;
  line-height: 1.6;
  max-width: 80%;
  text-shadow: 0 0 12px rgba(124,92,255,.18);
}

.cert-viewer__image {
  display: none;
  width: 100%;
  max-width: 100%;
  max-height: 380px;
  object-fit: contain;
  border-radius: 12px;
  cursor: zoom-in;
  opacity: 0;
  transform: translateY(8px) scale(.985);
  transition: opacity .28s ease, transform .28s ease;
  box-shadow: 0 12px 30px rgba(0,0,0,.28);
}

.cert-viewer__image.is-visible {
  display: block;
  opacity: 1;
  transform: translateY(0) scale(1);
}

.cert-viewer__hint {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  color: rgba(255,255,255,.6);
  pointer-events: none;
}

/* ====================== LAYOUT PRINCIPAL ====================== */
.terminal-cert-layout {
  display: grid;
  grid-template-columns: minmax(320px, 680px) minmax(280px, 1fr);
  gap: 16px;                    /* spațiu mic și elegant între panouri */
  max-width: 1180px;            /* centrează layout-ul */
  margin: 40px auto;
  padding: 0 20px;
  align-items: start;
}

/* ====================== MODAL ====================== */
.cert-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.cert-modal.is-open {
  display: flex;
}

.cert-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.78);
  backdrop-filter: blur(6px);
}

.cert-modal__dialog {
  position: relative;
  z-index: 2;
  width: min(92vw, 1100px);
  height: min(88vh, 800px);
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(10,14,28,.98);
  box-shadow: 0 30px 80px rgba(0,0,0,.55);
  padding: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cert-modal__image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 10px;
  display: block;
}

.cert-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 12px;
  background: rgba(255,255,255,.08);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  z-index: 3;
  transition: .18s ease;
}

.cert-modal__close:hover {
  background: rgba(255,255,255,.16);
}

/* ====================== TYPOGRAPHY & ANIMATIONS ====================== */
.typing-caret {
  display: inline-block;
  width: 10px;
  height: 18px;
  margin-left: 4px;
  background: linear-gradient(180deg, #c9b6ff, #7c5cff);
  box-shadow: 0 0 8px rgba(124,92,255,.7);
  animation: blink 1s infinite;
  vertical-align: middle;
}

.ps-terminal,
.cert-viewer__placeholder,
#typingText {
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.3px;
}

#typingText {
  color: #d6c8ff;
  text-shadow: 0 0 10px rgba(124,92,255,.25);
}

@keyframes blink {
  0%, 50%, 100% { opacity: 1; }
  25%, 75% { opacity: 0; }
}

/* ====================== RESPONSIVE ====================== */
@media (max-width: 768px) {
  .wt-window {
    max-width: 100%;
  }

  .wt-body {
    min-height: 360px;
    padding: 16px;
  }

  .wt-output {
    min-height: 240px;
    max-height: 240px;
    font-size: 13px;
  }

  .wt-input-row,
  #psInput,
  .wt-prompt {
    font-size: 13px;
  }
}

@media (max-width: 980px) {
  .terminal-cert-layout {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 0 15px;
    margin: 30px auto;
  }

  .cert-viewer {
    min-height: 280px;
  }

  .cert-viewer__image {
    max-height: 260px;
  }

  .cert-modal__dialog {
    width: 94vw;
    height: 82vh;
    padding: 16px;
  }
}