/* Assets/CSS/style.css - Death Note Theme */

@import url("https://fonts.googleapis.com/css2?family=Crimson+Text:wght@400;600;700&family=Playfair+Display:wght@700;900&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Crimson Text", Georgia, serif;
  background: linear-gradient(180deg, #000000 0%, #0a0a0a 50%, #1a0000 100%);
  background-attachment: fixed;
  color: #e8e8e8;
  line-height: 1.6;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(0, 0, 0, 0.3) 3px,
      rgba(0, 0, 0, 0.3) 3px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 2px,
      rgba(0, 0, 0, 0.3) 3px,
      rgba(0, 0, 0, 0.3) 3px
    );
  background-size: 100px 100px;
  opacity: 0.03;
  pointer-events: none;
  z-index: -1;
}

/* Header */
header {
  background: linear-gradient(135deg, #1a0000 0%, #000000 50%, #1a0000 100%);
  padding: 1.5rem 2rem;
  box-shadow: 0 4px 20px rgba(139, 0, 0, 0.5), 0 0 50px rgba(139, 0, 0, 0.2);
  border-bottom: 2px solid #8b0000;
  position: relative;
}

header::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #dc143c 50%, transparent);
  animation: bloodPulse 3s ease-in-out infinite;
}

@keyframes bloodPulse {
  0%,
  100% {
    opacity: 0.5;
  }
  50% {
    opacity: 1;
  }
}

header h1 {
  font-family: "Playfair Display", serif;
  color: #dc143c;
  font-size: 2.5rem;
  margin-bottom: 1rem;
  text-shadow: 0 0 10px rgba(220, 20, 60, 0.5), 0 0 20px rgba(220, 20, 60, 0.3),
    2px 2px 4px rgba(0, 0, 0, 0.8);
  letter-spacing: 3px;
  font-weight: 900;
  position: relative;
  display: inline-block;
}

header h1::after {
  content: "死";
  position: absolute;
  right: -40px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  opacity: 0.3;
  color: #8b0000;
}

/* Navigation */
nav {
  margin-bottom: 1rem;
}

nav a {
  color: #d4d4d4;
  text-decoration: none;
  padding: 0.6rem 1.2rem;
  margin-right: 0.5rem;
  border: 1px solid transparent;
  border-radius: 0;
  transition: all 0.4s ease;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-size: 0.9rem;
  position: relative;
  overflow: hidden;
}

nav a::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: -100%;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #dc143c, transparent);
  transition: left 0.4s ease;
}

nav a:hover {
  color: #dc143c;
  text-shadow: 0 0 10px rgba(220, 20, 60, 0.5);
}

nav a:hover::before {
  left: 0;
}

/* Search Box */
.search-box {
  position: relative;
  max-width: 500px;
}

.search-box input {
  width: 100%;
  padding: 0.9rem 1.2rem;
  border: 2px solid #3a0000;
  border-radius: 0;
  background-color: rgba(0, 0, 0, 0.7);
  color: #e8e8e8;
  font-size: 1rem;
  font-family: "Crimson Text", serif;
  transition: all 0.3s ease;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.5);
}

.search-box input::placeholder {
  color: #666;
  font-style: italic;
}

.search-box input:focus {
  outline: none;
  border-color: #8b0000;
  background-color: rgba(10, 0, 0, 0.9);
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.5),
    0 0 15px rgba(220, 20, 60, 0.3);
}

.search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: rgba(0, 0, 0, 0.95);
  border: 2px solid #3a0000;
  border-top: none;
  max-height: 400px;
  overflow-y: auto;
  z-index: 1000;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
  display: none;
}

.search-item {
  display: flex;
  align-items: center;
  padding: 0.8rem;
  border-bottom: 1px solid #3a0000;
  cursor: pointer;
  transition: all 0.3s ease;
}

.search-item:hover {
  background-color: rgba(139, 0, 0, 0.2);
  border-left: 3px solid #dc143c;
}

.search-item img {
  width: 50px;
  height: 75px;
  object-fit: cover;
  margin-right: 1rem;
  border: 1px solid #3a0000;
}

.search-info h4 {
  color: #dc143c;
  margin-bottom: 0.3rem;
  font-size: 1rem;
}

.search-info p {
  color: #888;
  font-size: 0.85rem;
}

.search-results p {
  padding: 1rem;
  text-align: center;
  color: #666;
}

/* Main Content */
main {
  padding: 3rem 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

section {
  margin-bottom: 4rem;
  position: relative;
}

section::before {
  content: "";
  position: absolute;
  top: -20px;
  left: 0;
  width: 80px;
  height: 2px;
  background: linear-gradient(90deg, #dc143c, transparent);
}

section h2 {
  font-family: "Playfair Display", serif;
  font-size: 2.2rem;
  margin-bottom: 2rem;
  color: #dc143c;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  position: relative;
  display: inline-block;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8), 0 0 10px rgba(220, 20, 60, 0.3);
}

section h2::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 60%;
  height: 3px;
  background: linear-gradient(90deg, #8b0000, transparent);
  box-shadow: 0 0 10px rgba(139, 0, 0, 0.5);
}

/* Cards Grid */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 2.5rem;
  margin-bottom: 2rem;
}

.card {
  background: linear-gradient(135deg, #0a0a0a 0%, #1a0000 100%);
  border: 1px solid #3a0000;
  border-radius: 0;
  overflow: hidden;
  transition: all 0.4s ease, filter 0.3s ease, opacity 0.3s ease;
  cursor: pointer;
  position: relative;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.8),
    inset 0 -2px 10px rgba(139, 0, 0, 0.1);
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    transparent 0%,
    rgba(220, 20, 60, 0.1) 100%
  );
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 1;
  pointer-events: none;
}

.card:hover {
  transform: translateY(-15px) scale(1.02);
  border-color: #8b0000;
  box-shadow: 0 15px 40px rgba(139, 0, 0, 0.6), 0 0 30px rgba(220, 20, 60, 0.3),
    inset 0 -2px 15px rgba(220, 20, 60, 0.2);
}

.card:hover::before {
  opacity: 1;
}

.card img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  transition: all 0.4s ease;
  filter: grayscale(20%) contrast(1.1);
}

.card:hover img {
  filter: grayscale(0%) contrast(1.2) brightness(1.1);
  transform: scale(1.05);
}

.card h3 {
  padding: 1.2rem;
  font-size: 1.05rem;
  text-align: center;
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Crimson Text", serif;
  font-weight: 600;
  color: #d4d4d4;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.9) 0%,
    rgba(26, 0, 0, 0.8) 100%
  );
  border-top: 1px solid #3a0000;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  position: relative;
  z-index: 2;
}

.card:hover h3 {
  color: #dc143c;
  text-shadow: 0 0 10px rgba(220, 20, 60, 0.5), 1px 1px 2px rgba(0, 0, 0, 0.8);
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 3rem;
  margin: 3rem 0;
  padding: 2rem 1rem;
  position: relative;
}

.pagination::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 1px;
  background: linear-gradient(90deg, transparent, #3a0000, transparent);
}

.pagination-btn {
  background: linear-gradient(135deg, #1a0000 0%, #0a0000 100%);
  color: #d4d4d4;
  border: 2px solid #3a0000;
  padding: 0.9rem 2rem;
  border-radius: 0;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
  font-family: "Crimson Text", serif;
  letter-spacing: 1px;
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.pagination-btn::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 0;
  height: 0;
  background: radial-gradient(circle, rgba(220, 20, 60, 0.3), transparent);
  transition: width 0.4s ease, height 0.4s ease;
  border-radius: 50%;
}

.pagination-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #3a0000 0%, #1a0000 100%);
  border-color: #8b0000;
  color: #dc143c;
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(139, 0, 0, 0.6), 0 0 20px rgba(220, 20, 60, 0.3);
  text-shadow: 0 0 10px rgba(220, 20, 60, 0.5);
}

.pagination-btn:hover:not(:disabled)::before {
  width: 300px;
  height: 300px;
}

.pagination-btn:disabled {
  background: linear-gradient(135deg, #0a0a0a 0%, #050505 100%);
  border-color: #1a1a1a;
  color: #3a3a3a;
  cursor: not-allowed;
  opacity: 0.4;
  box-shadow: none;
}

.page-info {
  font-size: 1.2rem;
  font-weight: 600;
  color: #d4d4d4;
  min-width: 180px;
  text-align: center;
  font-family: "Playfair Display", serif;
  letter-spacing: 2px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, rgba(26, 0, 0, 0.3), rgba(10, 0, 0, 0.3));
  border: 1px solid #3a0000;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* Scrollbar personnalisé */
::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: #000000;
  border-left: 1px solid #3a0000;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #3a0000, #1a0000);
  border: 1px solid #1a0000;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #8b0000, #3a0000);
  box-shadow: 0 0 10px rgba(220, 20, 60, 0.5);
}

/* Animation d'apparition */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card {
  animation: fadeInUp 0.6s ease-out backwards;
}

.card:nth-child(1) {
  animation-delay: 0.1s;
}
.card:nth-child(2) {
  animation-delay: 0.15s;
}
.card:nth-child(3) {
  animation-delay: 0.2s;
}
.card:nth-child(4) {
  animation-delay: 0.25s;
}
.card:nth-child(5) {
  animation-delay: 0.3s;
}
.card:nth-child(6) {
  animation-delay: 0.35s;
}
.card:nth-child(7) {
  animation-delay: 0.4s;
}
.card:nth-child(8) {
  animation-delay: 0.45s;
}

/* Responsive */
@media (max-width: 768px) {
  .cards-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1.5rem;
  }

  header h1 {
    font-size: 1.8rem;
    letter-spacing: 2px;
  }

  header h1::after {
    right: -30px;
    font-size: 1.2rem;
  }

  section h2 {
    font-size: 1.6rem;
  }

  nav a {
    padding: 0.5rem 0.9rem;
    font-size: 0.85rem;
  }

  .pagination {
    flex-direction: column;
    gap: 1.5rem;
  }

  .pagination-btn {
    width: 100%;
    max-width: 250px;
  }

  main {
    padding: 2rem 1rem;
  }

  .search-box {
    max-width: 100%;
  }

  .search-box input {
    font-size: 0.9rem;
    padding: 0.7rem 1rem;
  }

  .search-results {
    max-height: 300px;
  }

  .search-item {
    padding: 0.6rem;
  }

  .search-item img {
    width: 40px;
    height: 60px;
  }

  .search-info h4 {
    font-size: 0.9rem;
  }

  .search-info p {
    font-size: 0.75rem;
  }
}

@media (max-width: 768px) {
  header {
    padding: 1rem;
  }

  header h1 {
    font-size: 1.8rem;
  }

  nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
  }

  nav a {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
  }

  .cards-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1.5rem;
  }

  .card img {
    height: 220px;
  }

  section h2 {
    font-size: 1.5rem;
  }

  main {
    padding: 1.5rem 1rem;
  }
}

@media (max-width: 480px) {
  header h1 {
    font-size: 1.5rem;
  }

  header h1::after {
    display: none;
  }

  nav a {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
  }

  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .card img {
    height: 180px;
  }

  .card h3 {
    font-size: 0.9rem;
  }

  section h2 {
    font-size: 1.3rem;
  }

  .pagination-btn {
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
  }

  .search-box input {
    font-size: 0.85rem;
  }
}

/* Bouton de contrôle de musique - Stranger Things */
@keyframes strangerthings-glow {
  0% {
    text-shadow: 0 0 10px #ff0040, 0 0 20px #ff0040, 0 0 30px #ff0040;
  }
  50% {
    text-shadow: 0 0 20px #ff0040, 0 0 40px #ff0040, 0 0 60px #ff0040;
  }
  100% {
    text-shadow: 0 0 10px #ff0040, 0 0 20px #ff0040, 0 0 30px #ff0040;
  }
}

@keyframes pulse-red {
  0%, 100% {
    box-shadow: 0 0 10px rgba(255, 0, 64, 0.5), inset 0 0 10px rgba(255, 0, 64, 0.2);
  }
  50% {
    box-shadow: 0 0 30px rgba(255, 0, 64, 1), inset 0 0 15px rgba(255, 0, 64, 0.4);
  }
}

@keyframes pulse-green {
  0%, 100% {
    box-shadow: 0 0 10px rgba(0, 255, 100, 0.5), inset 0 0 10px rgba(0, 255, 100, 0.2);
  }
  50% {
    box-shadow: 0 0 30px rgba(0, 255, 100, 1), inset 0 0 15px rgba(0, 255, 100, 0.4);
  }
}

.music-control {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  padding: 12px 20px;
  background: #1a0000;
  color: #ff0040;
  border: 3px solid #ff0040;
  border-radius: 8px;
  cursor: pointer;
  font-family: "Playfair Display", serif;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 2px;
  transition: all 0.3s ease;
  animation: strangerthings-glow 2s ease-in-out infinite, pulse-red 2s ease-in-out infinite;
  text-transform: uppercase;
  background: linear-gradient(135deg, rgba(255, 0, 64, 0.1) 0%, rgba(0, 0, 0, 0.5) 100%);
  backdrop-filter: blur(10px);
}

.music-control:hover {
  transform: scale(1.1) skewY(-2deg);
  border-color: #ff0080;
  animation: strangerthings-glow 1s ease-in-out infinite, pulse-red 1s ease-in-out infinite;
}

.music-control:active {
  transform: scale(0.95) skewY(2deg);
}

.music-control.music-on {
  color: #00ff64;
  border-color: #00ff64;
  animation: strangerthings-glow 2s ease-in-out infinite, pulse-green 2s ease-in-out infinite;
  background: linear-gradient(135deg, rgba(0, 255, 100, 0.1) 0%, rgba(0, 0, 0, 0.5) 100%);
  text-shadow: 0 0 10px #00ff64, 0 0 20px #00ff64, 0 0 30px #00ff64;
}

.music-control.music-on:hover {
  border-color: #00ff80;
  animation: strangerthings-glow 1s ease-in-out infinite, pulse-green 1s ease-in-out infinite;
}

@media (max-width: 768px) {
  .music-control {
    top: 10px;
    right: 10px;
    padding: 10px 15px;
    font-size: 0.85rem;
    letter-spacing: 1px;
  }
}
