* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

@font-face {
  font-family: "MyFont";
  src: url("fonts/Akira Expanded Demo.otf") format("truetype");
}

body {
  background-color: #000;
  color: #fff;
  font-family: "MyFont", sans-serif;
  scroll-behavior: smooth;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 50px;
  background: rgba(0, 0, 0, 0.8);
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
}

header .logo {
  font-size: 1.5rem;
  font-weight: bold;
  letter-spacing: 2px;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 20px;
}

nav a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
}

/* 🌌 HERO SECTION */
.hero {
  height: 100vh;
  background-size: cover;
  background-position: center;
  background: url("images/reze_arc_banner.png") center/cover no-repeat;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  transition: background-image 1s ease-in-out;
}

/* Overlay fade-in for cinematic effect */
.hero::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  animation: fadeOverlay 1.5s ease forwards;
}

/* Text container */
.hero-content {
  position: relative;
  z-index: 1;
  overflow: hidden;
}

/* Hero text reveal animation */
.hero-text {
  font-size: 3rem;
  font-weight: 600;
  color: #fff;
  padding: 0 20px;
  max-width: 800px;
  line-height: 1.2;
}

/* Tablet adjustments */
@media (max-width: 1024px) {
  .hero {
    height: 80vh;
  }

  .hero-text {
    font-size: 2.2rem;
    line-height: 1.3;
  }
}

/* Mobile phones */
@media (max-width: 600px) {
  .hero {
    height: 70vh;
    background-position: center top;
  }

  .hero-text {
    font-size: 1.6rem;
    padding: 0 10px;
    line-height: 1.4;
  }
}

/* ✨ Keyframes */
@keyframes fadeOverlay {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes textReveal {
  0% {
    opacity: 0;
    transform: translateY(40px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Optional glowing effect (like MAPPA logo) */
.hero-text.glow {
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.6);
}

.section {
  padding: 100px 20px;
  text-align: center;
}

/* ======= Anime Grid Layout ======= */
#anime-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  /* centers the last row */
  gap: 20px;
  margin-top: 30px;
}

/* Each anime card */
.card {
  background: #111;
  border: 1px solid #333;
  border-radius: 8px;
  width: calc(16.66% - 20px);
  /* 6 per row (100% / 6 = 16.66%) */
  box-sizing: border-box;
  padding: 10px;
  color: #fff;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}

.card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 6px;
}

.card h3 {
  font-size: 1rem;
  margin: 10px 0 5px;
  color: #00bfff;
}

.card p {
  font-size: 0.9rem;
  color: #ccc;
  margin: 5px 0;
}

.card a {
  display: inline-block;
  margin-top: 8px;
  background: #00bfff;
  color: #fff;
  padding: 6px 10px;
  border-radius: 5px;
  text-decoration: none;
  font-size: 0.9rem;
  transition: background 0.3s;
}

.card a:hover {
  background: #0090cc;
}

/* Hover effect */
.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

/* ===== Responsive Fixes ===== */
@media (max-width: 1200px) {
  .card {
    width: calc(20% - 20px);
    /* 5 per row */
  }
}

@media (max-width: 992px) {
  .card {
    width: calc(25% - 20px);
    /* 4 per row */
  }
}

@media (max-width: 768px) {
  .card {
    width: calc(33.33% - 20px);
    /* 3 per row */
  }
}

@media (max-width: 600px) {
  .card {
    width: calc(50% - 20px);
    /* 2 per row */
  }
}

@media (max-width: 400px) {
  .card {
    width: 100%;
    /* 1 per row */
  }
}


/* Tablet view */
@media (max-width: 1024px) {
  .grid {
    gap: 20px;
  }

  .card {
    max-width: 300px;
  }
}

/* Mobile view */
@media (max-width: 600px) {
  .grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .card {
    width: 90%;
  }
}


button {
  background: #007bff;
  border: none;
  color: #fff;
  padding: 8px 15px;
  border-radius: 5px;
  cursor: pointer;
}

button:hover {
  background: #0056b3;
}

.add-form {
  margin-top: 40px;
}

footer {
  background: #111;
  padding: 30px;
  text-align: center;
}

footer a {
  color: #fff;
  /* change link color */
  text-decoration: none;
  /* remove underline */
  font-weight: bold;
  /* make it bold */
  transition: 0.3s ease;
}

/* 🌙 LOGIN PAGE */
.login-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: radial-gradient(circle at center, #111 0%, #000 100%);
  text-align: center;
  padding: 40px;
}

.login-container h2 {
  font-size: 2rem;
  margin-bottom: 20px;
  color: #fff;
  letter-spacing: 2px;
}

.login-container form {
  background: rgba(20, 20, 20, 0.9);
  padding: 30px 40px;
  border: 1px solid #333;
  border-radius: 10px;
  width: 300px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.login-container input {
  padding: 10px;
  background: #111;
  border: 1px solid #333;
  color: #fff;
  border-radius: 5px;
}

.login-container input:focus {
  border-color: #00bfff;
  outline: none;
}

.login-container button {
  background: #00bfff;
  border: none;
  padding: 10px;
  color: #fff;
  font-weight: bold;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.login-container button:hover {
  background: #0077b3;
}

.login-container .error {
  color: #ff4d4d;
  margin-bottom: 10px;
}

.back-home {
  display: inline-block;
  margin-top: 15px;
  color: #888;
  text-decoration: none;
}

.back-home:hover {
  color: #00bfff;
}


/* Fade-in animation base */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1s ease-out, transform 1s ease-out;
}

/* Show state */
.fade-in.show {
  opacity: 1;
  transform: translateY(0);
}

/* Optional staggered fade animation using delays */
.fade-in.delay-1 {
  transition-delay: 0.1s;
}

.fade-in.delay-2 {
  transition-delay: 0.2s;
}

.fade-in.delay-3 {
  transition-delay: 0.3s;
}

.fade-in.delay-4 {
  transition-delay: 0.4s;
}

.fade-in.delay-5 {
  transition-delay: 0.5s;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

.menu-toggle {
  display: none;
  font-size: 1.8rem;
  cursor: pointer;
}

/* ============ Anime Detail Modal ============ */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  padding-top: 60px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  overflow-y: auto;
}

.modal-content {
  background-color: #111;
  margin: auto;
  padding: 20px;
  border: 1px solid #333;
  width: 90%;
  max-width: 600px;
  color: #fff;
  border-radius: 10px;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
  text-align: center;
}

.modal-content img {
  width: 80%;
  max-width: 350px;
  height: auto;
  border-radius: 8px;
  margin: 10px 0;
  object-fit: cover;
}

.modal-content h2 {
  font-size: 1.5rem;
  margin: 10px 0;
  color: #00bfff;
}

.modal-content p {
  font-size: 1rem;
  color: #ccc;
  margin: 8px 0;
  line-height: 1.4;
}

.modal-content a {
  display: inline-block;
  margin-top: 10px;
  background: #00bfff;
  padding: 8px 16px;
  border-radius: 6px;
  text-decoration: none;
  color: #fff;
  transition: background 0.3s;
}

.modal-content a:hover {
  background: #0090cc;
}

.close {
  color: #bbb;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.close:hover {
  color: #fff;
}

/* Small screen adjustments */
@media (max-width: 600px) {
  .modal-content {
    width: 95%;
    padding: 15px;
  }

  .modal-content img {
    width: 100%;
    max-width: 100%;
  }

  .modal-content h2 {
    font-size: 1.3rem;
  }

  .modal-content p {
    font-size: 0.9rem;
  }
}

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  nav ul {
    display: none;
    flex-direction: column;
    background: #000;
    width: 100%;
    margin-top: 10px;
  }

  nav ul.active {
    display: flex;
  }
}

/* 📱 Mobile and small screens */
@media (max-width: 768px) {

  header {
    flex-direction: column;
    align-items: flex-start;
    padding: 15px 20px;
  }

  nav ul {
    flex-direction: column;
    width: 100%;
    gap: 10px;
    margin-top: 10px;
  }

  .hero-text {
    font-size: 1.8rem;
    text-align: center;
    padding: 0 20px;
  }

  .section {
    padding: 60px 15px;
  }

  .grid {
    flex-direction: column;
    align-items: center;
  }

  .card {
    width: 90%;
    max-width: 320px;
  }

  footer {
    padding: 20px 10px;
    font-size: 0.9rem;
  }
}

/* 📱 Even smaller screens (phones under 480px) */
@media (max-width: 480px) {
  .logo {
    font-size: 1.2rem;
  }

  .hero {
    height: 80vh;
    background-position: center;
  }

  .hero-text {
    font-size: 1.5rem;
    line-height: 1.3;
  }

  nav ul li a {
    font-size: 0.9rem;
  }

  .card img {
    height: auto;
  }
}