/* Created by: Chris Manalo */
:root {
  --dark: #0f1417;
  --dark-overlay: #0F141780;
  --light: #ebebed;
  --light-overlay: #FFFFFF4D;
  --accent: #08daff;
  --accent-secondary: #4a3aff;
  --text-color: #FFFFFF;
  --dark-secondary: #080808;
}

::selection {
    background-color: var(--accent-secondary);
    color: var(--text-color);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Roboto", sans-serif;
  color: var(--text-color);
  background: 
    url("./content-cleaner-wallpaper.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

.tool-shell {
  width: min(1280px, calc(100vw - 28px));
  margin: 0 auto;
  padding: 100px 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: rgba(15, 20, 23, 0.5);
  border-radius: 20px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(235, 235, 237, 0.1);
}

.hero-card {
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 40px;
  max-width: 1280px;
  margin: 0;
  padding: 0 0 40px 0;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  width: 50%;
  gap: 12px;
}

.eyebrow,
.summary-label,
.button {
  text-transform: uppercase;
  letter-spacing: 4px;
  font-family: "Roboto Mono", monospace;
  font-size: 15px;
  font-weight: 500;
}


.eyebrow {
  color: var(--accent);
  margin: 0;
}

h1,
h2 {
  margin: 0;
  line-height: 1.1;
  text-transform: uppercase;
}

h1 {
  font-size: 56px;
  font-weight: 800;
}

h2 {
  font-size: 32px;
  font-weight: 600;
}

code {
  background: rgba(47, 164, 171, 0.15);
  border-radius: 999px;
  padding: 0.08em 0.38em;
  font-size: 0.92em;
}

.panel-head p,
label {
  color: var(--accent);
}

.panel-head p,
.preview-pane p,
.preview-pane li {
  line-height: 1.65;
}

.action-row {
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
  gap: 12px;
  width: 50%;
  margin-top: auto;
}

.button {
  border: 0;
  border-radius: 999px;
  padding: 14px 20px;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

.button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.button-primary,
.button-secondary,
.button-ghost {
  transition: background 0.3s ease, color 0.3s ease;
}

.button-primary {
  color: var(--text-color);
  background: var(--accent-secondary);
}

.button-primary:hover:not(:disabled) {
  color: var(--dark);
  background: var(--light);
}

.button-secondary {
  color: var(--text-color);
  background: var(--light-overlay);
}

.button-secondary:hover:not(:disabled) {
  color: var(--dark);
  background: var(--light);
}

.button-ghost {
  color: var(--text-color);
  background: var(--dark-secondary);
}

.button-ghost:hover:not(:disabled) {
  color: var(--dark);
  background: var(--light);
}

#scrollTopBtn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;

  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;

  background: var(--accent-secondary);
  color: var(--text-color);

  display: flex;
  align-items: center;
  justify-content: center;

  cursor: pointer;

  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

#scrollTopBtn svg {
  width: 20px;
  height: 20px;
}

#scrollTopBtn.show {
  opacity: 1;
  visibility: visible;
}

#scrollTopBtn:hover {
  background: var(--light);
  color: var(--dark);
}

.summary-card strong {
  line-height: 1.5;
}


.workspace,
.results-grid {
  display: flex;
  flex-direction: row;
  gap: 20px;
  margin: 0;
}

.panel {
  width: 100%;
  padding: 30px;
}

.panel-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  align-content: center;
  gap: 8px;
}

.panel-head p {
  margin: 0;
}

label {
  display: grid;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 700;
}

.code-area,
.preview-pane {
  width: 100%;
  min-height: 360px;
  padding: 20px;
  background: rgba(12, 16, 18, 0.5);
  border-radius: 10px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(235, 235, 237, 0.1);
  color: var(--text-color);
  font-family: "Roboto Mono", monospace;
  font-size: 15px;
  font-weight: 300;
  line-height: 1.5em;
}

.code-area:focus {
  outline: 1px solid rgba(235, 235, 237, 0.4);
  outline-offset: 0;
}

.stats-grid {
  width: 28%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.summary-card {
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 10px;
  padding: 30px;
  background: rgba(12, 16, 18, 0.5);
  border-radius: 20px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(235, 235, 237, 0.1);
}

.action-row {
  margin: 10px 0;
}


.summary-card {
  display: flex;
  flex-direction: column;
}

.summary-card strong {
  font-size: 32px;
  font-weight: 500;
  color: var(--text-color);
}

.summary-label {
  color: var(--accent);
}

.preview-panel {
  display: grid;
  align-content: start;
}


.preview-pane > :first-child {
  margin-top: 0;
}

.preview-pane > :last-child {
  margin-bottom: 0;
}

.preview-pane h1,
.preview-pane h2,
.preview-pane h3,
.preview-pane h4,
.preview-pane h5,
.preview-pane h6 {
  font-weight: 500;
  line-height: 1.2;
  margin: 20px 0 !important;
  max-width: none;
  text-transform: none !important;
}

.preview-pane p,
.preview-pane ul,
.preview-pane ol,
.preview-pane blockquote {
  margin: 0 0 1rem;
}

.preview-pane ul,
.preview-pane ol {
  padding-left: 1.2rem;
}

.preview-pane a {
  color: var(--accent);
}

.empty-preview {

  margin: 0;
  text-align: center;
}

@media (max-width: 1360px) {
  .tool-shell {
    width: 100%;
    padding: 100px 40px;
  }
}

@media (max-width: 1280px) {
  .hero-card {
    gap: 20px;
  }
}

@media (max-width: 1240px) {
  .hero-card {
    display: flex;
    flex-direction: column;
  }

  .hero-copy,
  .action-row {
    width: 100%;
    justify-content: center;
    align-items: center;
  } 
}

@media (max-width: 1024px) {
  .hero-card,
  .workspace,
  .results-grid {
    display: flex;
    flex-direction: column;
  }

  .hero-card {
    padding: 0 0 20px 0;
  }

  .stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    width: auto;
  }

  .summary-card {
    padding: 20px;
  }

}

@media (max-width: 767px) {
  .tool-shell {
    width: 100%;
    padding: 60px 20px;
  }

  .hero-card {
    gap: 30px;
    padding: 0;
  }

  .action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

  .panel {
    padding: 20px;
    border-radius: 20px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .code-area {
    min-height: 280px;
  }

  h1 {
    max-width: none;
    font-size: 40px;
  }

  h2 {
    font-size: 26px;
  }
}
