:root {
  --primary-color: #4a235a;
  --secondary-color: #2c3e50;
  --accent-color: #8e44ad;
  --light-color: #f39c12;
}

body {
  color: #f8f9fa;
  min-height: 100vh;
  padding-bottom: 50px;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  overflow-x: hidden;
  position: relative;
}

/* Hareketli Galaksi Arka Planı */
.galaxy-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: radial-gradient(ellipse at bottom, #1b2735 0%, #090a0f 100%);
  overflow: hidden;
}

.star {
  position: absolute;
  background: white;
  border-radius: 50%;
  animation: twinkle var(--duration, 5s) infinite ease-in-out;
}

.shooting-star {
  position: absolute;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8));
  animation: shooting var(--duration, 3s) infinite ease-in-out;
}

.nebula {
  position: absolute;
  border-radius: 50%;
  opacity: 0.1;
  filter: blur(50px);
  animation: nebulaPulse var(--duration, 15s) infinite ease-in-out;
}

/* Animasyonlar */
@keyframes twinkle {
  0%,
  100% {
    opacity: 0.2;
  }
  50% {
    opacity: 1;
  }
}

@keyframes shooting {
  0% {
    transform: translateX(-100px) translateY(var(--y)) rotate(45deg);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  100% {
    transform: translateX(100vw) translateY(calc(var(--y) + 100vh))
      rotate(45deg);
    opacity: 0;
  }
}

@keyframes nebulaPulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.1;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.2;
  }
}

/* Diğer stiller */
.header-container {
  position: relative;
  overflow: hidden;
  border-radius: 0 0 20px 20px;
  margin-bottom: 30px;
  padding-top: 20px;
}

.moon {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  background: radial-gradient(circle, #f5f5f5 0%, #c0c0c0 100%);
  border-radius: 50%;
  box-shadow: 0 0 30px rgba(255, 255, 255, 0.6);
  animation: moonGlow 4s infinite alternate;
}

@keyframes moonGlow {
  from {
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
  }
  to {
    box-shadow: 0 0 40px rgba(255, 255, 255, 0.8);
  }
}

.card-container {
  perspective: 1000px;
  margin: 20px auto;
}

.tarot-card {
  background: linear-gradient(
    145deg,
    var(--secondary-color),
    var(--primary-color)
  );
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  transition: all 0.5s ease;
  transform-style: preserve-3d;
  position: relative;
  backdrop-filter: blur(10px);
  background-color: rgba(44, 62, 80, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.floating {
  animation: float 8s infinite ease-in-out;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-20px);
  }
}

.particle {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
}

body {
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  color: #f8f9fa;
  min-height: 100vh;
  padding-bottom: 50px;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.card-container {
  perspective: 1000px;
  margin: 20px auto;
}

.tarot-card {
  background: linear-gradient(145deg, #2c3e50, #4a235a);
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  transition: all 0.5s ease;
  transform-style: preserve-3d;
  position: relative;
}

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

.card-img-container {
  border-top-left-radius: 15px;
  border-bottom-left-radius: 15px;
  height: 100%;
  overflow: hidden;
  position: relative;
  transition: transform 0.8s ease;
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.8s ease;
}

.card-img.reversed {
  transform: rotate(180deg);
}

.card-body {
  padding: 25px;
}

.card-title {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: #f39c12;
  border-bottom: 2px solid #8e44ad;
  padding-bottom: 10px;
}

.keywords {
  background: rgba(44, 62, 80, 0.6);
  border-radius: 10px;
  padding: 15px;
  margin-top: 15px;
}

.keywords-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #3498db;
  margin-bottom: 8px;
}

.upright-keywords {
  color: #2ecc71;
}

.reversed-keywords {
  color: #e74c3c;
}

.btn-outline-light {
  border-width: 2px;
  font-weight: 600;
  transition: all 0.3s;
}

.btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.05);
}

.card-info {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
  font-size: 0.9rem;
  color: #bdc3c7;
  flex-wrap: wrap;
  gap: 8px;
}

.info-item {
  background: rgba(44, 62, 80, 0.4);
  padding: 5px 10px;
  border-radius: 5px;
  flex: 1 0 calc(50% - 8px); /* İki sütunlu düzen */
  text-align: center;
}

.card-list {
  display: none;
  background: rgba(26, 26, 46, 0.95);
  border-radius: 15px;
  padding: 20px;
  margin-top: 30px;
  max-height: 400px;
  overflow-y: auto;
}

.card-list-item {
  padding: 10px;
  border-bottom: 1px solid #34495e;
  cursor: pointer;
  transition: all 0.2s;
}

.card-list-item:hover {
  background: rgba(52, 152, 219, 0.1);
  transform: translateX(5px);
}

.flip-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  z-index: 10;
  background: rgba(0, 0, 0, 0.5);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  cursor: pointer;
}

.flip-btn:hover {
  background: rgba(142, 68, 173, 0.7);
}

.orientation-badge {
  position: absolute;
  top: 15px;
  left: 15px;
  z-index: 10;
  padding: 5px 10px;
  font-weight: bold;
  border-radius: 20px;
}

.upright {
  background: rgba(46, 204, 113, 0.8);
  color: #111;
}

.reversed {
  background: rgba(231, 76, 60, 0.8);
  color: white;
}

.header-container {
  position: relative;
  overflow: hidden;
  border-radius: 0 0 20px 20px;
  margin-bottom: 30px;
}

.moon {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  background: radial-gradient(circle, #f5f5f5 0%, #c0c0c0 100%);
  border-radius: 50%;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
}

.stars {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent;
}

.star {
  position: absolute;
  background-color: white;
  border-radius: 50%;
}

@media (max-width: 768px) {
  .btn {
    margin: 5px 0;
    width: 100%;
  }

  .tarot-card {
    flex-direction: column;
  }

  .card-img-container {
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
    border-bottom-left-radius: 0;
    height: 300px;
  }

  .card-title {
    font-size: 1.5rem;
  }

  .card-img {
    height: 100%;
    width: auto; /* Genişlik otomatik */
    max-width: 100%; /* Maksimum genişlik */
    margin: 0 auto; /* Ortalama */
    display: block;
    object-fit: contain; /* Resmi tam sığdır */
  }
}

.footer {
  text-align: center;
  padding: 20px;
  color: #bdc3c7;
  font-size: 0.9rem;
  margin-top: 30px;
}
