/* psuedo-elements.css: Styles for the CSS pseudo-elements demo page */
body {
  background: linear-gradient(120deg, #f0f4f8 0%, #e0e7ef 100%);
  font-family: 'Segoe UI', Arial, sans-serif;
  margin: 0;
  padding: 0;
  color: #222;
}
.container {
  max-width: 900px;
  margin: 40px auto;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 4px 32px 0 rgba(52, 152, 219, 0.10);
  padding: 32px 24px 24px 24px;
}
h1 {
  text-align: center;
  color: #8e44ad;
  margin-bottom: 16px;
}
.theory-section, .code-section, .demo-section {
  margin-bottom: 32px;
  padding: 18px 20px;
  border-radius: 12px;
  background: #f8fafc;
  box-shadow: 0 2px 8px 0 rgba(52, 152, 219, 0.04);
}
.code-section {
  background: #23272e;
  color: #f8f8f2;
}
.code-block {
  background: #181a20;
  border-radius: 8px;
  padding: 16px;
  overflow-x: auto;
  margin-top: 10px;
}
.code-block code {
  color: #ffd200;
  font-family: 'Fira Mono', 'Consolas', monospace;
  font-size: 1rem;
}
.demo-section {
  background: #f7f9fb;
}
.pseudo-demo-row {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: center;
  margin-top: 18px;
}
.pseudo-demo-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 8px 0 rgba(52, 152, 219, 0.08);
  padding: 12px 10px 10px 10px;
  min-width: 260px;
  min-height: 160px;
  transition: box-shadow 0.3s, transform 0.2s;
  margin-bottom: 8px;
  position: relative;
}
.pseudo-demo-card:hover, .pseudo-demo-card:focus-within {
  box-shadow: 0 8px 32px 0 #8e44ad44;
  transform: translateY(-4px) scale(1.04);
}
.pseudo-demo-label {
  font-weight: 600;
  color: #8e44ad;
  margin-bottom: 8px;
  font-size: 1.08rem;
}
.pseudo-btn {
  font-size: 1.08rem;
  padding: 10px 22px;
  border-radius: 6px;
  border: none;
  background: linear-gradient(90deg, #3498db 60%, #8e44ad 100%);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 2px 8px #3498db22;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
}
.pseudo-btn:hover, .pseudo-btn:focus {
  background: linear-gradient(90deg, #8e44ad 0%, #3498db 100%);
  box-shadow: 0 4px 16px 0 #8e44ad44;
  transform: translateY(-2px) scale(1.03);
}
.pseudo-intro {
  max-width: 220px;
  margin: 0 auto;
  font-size: 1.01rem;
  line-height: 1.5;
  background: #f7e9ff;
  border-radius: 8px;
  padding: 10px 14px;
}
.pseudo-selection {
  max-width: 220px;
  margin: 0 auto;
  font-size: 1.01rem;
  background: #eaf7ff;
  border-radius: 8px;
  padding: 10px 14px;
}
.pseudo-placeholder {
  font-size: 1.08rem;
  padding: 8px 14px;
  border-radius: 6px;
  border: 2px solid #8e44ad;
  margin-top: 8px;
  width: 180px;
  background: #f8fafc;
  color: #222;
}
.pseudo-list {
  margin: 0 auto;
  padding: 0 0 0 18px;
  max-width: 220px;
}
.pseudo-list li {
  margin: 6px 0;
  padding: 6px 10px;
  border-radius: 5px;
  background: #f8fafc;
  transition: background 0.2s, color 0.2s;
}
.pseudo-demo-desc {
  color: #888;
  font-size: 0.98rem;
  margin-top: 8px;
  text-align: center;
}
.back-btn {
  display: inline-block;
  margin-top: 24px;
  padding: 10px 22px;
  background: linear-gradient(90deg, #8e44ad 60%, #3498db 100%);
  color: #fff;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  box-shadow: 0 2px 8px 0 rgba(52, 152, 219, 0.12);
  transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
}
.back-btn:hover, .back-btn:focus {
  background: linear-gradient(90deg, #3498db 0%, #8e44ad 100%);
  box-shadow: 0 4px 16px 0 #8e44ad44;
  transform: translateY(-2px) scale(1.03);
}
/* Pseudo-element demos */
.button::before { content: '🚀 '; }
.button::after { content: ' →'; }
.intro::first-letter { font-size: 2rem; color: #8e44ad; }
.intro::first-line { font-weight: bold; }
.pseudo-selection::selection{ background: #ffd200; color: #222; }
input::placeholder, .pseudo-placeholder::placeholder { color: #888; font-style: italic; }
.pseudo-list li:first-child { color: #3498db; }
.pseudo-list li:last-child { color: #e67e22; }
.pseudo-list li:nth-child(2) { font-weight: bold; }
.pseudo-list li:only-child { color: #27ae60; }
.pseudo-list li:empty { background: #f7e9ff; }
/* Animated badge with ::after */
.badge::after {
  content: '●';
  color: #e74c3c;
  margin-left: 8px;
  font-size: 1.2em;
  animation: pulse 1.2s infinite alternate;
}
@keyframes pulse {
  from { opacity: 0.5; transform: scale(1); }
  to { opacity: 1; transform: scale(1.3); }
}
/* Custom list marker */
ul.custom-list li::marker {
  color: #3498db;
  font-size: 1.2em;
}
/* Progress bar using ::before */
.progress-bar {
  position: relative;
  background: #eee;
  border-radius: 8px;
  height: 18px;
  width: 180px;
  margin: 10px 0;
  overflow: hidden;
}
.progress-bar::before {
  content: '';
  display: block;
  background: linear-gradient(90deg, #3498db 60%, #8e44ad 100%);
  height: 100%;
  border-radius: 8px 0 0 8px;
  width: 60%;
  transition: width 0.5s;
}
/* Custom placeholder and selection */
input::placeholder {
  color: #8e44ad;
  font-style: italic;
  opacity: 0.8;
}
input:focus::placeholder {
  color: #3498db;
  opacity: 1;
}
input::selection {
  background: #ffd200;
  color: #222;
}
@media (max-width: 700px) {
  .container {
    padding: 10px 2vw;
  }
  .pseudo-demo-row {
    flex-direction: column;
    gap: 16px;
  }
  .pseudo-demo-card {
    min-width: 0;
    width: 100%;
  }
}
:focus {
  outline: 2px solid #8e44ad;
  outline-offset: 2px;
}
