/* -- TOOLS PAGE SPECIFIC STYLES -- */

body {
  background: #0a0a0a;
}

/* ── CYBER EYE PANEL ── */

/* ── CYBER FINGERPRINT PANEL ── */
.fp-panel {
  position: relative;
  float: left;
  width: 78px;
  height: 105px;
  margin: 0.5rem 0;
  flex-shrink: 0;
  border: 1px solid #d00;
  background: #050505;
}
.fp-panel-inner canvas {
  width: 100%;
  height: 100%;
  display: block;
}
.eye-panel {
  position: relative;
  float: left;
  width: 105px;
  height: 105px;
  margin: 0.5rem 0;
  flex-shrink: 0;
}
.eye-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background: #d00;
  clip-path: polygon(0% 0%, 100% 0%, 100% calc(100% - 24px), calc(100% - 24px) 100%, 0% 100%);
  pointer-events: none;
}
.eye-panel-inner {
  position: absolute;
  inset: 1px;
  clip-path: polygon(0% 0%, 100% 0%, 100% calc(100% - 24px), calc(100% - 24px) 100%, 0% 100%);
  overflow: hidden;
  background: #050505;
}
.eye-panel-inner canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* ── CONTENT LAYOUT ── */
.tools-body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.tools-main {
  display: flex;
  flex-direction: column;
  padding: 1rem 1.5rem;
  max-width: 1000px;
  margin: 0 auto;
  width: 100%;
}
.tools-header {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}
.tools-title-area {
  padding-top: 0.5rem;
  flex: 1;
}
.tools-title {
  font-size: 1.4rem;
  letter-spacing: .3em;
  color: #eee;
  text-shadow: 0 0 12px rgba(221,0,0,.4);
  margin: 0;
}
.tools-subtitle {
  color: #666;
  font-size: .75rem;
  letter-spacing: .15em;
  margin: 0;
  padding-top: .25rem;
}

/* ── QUERY BAR (VK-style interrogation) ── */
.query-bar {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-top: .6rem;
  padding: .4rem .6rem;
  background: #0d0d0d;
  border: 1px solid #222;
  font-size: .7rem;
  flex-wrap: wrap;
}
.query-label {
  color: #d00;
  font-weight: bold;
  letter-spacing: .15em;
  flex-shrink: 0;
}
.query-text {
  color: #c0c0c0;
  letter-spacing: .04em;
  flex: 1;
  min-width: 150px;
  font-size: .8rem;
}
.query-input {
  background: #0a0a0a;
  border: 1px solid #333;
  color: #c0c0c0;
  padding: .25rem .5rem;
  font-family: inherit;
  font-size: .7rem;
  flex: 0 0 140px;
  min-width: 80px;
}
.query-input:focus {
  outline: none;
  border-color: #d00;
}
.query-btn {
  background: transparent;
  border: 1px solid #d00;
  color: #d00;
  padding: .25rem .5rem;
  font-family: inherit;
  font-size: .8rem;
  cursor: pointer;
  transition: all .15s;
  line-height: 1;
}
.query-btn:hover {
  background: #d00;
  color: #0a0a0a;
}
.query-result {
  color: #555;
  font-size: .6rem;
  letter-spacing: .1em;
  flex-shrink: 0;
}

/* ── BORDER FLASH (triggered by query submit) ── */
@keyframes border-flash-fp {
  0%   { border-color: #fff; box-shadow: 0 0 8px rgba(255,255,255,.6); }
  50%  { border-color: #fff; box-shadow: 0 0 12px rgba(255,255,255,.4); }
  100% { border-color: #d00; box-shadow: 0 0 0 transparent; }
}
@keyframes border-flash-eye {
  0%   { background: #fff; }
  50%  { background: #fff; }
  100% { background: #d00; }
}
.fp-panel.flash-white {
  animation: border-flash-fp .8s ease-out;
}
.eye-panel.flash-white::before {
  animation: border-flash-eye .8s ease-out;
}

/* ── TOOL TABS ── */
.tool-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid #222;
  margin-bottom: 0.75rem;
}
.tool-tab {
  background: #0d0d0d;
  border: none;
  border-bottom: 2px solid transparent;
  padding: .7rem 1.5rem;
  color: #666;
  font-family: inherit;
  font-size: .7rem;
  letter-spacing: .2em;
  cursor: pointer;
  text-transform: uppercase;
  transition: color .15s, border-color .15s, background .15s;
}
.tool-tab:hover {
  color: #aaa;
  background: #111;
}
.tool-tab.active {
  color: #d00;
  border-bottom-color: #d00;
  background: #0d0d0d;
}

/* ── TOOL PANES ── */
.tool-pane {
  display: none;
  animation: fadeIn .2s ease;
}
.tool-pane.active {
  display: block;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.tool-pane h3 {
  color: #d00;
  font-size: .85rem;
  letter-spacing: .2em;
  margin-bottom: 0.2rem;
}
.tool-pane p {
  color: #666;
  font-size: .7rem;
  margin-bottom: 0.5rem;
  letter-spacing: .05em;
}

/* ── TOOL INPUT / OUTPUT ── */
.tool-input-group {
  display: flex;
  gap: .5rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}
.tool-input {
  flex: 1;
  min-width: 200px;
  background: #0d0d0d;
  border: 1px solid #222;
  color: #c0c0c0;
  padding: .5rem .7rem;
  font-family: 'Courier New', 'Consolas', 'Liberation Mono', monospace;
  font-size: .8rem;
  resize: vertical;
}
.tool-input:focus {
  outline: none;
  border-color: #d00;
}
.tool-textarea {
  min-height: 80px;
}
.tool-btn {
  background: #0d0d0d;
  border: 1px solid #d00;
  color: #d00;
  padding: .5rem 1.2rem;
  font-family: inherit;
  font-size: .7rem;
  letter-spacing: .2em;
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
}
.tool-btn:hover {
  background: #d00;
  color: #0a0a0a;
}
.tool-output {
  background: #0d0d0d;
  border: 1px solid #222;
  border-left: 3px solid #d00;
  padding: .5rem .7rem;
  min-height: 40px;
  font-family: 'Courier New', 'Consolas', 'Liberation Mono', monospace;
  font-size: .8rem;
  color: #c0c0c0;
  white-space: pre-wrap;
  word-break: break-word;
}
.tool-output.is-loading {
  color: #666;
  animation: pulse-text 1s ease-in-out infinite;
}
@keyframes pulse-text {
  0%, 100% { opacity: .6; }
  50% { opacity: .3; }
}
.tool-output.is-error {
  color: #d00;
  border-left-color: #d00;
}
.tool-swap-btn {
  background: transparent;
  border: 1px solid #333;
  color: #555;
  padding: .2rem .5rem;
  font-family: inherit;
  font-size: .6rem;
  cursor: pointer;
  transition: all .15s;
  letter-spacing: .1em;
  margin-left: .5rem;
}
.tool-swap-btn:hover {
  border-color: #d00;
  color: #d00;
}
.gt-note {
  color: #555;
  font-size: .6rem;
  letter-spacing: .08em;
  margin-top: .75rem;
  margin-bottom: .5rem;
}

.tool-char-count {
  font-size: .6rem;
  color: #444;
  margin-top: .25rem;
  letter-spacing: .1em;
}

/* ── OUTPUT WRAPPER & COPY BUTTON ── */
.tool-output-wrap {
  position: relative;
  margin-bottom: 0.5rem;
}
.tool-output-wrap .tool-output {
  margin-bottom: 0;
}
.copy-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  background: #1a1a1a;
  border: 1px solid #555;
  color: #eee;
  padding: 6px 10px;
  font-size: 1.1rem;
  cursor: pointer;
  z-index: 1;
  line-height: 1;
  font-family: inherit;
  border-radius: 2px;
  transition: color .15s, border-color .15s, background .15s;
}
.copy-btn:hover {
  color: #fff;
  border-color: #d00;
  background: #222;
}
.copy-btn.copied {
  color: #0a0;
  border-color: #0a0;
}

/* ── TIMESTAMP CONVERTER ── */
.tsconv-section {
  margin-bottom: 1rem;
}
.tsconv-section h4 {
  color: #d00;
  font-size: .75rem;
  letter-spacing: .2em;
  margin-bottom: .5rem;
}
.tsconv-input-row {
  display: flex;
  gap: .5rem;
  margin-bottom: .5rem;
  flex-wrap: wrap;
  align-items: center;
}
.tsconv-date-picker {
  background: #0d0d0d;
  border: 1px solid #222;
  color: #c0c0c0;
  padding: .4rem .5rem;
  font-family: inherit;
  font-size: .7rem;
  cursor: pointer;
  flex: 0 0 150px;
  min-width: 120px;
  color-scheme: dark;
}
.tsconv-date-picker:focus {
  outline: none;
  border-color: #d00;
}
.tsconv-date-picker::-webkit-calendar-picker-indicator {
  filter: invert(0.7);
  cursor: pointer;
}
.tsconv-time-input {
  flex: 0 0 90px;
  min-width: 70px;
}
.tsconv-epoch-input {
  flex: 1;
  min-width: 200px;
}

@media (max-width: 700px) {
  .fp-panel {
    width: 44px;
    height: 60px;
    margin: 0 0;
  }
  .eye-panel {
    width: 60px;
    height: 60px;
    margin: 0 0;
  }
  .tools-header {
    gap: 1rem;
    margin-bottom: 0.25rem;
  }
  .tools-title {
    font-size: 1rem;
  }
  .tools-title-area {
    padding-top: 0.25rem;
  }
  .tool-tab {
    padding: .4rem .6rem;
    font-size: .55rem;
  }
  .tool-tabs {
    margin-bottom: 0.4rem;
  }
  .tool-input-group {
    flex-direction: column;
  }
  .tool-btn {
    width: 100%;
  }
  .tsconv-input-row {
    flex-direction: column;
    align-items: stretch;
  }
  .tsconv-date-picker,
  .tsconv-time-input,
  .tsconv-epoch-input {
    flex: 1;
    min-width: 0;
    width: 100%;
  }
}
