/* Font Imports */
@font-face {
  font-family: "Crimson Text";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/crimson-text-400.ttf") format("truetype");
}

@font-face {
  font-family: "Crimson Text";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/crimson-text-600.ttf") format("truetype");
}

@font-face {
  font-family: "Uncial Antiqua";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/uncial-antiqua-400.ttf") format("truetype");
}

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

body {
  font-family: "Crimson Text", serif;
  background-color: #020617;
  color: #e9d5ff;
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Background Effects */
.background-effects {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.gradient-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom right,
    rgba(88, 28, 135, 0.2),
    rgba(67, 56, 202, 0.1),
    #020617
  );
}

.stars-container {
  position: absolute;
  inset: 0;
}

.background-star {
  position: absolute;
  width: 1px;
  height: 1px;
  background-color: rgba(196, 181, 253, 0.4);
  border-radius: 50%;
}

.constellation {
  position: absolute;
  opacity: 0.15;
  color: #c4b5fd;
}

.constellation-1 {
  top: 80px;
  left: 40px;
  animation: spin 45s linear infinite; /* Slowed from 20s */
  will-change: transform;
}

.constellation-2 {
  bottom: 128px;
  right: 64px;
  animation: spin 60s linear infinite reverse; /* Slowed from 25s */
  will-change: transform;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(48px);
  animation: pulse 8s ease-in-out infinite; /* Slowed from 3s */
  will-change: opacity;
}

/* Disable heavy animations for performance */
@media (prefers-reduced-motion: reduce) {
  .orb,
  .constellation-1,
  .constellation-2,
  .floating-element,
  .background-star,
  .spirit-particle {
    animation: none !important;
  }

  .navbar {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background-color: rgba(15, 23, 42, 0.98) !important;
  }
}

.orb-1 {
  top: 25%;
  left: 20%;
  width: 384px;
  height: 384px;
  background-color: rgba(147, 51, 234, 0.1);
}

.orb-2 {
  bottom: 25%;
  right: 20%;
  width: 320px;
  height: 320px;
  background-color: rgba(79, 70, 229, 0.1);
  animation-delay: 1s;
}

.orb-3 {
  top: 75%;
  left: 40%;
  width: 256px;
  height: 256px;
  background-color: rgba(139, 92, 246, 0.1);
  animation-delay: 2s;
}

/* Floating Elements */
.floating-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10;
}

.floating-element {
  position: absolute;
  font-size: 18px;
  color: rgba(196, 181, 253, 0.6);
  animation: floatUpward 20s linear infinite;
  pointer-events: none;
  z-index: 10;
  bottom: -50px;
}

.floating-element.large {
  font-size: 28px;
  color: rgba(196, 181, 253, 0.8);
}

.floating-element.twinkling {
  animation:
    floatUpward 20s linear infinite,
    twinkle 2s ease-in-out infinite alternate;
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: rgba(2, 6, 23, 0.9);
  backdrop-filter: blur(20px);
  z-index: 50;
  border-bottom: 1px solid rgba(168, 85, 247, 0.2);
}

.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: "Uncial Antiqua", serif;
  font-size: 28px;
  font-weight: bold;
  color: #c4b5fd;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo .star-icon {
  display: inline-block;
  transition: transform 0.3s;
}

.logo:hover .star-icon {
  animation: spin 0.8s ease-in-out infinite;
}

.hamburger {
  display: block;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 60;
}

.hamburger span {
  display: block;
  width: 25px;
  height: 2px;
  background-color: #c4b5fd;
  margin: 5px 0;
  transition: all 0.3s ease;
  border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(7px, 7px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

.nav-links {
  display: none;
  flex-direction: column;
  position: fixed;
  top: 70px;
  right: 0;
  width: 100%;
  max-width: 300px;
  background-color: rgba(2, 6, 23, 0.98);
  backdrop-filter: blur(20px);
  border-left: 1px solid rgba(168, 85, 247, 0.2);
  border-bottom: 1px solid rgba(168, 85, 247, 0.2);
  padding: 24px;
  gap: 16px;
  box-shadow: -4px 4px 20px rgba(0, 0, 0, 0.5);
}

.nav-links.active {
  display: flex;
}

@media (min-width: 768px) {
  .hamburger {
    display: none;
  }

  .nav-links {
    display: flex;
    flex-direction: row;
    position: static;
    width: auto;
    max-width: none;
    background-color: transparent;
    backdrop-filter: none;
    border: none;
    padding: 0;
    gap: 32px;
    box-shadow: none;
  }

  .nav-links.active {
    display: flex;
  }
}

.nav-links a {
  color: #d8b4fe;
  text-decoration: none;
  transition: color 0.3s;
  padding: 8px 0;
  border-bottom: 1px solid rgba(168, 85, 247, 0.1);
}

@media (min-width: 768px) {
  .nav-links a {
    padding: 0;
    border-bottom: none;
  }
}

.nav-links a:hover {
  color: #e9d5ff;
}

/* Hero Section */
.hero {
  padding: 192px 24px 80px;
  position: relative;
  z-index: 2;
}

.hero-title {
  font-family: "Uncial Antiqua", serif;
  font-size: clamp(32px, 5vw, 40px);
  font-weight: bold;
  margin-bottom: 32px;
  background: linear-gradient(to right, #c4b5fd, #c7d2fe, #a5b4fc);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-align: center;
  filter: drop-shadow(0 0 30px rgba(168, 85, 247, 0.8));
  transition: filter 0.5s;
}

.hero-title:hover {
  filter: drop-shadow(0 0 50px rgba(168, 85, 247, 1));
}

.hero-subtitle {
  font-size: 24px;
  margin-bottom: 24px;
  font-weight: 500;
  color: #a855f7;
  text-align: center;
}

.hero-description {
  font-size: 20px;
  max-width: 1024px;
  margin: 0 auto 80px;
  line-height: 1.8;
  color: #f3e8ff;
  text-align: center;
}

.hero-description a {
  color: #d8b4fe;
  text-decoration: none;
  position: relative;
  font-weight: 600;
  transition:
    text-shadow 0.3s ease,
    border-bottom-color 0.3s ease,
    transform 0.3s ease;
  text-shadow:
    0 0 8px rgba(168, 85, 247, 0.4),
    0 0 12px rgba(168, 85, 247, 0.2);
  border-bottom: 1px solid rgba(168, 85, 247, 0.3);
  padding-bottom: 2px;
}

.hero-description a:hover {
  color: #fae8ff;
  text-shadow:
    0 0 12px rgba(168, 85, 247, 0.8),
    0 0 20px rgba(168, 85, 247, 0.5),
    0 0 30px rgba(168, 85, 247, 0.3);
  border-bottom-color: rgba(216, 180, 254, 0.6);
  transform: translateY(-1px);
  animation: mysticalPulse 2s ease-in-out infinite;
}

.hero-description a:active {
  transform: translateY(0);
  text-shadow:
    0 0 15px rgba(168, 85, 247, 1),
    0 0 25px rgba(168, 85, 247, 0.6);
}

/* Example PLUQQY.md Section */
.example-pluqqy-section {
  padding: 40px 0 80px;
  background: linear-gradient(
    to bottom,
    rgba(15, 23, 42, 0.95),
    rgba(88, 28, 135, 0.1)
  );
  position: relative;
  scroll-margin-top: 100px;
}

.pipeline-selector {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .pipeline-selector {
    gap: 8px;
  }
}

.pipeline-hint {
  text-align: center;
  font-size: 13px;
  color: rgba(168, 85, 247, 0.6);
  margin: 0 0 24px 0;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(168, 85, 247, 0.2);
  font-style: italic;
}

.pipeline-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(168, 85, 247, 0.2);
  border-radius: 8px;
  color: #c4b5fd;
  cursor: pointer;
  transition: all 0.3s ease;
  flex: 1;
  min-width: 0;
}

@media (max-width: 768px) {
  .pipeline-option {
    flex: 1 1 100%;
    padding: 10px 16px;
    gap: 10px;
  }
}

.pipeline-option:hover {
  background: rgba(88, 28, 135, 0.2);
  border-color: rgba(168, 85, 247, 0.4);
  transform: translateY(-2px);
}

.pipeline-option.active {
  background: linear-gradient(
    to right,
    rgba(147, 51, 234, 0.3),
    rgba(79, 70, 229, 0.3)
  );
  border-color: rgba(168, 85, 247, 0.5);
  box-shadow: 0 4px 12px rgba(168, 85, 247, 0.2);
}

.pipeline-option-icon {
  font-size: 20px;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .pipeline-option-icon {
    font-size: 18px;
  }
}

.pipeline-option-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
  min-width: 0;
  flex: 1;
}

.pipeline-option-name {
  font-family: "Uncial Antiqua", serif;
  font-size: 16px;
  color: #e0d5ff;
}

@media (max-width: 768px) {
  .pipeline-option-name {
    font-size: 14px;
  }
}

.pipeline-option-command {
  font-family: "Courier New", monospace;
  font-size: 12px;
  color: #a78bfa;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(168, 85, 247, 0.15);
  border-radius: 4px;
  padding: 6px 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

@media (max-width: 768px) {
  .pipeline-option-command {
    font-size: 11px;
    padding: 4px 8px;
  }
}

.pipeline-card {
  max-width: 1200px;
  margin: 0 auto;
  background: linear-gradient(
    to bottom right,
    rgba(15, 23, 42, 0.9),
    rgba(88, 28, 135, 0.2)
  );
  border: 2px solid rgba(168, 85, 247, 0.3);
  border-radius: 12px;
  padding: 24px;
  box-shadow:
    0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(168, 85, 247, 0.1);
  transition: all 0.3s ease;
}

.pipeline-card:hover {
  border-color: rgba(168, 85, 247, 0.5);
  box-shadow:
    0 25px 30px -5px rgba(0, 0, 0, 0.15),
    0 15px 15px -5px rgba(168, 85, 247, 0.2);
}

.pipeline-content-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-top: 24px;
}

@media (max-width: 768px) {
  .pipeline-content-wrapper {
    grid-template-columns: 1fr;
  }
}

.pipeline-components-column,
.pipeline-preview-column {
  display: flex;
  flex-direction: column;
}

.column-title {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1.5px;
  color: rgba(216, 180, 254, 0.9);
  margin-bottom: 16px;
  text-align: center;
  text-transform: uppercase;
}

.token-count-header {
  position: sticky;
  top: 1px;
  display: flex;
  justify-content: flex-end;
  z-index: 10;
  pointer-events: none;
  margin-bottom: -30px;
}

.token-count {
  font-size: 12px;
  font-weight: 500;
  color: rgba(74, 222, 128, 0.85);
  letter-spacing: 0.5px;
  font-family: "Courier New", monospace;
  text-shadow: 0 0 8px rgba(74, 222, 128, 0.3);
  background: rgba(0, 0, 0, 0.7);
  padding: 6px 14px;
  border-radius: 12px;
  border: 1px solid rgba(74, 222, 128, 0.2);
  backdrop-filter: blur(8px);
  opacity: 0.85;
}

.pipeline-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(168, 85, 247, 0.2);
}

.pipeline-icon {
  font-size: 24px;
  filter: drop-shadow(0 0 10px rgba(168, 85, 247, 0.5));
}

.pipeline-name {
  font-family: "Uncial Antiqua", serif;
  font-size: 20px;
  color: #d8b4fe;
  margin: 0;
  letter-spacing: 0.5px;
}

.components-flow {
  display: flex;
  flex-direction: column;
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
}

.component-sections-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(168, 85, 247, 0.25);
  border-radius: 8px;
  padding: 20px;
  max-height: 500px;
  overflow-y: auto;
}

.component-section {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.section-heading {
  font-family: "Uncial Antiqua", serif;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 1.5px;
  color: rgba(216, 180, 254, 0.9);
  margin-bottom: 12px;
  text-align: center;
}

.component-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
}

.component-card {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(168, 85, 247, 0.2);
  border-radius: 8px;
  padding: 16px 24px;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 200px;
  text-align: center;
  animation: fadeIn 0.5s ease-out;
}

.component-card:hover {
  background: rgba(88, 28, 135, 0.2);
  border-color: rgba(168, 85, 247, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(168, 85, 247, 0.2);
}

.component-card.component-new {
  animation: componentFadeIn 0.6s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes componentFadeIn {
  0% {
    opacity: 0;
    transform: scale(0.9);
    background: rgba(168, 85, 247, 0.4);
    border-color: rgba(168, 85, 247, 0.8);
  }
  50% {
    background: rgba(168, 85, 247, 0.3);
    border-color: rgba(168, 85, 247, 0.6);
  }
  100% {
    opacity: 1;
    transform: scale(1);
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(168, 85, 247, 0.2);
  }
}

.component-name {
  color: #c4b5fd;
  font-size: 15px;
  font-weight: 500;
}

@media (max-width: 640px) {
  .component-row {
    flex-direction: column;
    gap: 12px;
  }

  .component-card {
    width: 100%;
    min-width: auto;
  }
}

.live-preview {
  position: relative;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(168, 85, 247, 0.2);
  border-radius: 8px;
  padding: 20px;
  color: #c4b5fd;
  font-family: monospace;
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
  max-height: 500px;
  overflow-y: auto;
  flex: 1;
}

.live-preview .preview-section {
  margin-bottom: 24px;
}

.live-preview .preview-section:last-child {
  margin-bottom: 0;
}

.live-preview .preview-heading {
  color: #d8b4fe;
  font-weight: bold;
  font-size: 14px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(168, 85, 247, 0.2);
}

.live-preview .preview-component {
  margin-bottom: 16px;
  padding-left: 12px;
  border-left: 2px solid rgba(168, 85, 247, 0.3);
}

.live-preview .preview-component-title {
  color: #a78bfa;
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 13px;
}

.live-preview .preview-component.highlight {
  animation: diffHighlight 2s ease-out;
}

@keyframes diffHighlight {
  0% {
    background: rgba(168, 85, 247, 0.3);
    border-left-color: rgba(168, 85, 247, 0.8);
  }
  100% {
    background: transparent;
    border-left-color: rgba(168, 85, 247, 0.3);
  }
}

/* Component Modal */
.component-modal-content {
  max-width: 900px;
  width: 90vw;
}

.component-content {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(168, 85, 247, 0.2);
  border-radius: 6px;
  padding: 20px;
  color: #c4b5fd;
  font-family: monospace;
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
  max-height: 60vh;
  overflow-y: auto;
}

/* Pipeline Preview Modal */
.pipeline-modal-content {
  max-width: 1000px;
  width: 90vw;
  max-height: 90vh;
  overflow-y: auto;
}

.pipeline-content {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(168, 85, 247, 0.2);
  border-radius: 6px;
  padding: 24px;
  color: #c4b5fd;
  font-family: monospace;
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
}

.pipeline-content .section-header {
  color: #d8b4fe;
  font-weight: bold;
  font-size: 16px;
  margin: 24px 0 12px 0;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(168, 85, 247, 0.2);
}

.pipeline-content .section-header:first-child {
  margin-top: 0;
}

/* Gallery */
.gallery-section {
  margin-bottom: 112px;
}

.gallery-title {
  font-family: "Uncial Antiqua", serif;
  font-size: 24px;
  font-weight: bold;
  color: #d8b4fe;
  margin-bottom: 24px;
  text-align: center;
  filter: drop-shadow(0 0 15px rgba(168, 85, 247, 0.4));
  transition: filter 0.3s;
}

.gallery-title:hover {
  filter: drop-shadow(0 0 25px rgba(168, 85, 247, 0.8));
}

.gallery-container {
  max-width: 768px;
  margin: 0 auto;
  position: relative;
  display: flex;
  align-items: center;
}

.gallery {
  background: linear-gradient(
    to bottom right,
    rgba(15, 23, 42, 0.8),
    rgba(88, 28, 135, 0.1)
  );
  border-radius: 8px;
  border: 1px solid rgba(168, 85, 247, 0.2);
  overflow: hidden;
  flex: 1;
}

.gallery-header {
  padding: 16px 16px 8px;
  text-align: center;
}

.gallery-label {
  padding: 8px 12px;
  font-weight: 500;
  border-radius: 6px;
  opacity: 0.9;
  color: #c4b5fd;
  font-size: 12px;
}

.gallery-image-container {
  position: relative;
}

.gallery-image-container img {
  width: 100%;
  height: auto;
  cursor: pointer;
  transition: opacity 0.3s;
}

.gallery-image-container img:hover {
  opacity: 0.9;
}

.gallery-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.2), transparent);
  pointer-events: none;
}

.gallery-dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}

.gallery-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.4);
  border: none;
  cursor: pointer;
  transition: background-color 0.3s;
}

.gallery-dot.active {
  background-color: #c4b5fd;
}

.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.4);
  color: rgba(255, 255, 255, 0.7);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 14px;
  z-index: 10;
}

.gallery-arrow:hover {
  background-color: rgba(0, 0, 0, 0.6);
  color: white;
  transform: translateY(-50%) scale(1.25);
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.5);
}

.gallery-arrow-left {
  left: -48px;
}

.gallery-arrow-right {
  right: -48px;
}

/* Buttons */
.hero-buttons {
  display: flex;
  flex-direction: column;
  gap: 24px;
  justify-content: center;
  align-items: center;
  margin-bottom: 48px;
  margin-top: 64px;
}

@media (min-width: 640px) {
  .hero-buttons {
    flex-direction: row;
  }
}

.btn {
  padding: 24px 32px;
  font-size: 18px;
  font-weight: 600;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  transform-origin: center;
}

.btn:hover {
  transform: scale(1.05);
}

.btn-primary {
  background: linear-gradient(to right, #9333ea, #6366f1);
  color: white;
}

.btn-primary:hover {
  background: linear-gradient(to right, #7c3aed, #4f46e5);
}

.btn-secondary {
  background-color: black;
  color: #c4b5fd;
  border: 1px solid #a855f7;
}

.btn-secondary:hover {
  background-color: rgba(88, 28, 135, 0.2);
  color: #e9d5ff;
}

/* Spirit Particles */
.spirit-particle {
  position: fixed;
  width: 6px;
  height: 6px;
  background: radial-gradient(circle, #a855f7, #6b21a8);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  box-shadow:
    0 0 10px #a855f7,
    0 0 20px #a855f7,
    0 0 30px #6b21a8;
  animation: spiritParticleMove 2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes spiritParticleMove {
  0% {
    opacity: 0;
    transform: scale(0) translateZ(0);
  }
  20% {
    opacity: 1;
    transform: scale(1.5) translateZ(0);
  }
  100% {
    opacity: 0;
    transform: scale(0.2) translateZ(0);
    left: var(--end-x);
    top: var(--end-y);
  }
}

/* Installation Card */
.installation-card {
  max-width: 612px;
  margin: 0 auto;
  background: linear-gradient(
    to bottom right,
    rgba(15, 23, 42, 0.95),
    rgba(88, 28, 135, 0.2)
  );
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: 8px;
  padding: 32px;
  box-shadow:
    0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(168, 85, 247, 0.1);
  transition: all 1s ease-out;
  position: relative;
  overflow: visible;
}

.installation-card.hidden {
  opacity: 0;
  transform: scale(0.95);
}

.installation-card.visible {
  opacity: 1;
  transform: scale(1);
  /* Fallback for browsers without animation support */
  transition:
    opacity 1s ease-out,
    transform 1s ease-out;
}

/* Progressive enhancement for modern browsers */
@supports (animation: test 1s) {
  .installation-card.visible {
    animation:
      spiritConjure 2.5s cubic-bezier(0.4, 0, 0.2, 1) forwards,
      mysticalGlow 3s ease-in-out infinite 2.5s;
  }
}

.installation-card.visible::before {
  content: "";
  position: absolute;
  inset: -20px;
  background: radial-gradient(
    circle at center,
    transparent 30%,
    rgba(168, 85, 247, 0.1) 50%,
    rgba(168, 85, 247, 0.3) 60%,
    transparent 70%
  );
  animation: spiritAura 2.5s ease-out forwards;
  pointer-events: none;
  z-index: -1;
}

.installation-card h3 {
  font-family: "Uncial Antiqua", serif;
  font-size: 24px;
  font-weight: bold;
  color: #d8b4fe;
  margin-bottom: 24px;
  text-align: center;
  filter: drop-shadow(0 0 15px rgba(168, 85, 247, 0.4));
  transition: filter 0.3s;
}

.installation-card h3:hover {
  filter: drop-shadow(0 0 25px rgba(168, 85, 247, 0.8));
}

.code-block {
  background-color: black;
  border: 1px solid rgba(168, 85, 247, 0.2);
  border-radius: 8px;
  padding: 20px 56px 20px 16px;
  position: relative;
}

.code-block code {
  color: #c4b5fd;
  font-size: 12px;
  font-family: monospace;
}

.copy-btn {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  background-color: rgba(147, 51, 234, 0.2);
  color: #d8b4fe;
  border: none;
  padding: 8px 14px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.3s;
}

.copy-btn:hover {
  background-color: rgba(147, 51, 234, 0.4);
}

.installation-note {
  color: #a855f7;
  text-align: center;
  margin-top: 16px;
}

/* Features Section */
.features {
  padding: 80px 24px;
  position: relative;
  z-index: 2;
}

.section-title {
  font-family: "Uncial Antiqua", serif;
  font-size: 30px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 64px;
  color: #d8b4fe;
  filter: drop-shadow(0 0 20px rgba(168, 85, 247, 0.5));
  transition: filter 0.3s;
}

.section-title:hover {
  filter: drop-shadow(0 0 35px rgba(168, 85, 247, 0.9));
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
}

.feature-card {
  background: linear-gradient(
    to bottom right,
    rgba(15, 23, 42, 0.8),
    rgba(88, 28, 135, 0.1)
  );
  border: 1px solid rgba(168, 85, 247, 0.2);
  border-radius: 8px;
  padding: 32px;
  transition: all 0.3s;
}

.feature-card:hover {
  border-color: rgba(168, 85, 247, 0.4);
  box-shadow:
    0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(168, 85, 247, 0.1);
}

.feature-icon {
  background-color: rgba(147, 51, 234, 0.2);
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: 50%;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  margin-bottom: 16px;
}

.feature-card h3 {
  font-size: 20px;
  font-weight: bold;
  color: #d8b4fe;
  margin-bottom: 16px;
}

.feature-card p {
  color: #c4b5fd;
  line-height: 1.8;
}

/* Usage Section */
.usage {
  padding: 80px 24px;
  background: linear-gradient(
    to right,
    rgba(15, 23, 42, 0.5),
    rgba(88, 28, 135, 0.1)
  );
  position: relative;
  z-index: 2;
}

.usage-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  align-items: center;
}

@media (min-width: 768px) {
  .usage-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.usage-steps {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.step {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.step-number {
  background-color: #9333ea;
  color: white;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  min-width: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

.step-content h3 {
  font-size: 20px;
  font-weight: bold;
  color: #d8b4fe;
  margin-bottom: 8px;
}

.step-content p {
  color: #c4b5fd;
}

.step-content code {
  background-color: #1e293b;
  color: #d8b4fe;
  padding: 4px 8px;
  border-radius: 4px;
}

.usage-example {
  background-color: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(168, 85, 247, 0.2);
  border-radius: 8px;
  padding: 24px;
}

.usage-example h3 {
  font-size: 18px;
  font-weight: bold;
  color: #d8b4fe;
  margin-bottom: 16px;
}

.example-link {
  display: inline-block;
  margin-top: 16px;
  color: #a78bfa;
  text-decoration: none;
  font-size: 14px;
  transition: all 0.3s ease;
  border-bottom: 1px solid rgba(168, 85, 247, 0.3);
  padding-bottom: 2px;
}

.example-link:hover {
  color: #d8b4fe;
  border-bottom-color: rgba(168, 85, 247, 0.6);
  transform: translateX(4px);
}

.example-code {
  font-family: monospace;
  font-size: 14px;
  color: #c4b5fd;
  line-height: 1.5;
}

.example-code div {
  margin: 8px 0;
}

.code-indent {
  margin-left: 16px;
  color: #a855f7;
}

/* Tooltip Styles */
.tooltip-trigger {
  position: relative;
  color: #a78bfa;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
  cursor: help;
  transition: color 0.3s ease;
}

.tooltip-trigger:hover {
  color: #d8b4fe;
}

.tooltip-content {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  margin-bottom: 8px;
  padding: 12px 16px;
  background: rgba(15, 23, 42, 0.98);
  border: 1px solid rgba(168, 85, 247, 0.4);
  border-radius: 8px;
  color: #c4b5fd;
  font-family: 'Courier New', monospace;
  font-size: 12px;
  line-height: 1.6;
  white-space: pre;
  z-index: 100;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  min-width: 220px;
}

.tooltip-trigger:hover .tooltip-content {
  visibility: visible;
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Tooltip arrow */
.tooltip-content::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: rgba(168, 85, 247, 0.4);
}

/* Context Switching Section */
.context-switching {
  padding: 80px 0;
  background: linear-gradient(
    to bottom,
    rgba(88, 28, 135, 0.05),
    rgba(15, 23, 42, 0.95)
  );
  position: relative;
  overflow: hidden;
}

.terminal-showcase {
  max-width: 1000px;
  margin: 48px auto 64px;
  text-align: center;
}

.showcase-image {
  width: 100%;
  max-width: 900px;
  border-radius: 12px;
  border: 1px solid rgba(168, 85, 247, 0.3);
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.3),
    0 0 60px rgba(168, 85, 247, 0.1);
  cursor: pointer;
  transition: all 0.3s ease;
}

.showcase-image:hover {
  transform: scale(1.02);
  border-color: rgba(168, 85, 247, 0.5);
  box-shadow:
    0 25px 50px rgba(0, 0, 0, 0.4),
    0 0 80px rgba(168, 85, 247, 0.2);
}

.showcase-caption {
  margin-top: 20px;
  color: rgba(216, 180, 254, 0.7);
  font-size: 14px;
  font-style: italic;
}

.context-switching::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 200%;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    rgba(168, 85, 247, 0.3),
    transparent
  );
}

.section-subtitle {
  text-align: center;
  color: rgba(216, 180, 254, 0.8);
  font-size: 18px;
  margin-top: -10px;
  margin-bottom: 48px;
  font-style: italic;
}

.context-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 32px;
  margin-top: 48px;
}

.context-card {
  background: linear-gradient(
    135deg,
    rgba(88, 28, 135, 0.1),
    rgba(15, 23, 42, 0.6)
  );
  border: 1px solid rgba(168, 85, 247, 0.2);
  border-radius: 12px;
  padding: 32px;
  position: relative;
  transition: all 0.3s ease;
}

.context-card:hover {
  transform: translateY(-4px);
  border-color: rgba(168, 85, 247, 0.4);
  box-shadow:
    0 10px 30px rgba(168, 85, 247, 0.15),
    inset 0 0 20px rgba(168, 85, 247, 0.05);
}

.context-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.context-icon {
  font-size: 28px;
  filter: drop-shadow(0 0 10px rgba(168, 85, 247, 0.5));
}

.context-header h3 {
  font-family: "Uncial Antiqua", serif;
  font-size: 20px;
  color: #d8b4fe;
  margin: 0;
  letter-spacing: 0.5px;
}

.context-command {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(168, 85, 247, 0.15);
  border-radius: 6px;
  padding: 12px 16px;
  margin-bottom: 16px;
}

.context-command code {
  color: #a78bfa;
  font-size: 14px;
  font-family: "Courier New", monospace;
  display: block;
}

.context-arrow {
  color: rgba(168, 85, 247, 0.6);
  font-size: 20px;
  text-align: center;
  margin: 8px 0;
}

.context-result {
  color: rgba(216, 180, 254, 0.9);
  font-size: 14px;
  line-height: 1.6;
  padding-left: 8px;
  border-left: 2px solid rgba(168, 85, 247, 0.3);
}

/* CLI Commands Section */
.cli-commands {
  padding: 80px 0;
  background: linear-gradient(
    to bottom,
    rgba(15, 23, 42, 0.95),
    rgba(88, 28, 135, 0.1)
  );
  position: relative;
}

.commands-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 48px;
  margin-top: 48px;
}

.command-category h3 {
  font-family: "Uncial Antiqua", serif;
  font-size: 20px;
  color: #d8b4fe;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(168, 85, 247, 0.2);
}

.command-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.command-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(168, 85, 247, 0.15);
  border-radius: 8px;
  transition: all 0.3s ease;
}

.command-item:hover {
  background: rgba(88, 28, 135, 0.1);
  border-color: rgba(168, 85, 247, 0.3);
  transform: translateX(4px);
}

.command-item code {
  color: #a78bfa;
  font-size: 14px;
  font-family: "Courier New", monospace;
  background: rgba(0, 0, 0, 0.4);
  padding: 6px 10px;
  border-radius: 4px;
  display: inline-block;
  width: fit-content;
}

.command-item span {
  color: rgba(196, 181, 253, 0.8);
  font-size: 13px;
  line-height: 1.4;
}

.cli-note {
  margin-top: 48px;
  text-align: center;
  padding: 20px;
  background: rgba(168, 85, 247, 0.05);
  border: 1px solid rgba(168, 85, 247, 0.2);
  border-radius: 8px;
}

.cli-note p {
  color: rgba(216, 180, 254, 0.9);
  font-size: 14px;
  margin: 0;
}

.cli-note code {
  color: #a78bfa;
  background: rgba(0, 0, 0, 0.3);
  padding: 2px 6px;
  border-radius: 3px;
}

/* Footer */
.footer {
  padding: 48px 24px;
  border-top: 1px solid rgba(168, 85, 247, 0.2);
  position: relative;
  z-index: 2;
}

.footer-tagline {
  color: #a855f7;
  margin-bottom: 16px;
  text-align: center;
}

.footer-description {
  color: #c4b5fd;
  margin-bottom: 24px;
  font-size: 18px;
  font-weight: 500;
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
}

.footer-links a {
  color: #c4b5fd;
  text-decoration: none;
  transition: color 0.3s;
}

.footer-links a:hover {
  color: #e9d5ff;
}

/* Modals */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.95);
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal.active {
  display: flex;
}

.modal-content {
  position: relative;
  background: linear-gradient(
    to bottom right,
    rgba(15, 23, 42, 0.9),
    rgba(88, 28, 135, 0.3)
  );
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: 8px;
  padding: 24px;
  max-width: 448px;
}

.image-modal-content {
  max-width: 90vw;
  max-height: 90vh;
  background: transparent;
  border: none;
  padding: 0;
}

.image-modal-content img {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
}

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

.modal-header h3 {
  font-family: "Uncial Antiqua", serif;
  font-size: 20px;
  font-weight: bold;
  color: #d8b4fe;
}

.modal-header p {
  color: #c4b5fd;
  font-size: 14px;
  margin-top: 8px;
}

.modal-content img {
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
}

.modal-close {
  position: absolute;
  top: 8px;
  right: 8px;
  background-color: rgba(0, 0, 0, 0.5);
  color: #d8b4fe;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.3s;
  z-index: 10;
}

.modal-close:hover {
  background-color: rgba(0, 0, 0, 0.7);
}

/* Rick Modal Lyrics */
.rick-container {
  position: relative;
  width: 100%;
}

.rick-container img {
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
}

.lyrics-scroll {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 8px;
  pointer-events: none;
}

.lyrics-content {
  animation: scrollLyrics 18s linear infinite;
  padding: 20px;
  text-align: center;
  color: #fff;
  text-shadow:
    0 0 10px rgba(0, 0, 0, 0.9),
    0 0 20px rgba(0, 0, 0, 0.7),
    2px 2px 4px rgba(0, 0, 0, 1);
  font-size: 16px;
  line-height: 1.8;
}

.lyrics-chorus {
  color: #fff;
  font-weight: 500;
  margin: 0;
}

.music-note {
  color: #a855f7;
  font-size: 20px;
  opacity: 0.8;
  display: inline-block;
  animation: noteFloat 2s ease-in-out infinite;
}

.music-note:nth-child(even) {
  animation-delay: 0.5s;
}

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

@keyframes scrollLyrics {
  0% {
    transform: translateY(100%);
  }
  100% {
    transform: translateY(-150%);
  }
}

/* Animations */
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

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

@keyframes floatUpward {
  0% {
    transform: translateY(0) translateX(0px) rotate(0deg) scale(0.5);
    opacity: 0;
  }
  10% {
    opacity: 0.8;
    transform: translateY(-10vh) translateX(5px) rotate(45deg) scale(0.8);
  }
  50% {
    transform: translateY(-50vh) translateX(-15px) rotate(180deg) scale(1);
    opacity: 1;
  }
  90% {
    opacity: 0.6;
    transform: translateY(-90vh) translateX(10px) rotate(315deg) scale(1.1);
  }
  100% {
    transform: translateY(-100vh) translateX(-5px) rotate(360deg) scale(0.8);
    opacity: 0;
  }
}

@keyframes twinkle {
  0% {
    opacity: 0.4;
    transform: scale(0.9);
  }
  100% {
    opacity: 1;
    transform: scale(1.3);
  }
}

@keyframes spiritAura {
  0% {
    opacity: 0;
    transform: scale(0.5) rotate(0deg);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.5) rotate(180deg);
  }
  100% {
    opacity: 0;
    transform: scale(2) rotate(360deg);
  }
}

@keyframes mysticalGlow {
  0%,
  100% {
    box-shadow:
      0 20px 25px -5px rgba(0, 0, 0, 0.1),
      0 10px 10px -5px rgba(168, 85, 247, 0.1),
      0 0 40px rgba(168, 85, 247, 0.3),
      inset 0 0 20px rgba(168, 85, 247, 0.1);
  }
  50% {
    box-shadow:
      0 20px 25px -5px rgba(0, 0, 0, 0.1),
      0 10px 10px -5px rgba(168, 85, 247, 0.2),
      0 0 60px rgba(168, 85, 247, 0.5),
      inset 0 0 30px rgba(168, 85, 247, 0.2);
  }
}

@keyframes spiritConjure {
  0% {
    opacity: 0;
    transform: scale(0) rotate(180deg);
    filter: blur(20px) hue-rotate(90deg);
  }
  15% {
    opacity: 0.2;
    transform: scale(0.3) rotate(135deg);
    filter: blur(15px) hue-rotate(60deg);
  }
  30% {
    opacity: 0.4;
    transform: scale(0.5) rotate(90deg);
    filter: blur(10px) hue-rotate(30deg);
  }
  45% {
    opacity: 0.6;
    transform: scale(0.7) rotate(45deg);
    filter: blur(5px) hue-rotate(10deg);
  }
  60% {
    opacity: 0.8;
    transform: scale(0.85) rotate(20deg);
    filter: blur(2px) hue-rotate(0deg);
  }
  75% {
    opacity: 0.9;
    transform: scale(0.95) rotate(5deg);
    filter: blur(1px) hue-rotate(0deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
    filter: blur(0) hue-rotate(0deg);
  }
}

@keyframes mysticalPulse {
  0%,
  100% {
    text-shadow:
      0 0 12px rgba(168, 85, 247, 0.8),
      0 0 20px rgba(168, 85, 247, 0.5),
      0 0 30px rgba(168, 85, 247, 0.3);
  }
  50% {
    text-shadow:
      0 0 16px rgba(168, 85, 247, 0.9),
      0 0 28px rgba(168, 85, 247, 0.6),
      0 0 40px rgba(168, 85, 247, 0.4);
  }
}

/* Grimoire Carousel Section */
.grimoire-carousel {
  padding: 80px 0 100px;
  background: linear-gradient(
    to bottom,
    rgba(15, 23, 42, 0.3),
    rgba(15, 23, 42, 0.5)
  );
  position: relative;
  overflow: hidden;
}

.grimoire-carousel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 2px;
  background: linear-gradient(to right, transparent, #a855f7, transparent);
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.6);
}

.carousel-wrapper {
  max-width: 900px;
  margin: 40px auto 0;
  position: relative;
  height: 350px;
  overflow: hidden;
  border-radius: 12px;
  background: linear-gradient(
    135deg,
    rgba(30, 27, 75, 0.95),
    rgba(55, 48, 107, 0.85)
  );
  border: 1px solid rgba(168, 85, 247, 0.3);
  box-shadow: 0 0 30px rgba(168, 85, 247, 0.2);
}

.carousel-slides {
  display: flex;
  transition: transform 0.5s ease;
  height: 100%;
}

.carousel-slide {
  min-width: 100%;
  padding: 40px 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.tip-icon {
  font-size: 2.5rem;
  margin-bottom: 20px;
  filter: drop-shadow(0 0 10px rgba(168, 85, 247, 0.6));
}

.tip-title {
  font-family: "Uncial Antiqua", serif;
  font-size: 1.5rem;
  color: #a855f7;
  margin-bottom: 15px;
  text-shadow: 0 0 10px rgba(168, 85, 247, 0.4);
}

.tip-content {
  color: #e9d5ff;
  line-height: 1.8;
  font-size: 1.1rem;
  max-width: 700px;
}

.carousel-controls {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 0 20px;
  pointer-events: none;
}

.carousel-btn {
  background: rgba(168, 85, 247, 0.2);
  border: 1px solid rgba(168, 85, 247, 0.4);
  color: #a855f7;
  font-size: 1.5rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  pointer-events: all;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-btn:hover {
  background: rgba(168, 85, 247, 0.4);
  transform: scale(1.1);
  box-shadow: 0 0 15px rgba(168, 85, 247, 0.5);
}

.carousel-indicators {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 20px;
}

.carousel-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(168, 85, 247, 0.3);
  border: 1px solid rgba(168, 85, 247, 0.5);
  cursor: pointer;
  transition: all 0.3s ease;
}

.carousel-indicator.active {
  background: #a855f7;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.8);
}

.grimoire-carousel .grimoire-link {
  text-align: center;
  margin-top: 30px;
}

.grimoire-carousel .grimoire-link a {
  color: #a855f7;
  text-decoration: none;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  opacity: 0.9;
  padding: 0;
  border: none;
  background: none;
  border-radius: 0;
  box-shadow: none;
}

.grimoire-carousel .grimoire-link a:hover {
  color: #c084fc;
  opacity: 1;
  text-decoration: underline;
  transform: none;
  box-shadow: none;
  background: none;
}

/* Responsive adjustments for grimoire carousel */
@media (max-width: 768px) {
  .carousel-wrapper {
    height: 380px;
  }

  .carousel-slide {
    padding: 30px 40px;
  }

  .tip-title {
    font-size: 1.3rem;
  }

  .tip-content {
    font-size: 1rem;
  }
}

/* Grimoire Page Styles */
.grimoire-content {
  padding: 60px 0 100px;
  position: relative;
  z-index: 10;
}

.scroll-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
}

.scroll-paper {
  background: linear-gradient(
    to bottom,
    #f4e8d0 0%,
    #f9f0dc 10%,
    #f4e8d0 20%,
    #f9f0dc 30%,
    #f4e8d0 40%,
    #f9f0dc 50%,
    #f4e8d0 60%,
    #f9f0dc 70%,
    #f4e8d0 80%,
    #f9f0dc 90%,
    #f4e8d0 100%
  );
  padding: 60px 50px 80px;
  border-radius: 8px;
  box-shadow:
    0 10px 40px rgba(0, 0, 0, 0.3),
    inset 0 0 100px rgba(139, 90, 43, 0.1),
    0 0 0 1px rgba(139, 90, 43, 0.2);
  position: relative;
  border: 2px solid #d4a574;
}

/* Aged paper texture overlay */
.scroll-paper::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(139, 90, 43, 0.03) 2px,
      rgba(139, 90, 43, 0.03) 4px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 2px,
      rgba(139, 90, 43, 0.03) 2px,
      rgba(139, 90, 43, 0.03) 4px
    );
  pointer-events: none;
  border-radius: 8px;
  opacity: 0.5;
}

/* Torn edge effect at top and bottom */
.scroll-paper::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 8px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(139, 90, 43, 0.1) 25%,
    transparent 50%,
    rgba(139, 90, 43, 0.1) 75%,
    transparent 100%
  );
  top: 0;
}

.grimoire-section {
  margin-bottom: 48px;
  position: relative;
  z-index: 1;
}

.forward-section {
  margin-bottom: 60px;
  padding-bottom: 40px;
  border-bottom: 2px solid rgba(139, 90, 43, 0.3);
}

.grimoire-section-heading {
  font-family: "Uncial Antiqua", serif;
  font-size: 2rem;
  color: #5a3a1a;
  text-align: center;
  margin-bottom: 30px;
  text-shadow: 1px 1px 2px rgba(139, 90, 43, 0.2);
  letter-spacing: 2px;
}

.practice-title {
  font-family: "Uncial Antiqua", serif;
  font-size: 1.5rem;
  color: #6b4423;
  margin-bottom: 16px;
  text-shadow: 0.5px 0.5px 1px rgba(139, 90, 43, 0.2);
  display: flex;
  align-items: center;
  gap: 12px;
}

.grimoire-text {
  font-family: "Crimson Text", serif;
  font-size: 1.15rem;
  line-height: 1.9;
  color: #3a2a1a;
  margin-bottom: 16px;
  text-align: justify;
}

.grimoire-quote {
  font-family: "Crimson Text", serif;
  font-size: 1.2rem;
  font-style: italic;
  color: #6b4423;
  margin: 20px 0;
  padding-left: 30px;
  border-left: 3px solid rgba(139, 90, 43, 0.4);
  text-align: left;
}

.grimoire-text code,
.grimoire-quote code {
  background: rgba(139, 90, 43, 0.15);
  padding: 2px 8px;
  border-radius: 4px;
  font-family: "Courier New", monospace;
  font-size: 0.95em;
  color: #5a3a1a;
  border: 1px solid rgba(139, 90, 43, 0.2);
}

.grimoire-footer {
  margin-top: 60px;
  padding-top: 40px;
  border-top: 2px solid rgba(139, 90, 43, 0.3);
}

.grimoire-footer .grimoire-link {
  display: inline-block;
  font-family: "Crimson Text", serif;
  font-size: 1.2rem;
  color: #6b4423;
  text-decoration: none;
  padding: 12px 24px;
  border: 2px solid rgba(139, 90, 43, 0.4);
  border-radius: 8px;
  background: rgba(139, 90, 43, 0.08);
  transition: all 0.3s ease;
}

.grimoire-footer .grimoire-link:hover {
  background: rgba(139, 90, 43, 0.15);
  border-color: rgba(139, 90, 43, 0.6);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(139, 90, 43, 0.2);
}

/* Music Player */
.music-player-container {
  position: relative;
  margin: 30px 0;
}

.music-player {
  padding: 20px;
  background: rgba(139, 90, 43, 0.08);
  border: 2px solid rgba(139, 90, 43, 0.3);
  border-radius: 12px;
  transition: all 0.3s ease;
}

.music-player:hover {
  background: rgba(139, 90, 43, 0.12);
  border-color: rgba(139, 90, 43, 0.4);
  box-shadow: 0 4px 12px rgba(139, 90, 43, 0.15);
}

.player-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.player-btn {
  background: rgba(139, 90, 43, 0.2);
  border: 2px solid rgba(139, 90, 43, 0.4);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  color: #6b4423;
  font-size: 18px;
}

.player-btn:hover {
  background: rgba(139, 90, 43, 0.3);
  border-color: rgba(139, 90, 43, 0.6);
  transform: scale(1.05);
  box-shadow: 0 0 15px rgba(139, 90, 43, 0.3);
}

.player-btn:active {
  transform: scale(0.95);
}

.volume-control {
  display: flex;
  align-items: center;
  gap: 10px;
}

.volume-icon {
  font-size: 20px;
  filter: grayscale(1) sepia(1) hue-rotate(10deg) brightness(0.7);
}

.volume-slider {
  width: 100px;
  height: 6px;
  border-radius: 3px;
  background: rgba(139, 90, 43, 0.2);
  outline: none;
  -webkit-appearance: none;
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #8b5a2b;
  cursor: pointer;
  border: 2px solid rgba(139, 90, 43, 0.6);
  transition: all 0.2s ease;
}

.volume-slider::-webkit-slider-thumb:hover {
  background: #6b4423;
  transform: scale(1.1);
  box-shadow: 0 0 10px rgba(139, 90, 43, 0.5);
}

.volume-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #8b5a2b;
  cursor: pointer;
  border: 2px solid rgba(139, 90, 43, 0.6);
  transition: all 0.2s ease;
}

.volume-slider::-moz-range-thumb:hover {
  background: #6b4423;
  transform: scale(1.1);
  box-shadow: 0 0 10px rgba(139, 90, 43, 0.5);
}

.player-label {
  font-family: "Crimson Text", serif;
  font-size: 1.1rem;
  color: #6b4423;
  font-style: italic;
  letter-spacing: 0.5px;
}

.music-credit {
  position: absolute;
  bottom: -24px;
  right: 0;
  margin: 0;
  font-family: "Crimson Text", serif;
  font-size: 0.85rem;
  color: rgba(107, 68, 35, 0.7);
  text-align: right;
  line-height: 1.4;
}

.music-credit a {
  color: #8b5a2b;
  text-decoration: none;
  border-bottom: 1px solid rgba(139, 90, 43, 0.3);
  transition: all 0.2s ease;
}

.music-credit a:hover {
  color: #6b4423;
  border-bottom-color: rgba(107, 68, 35, 0.6);
}

/* Responsive grimoire styles */
@media (max-width: 768px) {
  .scroll-paper {
    padding: 40px 30px 60px;
  }

  .grimoire-section-heading {
    font-size: 1.6rem;
  }

  .practice-title {
    font-size: 1.3rem;
  }

  .grimoire-text {
    font-size: 1.05rem;
    text-align: left;
  }

  .grimoire-quote {
    font-size: 1.1rem;
    padding-left: 20px;
  }

  .player-controls {
    gap: 12px;
  }

  .volume-slider {
    width: 80px;
  }

  .player-label {
    font-size: 0.95rem;
  }
}
