/* ═══════════════════════════════════════════════
   Base64 Encoder / Decoder — Styles
   (Based on Password Generator golden reference)
   ═══════════════════════════════════════════════ */

/* Page Header */
.b64-page-header {
  display: grid;
  grid-template-columns: 1fr auto;
  border-bottom: 1px solid var(--border);
  background: #0a0a0a;
}

.b64-ph-left {
  padding: 44px 48px 36px;
  border-right: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.b64-ph-left::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(255, 255, 255, 0.012) 3px,
    rgba(255, 255, 255, 0.012) 4px
  );
}

.b64-ph-eyebrow {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.b64-ph-eyebrow .ey-dot {
  width: 6px;
  height: 6px;
  background: var(--green, #00c875);
  border-radius: 50%;
  animation: b64-dot-blink 1.8s step-end infinite;
}

@keyframes b64-dot-blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

.b64-ph-eyebrow .ey-sep {
  color: var(--border);
}

.b64-ph-title {
  font-family: var(--cond);
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 900;
  line-height: 0.92;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 18px;
}

.b64-ph-title .t-accent {
  color: var(--yellow);
}

.b64-ph-desc {
  font-size: 0.95rem;
  color: var(--muted);
  max-width: 500px;
  line-height: 1.65;
  border-left: 3px solid var(--yellow);
  padding-left: 14px;
  margin-bottom: 28px;
}

.b64-ph-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.b64-ph-tag {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border: 1px solid var(--border);
  color: var(--muted);
}

.b64-ph-tag.yellow {
  border-color: var(--yellow);
  color: var(--yellow);
}
.b64-ph-tag.green {
  border-color: var(--green, #00c875);
  color: var(--green, #00c875);
}

.b64-ph-right {
  display: flex;
  flex-direction: column;
  min-width: 220px;
}

.b64-ph-stat {
  flex: 1;
  padding: 24px 32px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.b64-ph-stat:last-child {
  border-bottom: none;
}

.b64-ph-stat-label {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.b64-ph-stat-val {
  font-family: var(--cond);
  font-size: 2.4rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--white);
}

.b64-ph-stat-val .y {
  color: var(--yellow);
}

.b64-ph-stat-note {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--muted);
  margin-top: 4px;
}

/* Main Layout */
.b64-page-body {
  display: grid;
  grid-template-columns: 1fr 300px;
  min-height: 80vh;
}

.b64-col-main {
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}

.b64-col-side {
  display: flex;
  flex-direction: column;
  background: #080808;
}

/* Tool Panel */
.b64-tool-panel {
  border-bottom: 1px solid var(--border);
}

.b64-tool-panel-header {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid var(--border);
  background: #0a0a0a;
  height: 46px;
}

.b64-tph-title {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 20px;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.06em;
  border-right: 1px solid var(--border);
  flex: 1;
}

.b64-tph-title .status {
  width: 6px;
  height: 6px;
  background: var(--green, #00c875);
  border-radius: 50%;
  flex-shrink: 0;
  animation: b64-dot-blink 1.8s step-end infinite;
}

.b64-tph-title .status-text {
  color: var(--green, #00c875);
  font-size: 0.65rem;
}

.b64-tph-actions {
  display: flex;
  align-items: stretch;
}

.b64-tph-btn {
  height: 46px;
  padding: 0 16px;
  border: none;
  border-right: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  transition:
    color 0.12s,
    background 0.12s;
  cursor: pointer;
}

.b64-tph-btn:hover {
  color: var(--white);
  background: #111;
}
.b64-tph-btn:last-child {
  border-right: none;
}

.b64-tool-body {
  padding: 28px;
}

/* Field label */
.b64-field-label {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Input / Textarea */
.b64-inp-wrap {
  margin-bottom: 24px;
}

.b64-textarea {
  width: 100%;
  background: #0a0a0a;
  border: 1px solid var(--border);
  color: var(--white);
  padding: 20px;
  font-family: var(--mono);
  font-size: 0.92rem;
  resize: vertical;
  line-height: 1.6;
  outline: none;
  transition: border-color 0.15s;
  display: block;
}

.b64-textarea:focus {
  border-color: var(--yellow);
}

/* Output pre */
.b64-output-pre {
  width: 100%;
  background: #0a0a0a;
  border: 1px solid var(--border);
  padding: 20px;
  font-family: var(--mono);
  font-size: 0.92rem;
  line-height: 1.6;
  margin: 0;
  word-break: break-all;
  color: var(--yellow);
}

/* Action Row */
.b64-action-row {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.b64-btn-primary {
  height: 48px;
  padding: 0 32px;
  background: var(--yellow);
  color: var(--ink, #0c0c0c);
  font-family: var(--sans);
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: 2px solid var(--yellow);
  display: flex;
  align-items: center;
  gap: 10px;
  transition:
    background 0.15s,
    color 0.15s;
  cursor: pointer;
}

.b64-btn-primary:hover {
  background: transparent;
  color: var(--yellow);
}

.b64-btn-secondary {
  height: 48px;
  padding: 0 24px;
  background: transparent;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  border: 2px solid var(--border);
  margin-left: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition:
    border-color 0.15s,
    color 0.15s;
  cursor: pointer;
}

.b64-btn-secondary:hover {
  border-color: var(--white);
  color: var(--white);
}

.b64-safe-note {
  margin-left: 16px;
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.b64-safe-note .lock {
  color: var(--green, #00c875);
}

/* Content Sections */
.b64-content-section {
  border-bottom: 1px solid var(--border);
}

.b64-cs-header {
  display: flex;
  align-items: center;
  padding: 0 28px;
  height: 46px;
  border-bottom: 1px solid var(--border);
  background: #0a0a0a;
}

.b64-cs-header-label {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
}

.b64-cs-header-title {
  font-family: var(--cond);
  font-size: 1.05rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--white);
  margin-left: 16px;
  border-left: 1px solid var(--border);
  padding-left: 16px;
}

.b64-step {
  display: grid;
  grid-template-columns: 64px 1fr;
  border-bottom: 1px solid var(--border);
  transition: background 0.12s;
}

.b64-step:hover {
  background: #0d0d0d;
}
.b64-step:last-child {
  border-bottom: none;
}

.b64-step-num {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 22px 0 20px;
  border-right: 1px solid var(--border);
  font-family: var(--cond);
  font-size: 2rem;
  font-weight: 900;
  color: var(--border);
  letter-spacing: -0.04em;
  transition: color 0.15s;
}

.b64-step:hover .b64-step-num {
  color: var(--yellow);
}

.b64-step-content {
  padding: 20px 24px;
}

.b64-step-title {
  font-family: var(--cond);
  font-size: 1rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--white);
  margin-bottom: 6px;
}

.b64-step-desc {
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.6;
}

/* Responsive */
@media (max-width: 900px) {
  .b64-page-header {
    grid-template-columns: 1fr;
  }
  .b64-ph-left {
    border-right: none;
  }
  .b64-ph-right {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    border-top: 1px solid var(--border);
  }
  .b64-ph-stat {
    border-bottom: none;
    border-right: 1px solid var(--border);
  }
  .b64-ph-stat:last-child {
    border-right: none;
  }
  .b64-page-body {
    grid-template-columns: 1fr;
  }
  .b64-col-main {
    border-right: none;
  }
  .b64-col-side {
    border-top: 1px solid var(--border);
  }
}
