:root {
  --main-bg: linear-gradient(to right, #111111, #5c1d4e, #792c78, #df0e9a);
  --secondary-bg: linear-gradient(
    135deg,
    var(--main-dark-color) 0%,
    var(--main-dark-color-secondary) 100%
  );
  --main-bg-opacity: linear-gradient(
    to right,
    rgba(17, 17, 17, 0.9),
    rgba(92, 29, 78, 0.9),
    rgba(121, 44, 120, 0.9),
    rgba(223, 14, 154, 0.9)
  );
  --secondary-bg-opacity: linear-gradient(
    135deg,
    rgba(17, 17, 17, 0.9) 0%,
    rgba(92, 29, 78, 0.9) 100%
  );

  --main-dark-color: #111111;
  --main-dark-color-secondary: #5c1d4e;
  --main-light-color: #df0e9a;
  --main-white: #f8f9fa;
  --main-gray: #888;
}

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

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: var(--secondary-bg);
  color: var(--main-white);
  min-height: 100vh;
}

.main-container {
  padding: 20px;
}

.header {
  text-align: center;
  margin-bottom: 40px;
}

.back-link {
  display: inline-block;
  margin-bottom: 20px;
  color: var(--main-light-color);
  text-decoration: none;
  font-size: 1.1rem;
  transition: opacity 0.3s ease;
}

.back-link:hover {
  opacity: 0.8;
}

.header h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
  background: linear-gradient(
    45deg,
    var(--main-light-color),
    var(--main-white)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.flashcards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  margin-bottom: 40px;
}

.flashcard {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 15px;
  padding: 25px;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  backdrop-filter: blur(10px);
  cursor: pointer;
  position: relative;
  min-height: 200px;
  display: flex;
  flex-direction: column;
}

.flashcard:hover {
  transform: translateY(-5px);
  border-color: var(--main-light-color);
  box-shadow: 0 15px 30px rgba(223, 14, 154, 0.2);
  background: rgba(255, 255, 255, 0.1);
}

.flashcard.flipped .front-side {
  display: none;
}

.flashcard.flipped .back-side {
  display: block;
}

.flashcard-title {
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--main-light-color);
  margin-bottom: 15px;
  border-bottom: 1px solid rgba(223, 14, 154, 0.3);
  padding-bottom: 10px;
}

.front-side,
.back-side {
  flex-grow: 1;
}

.back-side {
  display: none;
}

.flashcard-content {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 15px;
}

.additional-info {
  font-size: 0.9rem;
  opacity: 0.7;
  font-style: italic;
  margin-top: auto;
  padding-top: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.flip-indicator {
  position: absolute;
  bottom: 10px;
  right: 15px;
  font-size: 0.8rem;
  opacity: 0.6;
  background: var(--main-light-color);
  color: var(--main-white);
  padding: 5px 10px;
  border-radius: 15px;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin-top: 40px;
}

.pagination a,
.pagination .current {
  padding: 12px 20px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--main-white);
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.pagination a:hover {
  background: var(--main-light-color);
  border-color: var(--main-light-color);
}

.pagination .current {
  background: var(--main-light-color);
  border-color: var(--main-light-color);
  font-weight: bold;
}

.no-flashcards {
  text-align: center;
  padding: 60px 20px;
  opacity: 0.7;
}

.no-flashcards h3 {
  font-size: 1.5rem;
  margin-bottom: 10px;
  color: var(--main-light-color);
}

@media (max-width: 768px) {
  .flashcards-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .header h1 {
    font-size: 2rem;
  }

  .flashcard {
    padding: 20px;
    min-height: 180px;
  }
}

#categoryName {
  font-size: 2.5rem;
  margin-bottom: 10px;
  background: linear-gradient(
    90deg,
    var(--main-light-color) 0%,
    var(--main-white) 50%,
    var(--main-light-color) 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 8s linear infinite;
}

@keyframes shimmer {
  0% {
    background-position: -200% center;
  }
  100% {
    background-position: 200% center;
  }
}
