:root {
  --primary-color: #4caf50;
  --primary-dark: #388e3c;
  --secondary-color: #2196f3;
  --secondary-dark: #1976d2;
  --accent-color: #ff9800;
  --accent-dark: #f57c00;
  --text-color: #333;
  --light-bg: #f8f9fa;
  --code-bg: #f5f5f5;
  --border-color: #e0e0e0;

  /* Enhanced note colors */
  --note-bg: #fff8e1;
  --note-border: #ffca28;
  --note-title: #f57c00;

  --warning-bg: #ffebee;
  --warning-border: #ef5350;
  --warning-title: #d32f2f;

  --tip-bg: #e8f5e9;
  --tip-border: #66bb6a;
  --tip-title: #2e7d32;

  --info-bg: #e3f2fd;
  --info-border: #42a5f5;
  --info-title: #1976d2;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.7;
  color: var(--text-color);
  margin: 0;
  padding: 0;
  background-color: #fafafa;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 40px;
}

/* Header styles - enhanced with gradient */
.header {
  background: linear-gradient(135deg, var(--light-bg) 0%, #e8f5e9 100%);
  padding: 50px 0;
  text-align: center;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  position: relative;
  overflow: hidden;
}

/* Add subtle pattern to header */
.header:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%239C92AC' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zM36 0V4h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  z-index: 0;
}

.header h1 {
  margin: 0;
  color: var(--primary-dark);
  font-size: 2.8rem;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
  position: relative;
  z-index: 1;
}

.header p {
  font-size: 1.3rem;
  max-width: 800px;
  margin: 20px auto 0;
  color: #555;
  position: relative;
  z-index: 1;
}

/* Table of contents - enhanced */
.toc {
  background-color: white;
  padding: 25px 35px;
  border-radius: 12px;
  margin-bottom: 50px;
  border-left: 5px solid var(--primary-color);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}

.toc:before {
  content: "📑";
  position: absolute;
  top: 20px;
  right: 25px;
  font-size: 2rem;
  opacity: 0.2;
}

.toc h2 {
  margin-top: 0;
  color: var(--primary-color);
  font-size: 1.6rem;
  border-bottom: none;
  padding-bottom: 0;
}

.toc ol {
  padding-left: 20px;
  counter-reset: item;
}

.toc li {
  margin-bottom: 12px;
  counter-increment: item;
  position: relative;
}

.toc li:before {
  content: counter(item);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: var(--primary-color);
  color: white;
  font-size: 0.8rem;
  font-weight: bold;
  margin-right: 10px;
  position: absolute;
  left: -32px;
  top: 0px;
}

.toc a {
  text-decoration: none;
  color: var(--secondary-color);
  font-weight: 500;
  transition: color 0.2s, transform 0.2s;
  display: inline-block;
}

.toc a:hover {
  color: var(--primary-color);
  transform: translateX(3px);
}

/* Typography */
h1,
h2,
h3,
h4 {
  font-weight: 600;
  line-height: 1.3;
}

h1 {
  font-size: 2.2rem;
  margin-top: 0;
  margin-bottom: 30px;
  color: var(--primary-color);
  padding-bottom: 15px;
  border-bottom: 2px solid var(--border-color);
}

h2 {
  font-size: 1.8rem;
  margin-top: 50px;
  margin-bottom: 25px;
  color: var(--secondary-color);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
}

h3 {
  font-size: 1.5rem;
  margin-top: 30px;
  margin-bottom: 15px;
  color: var(--text-color);
}

h4 {
  font-size: 1.2rem;
  margin-top: 25px;
  margin-bottom: 10px;
  color: var(--text-color);
}

p {
  margin-bottom: 20px;
  line-height: 1.8;
}

/* Code styles - enhanced */
code {
  font-family: "Cascadia Code", "Fira Code", Consolas, monospace;
  background-color: var(--code-bg);
  padding: 3px 6px;
  border-radius: 4px;
  font-size: 0.9em;
  color: #d63384;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

pre {
  background-color: var(--code-bg);
  padding: 25px;
  border-radius: 10px;
  overflow-x: auto;
  margin: 25px 0;
  border-left: 5px solid var(--secondary-color);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.07);
}

pre code {
  background-color: transparent;
  padding: 0;
  color: #333;
  font-size: 0.95em;
  line-height: 1.6;
  border: none;
}

/* Step styles - enhanced with better shadows */
.step {
  margin-bottom: 60px;
  padding: 30px;
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1),
    0 3px 10px rgba(0, 0, 0, 0.05);
  border-top: 5px solid var(--secondary-color);
  transition: transform 0.2s, box-shadow 0.2s;
}

.step:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12),
    0 5px 15px rgba(0, 0, 0, 0.08);
}

.step h2 {
  margin-top: 0;
  color: var(--secondary-color);
  display: flex;
  align-items: center;
}

.step h2:before {
  content: "✓";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background-color: var(--secondary-color);
  color: white;
  border-radius: 50%;
  margin-right: 15px;
  font-size: 1.2rem;
  font-weight: bold;
}

/* Enhanced Note styles with distinct types */
.note,
.warning,
.tip,
.important {
  position: relative;
  padding: 25px 30px 25px 70px;
  border-radius: 10px;
  margin: 30px 0;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.07);
}

/* Default note style */
.note {
  background-color: var(--note-bg);
  border-left: 5px solid var(--note-border);
}

.note:before {
  content: "📝";
  position: absolute;
  left: 20px;
  top: 25px;
  font-size: 1.8rem;
}

.note strong {
  color: var(--note-title);
  font-size: 1.1em;
  display: block;
  margin-bottom: 8px;
}

/* Warning note style */
.warning {
  background-color: var(--warning-bg);
  border-left: 5px solid var(--warning-border);
}

.warning:before {
  content: "⚠️";
  position: absolute;
  left: 20px;
  top: 25px;
  font-size: 1.8rem;
}

.warning strong {
  color: var(--warning-title);
  font-size: 1.1em;
  display: block;
  margin-bottom: 8px;
}

/* Tip note style */
.tip {
  background-color: var(--tip-bg);
  border-left: 5px solid var(--tip-border);
}

.tip:before {
  content: "💡";
  position: absolute;
  left: 20px;
  top: 25px;
  font-size: 1.8rem;
}

.tip strong {
  color: var(--tip-title);
  font-size: 1.1em;
  display: block;
  margin-bottom: 8px;
}

/* Important note style */
.important {
  background-color: var(--info-bg);
  border-left: 5px solid var(--info-border);
}

.important:before {
  content: "ℹ️";
  position: absolute;
  left: 20px;
  top: 25px;
  font-size: 1.8rem;
}

.important strong {
  color: var(--info-title);
  font-size: 1.1em;
  display: block;
  margin-bottom: 8px;
}

.note p:first-child,
.warning p:first-child,
.tip p:first-child,
.important p:first-child {
  margin-top: 0;
}

.note p:last-child,
.warning p:last-child,
.tip p:last-child,
.important p:last-child {
  margin-bottom: 0;
}

/* Lists */
ol,
ul {
  padding-left: 30px;
  margin-bottom: 20px;
}

li {
  margin-bottom: 10px;
}

/* Images - enhanced */
img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  margin: 25px 0;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  border: 1px solid var(--border-color);
  transition: transform 0.2s, box-shadow 0.2s;
}

img:hover {
  transform: scale(1.01);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

/* Button for copying code */
.copy-button {
  position: absolute;
  right: 10px;
  top: 10px;
  background-color: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 5px 10px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
}

.copy-button:hover {
  background-color: var(--secondary-color);
  color: white;
}

/* Code container */
.code-container {
  position: relative;
}

/* Responsive design */
@media (max-width: 768px) {
  .container {
    padding: 15px 20px;
  }

  .header h1 {
    font-size: 2rem;
  }

  h1 {
    font-size: 1.8rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  h3 {
    font-size: 1.3rem;
  }

  .step {
    padding: 20px;
  }

  .note,
  .warning,
  .tip,
  .important {
    padding: 20px 20px 20px 60px;
  }

  .note:before,
  .warning:before,
  .tip:before,
  .important:before {
    font-size: 1.5rem;
    left: 15px;
    top: 20px;
  }
}
