
header{
    width: 100%;
    padding-bottom: 1em;
    padding-top: 0;
    margin-top: 0;
}
.header-link{
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 2.5em;
    border-width: 2px;
    background-color: #000;
}

a{
    text-decoration: none;
    color: #000;
}
a:hover{
    color: #ff9000;
}
:root {
    --primary-color: #870000;
    --secondary-color: #190a05;
    --card-width: 410px;
    --card-height: 550px;
    --border-color: #5a3e2b;
    --text-color: #a99383;
    --highlight-color: #ff9000;
    --shadow-color: rgba(0, 0, 0, 0.7);
    --card-bg-color: #1d0d06;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    
}

body {
    font-family: "Times New Roman", serif;
    background: linear-gradient(135deg, #190a05 0%, #41251c 50%, #190a05 100%);
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    color: var(--text-color);
    position: relative;
    
}

body::before {
    content: "";
    position: fixed;
    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"><rect width="100" height="100" fill="none"/><path d="M0,0 L100,100 M100,0 L0,100" stroke="rgba(137, 0, 0, 0.1)" stroke-width="0.5"/></svg>');
    opacity: 0.2;
    z-index: -1;
}

h1 {
  position: absolute;
  top: 10px;
  text-align: center;
  font-size: 2rem;
  width: 100%;
  color: var(--text-color);
  letter-spacing: 3px;
  text-shadow: 0 0 5px var(--shadow-color);
  font-weight: normal;
}

.scene {
  width: 100%;
  max-width: 1000px;
  height: 100vh;
  perspective: 1000px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.carousel {
  width: 100%;
  height: 80%;
  position: relative;
  transform-style: preserve-3d;
  transform: translateZ(-400px);
  transition: transform 1s;
}

.card {
  width: var(--card-width);
  height: var(--card-height);
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%) translateZ(400px);
  perspective: 1000px;
  transition: transform 1s;
  cursor: pointer;
}

.card-inner {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.8s ease;
}

.card.flipped .card-inner {
  transform: rotateY(180deg);
}

.card-front,
.card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 20px;
  background: var(--card-bg-color);
  border: 5px solid var(--border-color);
  box-shadow: 0 0 15px var(--shadow-color), 0 0 30px rgba(137, 0, 0, 0.3);
  transition: all 0.5s ease-out;
}

.card-back {
  transform: rotateY(180deg);
  background-image: radial-gradient(circle, #1d0d06, #000);
}
.card-back-title {
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--highlight-color);
  text-shadow: 0 0 5px var(--shadow-color);
  margin-bottom: 10px;
  letter-spacing: 1px;
}

.card-back-text {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
  text-align: center;
  padding: 0 10px;
  line-height: 1.4;
}


.card:hover:not(.flipped) .card-inner {
  transform: scale(1.05);
  box-shadow: 0 0 30px var(--shadow-color), 0 0 50px rgba(137, 0, 0, 0.5);
}

.card-image {
  height: 80%;
  width: 80%;
  background: var(--secondary-color);
  border: 3px solid var(--border-color);
  position: relative;
  overflow: hidden;
  margin-bottom: 10px;
  opacity: 0.9;
  transition: opacity 0.3s;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
}

.card:hover .card-image {
  opacity: 1;
  box-shadow: inset 0 0 30px rgba(137, 0, 0, 0.3);
}

.card-image::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(137, 0, 0, 0.3) 0%,
    transparent 50%,
    rgba(137, 0, 0, 0.3) 100%
  );
  z-index: 1;
}

.card-title {
  font-size: 1.2rem;
  margin-top: 10px;
  color: var(--text-color);
  letter-spacing: 2px;
  text-shadow: 0 0 5px var(--shadow-color);
}

.card-num {
  font-size: 0.8rem;
  color: var(--highlight-color);
  margin-top: 5px;
  font-style: italic;
}

.card-content {
  text-align: center;
  font-size: 0.8rem;
  margin-top: 5px;
  height: 40px;
  overflow: hidden;
  line-height: 1.3;
  font-style: italic;
  color: rgba(169, 147, 131, 0.7);
  padding: 0 5px;
}

.controls {
    position: absolute;
    bottom: 100px;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 8%;
}

.prev-btn,
.next-btn {
    background-color:#fff ;
    color: var(--text-color);
    border: 1px solid var(--border-color);
    padding: 10px 20px;
    cursor: pointer;
    transition: all 0.3s;
    font-family: "Times New Roman", serif;
    letter-spacing: 1px;
    font-size: 2em;
}

.prev-btn:hover,
.next-btn:hover {
    background: var(--primary-color);
    color: #fff;
}

.card-symbol {
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 1.5rem;
    color: var(--highlight-color);
    opacity: 0.7;
}

.fog {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(
        ellipse at center,
        transparent 0%,
        rgba(25, 10, 5, 0.6) 100%);
    pointer-events: none;
    z-index: 10;
    opacity: 0.5;
}

#card-0 .card-image {
    background-image: url(#);
}
#card-1 .card-image {
    background-image: url(#);
}
#card-2 .card-image {
    background-image: url(#);
}
#card-3 .card-image {
    background-image: url(#);
}
#card-4 .card-image {
    background-image: url(#);
}

@media (max-width: 768px) {
  body{
    max-width: 100%;
  }
  main{
    max-width: 768px;
  }
  :root{
    --card-width: 250px;
    --card-height: 400px;
  }

  .scene {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2.5rem; /* Adjust this to increase space between cards */
    max-width: 768px;
    height: 70vh;
    width: 100%;
    perspective: 768px;
  }

  .carousel {
    transform: translateZ(-300px);
  }
  .card-title {
    font-size: 1em;
  }
  .card-content {
    font-size: 0.75em;
  }
  .prev-btn,
  .next-btn {
    font-size: 2em;
    padding: 8px 16px;
  }
}
@media (max-width: 480px) {
  
  .header-link{
    justify-content: space-between;
  }
  body{
    max-width: 100%;
  }
  main{
    max-width: 100%;
    overflow: 0 ;
    padding-bottom: auto;
    overflow: none;
  }
  :root{
    --card-width: 100%;
    --card-height: 100%;
  }
  .carousel{
    display: flex;
    flex-direction: row;
    transform-style:preserve-3d;
  }
  .scene {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 70vh;
    width: 100%;
    overflow: none;
  }
  .card{
    width: 100vw;
    height: 70vh;
    perspective: 100%;
  }
  header{
    margin-top: 0 ;
    width: 100%;
  }
  .controls{
    margin-top: 20vh;
    display: none;
  }
  .prev-btn,
  .next-btn{
    background-color:#fff;
    font-size: 1em;
  }

}







@keyframes glow {
  0%, 100% {
    box-shadow: 0 0 15px var(--shadow-color), 0 0 30px rgba(137, 0, 0, 0.3);
  }
  50% {
    box-shadow: 0 0 20px var(--shadow-color), 0 0 40px rgba(137, 0, 0, 0.5);
  }
}

.card {
  animation: glow 3s infinite alternate;
}

.static-effect {
  position: fixed;
  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="500" height="500" viewBox="0 0 500 500"><rect width="1" height="1" fill="rgba(255,255,255,0.1)" x="10" y="10"/></svg>');
  pointer-events: none;
  z-index: 20;
  opacity: 0.05;
  animation: static 0.5s steps(3, end) infinite;
}

@keyframes static {
  0% { background-position: 0 0; }
  25% { background-position: 100px -50px; }
  50% { background-position: -50px 100px; }
  75% { background-position: 200px 100px; }
  100% { background-position: -100px -100px; }
}
