/* Define CSS Custom Properties for Easy Adjustments */
:root {
  --base-font-size: 16px; /* Adjust for global font scaling */
  --header-max-width: 900px; /* Adjust for header width */
  --deck-card-width: 50%; /* Adjust for card width */
  --deck-card-max-width: 350px;
  --deck-card-min-width: 200px;
  --category-btn-width: 100px; /* Adjust for button width */
  --category-btn-height: 40px; /* Adjust for button height */
  --modal-max-width: 400px; /* Adjust for modal width */
  --deck-area-max-width: 650px; /* Adjust for deck area width */
  --header-top: 8%; /* Adjust for header positioning */
  --category-tabs-bottom: 4vh; /* Adjust for tabs positioning */
  --deck-card-border-radius: 1.2rem; /* Increased by 20% for more curvature */
  --shadow-intensity: 0.5; /* Adjust for shadow intensity */
  --category-header-font-size: 1.5rem; /* Adjust for category header text */
  --category-header-top: 15%; /* Adjust for category header positioning */
}

/* Global Styles */
body {
  background-image: url('/images/landscape.png');
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #000000;
  background-attachment: fixed;
  min-height: 100vh;
  width: 100vw;
  height: 100vh;
  overflow: visible;
  position: fixed;
  margin: 0;
  font-family: Arial, sans-serif;
  color: #fff;
  font-size: var(--base-font-size);
}

body::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, rgba(0, 255, 255, 0.1), rgba(255, 0, 255, 0.1), rgba(0, 255, 0, 0.1));
  opacity: 0.2;
  z-index: -1;
  animation: holographic-shift 10s infinite linear;
}

@keyframes holographic-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

header {
  text-align: center;
  padding: 0 1.5%;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0), transparent);
  position: fixed;
  top: var(--header-top);
  left: 50%;
  transform: translateX(-50%);
  z-index: 5000;
  width: 100%;
  max-width: var(--header-max-width);
  box-sizing: border-box;
}

h1 {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  margin: 0 0 1%;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #ffffff;
  text-shadow: 0 0 1vw rgba(0, 255, 255, 0.8), 0 0 2vw rgba(255, 0, 255, 0.5);
  z-index: 1;
}

.atlas-main {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  max-width: 90%;
  width: 100%;
  padding: 2%;
  margin: 0 auto;
  box-sizing: border-box;
  min-height: 100vh;
}

.deck-content {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 90%;
  min-height: calc(100vh - 10vh);
}

.deck-section {
  flex: 1;
  max-width: 90%;
  min-height: 40vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: transparent;
  overflow: visible;
  position: relative;
  z-index: 3050;
  padding-top: 0;
  margin: 0 auto;
}

.deck-container {
  cursor: pointer;
  outline: none;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  max-width: var(--header-max-width);
  overflow: visible;
}

.deck-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 2%;
  width: 100%;
  overflow: visible;
  outline: none;
}

#deck-area {
  position: relative;
  width: 70%;
  max-width: var(--deck-area-max-width);
  min-height: 40vh;
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: auto;
  z-index: 3050;
  visibility: visible;
  opacity: 1;
  transform: scale(0.9); /* Scaled down by 10% for all displays */
}

.deck-card {
  position: relative;
  width: var(--deck-card-width);
  max-width: var(--deck-card-max-width);
  min-width: var(--deck-card-min-width);
  aspect-ratio: 2 / 3;
  z-index: 20;
  will-change: transform, box-shadow;
  visibility: visible;
  opacity: 1;
  border-radius: var(--deck-card-border-radius);
  overflow: hidden;
  padding: 0;
}

.deck-card.flipped {
  perspective: 1000px;
  transform-style: preserve-3d;
}

.deck-card.flipped .card-front {
  transform: rotateY(0deg);
}

.deck-card.flipped .card-back {
  transform: rotateY(180deg);
}

.card-back,
.card-front {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: var(--deck-card-border-radius);
}

.card-front {
  transform: rotateY(180deg);
}

.deck-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--deck-card-border-radius);
  display: block;
  margin: 0;
}

.deck-card.rocking {
  animation: organ-shuffle-rays 3s ease-in-out infinite; /* Matches provided keyframes duration and timing */
  z-index: 30;
  transform-origin: 50% 50%;
  will-change: box-shadow;
  display: block;
  opacity: 1;
  visibility: visible;
  border-radius: var(--deck-card-border-radius);
  outline: 0.1rem solid rgba(0, 255, 200, calc(var(--shadow-intensity) * 0.5)); /* Tighter outline */
  outline-offset: 0.1rem; /* Tighter to image */
}

@keyframes organ-shuffle-rays {
  0% {
    box-shadow:
      0 0 0 0 rgba(47, 0, 71, 0.0), /* Fulfillment deep purple */
      0 0 40px 0px rgba(47, 0, 71, 0.45),
      40px 0 80px 0px rgba(6, 252, 153, 0.18), /* Mood green */
      -40px 0 80px 0px rgba(255, 255, 255, 0.08),
      0 40px 80px 0px rgba(135, 206, 235, 0.13), /* Fulfillment blue */
      0 -40px 80px 0px rgba(255, 0, 255, 0.13); /* Lucidity magenta */
  }
  20% {
    box-shadow:
      0 0 0 0 rgba(47, 0, 71, 0.0),
      0 0 60px 0px rgba(30, 144, 255, 0.55), /* Fulfillment blue */
      60px 0 100px 0px rgba(6, 252, 153, 0.22),
      -60px 0 100px 0px rgba(255, 255, 255, 0.13),
      0 60px 100px 0px rgba(135, 206, 235, 0.18),
      0 -60px 100px 0px rgba(255, 0, 255, 0.18);
  }
  40% {
    box-shadow:
      0 0 0 0 rgba(47, 0, 71, 0.0),
      0 0 80px 0px rgba(6, 252, 153, 0.65),
      80px 0 120px 0px rgba(255, 255, 0, 0.19), /* Mood yellow */
      -80px 0 120px 0px rgba(255, 255, 255, 0.10),
      0 80px 120px 0px rgba(135, 206, 235, 0.22),
      0 -80px 120px 0px rgba(255, 0, 255, 0.22);
  }
  60% {
    box-shadow:
      0 0 0 0 rgba(47, 0, 71, 0.0),
      0 0 60px 0px rgba(30, 144, 255, 0.55),
      60px 0 100px 0px rgba(6, 252, 153, 0.18),
      -60px 0 100px 0px rgba(255, 255, 255, 0.08),
      0 60px 100px 0px rgba(135, 206, 235, 0.13),
      0 -60px 100px 0px rgba(255, 0, 255, 0.13);
  }
  80% {
    box-shadow:
      0 0 0 0 rgba(47, 0, 71, 0.0),
      0 0 40px 0px rgba(47, 0, 71, 0.45),
      40px 0 80px 0px rgba(6, 252, 153, 0.18),
      -40px 0 80px 0px rgba(255, 255, 255, 0.08),
      0 40px 80px 0px rgba(135, 206, 235, 0.13),
      0 -60px 100px 0px rgba(255, 0, 255, 0.13);
  }
  100% {
    box-shadow:
      0 0 0 0 rgba(47, 0, 71, 0.0),
      0 0 40px 0px rgba(47, 0, 71, 0.45),
      40px 0 80px 0px rgba(6, 252, 153, 0.18),
      -40px 0 80px 0px rgba(255, 255, 255, 0.08),
      0 40px 80px 0px rgba(135, 206, 235, 0.13),
      0 -40px 80px 0px rgba(255, 0, 255, 0.13);
  }
}

.category-tabs {
  display: flex;
  justify-content: center;
  gap: 7%;
  padding: 0 1.5%;
  position: fixed;
  bottom: var(--category-tabs-bottom);
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  max-width: var(--header-max-width);
  width: 100%;
  flex-wrap: nowrap;
  box-sizing: border-box;
}

.category-btn {
  width: clamp(var(--category-btn-width), 15vw, calc(var(--category-btn-width) * 1.5));
  height: clamp(var(--category-btn-height), 6vw, calc(var(--category-btn-height) * 1.5));
  border: none;
  cursor: pointer;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  background-color: #000000;
  opacity: 1;
  transition: transform 0.3s ease, opacity 0.3s ease, box-shadow 0.3s ease;
  text-indent: 120%;
  white-space: nowrap;
  overflow: hidden;
  box-shadow: 
    0 0 1rem 0.5rem rgba(200, 255, 255, calc(var(--shadow-intensity) * 0.25)),
    0 0 0.2857rem 0.2143rem rgba(170, 136, 255, var(--shadow-intensity)); /* Reduced vertical by 5px (0.4rem to 0.2857rem), horizontal by 2px (0.3rem to 0.2143rem) */
  border-radius: 0; /* No border radius for box shadow */
  position: relative;
  pointer-events: auto;
  z-index: 6;
}

.category-btn:hover {
  transform: scale(1.15);
  box-shadow: 
    0 0 1.2rem 0.7rem rgba(255, 200, 255, calc(var(--shadow-intensity) * 0.3)),
    0 0 0.5714rem 0.0714rem rgba(170, 136, 255, calc(var(--shadow-intensity) * 1.6)); /* Reduced vertical by 5px (0.8rem to 0.5714rem), horizontal by 2px (0.1rem to 0.0714rem) */
  border-radius: 0;
  animation: category-glow 2s ease-in-out infinite alternate;
}

.category-btn.active {
  transform: scale(1.15);
  box-shadow: 
    0 0 1.2rem 0.7rem rgba(255, 200, 255, calc(var(--shadow-intensity) * 0.3)),
    0 0 0.5714rem 0.0714rem rgba(170, 136, 255, calc(var(--shadow-intensity) * 2)); /* Reduced vertical by 5px (0.8rem to 0.5714rem), horizontal by 2px (0.1rem to 0.0714rem) */
  border-radius: 0;
  animation: category-glow 2s ease-in-out infinite alternate;
  z-index: 7;
}

@keyframes category-glow {
  0% {
    box-shadow: 
      0 0 1rem 0.5rem rgba(200, 255, 255, calc(var(--shadow-intensity) * 0.25)),
      0 0 0.5714rem 0.0714rem rgba(170, 136, 255, calc(var(--shadow-intensity) * 1.6));
  }
  100% {
    box-shadow: 
      0 0 1.4rem 0.9rem rgba(255, 200, 255, calc(var(--shadow-intensity) * 0.35)),
      0 0 0.5714rem 0.0714rem rgba(170, 136, 255, calc(var(--shadow-intensity) * 2));
  }
}

.category-btn:focus {
  outline: 0.2rem solid rgba(170, 136, 255, 1);
  outline-offset: 0.2rem;
  border-radius: 0;
}

.category-btn[data-category="your-atlas"] {
  background-image: url('/images/your-atlas-deck.png');
}

.category-btn[data-category="envision"] {
  background-image: url('/images/envision-deck.png');
}

.category-btn[data-category="dreamcatcher"] {
  background-image: url('/images/dreamcatcher-deck.png');
}

.deck-buttons {
  display: none;
}

.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.9);
  border: 0.1rem solid rgba(170, 136, 255, 0.7);
  border-radius: 1rem;
  padding: 1%;
  z-index: 4000;
  display: none;
  flex-direction: column;
  align-items: center;
}

.modal[aria-hidden="false"] {
  display: flex;
}

.modal-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #fff;
  width: 90%;
  max-width: var(--modal-max-width);
  height: 100%;
  font-family: Arial, sans-serif;
  padding: 1%;
  box-sizing: border-box;
  gap: 1rem;
}

#subscription-modal h2 {
  text-align: center;
  width: 100%;
  margin: 0 0 1rem;
}

.close-modal {
  position: absolute;
  top: 1%;
  right: 1%;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5%;
  transition: transform 0.3s ease;
}

.close-modal-img {
  width: clamp(18px, 2vw, 22px);
  height: clamp(18px, 2vw, 22px);
  object-fit: contain;
  filter: drop-shadow(0 0 0.4rem rgba(170, 136, 255, var(--shadow-intensity)));
}

.close-modal:hover {
  transform: scale(1.1);
}

#auth-form {
  display: flex;
  flex-direction: column;
  gap: 3%;
  width: 100%;
}

#auth-form label {
  font-size: clamp(0.8rem, 1vw, 0.9rem);
}

#auth-form input,
#auth-form select {
  padding: 1%;
  border: 0.1rem solid rgba(170, 136, 255, 0.7);
  border-radius: 0.5rem;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-family: Arial, sans-serif;
  width: 100%;
  box-sizing: border-box;
}

#auth-form select {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#auth-form select option {
  background: rgba(0, 0, 0, 0.9);
  color: #fff;
  font-size: clamp(0.8rem, 1vw, 0.9rem);
  padding: 3%;
}

#auth-btn {
  padding: 1% 2%;
  height: 2rem;
  line-height: 2rem;
  background: rgba(170, 136, 255, 0.7);
  border: none;
  border-radius: 0.5rem;
  color: #fff;
  cursor: pointer;
  font-family: Arial, sans-serif;
  box-shadow: 0 0 0.2rem 0.15rem rgba(170, 136, 255, calc(var(--shadow-intensity) * 0.7));
  transition: background 0.3s ease, box-shadow 0.3s ease;
  margin-top: 4%;
  box-sizing: border-box;
}

#auth-btn:hover {
  background: rgba(170, 136, 255, 1);
  box-shadow: 0 0 1rem rgba(170, 136, 255, calc(var(--shadow-intensity) * 1.6));
}

#auth-status {
  margin-top: 1%;
  font-size: clamp(0.8rem, 1vw, 0.9rem);
  text-align: center;
}

#service-member-btn {
  padding: 1% 2%;
  height: 2rem;
  line-height: 2rem;
  background: rgba(170, 136, 255, 0.7);
  border: none;
  border-radius: 0.5rem;
  color: #fff;
  cursor: pointer;
  font-family: Arial, sans-serif;
  box-shadow: 0 0 0.2rem 0.15rem rgba(170, 136, 255, calc(var(--shadow-intensity) * 0.7));
  transition: background 0.3s ease, box-shadow 0.3s ease;
  margin-top: 4%;
  box-sizing: border-box;
}

#service-member-btn:hover {
  background: rgba(170, 136, 255, 1);
  box-shadow: 0 0 1rem rgba(170, 136, 255, calc(var(--shadow-intensity) * 1.6));
}

#service-member-container {
  display: none;
  margin-top: 1%;
  width: 100%;
}

#service-member-container label {
  font-size: clamp(0.8rem, 1vw, 0.9rem);
}

#service-member-container input {
  padding: 1%;
  border: 0.1rem solid rgba(170, 136, 255, 0.7);
  border-radius: 0.5rem;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-family: Arial, sans-serif;
  width: 100%;
  box-sizing: border-box;
}

#discount-info {
  font-size: clamp(0.8rem, 1vw, 0.9rem);
  color: #fff;
  margin: 0 0 1%;
  text-align: center;
  font-family: Arial, sans-serif;
}

#subscription-status {
  margin: 2% 0;
  text-align: center;
  color: #fff;
  font-size: clamp(0.9rem, 1.2vw, 1rem);
  font-family: Arial, sans-serif;
  width: 100%;
}

#subscribe-btn,
#toggle-mode-btn {
  padding: 1.8em 2%;
  background: rgba(170, 136, 255, 0.7);
  border: none;
  max-height: 10px;
  border-radius: 0.5rem;
  color: #fff;
  cursor: pointer;
  font-family: Arial, sans-serif;
  box-shadow: 0 0 0.4rem 0.3rem rgba(170, 136, 255, var(--shadow-intensity));
  transition: background 0.3s ease, box-shadow 0.3s ease;
  margin-top: 1%;
  width: 100%;
  max-width: 200px;
}

#subscribe-btn:hover,
#toggle-mode-btn:hover {
  background: rgba(170, 136, 255, 1);
  box-shadow: 0 0 1rem rgba(170, 136, 255, calc(var(--shadow-intensity) * 1.6));
}

.no-audio {
  color: #ff3333;
  font-size: clamp(0.8rem, 1vw, 0.9rem);
  margin: 1% 0;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 25;
  font-family: Arial, sans-serif;
}

/* Auth Mode Toggle */
.auth-mode {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  justify-content: center;
}

.auth-mode label {
  font-size: clamp(0.8rem, 1vw, 0.9rem);
  color: #fff;
}

/* Info Button (used for both subscription and artist buttons) */
.info-btn {
  background: none;
  border: none;
  cursor: pointer;
  z-index: 6000;
}

#info-btn {
  position: fixed;
  top: 2%;
  right: 2%;
  padding: 0.5%;
  transition: transform 0.3s ease;
}

#artist-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 0.5%;
  transition: transform 0.3s ease;
}

.info-btn img {
  width: 40px;
  height: 40px;
  filter: drop-shadow(0 0 5px rgba(0, 255, 255, 0.5));
}

.info-btn:hover img,
.info-btn:focus img {
  filter: drop-shadow(0 0 10px rgba(0, 255, 255, 0.8));
}

/* Artist Note Modal */
.info-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 4000; /* Higher than deck-section (3050) */
  visibility: visible;
  opacity: 1;
}

.info-modal[aria-hidden="false"] {
  display: flex;
}

.info-modal-content {
  background: linear-gradient(45deg, rgba(0, 0, 0, 0.9), rgba(30, 30, 60, 0.9));
  color: #ffffff;
  padding: 25px;
  border-radius: 10px;
  border: 1px solid rgba(0, 255, 255, 0.3);
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.5), 0 0 30px rgba(255, 0, 255, 0.3);
  max-width: 90%;
  max-height: 80%;
  overflow-y: auto;
  text-align: center;
  font-family: "Google Sans", Arial, sans-serif;
  position: relative;
  z-index: 4001;
  animation: holographic-shift 10s infinite linear;
}

.info-modal-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, rgba(0, 255, 255, 0.1), rgba(255, 0, 255, 0.1), rgba(0, 255, 0, 0.1));
  opacity: 0.2;
  z-index: -1;
  animation: holographic-shift 10s infinite linear;
}

.info-modal-content p {
  margin: 15px 0;
  line-height: 1.6;
  font-size: 1.1em;
  text-shadow: 0 0 5px rgba(0, 255, 255, 0.5);
}

.info-modal-content a {
  color: #1a73e8;
  text-decoration: none;
  font-weight: 500;
  text-shadow: 0 0 5px rgba(0, 255, 255, 0.3);
}

.info-modal-content a:hover,
.info-modal-content a:focus {
  text-decoration: underline;
  outline: 2px solid #00f6ff;
  outline-offset: 2px;
}

.info-modal-content .close-btn {
  background: rgba(0, 0, 0, 0.934);
  color: #ffffff;
  border: 2px solid rgba(0, 255, 255, 0.8);
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
  position: absolute;
  top: 10px;
  right: 10px;
  font-family: "Google Sans", Arial, sans-serif;
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
  transition: all 0.3s ease;
}

.info-modal-content .close-btn img {
  width: 20px;
  height: 20px;
  filter: drop-shadow(0 0 5px rgba(0, 255, 255, 0.5));
}

.info-modal-content .close-btn:hover,
.info-modal-content .close-btn:focus {
  background: linear-gradient(45deg, rgba(0, 255, 255, 0.2), rgba(255, 0, 255, 0.2));
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.8);
  outline: 2px solid #00f6ff;
  outline-offset: 2px;
}

.info-modal-content .close-btn:hover img,
.info-modal-content .close-btn:focus img {
  filter: drop-shadow(0 0 10px rgba(0, 255, 255, 0.8));
}

@keyframes sparkle {
  0% { opacity: 0.5; text-shadow: 0 0 5px rgba(0, 255, 255, 0.5); }
  50% { opacity: 1; text-shadow: 0 0 15px rgba(0, 255, 255, 0.8); }
  100% { opacity: 0.5; text-shadow: 0 0 5px rgba(0, 255, 255, 0.5); }
}

.sparkle {
  animation: sparkle 2s infinite;
  z-index: 1;
  text-align: center;
}

.hidden {
  display: none !important;
}

/* Subscription Modal */
#subscription-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.9);
  border: 0.1rem solid rgba(170, 136, 255, 0.7);
  border-radius: 1rem;
  padding: 1%;
  z-index: 4000;
  display: none;
  flex-direction: column;
  align-items: center;
}

#subscription-modal[aria-hidden="false"] {
  display: flex;
}

#unsubscribe-btn {
  padding: 1% 2%;
  height: 2rem;
  line-height: 2rem;
  background: rgba(222, 72, 94, 0.7);
  border: none;
  border-radius: 0.5rem;
  color: #fff;
  cursor: pointer;
  font-family: Arial, sans-serif;
  box-shadow: 0 0 0.2rem 0.15rem rgba(255, 99, 71, calc(var(--shadow-intensity) * 0.7));
  transition: background 0.3s ease, box-shadow 0.3s ease;
  margin-top: 1%;
  width: 100%;
  max-width: 200px;
}

#unsubscribe-btn:hover {
  background: rgba(255, 99, 71, 1);
  box-shadow: 0 0 1rem rgba(255, 99, 71, calc(var(--shadow-intensity) * 1.6));
}

.button-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1%;
  width: 100%;
  align-items: center;
}

#privacy-policy-btn {
  padding: 1% 2%;
  height: 2rem;
  line-height: 2rem;
  background: rgba(100, 149, 237, 0.7);
  border: none;
  border-radius: 0.5rem;
  color: #fff;
  cursor: pointer;
  font-family: Arial, sans-serif;
  box-shadow: 0 0 0.2rem 0.15rem rgba(100, 149, 237, calc(var(--shadow-intensity) * 0.7));
  transition: background 0.3s ease, box-shadow 0.3s ease;
  width: 100%;
  max-width: 200px;
}

#privacy-policy-btn:hover {
  background: rgba(100, 149, 237, 1);
  box-shadow: 0 0 1rem rgba(100, 149, 237, calc(var(--shadow-intensity) * 1.6));
}

#privacy-policy-content {
  margin-top: 1rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
  color: #fff;
  font-family: Arial, sans-serif;
  width: 100%;
  text-align: center;
}

#privacy-policy-content[aria-hidden="false"] {
  display: block;
}

#contact-info {
  margin-top: 1rem;
  text-align: center;
  width: 100%;
}

/* Mobile Portrait (max-width: 767px) */
@media (max-width: 767px) and (orientation: portrait) {
  :root {
    --base-font-size: 14px;
    --header-max-width: 80vw;
    --deck-card-width: 105%;
    --deck-card-max-width: 75vw;
    --deck-card-min-width: 55vw;
    --category-btn-width: 20vw;
    --category-btn-height: 9vw;
    --modal-max-width: 65vw;
    --deck-area-max-width: 80vw;
    --header-top: 11%;
    --category-tabs-bottom: 10vh;
    --deck-card-border-radius: 2.4vw; /* Increased by 20% */
    --shadow-intensity: 0.5;
    --category-header-font-size: 1.2rem;
    --category-header-top: 18%;
  }

  body {
    background-image: url('/images/portrait.png');
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    width: 100vw;
    height: 100vh;
    min-height: 100vh;
    min-width: 100vw;
    max-width: 100vw;
    max-height: 100vh;
    overflow: auto;
    position: static;
  }

  header {
    padding: 0 10%;
  }

  h1 {
    font-size: clamp(1rem, 3vw, 1.2rem);
    margin: 0 0 1%;
    letter-spacing: 0.05em;
    text-align: center;
  }

  #category-header {
    font-size: clamp(0.9rem, var(--category-header-font-size), 1.5rem);
  }

  .atlas-main {
    top: 3%;
  }

  .deck-section {
    max-width: 100%;
    top: 45%;
    margin: 0 auto;
  }

  .deck-container {
    width: 100%;
  }

  #deck-area {
    width: 89%;
    height: auto;
    aspect-ratio: 4 / 5;
    overflow: visible;
  }

  .deck-content {
    max-height: calc(100vh - 10vh);
    max-width: 100%;
  }

  .deck-card {
    border-radius: var(--deck-card-border-radius);
    padding: 0;
  }

  .deck-image {
    border-radius: var(--deck-card-border-radius);
    object-fit: cover;
  }

  .deck-card.rocking {
    animation: organ-shuffle-rays 3s ease-in-out infinite;
    box-shadow: 
      0 0 0 0 rgba(47, 0, 71, 0.0), /* Fulfillment deep purple */
      0 0 40px 0px rgba(47, 0, 71, 0.45),
      40px 0 80px 0px rgba(6, 252, 153, 0.18), /* Mood green */
      -40px 0 80px 0px rgba(255, 255, 255, 0.08),
      0 40px 80px 0px rgba(135, 206, 235, 0.13), /* Fulfillment blue */
      0 -40px 80px 0px rgba(255, 0, 255, 0.13); /* Lucidity magenta */
    outline: 0.1rem solid rgba(0, 255, 200, calc(var(--shadow-intensity) * 0.5));
    outline-offset: 0.1rem;
  }

  @keyframes organ-shuffle-rays {
    0% {
      box-shadow:
        0 0 0 0 rgba(47, 0, 71, 0.0),
        0 0 40px 0px rgba(47, 0, 71, 0.45),
        40px 0 80px 0px rgba(6, 252, 153, 0.18),
        -40px 0 80px 0px rgba(255, 255, 255, 0.08),
        0 40px 80px 0px rgba(135, 206, 235, 0.13),
        0 -40px 80px 0px rgba(255, 0, 255, 0.13);
    }
    20% {
      box-shadow:
        0 0 0 0 rgba(47, 0, 71, 0.0),
        0 0 60px 0px rgba(30, 144, 255, 0.55),
        60px 0 100px 0px rgba(6, 252, 153, 0.22),
        -60px 0 100px 0px rgba(255, 255, 255, 0.13),
        0 60px 100px 0px rgba(135, 206, 235, 0.18),
        0 -60px 100px 0px rgba(255, 0, 255, 0.18);
    }
    40% {
      box-shadow:
        0 0 0 0 rgba(47, 0, 71, 0.0),
        0 0 80px 0px rgba(6, 252, 153, 0.65),
        80px 0 120px 0px rgba(255, 255, 0, 0.19),
        -80px 0 120px 0px rgba(255, 255, 255, 0.10),
        0 80px 120px 0px rgba(135, 206, 235, 0.22),
        0 -80px 120px 0px rgba(255, 0, 255, 0.22);
    }
    60% {
      box-shadow:
        0 0 0 0 rgba(47, 0, 71, 0.0),
        0 0 60px 0px rgba(30, 144, 255, 0.55),
        60px 0 100px 0px rgba(6, 252, 153, 0.18),
        -60px 0 100px 0px rgba(255, 255, 255, 0.08),
        0 60px 100px 0px rgba(135, 206, 235, 0.13),
        0 -60px 100px 0px rgba(255, 0, 255, 0.13);
    }
    80% {
      box-shadow:
        0 0 0 0 rgba(47, 0, 71, 0.0),
        0 0 40px 0px rgba(47, 0, 71, 0.45),
        40px 0 80px 0px rgba(6, 252, 153, 0.18),
        -40px 0 80px 0px rgba(255, 255, 255, 0.08),
        0 40px 80px 0px rgba(135, 206, 235, 0.13),
        0 -60px 100px 0px rgba(255, 0, 255, 0.13);
    }
    100% {
      box-shadow:
        0 0 0 0 rgba(47, 0, 71, 0.0),
        0 0 40px 0px rgba(47, 0, 71, 0.45),
        40px 0 80px 0px rgba(6, 252, 153, 0.18),
        -40px 0 80px 0px rgba(255, 255, 255, 0.08),
        0 40px 80px 0px rgba(135, 206, 235, 0.13),
        0 -40px 80px 0px rgba(255, 0, 255, 0.13);
    }
  }

  .category-tabs {
    gap: 3%;
    max-height: 15vh;
    flex-wrap: wrap;
  }

  .category-btn {
    background-size: 100% 100%;
    font-size: clamp(0.9rem, 3vw, 1rem);
    box-shadow: 
      0 0 1rem 0.5rem rgba(200, 255, 255, calc(var(--shadow-intensity) * 0.25)),
      0 0 0.2857rem 0.2143rem rgba(170, 136, 255, var(--shadow-intensity));
    border-radius: 0;
  }

  .category-btn:hover,
  .category-btn.active {
    transform: scale(1.08);
    box-shadow: 
      0 0 1.2rem 0.7rem rgba(255, 200, 255, calc(var(--shadow-intensity) * 0.3)),
      0 0 0.5714rem 0.0714rem rgba(170, 136, 255, calc(var(--shadow-intensity) * 1.4));
    border-radius: 0;
    animation: category-glow 2s ease-in-out infinite alternate;
  }

  #subscription-status {
    font-size: clamp(0.9rem, 3.5vw, 1rem);
  }

  #subscribe-btn,
  #toggle-mode-btn {
    padding: 2vw 4vw;
    font-size: clamp(0.9rem, 3.5vw, 1rem);
  }

  #info-btn {
    top: 1%;
    right: 1%;
  }

  #artist-btn {
    bottom: 15px;
    right: 15px;
  }

  .info-btn img {
    width: clamp(20px, 4vw, 24px);
    height: clamp(20px, 4vw, 24px);
  }

  #subscription-modal {
    max-width: var(--modal-max-width);
  }

  #subscription-modal h2 {
    font-size: clamp(0.9rem, 3vw, 1.2rem);
  }

  .button-group {
    flex-direction: column;
    gap: 0.5rem;
  }

  #privacy-policy-btn {
    padding: 1.5% 3%;
    font-size: clamp(0.8rem, 2vw, 0.9rem);
  }

  #privacy-policy-content {
    padding: 0.8rem;
    font-size: clamp(0.8rem, 2vw, 0.9rem);
  }

  .auth-mode {
    flex-direction: column;
    gap: 0.5rem;
  }

  .auth-mode label {
    font-size: clamp(0.7rem, 2vw, 0.8rem);
  }

  .info-modal-content {
    max-width: 80%;
    padding: 20px;
  }

  .info-modal-content .close-btn {
    top: 5px;
    right: 5px;
    padding: 8px;
  }

.info-modal-content .close-btn img {
  width: 16px;
  height: 16px;
}

/* Mobile Landscape (max-width: 767px) */
@media (max-width: 767px) and (orientation: landscape) {
  :root {
    --base-font-size: 13px;
    --header-max-width: 90vw;
    --deck-card-width: 25vw;
    --deck-card-max-width: 28vw;
    --deck-card-min-width: 18vw;
    --category-btn-width: 10vw;
    --category-btn-height: 4vw;
    --modal-max-width: 50vw;
    --deck-area-max-width: 38vw;
    --header-top: 2vh;
    --category-tabs-bottom: 4vh;
    --deck-card-border-radius: 1.8vw; /* Increased by 20% */
    --shadow-intensity: 0.4;
    --category-header-font-size: 1rem;
    --category-header-top: 12%;
  }

  body {
    background-image: url('/images/landscape.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    width: 100vw;
    height: 100vh;
    min-width: 100vw;
    min-height: 100vh;
    max-width: 100vw;
    max-height: 100vh;
    overflow: auto;
    position: fixed;
  }

  header {
    max-width: var(--header-max-width);
    padding: 0 2%;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
  }

  h1 {
    font-size: clamp(0.9rem, 2.5vw, 1.3rem);
    margin: 0 0 1%;
    letter-spacing: 0.05em;
    line-height: 1.2;
    white-space: nowrap;
    text-align: center;
  }

  #category-header {
    font-size: clamp(0.8rem, var(--category-header-font-size), 1.2rem);
  }

  .atlas-main {
    padding: 1%;
    max-width: 100%;
  }

  .deck-content {
    min-height: calc(100vh - 10vh);
  }

  .deck-section {
    max-width: 100%;
    max-height: 100%;
    padding: 0 2%;
  }

  .deck-container {
    width: 90%;
  }

  #deck-area {
    min-height: 20vh;
  }

  .deck-card {
    border-radius: var(--deck-card-border-radius);
    padding: 0;
  }

  .deck-image {
    border-radius: var(--deck-card-border-radius);
    object-fit: cover;
  }

  .deck-card.rocking {
    animation: organ-shuffle-rays 3s ease-in-out infinite;
    box-shadow: 
      0 0 0 0 rgba(47, 0, 71, 0.0), /* Fulfillment deep purple */
      0 0 40px 0px rgba(47, 0, 71, 0.45),
      40px 0 80px 0px rgba(6, 252, 153, 0.18), /* Mood green */
      -40px 0 80px 0px rgba(255, 255, 255, 0.08),
      0 40px 80px 0px rgba(135, 206, 235, 0.13), /* Fulfillment blue */
      0 -40px 80px 0px rgba(255, 0, 255, 0.13); /* Lucidity magenta */
    outline: 0.1rem solid rgba(0, 255, 200, calc(var(--shadow-intensity) * 0.5));
    outline-offset: 0.1rem;
  }

  @keyframes organ-shuffle-rays {
    0% {
      box-shadow:
        0 0 0 0 rgba(47, 0, 71, 0.0),
        0 0 40px 0px rgba(47, 0, 71, 0.45),
        40px 0 80px 0px rgba(6, 252, 153, 0.18),
        -40px 0 80px 0px rgba(255, 255, 255, 0.08),
        0 40px 80px 0px rgba(135, 206, 235, 0.13),
        0 -40px 80px 0px rgba(255, 0, 255, 0.13);
    }
    20% {
      box-shadow:
        0 0 0 0 rgba(47, 0, 71, 0.0),
        0 0 60px 0px rgba(30, 144, 255, 0.55),
        60px 0 100px 0px rgba(6, 252, 153, 0.22),
        -60px 0 100px 0px rgba(255, 255, 255, 0.13),
        0 60px 100px 0px rgba(135, 206, 235, 0.18),
        0 -60px 100px 0px rgba(255, 0, 255, 0.18);
    }
    40% {
      box-shadow:
        0 0 0 0 rgba(47, 0, 71, 0.0),
        0 0 80px 0px rgba(6, 252, 153, 0.65),
        80px 0 120px 0px rgba(255, 255, 0, 0.19),
        -80px 0 120px 0px rgba(255, 255, 255, 0.10),
        0 80px 120px 0px rgba(135, 206, 235, 0.22),
        0 -80px 120px 0px rgba(255, 0, 255, 0.22);
    }
    60% {
      box-shadow:
        0 0 0 0 rgba(47, 0, 71, 0.0),
        0 0 60px 0px rgba(30, 144, 255, 0.55),
        60px 0 100px 0px rgba(6, 252, 153, 0.18),
        -60px 0 100px 0px rgba(255, 255, 255, 0.08),
        0 60px 100px 0px rgba(135, 206, 235, 0.13),
        0 -60px 100px 0px rgba(255, 0, 255, 0.13);
    }
    80% {
      box-shadow:
        0 0 0 0 rgba(47, 0, 71, 0.0),
        0 0 40px 0px rgba(47, 0, 71, 0.45),
        40px 0 80px 0px rgba(6, 252, 153, 0.18),
        -40px 0 80px 0px rgba(255, 255, 255, 0.08),
        0 40px 80px 0px rgba(135, 206, 235, 0.13),
        0 -60px 100px 0px rgba(255, 0, 255, 0.13);
    }
    100% {
      box-shadow:
        0 0 0 0 rgba(47, 0, 71, 0.0),
        0 0 40px 0px rgba(47, 0, 71, 0.45),
        40px 0 80px 0px rgba(6, 252, 153, 0.18),
        -40px 0 80px 0px rgba(255, 255, 255, 0.08),
        0 40px 80px 0px rgba(135, 206, 235, 0.13),
        0 -40px 80px 0px rgba(255, 0, 255, 0.13);
    }
  }

  .category-tabs {
    gap: 1.5%;
    max-height: 10vh;
  }

  .category-btn {
    background-size: 100% 100%;
    box-shadow: 
      0 0 1rem 0.5rem rgba(200, 255, 255, calc(var(--shadow-intensity) * 0.25)),
      0 0 0.2857rem 0.2143rem rgba(170, 136, 255, var(--shadow-intensity));
    border-radius: 0;
  }

  .category-btn:hover,
  .category-btn.active {
    transform: scale(1.08);
    box-shadow: 
      0 0 1.2rem 0.7rem rgba(255, 200, 255, calc(var(--shadow-intensity) * 0.3)),
      0 0 0.5714rem 0.0714rem rgba(170, 136, 255, calc(var(--shadow-intensity) * 1.4));
    border-radius: 0;
    animation: category-glow 2s ease-in-out infinite alternate;
  }

  #subscription-status {
    font-size: clamp(0.9rem, 3vw, 1rem);
  }

  #subscribe-btn,
  #toggle-mode-btn {
    padding: 1.5vw 3vw;
    font-size: clamp(0.8rem, 3vw, 0.9rem);
  }

  #info-btn {
    top: 1%;
    right: 1%;
  }

  #artist-btn {
    bottom: 10px;
    right: 10px;
  }

  .info-btn img {
    width: clamp(18px, 3vw, 22px);
    height: clamp(18px, 3vw, 22px);
  }

  #subscription-modal {
    max-width: var(--modal-max-width);
  }

  #subscription-modal h2 {
    font-size: clamp(0.8rem, 2.5vw, 1rem);
  }

  .button-group {
    flex-direction: column;
    gap: 0.5rem;
  }

  #privacy-policy-btn {
    padding: 1.5% 3%;
    font-size: clamp(0.7rem, 1.8vw, 0.8rem);
  }

  #privacy-policy-content {
    padding: 0.7rem;
    font-size: clamp(0.7rem, 1.8vw, 0.8rem);
  }

  .auth-mode {
    flex-direction: column;
    gap: 0.5rem;
  }

  .auth-mode label {
    font-size: clamp(0.7rem, 1.8vw, 0.8rem);
  }

  .info-modal-content {
    max-width: 70%;
    padding: 15px;
  }

  .info-modal-content .close-btn {
    top: 5px;
    right: 5px;
    padding: 8px;
  }

  .info-modal-content .close-btn img {
    width: 16px;
    height: 16px;
  }
}

/* Larger Mobile/Small Tablet Landscape (896x414, 932x430, 915x412) */
@media (min-width: 896px) and (max-width: 940px) and (min-height: 400px) and (max-height: 450px) and (orientation: landscape) {
  :root {
    --base-font-size: 14px;
    --header-max-width: 85vw;
    --deck-card-width: 35%;
    --deck-card-max-width: 300px;
    --deck-card-min-width: 160px;
    --category-btn-width: 100px;
    --category-btn-height: 40px;
    --modal-max-width: 380px;
    --deck-area-max-width: 600px;
    --header-top: 2%;
    --category-tabs-bottom: 3vh;
    --deck-card-border-radius: 0.96rem; /* Increased by 20% */
    --shadow-intensity: 0.5;
    --category-header-font-size: 1.2rem;
    --category-header-top: 12%;
  }

  body {
    background-size: cover;
    background-position: center;
    overflow: hidden;
    position: fixed;
  }

  header {
    padding: 0 2%;
  }

  h1 {
    font-size: clamp(1.1rem, 2vw, 1.6rem);
    letter-spacing: 0.07em;
    text-shadow: 0 0 0.8vw rgba(0, 255, 255, 0.7), 0 0 1.5vw rgba(255, 0, 255, 0.4);
  }

  #category-header {
    font-size: clamp(0.9rem, var(--category-header-font-size), 1.5rem);
  }

  .atlas-main {
    max-width: 95%;
    padding: 1.5%;
  }

  .deck-content {
    max-width: 95%;
    min-height: calc(100vh - 8vh);
  }

  .deck-section {
    max-width: 90%;
    min-height: 45vh;
    padding-top: 3%;
  }

  .deck-container {
    width: 90%;
  }

  #deck-area {
    width: 70%;
    min-height: 40vh;
    aspect-ratio: 4 / 3;
  }

  .deck-card {
    border-radius: var(--deck-card-border-radius);
    padding: 0;
  }

  .deck-image {
    border-radius: var(--deck-card-border-radius);
    object-fit: cover;
  }

  .deck-card.rocking {
    animation: organ-shuffle-rays 3s ease-in-out infinite;
    box-shadow: 
      0 0 0 0 rgba(47, 0, 71, 0.0), /* Fulfillment deep purple */
      0 0 40px 0px rgba(47, 0, 71, 0.45),
      40px 0 80px 0px rgba(6, 252, 153, 0.18), /* Mood green */
      -40px 0 80px 0px rgba(255, 255, 255, 0.08),
      0 40px 80px 0px rgba(135, 206, 235, 0.13), /* Fulfillment blue */
      0 -40px 80px 0px rgba(255, 0, 255, 0.13); /* Lucidity magenta */
    outline: 0.1rem solid rgba(0, 255, 200, calc(var(--shadow-intensity) * 0.5));
    outline-offset: 0.1rem;
  }

  @keyframes organ-shuffle-rays {
    0% {
      box-shadow:
        0 0 0 0 rgba(47, 0, 71, 0.0),
        0 0 40px 0px rgba(47, 0, 71, 0.45),
        40px 0 80px 0px rgba(6, 252, 153, 0.18),
        -40px 0 80px 0px rgba(255, 255, 255, 0.08),
        0 40px 80px 0px rgba(135, 206, 235, 0.13),
        0 -40px 80px 0px rgba(255, 0, 255, 0.13);
    }
    20% {
      box-shadow:
        0 0 0 0 rgba(47, 0, 71, 0.0),
        0 0 60px 0px rgba(30, 144, 255, 0.55),
        60px 0 100px 0px rgba(6, 252, 153, 0.22),
        -60px 0 100px 0px rgba(255, 255, 255, 0.13),
        0 60px 100px 0px rgba(135, 206, 235, 0.18),
        0 -60px 100px 0px rgba(255, 0, 255, 0.18);
    }
    40% {
      box-shadow:
        0 0 0 0 rgba(47, 0, 71, 0.0),
        0 0 80px 0px rgba(6, 252, 153, 0.65),
        80px 0 120px 0px rgba(255, 255, 0, 0.19),
        -80px 0 120px 0px rgba(255, 255, 255, 0.10),
        0 80px 120px 0px rgba(135, 206, 235, 0.22),
        0 -80px 120px 0px rgba(255, 0, 255, 0.22);
    }
    60% {
      box-shadow:
        0 0 0 0 rgba(47, 0, 71, 0.0),
        0 0 60px 0px rgba(30, 144, 255, 0.55),
        60px 0 100px 0px rgba(6, 252, 153, 0.18),
        -60px 0 100px 0px rgba(255, 255, 255, 0.08),
        0 60px 100px 0px rgba(135, 206, 235, 0.13),
        0 -60px 100px 0px rgba(255, 0, 255, 0.13);
    }
    80% {
      box-shadow:
        0 0 0 0 rgba(47, 0, 71, 0.0),
        0 0 40px 0px rgba(47, 0, 71, 0.45),
        40px 0 80px 0px rgba(6, 252, 153, 0.18),
        -40px 0 80px 0px rgba(255, 255, 255, 0.08),
        0 40px 80px 0px rgba(135, 206, 235, 0.13),
        0 -60px 100px 0px rgba(255, 0, 255, 0.13);
    }
    100% {
      box-shadow:
        0 0 0 0 rgba(47, 0, 71, 0.0),
        0 0 40px 0px rgba(47, 0, 71, 0.45),
        40px 0 80px 0px rgba(6, 252, 153, 0.18),
        -40px 0 80px 0px rgba(255, 255, 255, 0.08),
        0 40px 80px 0px rgba(135, 206, 235, 0.13),
        0 -40px 80px 0px rgba(255, 0, 255, 0.13);
    }
  }

  .category-tabs {
    gap: 1.5%;
    max-width: 90%;
  }

  .category-btn {
    box-shadow: 
      0 0 1rem 0.5rem rgba(200, 255, 255, calc(var(--shadow-intensity) * 0.25)),
      0 0 0.2857rem 0.2143rem rgba(170, 136, 255, var(--shadow-intensity));
    border-radius: 0;
  }

  .category-btn:hover,
  .category-btn.active {
    transform: scale(1.1);
    box-shadow: 
      0 0 1.2rem 0.7rem rgba(255, 200, 255, calc(var(--shadow-intensity) * 0.3)),
      0 0 0.5714rem 0.0714rem rgba(170, 136, 255, calc(var(--shadow-intensity) * 1.5));
    border-radius: 0;
    animation: category-glow 2s ease-in-out infinite alternate;
  }

  .modal-content {
    padding: 2%;
  }

  #subscription-status {
    font-size: clamp(0.85rem, 1.1vw, 0.95rem);
  }

  #subscribe-btn,
  #toggle-mode-btn {
    padding: 1% 2%;
    font-size: clamp(0.8rem, 1vw, 0.9rem);
  }

  .close-modal-img {
    width: clamp(16px, 2vw, 20px);
    height: clamp(16px, 2vw, 20px);
  }

  .info-btn img {
    width: clamp(20px, 2.5vw, 24px);
    height: clamp(20px, 2.5vw, 24px);
  }

  .button-group {
    gap: 0.8rem;
  }

  #privacy-policy-btn {
    font-size: clamp(0.8rem, 1.5vw, 0.9rem);
  }

  #privacy-policy-content {
    font-size: clamp(0.8rem, 1.5vw, 0.9rem);
  }

  .auth-mode {
    gap: 0.8rem;
  }

  .auth-mode label {
    font-size: clamp(0.8rem, 1.5vw, 0.9rem);
  }

  #subscription-modal h2 {
    font-size: clamp(0.8rem, 1.5vw, 0.9rem);
  }

  #info-btn {
    top: 1%;
    right: 1%;
  }

  #artist-btn {
    bottom: 15px;
    right: 15px;
  }

  .info-modal-content {
    max-width: 85%;
    padding: 20px;
  }
}

/* 768x1024 (Portrait, Tablet) */
@media (min-width: 767px) and (max-width: 780px) and (min-height: 1000px) and (max-height: 1050px) and (orientation: portrait) {
  :root {
    --base-font-size: 14px;
    --header-max-width: 720px;
    --deck-card-width: 50%;
    --deck-card-max-width: 320px;
    --deck-card-min-width: 180px;
    --category-btn-width: 110px;
    --category-btn-height: 44px;
    --modal-max-width: 360px;
    --deck-area-max-width: 640px;
    --header-top: 5%;
    --category-tabs-bottom: 5vh;
    --deck-card-border-radius: 1.08rem; /* Increased by 20% */
    --shadow-intensity: 0.5;
    --category-header-font-size: 1.2rem;
    --category-header-top: 12%;
  }

  body {
    background-size: cover;
    background-position: center;
    overflow: auto;
    position: static;
  }

  header {
    padding: 0 5%;
  }

  h1 {
    font-size: clamp(1.1rem, 2.5vw, 1.6rem);
    letter-spacing: 0.08em;
    text-shadow: 0 0 0.8vw rgba(0, 255, 255, 0.7), 0 0 1.5vw rgba(255, 0, 255, 0.4);
  }

  #category-header {
    font-size: clamp(0.9rem, var(--category-header-font-size), 1.5rem);
  }

  .atlas-main {
    max-width: 92%;
    padding: 3%;
  }

  .deck-content {
    max-width: 92%;
    min-height: calc(100vh - 12vh);
  }

  .deck-section {
    max-width: 92%;
    min-height: 50vh;
    padding-top: 5%;
  }

  .deck-container {
    width: 95%;
  }

  #deck-area {
    width: 85%;
    min-height: 45vh;
    aspect-ratio: 4 / 5;
  }

  .deck-card {
    border-radius: var(--deck-card-border-radius);
    padding: 0;
  }

  .deck-image {
    border-radius: var(--deck-card-border-radius);
    object-fit: cover;
  }

  .deck-card.rocking {
    animation: organ-shuffle-rays 3s ease-in-out infinite;
    z-index: 30;
    transform-origin: 50% 50%;
    will-change: box-shadow;
    display: block;
    opacity: 1;
    visibility: visible;
    border-radius: var(--deck-card-border-radius);
    outline: 0.1rem solid rgba(0, 255, 200, calc(var(--shadow-intensity) * 0.5));
    outline-offset: 0.1rem;
  }

  @keyframes organ-shuffle-rays {
    0% {
      box-shadow:
        0 0 0 0 rgba(47, 0, 71, 0.0), /* Fulfillment deep purple */
        0 0 40px 0px rgba(47, 0, 71, 0.45),
        40px 0 80px 0px rgba(6, 252, 153, 0.18), /* Mood green */
        -40px 0 80px 0px rgba(255, 255, 255, 0.08),
        0 40px 80px 0px rgba(135, 206, 235, 0.13), /* Fulfillment blue */
        0 -40px 80px 0px rgba(255, 0, 255, 0.13); /* Lucidity magenta */
    }
    20% {
      box-shadow:
        0 0 0 0 rgba(47, 0, 71, 0.0),
        0 0 60px 0px rgba(30, 144, 255, 0.55), /* Fulfillment blue */
        60px 0 100px 0px rgba(6, 252, 153, 0.22),
        -60px 0 100px 0px rgba(255, 255, 255, 0.13),
        0 60px 100px 0px rgba(135, 206, 235, 0.18),
        0 -60px 100px 0px rgba(255, 0, 255, 0.18);
    }
    40% {
      box-shadow:
        0 0 0 0 rgba(47, 0, 71, 0.0),
        0 0 80px 0px rgba(6, 252, 153, 0.65),
        80px 0 120px 0px rgba(255, 255, 0, 0.19), /* Mood yellow */
        -80px 0 120px 0px rgba(255, 255, 255, 0.10),
        0 80px 120px 0px rgba(135, 206, 235, 0.22),
        0 -80px 120px 0px rgba(255, 0, 255, 0.22);
    }
    60% {
      box-shadow:
        0 0 0 0 rgba(47, 0, 71, 0.0),
        0 0 60px 0px rgba(30, 144, 255, 0.55),
        60px 0 100px 0px rgba(6, 252, 153, 0.18),
        -60px 0 100px 0px rgba(255, 255, 255, 0.08),
        0 60px 100px 0px rgba(135, 206, 235, 0.13),
        0 -60px 100px 0px rgba(255, 0, 255, 0.13);
    }
    80% {
      box-shadow:
        0 0 0 0 rgba(47, 0, 71, 0.0),
        0 0 40px 0px rgba(47, 0, 71, 0.45),
        40px 0 80px 0px rgba(6, 252, 153, 0.18),
        -40px 0 80px 0px rgba(255, 255, 255, 0.08),
        0 40px 80px 0px rgba(135, 206, 235, 0.13),
        0 -60px 100px 0px rgba(255, 0, 255, 0.13);
    }
    100% {
      box-shadow:
        0 0 0 0 rgba(47, 0, 71, 0.0),
        0 0 40px 0px rgba(47, 0, 71, 0.45),
        40px 0 80px 0px rgba(6, 252, 153, 0.18),
        -40px 0 80px 0px rgba(255, 255, 255, 0.08),
        0 40px 80px 0px rgba(135, 206, 235, 0.13),
        0 -40px 80px 0px rgba(255, 0, 255, 0.13);
    }
  }

  .category-tabs {
    gap: 2.5%;
    max-width: 90%;
  }

  .category-btn {
    box-shadow: 
      0 0 1rem 0.5rem rgba(200, 255, 255, calc(var(--shadow-intensity) * 0.25)),
      0 0 0.2857rem 0.2143rem rgba(170, 136, 255, var(--shadow-intensity));
    border-radius: 0;
  }

  .category-btn:hover,
  .category-btn.active {
    transform: scale(1.1);
    box-shadow: 
      0 0 1.2rem 0.7rem rgba(255, 200, 255, calc(var(--shadow-intensity) * 0.3)),
      0 0 0.5714rem 0.0714rem rgba(170, 136, 255, calc(var(--shadow-intensity) * 1.6));
    border-radius: 0;
    animation: category-glow 2s ease-in-out infinite alternate;
  }

  .modal-content {
    padding: 3%;
  }

  #subscription-status {
    font-size: clamp(0.85rem, 1.1vw, 0.95rem);
  }

  #subscribe-btn,
  #toggle-mode-btn {
    padding: 1.5% 2.5%;
    font-size: clamp(0.75rem, 1vw, 0.85rem);
  }

  .close-modal-img {
    width: clamp(16px, 2vw, 20px);
    height: clamp(16px, 2vw, 20px);
  }

  .info-btn img {
    width: clamp(20px, 2.5vw, 24px);
    height: clamp(20px, 2.5vw, 24px);
  }

  .button-group {
    gap: 0.8rem;
  }

  #privacy-policy-btn {
    font-size: clamp(0.8rem, 1.5vw, 0.9rem);
  }

  #privacy-policy-content {
    font-size: clamp(0.8rem, 1.5vw, 0.9rem);
  }

  .auth-mode {
    gap: 0.8rem;
  }

  .auth-mode label {
    font-size: clamp(0.8rem, 1.5vw, 0.9rem);
  }

  #subscription-modal h2 {
    font-size: clamp(0.8rem, 1.5vw, 0.9rem);
  }

  #info-btn {
    top: 1%;
    right: 1%;
  }

  #artist-btn {
    bottom: 15px;
    right: 15px;
  }

  .info-modal-content {
    max-width: 80%;
    padding: 20px;
  }
}

  .info-modal-content .close-btn {
    top: 5px;
    right: 5px;
    padding: 8px;
  }

  .info-modal-content .close-btn img {
    width: 16px;
    height: 16px;
  }
}