:root {
  --primary-color: #4caf50;
  --hover-color: #45a049;
  --code-bg: #f5f5f5;
}

/* * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        } */

body {
  background-color: #f9f9f9;
  line-height: 1.6;
}

.container {
  max-width: 56.25rem;
  margin: 0 auto;
  padding: 1.25rem;
  font-family: "Segoe UI", Arial, sans-serif;
}

.color-section {
  margin: 1.875rem 0;
  padding: 1.5625rem;
  border-radius: 0.75rem;
  box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
  background-color: white;
  transition: transform 0.3s ease;
}

.color-section:hover {
  transform: translateY(-0.3125rem);
}

.theory-section {
  background-color: #f0f7ff;
  padding: 0.9375rem;
  padding-left: 3rem;
  border-left: 0.25rem solid #007bff;
  margin: 0.9375rem 0;
  border-radius: 0 0.5rem 0.5rem 0;
}

.color-demo {
  height: 3.75rem;
  margin: 0.9375rem 0;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.color-demo:hover {
  transform: scale(1.02);
  box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.2);
}

.color-demo::after {
  content: "Click to copy";
  position: absolute;
  right: 0.625rem;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.9);
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  opacity: 0;
  transition: opacity 0.3s;
}

.color-demo:hover::after {
  opacity: 1;
}

code {
  display: block;
  padding: 0.75rem;
  background: var(--code-bg);
  border-radius: 0.375rem;
  font-family: "Courier New", monospace;
  margin: 0.625rem 0;
  position: relative;
  cursor: pointer;
}

code:hover {
  background: #eaeaea;
}

.code-block {
  background-color: #f4f4f4;
  padding: 1em;
  margin: 1em 0;
  border-left: 5px solid #333;
  overflow-x: auto;
  font-family: "Courier New", Courier, monospace;
  white-space: pre-wrap;
  line-height: 1.6;
}

.back-button {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background-color: var(--primary-color);
  color: white;
  text-decoration: none;
  border-radius: 0.375rem;
  margin-bottom: 1.25rem;
  transition: all 0.3s ease;
}

.back-button:hover {
  background-color: var(--hover-color);
  transform: translateX(-0.3125rem);
}

h1 {
  color: #333;
  border-bottom: 0.1875rem solid var(--primary-color);
  padding-bottom: 0.625rem;
}

h2 {
  color: #444;
  margin-top: 1.5625rem;
}

.interactive-demo {
  display: flex;
  gap: 1.25rem;
  margin: 1.25rem 0;
}

.color-input {
  padding: 0.625rem;
  border: 0.0625rem solid #ddd;
  border-radius: 0.25rem;
  width: 9.375rem;
}

.color-preview {
  width: 6.25rem;
  height: 6.25rem;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
}
.pure-red-bg {
  background: rgb(255, 0, 0);
}
.semi-transparent-blue-bg {
  background: rgba(0, 0, 255, 0.5);
}
.orange-bg {
  background: #ff5733;
}
.light-green-bg {
  background: #33ff57;
}
.pure-green-bg {
  background: hsl(120, 100%, 50%);
}
.semi-transparent-purple-bg {
  background: hsla(300, 100%, 50%, 0.5);
}
.current-color-demo {
  color: blue;
  border: 0.3125rem solid currentColor;
}
.transparent-demo {
  background: transparent;
  border: 0.125rem dashed #333;
}
.default-color-preview {
  background-color: #4caf50;
}
