/* General Body and Font */
@font-face {
  font-family: edge;
  src: url(assets/edge.ttf);
}

body {
  font-family: edge;
  margin: 0;
  background-color: #0e0e0e;
  color: white;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Header Styling */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 30px;
  background-color: #0e0e0e;
  border-bottom: 0px solid #;
  flex-wrap: wrap;
}

main {
  flex: 1;
}

/* Width */
::-webkit-scrollbar {
  width: 14px;
  height: 0px;
}

/* Corner */
::-webkit-scrollbar-corner {
  background: #0e0e0e;
}

/* Track */
::-webkit-scrollbar-track {
  background: transparent;
}

/* Handle */
::-webkit-scrollbar-thumb {
  background: #00f2ab;
  border-radius: 10px;
  border-style: solid;
  border-width: 3px;
  border-color: #0e0e0e;
}

/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
  background: #00b47f;
}

/* Dropdown Menu Styling */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropbtn {
  background-color: #1a1a1a;
  color: white;
  border: none;

  padding: 10px 20px;
  font-size: 16px;
  cursor: pointer;
  border-radius: 100px;
  transition: background-color 0.3s;

}

.dropbtn:hover {
  background-color: #333;
}

.dropdown-content {
  display: none;
  position: absolute;
  right: 0;
  background-color: #181818;
  min-width: 180px;
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
  z-index: 1;
  border-radius: 20px;

}

.dropdown-content.show {
  display: block;
}

.dropdown-content a {
  color: white;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
}

.dropdown-content a:hover {
  background-color: #333;
  border-radius: 20px;

}

.dropdown:hover .dropdown-content {
  display: block;
}


footer {
  background-color: #0e0e0e;
  text-align: center;
  padding: 10px;
  position: relative;
}

.logo img {
  max-width: 200px;
  height: auto;
}

nav ul {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 20px;
}

nav ul li {
  font-size: 16px;
}

nav ul li a {
  text-decoration: none;
  color: #747474;
  transition: color 0.3s;
}

nav ul li a.active,
nav ul li a:hover {
  color: #f5f5f5;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

#search-bar {
  background-color: #1a1a1a;
  color: white;
  font-family: edge;
  border: 0px solid #1a1a1a;
  border-radius: 100px;
  padding: 10px 20px;
  font-size: 16px;
  width: 200px;
}

/* Main Section */
main {
  padding: 50px 40px;
}

#comics-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  padding: 0px;
  justify-items: center;
  align-items: start;
  transition: all 0.3s ease-in-out;
}

/* Comic Card Styles */
.comic-card {
  background-color: #1a1a1a;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  max-width: 250px;
}

.comic-card img {
  width: 100%;
  height: 200%;
  object-fit: cover;
  border-bottom: 2px solid #444;
}

.comic-card h3 {
  font-size: 18px;
  padding: 15px;
  color: #f9f9f9;
  font-weight: 500;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Hover effects for comic cards */
.comic-card:hover {
  transform: translateY(-5px);
  /* Subtle lift effect */
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  /* Increased shadow for hover effect */
}

/* Footer Styling */
footer {
  text-align: center;
  padding: 20px;
  border-top: 0px solid #1a1a1a;
  color: #f5f5f5;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1);
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4);
  animation: fadeIn 0.3s ease;

}

/* Modal fade-out animation */
.modal.fade-out {
  animation: fadeOut 0.3s ease forwards;
  /* Add forwards to retain final state */
}


.modal-content {
  background-color: #0E0E0E;
  margin: 5% auto;
  padding: 20px;
  border: 1px solid #1a1a1a;
  width: 80%;
  max-width: 600px;
  color: #f5f5f5;
  border-radius: 20px;
  max-height: 80vh;
  /* Prevent overflow */
  overflow-y: auto;
  /* Enable scrolling */
  animation: fadeIn 0.3s ease-in-out;

}

.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
}

.close:hover,
.close:focus {
  color: white;
  text-decoration: none;
  cursor: pointer;
}

/* Modal Buttons Styling */
.modal-buttons {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px
}

.modal-buttons button {
  background-color: #1a1a1a;
  color: #FFF;
  padding: 10px 20px;
  border: none;
  font-family: edge;
  border-radius: 50px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.modal-buttons button:hover {
  background-color: #5e5e5e;
}



.modal-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal-buttons button {
  width: 100%;
}

.modal-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  border-top: 1px solid #444;
  padding-top: 20px;
  margin-top: 20px;
}

.modal-grid-item {
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid #444;
  padding-bottom: 10px;
}

.grid-label {
  font-weight: bold;
  color: #00f2ab;
  margin-bottom: 5px;
  font-size: 14px;
}

.grid-value {
  color: #eee;
  font-size: 16px;
  word-break: break-word;
}

#chapterSelect.grid-value {
  background-color: #222;
  color: #fff;
  border: 1px solid #555;
  padding: 6px;
  border-radius: 4px;
  width: 100%;
}

/* Buttons stack on smaller screens */
@media (max-width: 600px) {
  .modal-grid {
    grid-template-columns: 1fr;
  }
}



/* Better dropdown styles */
#chapterSelect {
  width: 100%;
  padding: 10px;
  border: 1px solid #444;
  border-radius: 8px;
  background: #222;
  color: white;
  font-family: edge;
  font-size: 16px;
  appearance: none;
  /* Remove default arrow */
  cursor: pointer;
}

/* Custom dropdown arrow */
#chapterSelect::after {
  content: "▼";
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: white;
}

/* Mobile and Tablet Styles */
@media (max-width: 768px) {
  header {
    flex-direction: column;
    align-items: center;
    vertical-align: center;
    padding: 10px 20px;
  }

  .logo img {
    max-width: 150px;
  }

  main {
    padding: 20px 30px;
  }

  nav ul {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;

    gap: 10px;
    margin-top: 10px;
    margin-bottom: 10px;
  }

  nav ul li {
    font-size: 14px;
  }

  .header-actions {
    margin-top: 10px;
    justify-content: center;
    gap: 15px;
  }

  #search-bar {
    width: 100%;
    height: 20px;
    margin-bottom: 10px;
  }

  .dropbtn {
    width: 100%;
    height: 40px;
    margin-bottom: 10px;
  }

  /* Grid Layout for Comics */
  #comics-container {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    padding: 0px 0px;

  }

  .comic-item h3 {
    font-size: 14px;
  }

  footer {
    font-size: 14px;
  }
}

/* Very Small Screens (Phones in portrait mode) */
@media (max-width: 480px) {
  .logo img {
    max-width: 200px;
  }

  nav ul li {
    font-size: 12px;
  }

  #search-bar {
    width: 100%;
    font-size: 14px;
  }

  main {
    padding: 20px 30px;
  }

  /* Grid Layout for Comics */
  #comics-container {
    grid-template-columns: repeat(auto-fill, minmax(2fr, 1fr));
  }

  .comic-item h3 {
    font-size: 12px;
  }
}

/* Fade-in animation */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* Fade-in animation */
@keyframes fadeOut {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

@keyframes fadeInModal {
  from {
    transform: scale(0.95);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

.ad-img {
  height: 8pc;
  display: block;
  margin-left: auto;
  margin-right: auto;
  align-items: center;
}

@media (max-width: 768px) {
  .ad-img {
    height: auto;
    width: 90%;
  }
}

img.emoji {
  width: 1em;
  height: 1em;
  vertical-align: -0.1em;
  border-bottom: 0px;

}