body {
  background: linear-gradient(to right, #0a0a0a, #141414);
  color: #ffffff;
  font-family: 'Poppins', sans-serif;
  margin: 0;
  padding: 0;
}

/* HEADER */

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  flex-wrap: wrap;
}

.logo {
  display: flex;
  align-items: center;
  gap: 15px;
  text-decoration: none;
  color: white;
}

.logo img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.logo h1 {
  color: red;
  font-size: 1.8rem;
  animation: fadeInDown 1s ease-in-out;
}

nav {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

nav a {
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  position: relative;
  margin-left: 30px;
}

nav a:hover::after,
nav a.active::after {
  content: '';
  width: 100%;
  height: 2px;
  background: red;
  position: absolute;
  bottom: -6px;
  left: 0;
  transition: width 0.3s ease;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* YOUTUBE HEADER */

.youtube-header {
  text-align: center;
  padding: 30px 20px 10px;
  font-size: 2.2rem;
  color: red;
}

/* SUBJECT CARDS SECTION */

.subjects-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  max-width: 1200px;
  margin: 0 auto;
  padding: 30px 20px;
  gap: 20px;
}

.subject-card {
  background: #1e1e1e;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.05);
  transition: transform 0.3s ease;
}

.subject-card:hover {
  transform: translateY(-5px);
}

.subject-title {
  font-size: 1.2rem;
  color: red;
  margin-bottom: 15px;
  font-weight: 600;
}

.links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}




.youtube-link {
  color: red;
  text-decoration: none;
  font-weight: 500;
}

.youtube-link:visited {
  color: red;
}

.youtube-link:hover,
.youtube-link:focus {
  color: red;
  text-decoration: underline;
}

.youtube-link:active {
  color: red;
}


/* FOOTER */

footer {
  text-align: center;
  padding: 20px;
  background: linear-gradient(to right, black, red, black);
  backdrop-filter: blur(10px);
  margin-top: 40px;
  font-size: 0.9rem;
}

.footer-container {
  background-color: #0e0e0e;
  padding: 20px;
  text-align: center;
  color: black;
  position: relative;
}

.footer-container p {
  margin-bottom: 10px;
  font-size: 14px;
}

.credit-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.credit-btn {
  position: relative;
  padding: 10px 20px;
  border: 2px solid white;
  border-radius: 30px;
  background: transparent;
  color: black;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
}

.credit-btn:hover {
  background-color: red;
  color: black;
}

.popup-card {
  display: none;
  position: absolute;
  bottom: 45px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #1a1a1a;
  color: white;
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(255, 0, 0, 1);
  width: 250px;
  z-index: 100;
  text-align: left;
}

.credit-btn:hover .popup-card {
  display: block;
}

.popup-card .social-links {
  display: flex;
  gap: 12px;
  margin: 6px 0;
}

.popup-card .social-links a {
  color: red;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
}

.popup-card .social-links a:hover {
  text-decoration: underline;
}

.popup-card i {
  margin-right: 6px;
}

.popup-card hr {
  border-color: red;
  margin: 10px 0;
}

/* RESPONSIVE */

@media (max-width: 600px) {
  .popup-card {
    width: 220px;
    font-size: 14px;
  }

  .credit-btn {
    padding: 8px 14px;
    font-size: 14px;
  }

  .credit-buttons {
    flex-direction: column;
    align-items: center;
  }

  nav {
    justify-content: center;
    margin-top: 10px;
  }

  .subjects-container {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
}