/* ═══════════════════════════════════════════
   Regex Tester — Styles (PG Golden Reference)
   ═══════════════════════════════════════════ */

/* Page Header */
.rt-page-header {
  display: grid;
  grid-template-columns: 1fr auto;
  border-bottom: 1px solid var(--border);
  background: #0a0a0a;
}
.rt-ph-left {
  padding: 44px 48px 36px;
  border-right: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.rt-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
  );
}
.rt-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;
}
.rt-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;
}
.rt-ph-title .t-accent {
  color: var(--yellow);
}
.rt-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;
}
.rt-ph-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.rt-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);
}
.rt-ph-tag.yellow {
  border-color: var(--yellow);
  color: var(--yellow);
}
.rt-ph-tag.green {
  border-color: var(--green, #00c875);
  color: var(--green, #00c875);
}

.rt-ph-right {
  display: flex;
  flex-direction: column;
  min-width: 220px;
}
.rt-ph-stat {
  flex: 1;
  padding: 24px 32px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.rt-ph-stat:last-child {
  border-bottom: none;
}
.rt-ph-stat-label {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.rt-ph-stat-val {
  font-family: var(--cond);
  font-size: 2.4rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--white);
}
.rt-ph-stat-val .y {
  color: var(--yellow);
}
.rt-ph-stat-note {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--muted);
  margin-top: 4px;
}

/* Main Layout */
.rt-page-body {
  display: grid;
  grid-template-columns: 1fr 300px;
  min-height: 80vh;
}
.rt-col-main {
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}
.rt-col-side {
  display: flex;
  flex-direction: column;
  background: #080808;
}

/* Tool Panel */
.rt-tool-panel {
  border-bottom: 1px solid var(--border);
}
.rt-tph-header {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid var(--border);
  background: #0a0a0a;
  height: 46px;
}
.rt-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;
  flex: 1;
}
.rt-tph-title .status {
  width: 6px;
  height: 6px;
  background: var(--green, #00c875);
  border-radius: 50%;
  animation: rt-dot-blink 1.8s step-end infinite;
}
@keyframes rt-dot-blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}
.rt-tph-title .status-text {
  color: var(--green, #00c875);
  font-size: 0.65rem;
}

.rt-tool-body {
  padding: 28px;
}
.rt-inp-wrap {
  margin-bottom: 24px;
}
.rt-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;
}

/* Regex input group */
.rt-regex-input-group {
  display: flex;
  align-items: center;
  background: #0a0a0a;
  border: 1px solid var(--border);
  transition: border-color 0.15s;
}
.rt-regex-input-group:focus-within {
  border-color: var(--yellow);
}
.rt-slash {
  padding: 0 8px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 1.2rem;
  user-select: none;
}
.rt-regex-pattern {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--white);
  padding: 14px 8px;
  font-family: var(--mono);
  font-size: 1rem;
  outline: none;
}
.rt-regex-flags {
  width: 60px;
  background: transparent;
  border: none;
  color: var(--yellow);
  padding: 14px 8px;
  font-family: var(--mono);
  font-size: 1rem;
  outline: none;
}

.rt-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;
}
.rt-textarea:focus {
  border-color: var(--yellow);
}

.rt-result-container {
  min-height: 150px;
  background: #0a0a0a;
  border: 1px solid var(--border);
  padding: 20px;
  color: var(--white);
  font-family: var(--mono);
  font-size: 0.92rem;
  line-height: 1.6;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.rt-match {
  background: rgba(227, 255, 0, 0.18);
  border-bottom: 2px solid var(--yellow);
  border-radius: 1px;
}
.rt-match:nth-child(even) {
  background: rgba(0, 200, 117, 0.18);
  border-bottom-color: var(--green, #00c875);
}
.rt-match-stats {
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--green, #00c875);
}
.rt-error {
  display: none;
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 0.82rem;
  color: #ff5252;
}

/* Content Section */
.rt-content-section {
  border-bottom: 1px solid var(--border);
}
.rt-cs-header {
  display: flex;
  align-items: center;
  padding: 0 28px;
  height: 46px;
  border-bottom: 1px solid var(--border);
  background: #0a0a0a;
}
.rt-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;
}
.rt-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;
}
.rt-step {
  display: grid;
  grid-template-columns: 64px 1fr;
  border-bottom: 1px solid var(--border);
  transition: background 0.12s;
}
.rt-step:hover {
  background: #0d0d0d;
}
.rt-step:last-child {
  border-bottom: none;
}
.rt-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;
}
.rt-step:hover .rt-step-num {
  color: var(--yellow);
}
.rt-step-content {
  padding: 20px 24px;
}
.rt-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;
}
.rt-step-desc {
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.6;
}

/* Responsive */
@media (max-width: 900px) {
  .rt-page-header {
    grid-template-columns: 1fr;
  }
  .rt-ph-left {
    border-right: none;
  }
  .rt-ph-right {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    border-top: 1px solid var(--border);
  }
  .rt-ph-stat {
    border-bottom: none;
    border-right: 1px solid var(--border);
  }
  .rt-ph-stat:last-child {
    border-right: none;
  }
  .rt-page-body {
    grid-template-columns: 1fr;
  }
  .rt-col-main {
    border-right: none;
  }
}

/* Mobile Screens (Max 480px) */
@media (max-width: 480px) {
  .rt-regex-input-group {
    flex-direction: column;
    align-items: stretch;
  }
  .rt-regex-pattern {
    border-bottom: 1px solid var(--border);
  }
  .rt-slash {
    display: none;
  }
  .rt-regex-flags {
    width: 100%;
    text-align: left;
    padding: 10px 14px;
    border-top: 1px solid var(--border);
  }
}
