/* Updated Anime Blog Styles */

/* Font imports */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;700&family=Bangers&family=Montserrat:wght@400;700&display=swap');

/* Global Styles */
:root {
  --primary-color: #ff4c91;
  --secondary-color: #6a11cb;
  --accent-color: #ffd700;
  --dark-color: #1a1a2e;
  --light-color: #f0f8ff;
  --success-color: #28a745;
  --info-color: #17a2b8;
  --warning-color: #ffc107;
  --danger-color: #dc3545;
  --text-color: #333333;
  --bg-gradient: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
}

body {
  font-family: 'Poppins', sans-serif;
  color: var(--text-color);
  background-color: #f9f9f9;
  background-image: linear-gradient(45deg, rgba(106, 17, 203, 0.03) 25%, transparent 25%),
                    linear-gradient(-45deg, rgba(106, 17, 203, 0.03) 25%, transparent 25%),
                    linear-gradient(45deg, transparent 75%, rgba(106, 17, 203, 0.03) 75%),
                    linear-gradient(-45deg, transparent 75%, rgba(106, 17, 203, 0.03) 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
}

.btn {
  border-radius: 50px;
  padding: 8px 25px;
  transition: all 0.3s ease;
  font-weight: 500;
}

.btn-primary {
  background: var(--bg-gradient);
  border: none;
  box-shadow: 0 4px 15px rgba(106, 17, 203, 0.3);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(106, 17, 203, 0.4);
  background: linear-gradient(135deg, #5b0cb1, #e6327e);
}

.btn-outline-primary {
  color: var(--secondary-color);
  border-color: var(--secondary-color);
}

.btn-outline-primary:hover {
  background-color: var(--secondary-color);
  border-color: var(--secondary-color);
  transform: translateY(-3px);
}

.btn-lg {
  padding: 12px 30px;
  font-size: 1.1rem;
}

.card {
  border: none;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  height: 100%;
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.bg-primary {
  background: var(--bg-gradient) !important;
}

section {
  padding: 80px 0;
}

@media (max-width: 768px) {
  section {
    padding: 50px 0;
  }
}

/* Navbar Styling */
.navbar {
  background: linear-gradient(90deg, var(--dark-color), var(--secondary-color)) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  padding: 15px 0;
}

.navbar-brand {
  font-family: 'Bangers', cursive;
  font-size: 2rem;
  color: var(--accent-color) !important;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  letter-spacing: 2px;
}

.nav-link {
  font-weight: bold;
  color: var(--light-color) !important;
  margin: 0 5px;
  transition: all 0.3s ease;
  position: relative;
  padding: 8px 12px !important;
}

.nav-link:hover {
  color: var(--accent-color) !important;
  transform: scale(1.05);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--accent-color);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.nav-link:hover::after {
  width: 70%;
}

.navbar .form-control {
  border-radius: 50px;
  padding: 10px 20px;
  border: none;
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
}

.navbar .form-control::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.navbar .btn-outline-light {
  border-radius: 50px;
  padding: 8px 15px;
}

/* Hero Section */
header {
  background: linear-gradient(135deg, var(--secondary-color), var(--primary-color)) !important;
  padding: 120px 0 100px !important;
  position: relative;
  overflow: hidden;
  margin-top: 0 !important;
}

header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><path d="M20 20L80 20L50 80Z" fill="none" stroke="white" stroke-width="1" opacity="0.2"/></svg>');
  background-size: 150px 150px;
}

header h1 {
  font-family: 'Bangers', cursive;
  font-size: 4rem;
  text-shadow: 3px 3px 5px rgba(0, 0, 0, 0.3);
  color: var(--light-color);
  letter-spacing: 2px;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

header p {
  font-size: 1.4rem;
  color: var(--light-color);
  max-width: 600px;
  margin: 0 auto 20px;
}

/* Featured Anime Section */
.featured-card {
  background: white;
  border-radius: 15px;
  transition: all 0.3s ease;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.featured-card:hover {
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
  transform: translateY(-5px);
}

.featured-card h3 {
  color: var(--secondary-color);
  font-weight: 700;
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.badge {
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 20px;
}

/* Blog Section */
section h2 {
  font-family: 'Bangers', cursive;
  color: var(--secondary-color);
  position: relative;
  display: inline-block;
  letter-spacing: 2px;
  font-size: 2.2rem;
  margin-bottom: 20px;
}

section h2::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 25%;
  width: 50%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  border-radius: 4px;
}

.card-img-top {
  height: 220px;
  object-fit: cover;
  transition: all 0.5s ease;
}

.card:hover .card-img-top {
  transform: scale(1.1);
}

.card-title {
  color: var(--secondary-color);
  font-weight: bold;
  font-size: 1.3rem;
  margin-bottom: 12px;
}

.card-text {
  color: #666;
  margin-bottom: 15px;
}

/* Anime List Section */
.anime-card {
  transition: all 0.3s ease;
  overflow: hidden;
}

.anime-card:hover {
  transform: translateY(-10px) rotate(2deg);
}

.anime-card .card-img-top {
  height: 300px;
  transition: all 0.5s ease;
}

.anime-card:hover .card-img-top {
  transform: scale(1.1);
}

.text-warning i {
  color: #FFD700;
}

/* Newsletter Section */
.bg-primary {
  position: relative;
}

.bg-primary::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><circle cx="10" cy="10" r="2" fill="white" opacity="0.3"/></svg>');
  background-size: 30px 30px;
}

/* Contact Section */
.social-icons .btn {
  width: 40px;
  height: 40px;
  padding: 0;
  line-height: 40px;
  text-align: center;
  margin-right: 5px;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.social-icons .btn:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.form-control, .form-select {
  border-radius: 10px;
  padding: 12px 15px;
  border: 1px solid #ddd;
}

.form-control:focus, .form-select:focus {
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 0.25rem rgba(106, 17, 203, 0.25);
}

/* Footer */
footer {
  background: linear-gradient(90deg, var(--dark-color), var(--secondary-color)) !important;
  border-top: 4px solid var(--primary-color);
  padding: 70px 0 20px !important;
}

footer h5 {
  color: var(--accent-color);
  font-weight: bold;
  margin-bottom: 20px;
  position: relative;
  display: inline-block;
  padding-bottom: 10px;
}

footer h5::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 50px;
  height: 3px;
  background: var(--primary-color);
}

footer .list-unstyled li {
  margin-bottom: 10px;
}

footer .list-unstyled a {
  transition: all 0.3s ease;
  position: relative;
  padding-left: 15px;
}

footer .list-unstyled a::before {
  content: "›";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--primary-color);
  font-size: 18px;
  transition: all 0.3s ease;
}

footer .list-unstyled a:hover {
  padding-left: 20px;
  color: var(--accent-color) !important;
}

footer .list-unstyled a:hover::before {
  left: 5px;
}

footer hr {
  background-color: rgba(255, 255, 255, 0.1);
  opacity: 1;
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-gradient);
  color: white;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 99;
}

.back-to-top:hover {
  transform: translateY(-5px);
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
}

/* Anime-style characters on the sides */
body::before, body::after {
  content: "";
  position: fixed;
  bottom: 0;
  width: 300px;
  height: 500px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: bottom;
  z-index: -1;
  opacity: 0.08;
  pointer-events: none;
}

body::before {
  left: 0;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 200"><path d="M50,10 C70,10 80,30 80,50 C80,70 70,90 50,90 C30,90 20,70 20,50 C20,30 30,10 50,10 Z" fill="%236a11cb"/><circle cx="40" cy="40" r="5" fill="white"/><circle cx="60" cy="40" r="5" fill="white"/><path d="M40,60 Q50,70 60,60" stroke="white" fill="none" stroke-width="2"/></svg>');
}

body::after {
  right: 0;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 200"><path d="M50,10 C70,10 80,30 80,50 C80,70 70,90 50,90 C30,90 20,70 20,50 C20,30 30,10 50,10 Z" fill="%23ff4c91"/><circle cx="40" cy="40" r="5" fill="white"/><circle cx="60" cy="40" r="5" fill="white"/><path d="M40,60 Q50,70 60,60" stroke="white" fill="none" stroke-width="2"/></svg>');
}

/* Animation for cards */
@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0px); }
}

.anime-card {
  animation: float 6s ease-in-out infinite;
}

.anime-card:nth-child(2) {
  animation-delay: 1s;
}

.anime-card:nth-child(3) {
  animation-delay: 2s;
}

.anime-card:nth-child(4) {
  animation-delay: 3s;
}

/* Add a subtle hover glow effect to images */
.card img {
  transition: all 0.5s ease;
}

.card:hover img {
  filter: brightness(1.1);
}

/* Media Queries */
@media (max-width: 991px) {
  header h1 {
    font-size: 3rem;
  }
  
  .navbar-brand {
    font-size: 1.8rem;
  }
  
  .navbar .form-control {
    margin-top: 15px;
    margin-bottom: 15px;
  }
}

@media (max-width: 768px) {
  header h1 {
    font-size: 2.5rem;
  }
  
  header p {
    font-size: 1.1rem;
  }
  
  body::before, body::after {
    display: none;
  }
  
  section {
    padding: 50px 0;
  }
  
  .card-img-top {
    height: 200px;
  }
}

@media (max-width: 576px) {
  header {
    padding: 100px 0 80px !important;
  }
  
  header h1 {
    font-size: 2rem;
  }
  
  section h2 {
    font-size: 1.8rem;
  }
  
  .btn-lg {
    padding: 10px 20px;
    font-size: 1rem;
  }
}

/* Custom Loading Animation for Page */
.page-loading {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: white;
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
}

.loading-anime {
  width: 100px;
  height: 100px;
  background: var(--bg-gradient);
  border-radius: 50%;
  animation: pulse 1s infinite alternate;
  position: relative;
}

.loading-anime::before, .loading-anime::after {
  content: "";
  position: absolute;
  top: 25px;
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50%;
}

.loading-anime::before {
  left: 25px;
}

.loading-anime::after {
  right: 25px;
}

.loading-anime .mouth {
  position: absolute;
  bottom: 30px;
  left: 50%;
  width: 40px;
  height: 10px;
  background: white;
  border-radius: 30px 30px 0 0;
  transform: translateX(-50%);
}

/* Add JavaScript for the show/hide of back-to-top button */
/* Add this code to a separate JS file and link it */
/*
document.addEventListener('DOMContentLoaded', function() {
  var backToTopButton = document.querySelector('.back-to-top');
  
  window.addEventListener('scroll', function() {
    if (window.pageYOffset > 300) {
      backToTopButton.classList.add('show');
    } else {
      backToTopButton.classList.remove('show');
    }
  });
  
  backToTopButton.addEventListener('click', function(e) {
    e.preventDefault();
    window.scrollTo({top: 0, behavior: 'smooth'});
  });
});
*/