/* General Styles */
body {
  margin: 0;
  font-family: Arial, sans-serif;
  background-color: #0b0b0f;
  color: #fff;
  line-height: 1.6;
  scroll-behavior: smooth;
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  background: #14080b;
  padding: 12px 0;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(176, 18, 46, 0.5);
}

.navbar ul {
  list-style: none;
  display: flex;
  justify-content: center;
  margin: 0;
  padding: 0;
}

.navbar li {
  margin: 0 20px;
}

.navbar a {
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s;
}

.navbar a:hover {
  color: #b0122e;
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 50px 20px;
  background: linear-gradient(135deg, #14080b, #b0122e);
  animation: fadeInDown 1.5s ease-in-out;
}

.hero h1 {
  font-size: 2.2rem;
  margin-bottom: 10px;
}

.hero p {
  font-style: italic;
  color: #ccc;
}

.author {
  display: block;
  margin-top: 8px;
  color: #aaa;
  font-size: 0.9rem;
}

/* Topic Section (HTML, CSS, JS) */
.topic {
  max-width: 900px;
  margin: 60px auto;
  padding: 40px 20px;
  text-align: center;
  border-top: 2px solid #b0122e;
}

.topic h1 {
  font-size: 2rem;
  color: #b0122e;
  margin-bottom: 10px;
}

.topic p {
  color: #ddd;
  font-size: 1.1rem;
  margin-bottom: 30px;
}

/* Sub Tutorial Boxes */
.tutorial {
  margin-bottom: 40px;
  text-align: left;
}

.tutorial h2 {
  color: #b0122e;
  margin-bottom: 10px;
  animation: fadeInLeft 1s ease-in-out;
}

/* Code Box */
.code-box {
  position: relative;
  background: #1a1a1a;
  padding: 15px;
  border-radius: 10px;
  overflow-x: auto;
  box-shadow: 0 0 15px rgba(176, 18, 46, 0.4);
}

.code-box pre {
  margin: 0;
  font-family: "Courier New", monospace;
  color: #eee;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #b0122e;
  border: none;
  padding: 6px 12px;
  color: #fff;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.3s ease;
}

.copy-btn:hover {
  background: #9f0404;
}

/* Animations */
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-40px); }
  to { opacity: 1; transform: translateX(0); }
}
