body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  background: #0d1117;
  color: #e6edf3;
  background-image: linear-gradient(rgba(63, 185, 80, 0.02) 1px, transparent 1px), linear-gradient(90deg, rgba(63, 185, 80, 0.02) 1px, transparent 1px);
  background-size: 40px 40px;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at top center, rgba(63, 185, 80, 0.08), transparent 50%);
  pointer-events: none;
  z-index: -1;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  background: linear-gradient(45deg, rgba(63,185,80,0.05), rgba(63,185,80,0), rgba(63,185,80,0.05));
  background-size: 400% 400%;
  animation: gradientMove 15s ease infinite;
  pointer-events: none;
  z-index: -2;
}
@keyframes gradientMove {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
a {
  color: #3fb950;
  text-decoration: none;
  transition: color 0.2s ease;
}
a:hover {
  color: #56d364;
}
.hero {
  text-align: center;
  padding: 140px 20px 40px;
}
.hero-text {
  margin-top: 35px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.8;
}
.logo {
  color: #3fb950;
  font-size: 28px;
  margin-bottom: 20px;
}
.logo::after {
  content: "_";
  color: #3fb950;
  animation: blink 1s infinite;
}
@keyframes blink {
  50% {
    opacity: 0;
  }
}
.intro {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 20px 80px;
  text-align: center;
}
.intro h2 {
  margin-bottom: 20px;
  color: #e6edf3;
}
.intro p {
  max-width: 700px;
  margin: 15px auto;
  line-height: 1.8;
}
h1 {
  font-size: 4rem;
  line-height: 1.1;
  margin-bottom: 20px;
}
h2 {
  font-size: 2rem;
  margin-bottom: 30px;
  text-align: center;
}
p {
  color: #8b949e;
}
.btn {
  display: inline-block;
  margin: 10px;
  padding: 12px 24px;
  background: #3fb950;
  color: #0d1117;
  border-radius: 10px;
  font-weight: 600;
  transition: all .2s ease;
  text-decoration: none;
}
.btn:hover {
  transform: translateY(-2px);
  background: #56d364;
  color: #fff;
}
.btn.secondary {
  background: #161b22;
  color: #e6edf3;
  border: 1px solid #2d333b;
}
section {
  padding: 60px 20px;
  max-width: 1200px;
  margin: auto;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}
.tutorial-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  width: 100%;
  align-items: start;
}
@media (max-width: 700px) {
  .tutorial-grid {
    grid-template-columns: 1fr;
  }
}
.card {
  background: #161b22;
  padding: 24px;
  border-radius: 16px;
  border: 1px solid #2d333b;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.02), 0 8px 30px rgba(0, 0, 0, 0.25);
  transition: all .25s ease;
}
.card:hover {
  border-color: #3fb950;
  transform: translateY(-6px);
  box-shadow:
    0 0 0 1px rgba(63, 185, 80, 0.25), 0 15px 40px rgba(0, 0, 0, 0.35);
}
.links a {
  display: inline-block;
  margin: 5px;
  color: #3fb950;
}
footer {
  text-align: center;
  padding: 40px;
  border-top: 1px solid #2d333b;
  color: #8b949e;
}
footer a {
  color: #8b949e;
  text-decoration: none;
}
footer a:hover {
  color: #3fb950;
}

/* Article-specific styling */
.article-container {
  max-width: 800px;
  margin: 40px auto;
  padding: 0 20px;
}
.article-container h1,
.article-container h2,
.article-container h3,
.article-container h4,
.article-container h5,
.article-container h6 {
  color: #e6edf3;
  margin-top: 2em;
  margin-bottom: 0.5em;
  line-height: 1.3;
}
.article-container h1 {
  font-size: 2.5rem;
}
.article-container h2 {
  font-size: 2rem;
}
.article-container h3 {
  font-size: 1.75rem;
}
.article-container p {
  color: #e6edf3;
  line-height: 1.7;
  margin-bottom: 1em;
}
.article-container ul,
.article-container ol {
  color: #e6edf3;
  margin-left: 2em;
  margin-bottom: 1em;
}
.article-container li {
  margin-bottom: 0.5em;
}
.article-container pre {
  background: #0d1117;
  border: 1px solid #2d333b;
  border-radius: 8px;
  padding: 16px;
  overflow-x: auto;
  margin: 1.5em 0;
}
.article-container code {
  background: #161b22;
  padding: 2px 4px;
  border-radius: 4px;
  font-family: 'Fira Code', monospace;
  font-size: 0.9em;
}
.article-container pre code {
  background: none;
  padding: 0;
  font-size: inherit;
}
.article-container blockquote {
  border-left: 4px solid #3fb950;
  padding-left: 16px;
  margin: 1.5em 0;
  color: #8b949e;
  font-style: italic;
}
.article-container hr {
  border: none;
  border-top: 1px solid #2d333b;
  margin: 2em 0;
}
.article-container .btn {
  display: inline-block;
  margin-top: 2em;
}

/* Callout styles */
.note,
.tip,
.warning {
  padding: 12px 16px;
  margin: 1.5em 0;
  border-radius: 8px;
  border-left: 4px solid;
}
.note {
  background: rgba(30, 144, 255, 0.1);
  border-color: #1e90ff;
}
.tip {
  background: rgba(34, 197, 94, 0.1);
  border-color: #22c55e;
}
.warning {
  background: rgba(251, 146, 60, 0.1);
  border-color: #fb923c;
}
.note h4,
.tip h4,
.warning h4 {
  margin-top: 0;
  margin-bottom: 0.5em;
  color: #e6edf3;
}
.article-container li.note,
.article-container li.tip,
.article-container li.warning {
  list-style: none;
  margin-left: -1.5em;
}

/* Responsive improvements */
@media (max-width: 600px) {
  .hero {
    padding: 100px 20px 80px;
  }
  h1 {
    font-size: 2.5rem;
  }
  h2 {
    font-size: 1.5rem;
  }
  .article-container {
    padding: 0 15px;
  }
}

.game-wrapper {
  width: 320px;
  height: 180px;
  margin: 20px auto 0;
  position: relative;
}

.game-wrapper::before {
  content: "SPITALL";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Inter', sans-serif;
  font-size: 44px;
  color: rgba(63,185,80,0.03);
  pointer-events: none;
  z-index: 0;
}


.tutorial-more {
  text-align: right;
  margin-top: 8px;
}
.btn-sm {
  padding: 8px 16px;
  font-size: 0.9rem;
}

/* Table Styling */
.article-container table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  background: #161b22;
  border: 1px solid #2d333b;
  border-radius: 8px;
  overflow: hidden;
}

.article-container table thead {
  background: #0d1117;
  border-bottom: 2px solid #30363d;
}

.article-container table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: #e6edf3;
  border-right: 1px solid #2d333b;
}

.article-container table th:last-child {
  border-right: none;
}

.article-container table td {
  padding: 12px 16px;
  border-right: 1px solid #2d333b;
  border-bottom: 1px solid #2d333b;
  color: #c9d1d9;
}

.article-container table td:last-child {
  border-right: none;
}

.article-container table tbody tr:last-child td {
  border-bottom: none;
}

.article-container table tbody tr:hover {
  background: #0d1117;
}

/* Snake Game Styling */
.game-container {
  max-width: 700px;
  margin: 40px auto;
  padding: 20px;
  background: #161b22;
  border: 1px solid #2d333b;
  border-radius: 12px;
}

.game-info {
  padding: 12px 0;
  text-align: center;
  border-bottom: 1px solid #2d333b;
  margin-bottom: 16px;
  font-size: 1.1rem;
}

.game-wrapper {
  position: relative;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0d1117;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 1/1;
}

#gameCanvas {
  display: block;
  width: 100%;
  height: 100%;
  border: none;
}

.game-start-btn {
  position: absolute;
  padding: 14px 32px;
  font-size: 1.1rem;
  font-weight: 600;
  background: #238636;
  color: #fff;
  border: 2px solid #3fb950;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 10;
}

.game-start-btn:hover {
  background: #2ea043;
  box-shadow: 0 0 16px rgba(63, 185, 80, 0.4);
}

.game-start-btn:active {
  transform: scale(0.98);
}

/* Mobile: Hide Game wenn Screen zu klein */
@media (max-width: 640px) {
  .game-container {
    display: none;
  }
}

/* Tablet & kleinere Desktop */
@media (max-width: 900px) {
  .game-container {
    max-width: 95vw;
  }
}
