/* Base styling for the body */
body {
  font-family: 'Press Start 2P', cursive;
  text-align: center;
  background: #0d0c1b;
  margin: 0;
  padding: 20px;
  overflow-x: hidden;
  box-sizing: border-box;
  width: 100%;
  max-width: 100vw;
  position: relative;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: none;
  touch-action: pan-y;
}

/* Removed smooth scrolling properties that were causing resistance */

/* Removed aggressive performance optimizations that were causing scroll resistance */

/* Ensure no horizontal overflow on mobile */
@media (max-width: 768px) {
  body {
    padding: 10px;
    overflow-x: hidden;
  }
  
  .atari-container {
    position: relative;
    padding-top: 50px; /* Add top padding to make room for spreads-link button */
  }
}

/* Mechanical digital control center container */
.atari-container {
  background: rgba(192, 192, 192, 0.1);
  border: 2px solid #c0c0c0;
  border-radius: 0;
  box-shadow: 
    0 0 15px rgba(192, 192, 192, 0.2),
    inset 0 0 15px rgba(192, 192, 192, 0.05),
    0 0 0 1px rgba(192, 192, 192, 0.1);
  padding: 25px;
  margin: 20px auto;
  max-width: 1200px;
  position: relative;
  backdrop-filter: blur(1px);
}

.atari-container::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: transparent;
  z-index: -1;
  border-radius: 0;
}

/* Content inside Atari container */
.atari-container > * {
  position: relative;
  z-index: 2;
}

/* Mechanical control center header */
.atari-container header h1 {
  text-shadow: 
    0 0 8px rgba(255, 255, 255, 0.6),
    0 0 16px rgba(255, 255, 255, 0.4),
    0 0 24px rgba(255, 255, 255, 0.2),
    2px 2px 4px rgba(0, 0, 0, 0.8);
  color: #f7fafc;
  font-weight: normal;
  letter-spacing: 0px;
  font-size: 18px;
  margin-bottom: 20px;
}

/* Style for the row of cards */
.cards-row {
  display: flex;
  justify-content: center; /* Centers the row of cards */
  align-items: center; /* Aligns cards in the middle vertically */
  width: 100%;
  margin-bottom: 30px;
  flex-wrap: wrap; /* Allows wrapping in smaller screens */
  gap: 20px; /* Adds space between cards */
}

/* Mechanical control center cards */
.atari-container .card {
  background: rgba(0, 0, 0, 0.7);
  border: 2px solid rgba(255, 155, 0, 0.3);
  border-radius: 10px;
  box-shadow: 
    0 0 12px rgba(255, 155, 0, 0.1),
    inset 0 0 12px rgba(255, 155, 0, 0.05),
    0 4px 8px rgba(0, 0, 0, 0.3);
  position: relative;
  z-index: 2;
  max-width: 250px;
  text-align: center;
  margin: 0 auto;
  padding: 20px;
  box-sizing: border-box;
  transition: all 0.3s ease;
  cursor: pointer;
}

/* Card hover glow effect */
.atari-container .card:hover {
  border: 2px solid rgba(255, 155, 0, 0.8);
  box-shadow: 
    0 0 25px rgba(255, 155, 0, 0.4),
    0 0 40px rgba(255, 155, 0, 0.2),
    inset 0 0 20px rgba(255, 155, 0, 0.1),
    0 8px 16px rgba(0, 0, 0, 0.4);
  transform: translateY(-5px) scale(1.02);
}

/* Card click feedback */
.atari-container .card:active {
  transform: translateY(-2px) scale(0.98);
  box-shadow: 
    0 0 15px rgba(255, 155, 0, 0.6),
    0 0 25px rgba(255, 155, 0, 0.3),
    inset 0 0 15px rgba(255, 155, 0, 0.2),
    0 4px 8px rgba(0, 0, 0, 0.5);
}

/* Card image hover effect */
.atari-container .card:hover img {
  transform: scale(1.05);
  transition: transform 0.3s ease;
}

/* Clickable card indicator - subtle pulse for unrevealed cards */
.atari-container .card:not(.revealed) {
  animation: subtlePulse 3s ease-in-out infinite;
}

@keyframes subtlePulse {
  0%, 100% {
    box-shadow: 
      0 0 12px rgba(255, 155, 0, 0.1),
      inset 0 0 12px rgba(255, 155, 0, 0.05),
      0 4px 8px rgba(0, 0, 0, 0.3);
  }
  50% {
    box-shadow: 
      0 0 18px rgba(255, 155, 0, 0.2),
      inset 0 0 18px rgba(255, 155, 0, 0.1),
      0 4px 8px rgba(0, 0, 0, 0.3);
  }
}

.card img {
  display: block; /* Makes the image a block element */
  margin: 0 auto; /* Centers the image horizontally */
  max-width: 100%; /* Ensures the image scales properly */
}

.atari-container .card h2 {
  color: rgb(150, 91, 24);
  text-shadow: none;
  font-size: 16px;
  margin: 10px 0;
  transition: text-shadow 0.3s ease;
}

.atari-container .card h3, 
.atari-container .card-name {
  color: rgb(150, 91, 24);
  text-shadow: none;
  transition: text-shadow 0.3s ease;
}

.atari-container .card .description {
  color: #ffffff;
  text-shadow: none;
  transition: text-shadow 0.3s ease;
}

/* Card text hover glow effect */
/* Individual hover glow colors for each card title - all silver for better contrast */
.atari-container #past-card:hover h2 {
  text-shadow: 0 0 6px rgba(192, 192, 192, 0.6), 0 0 10px rgba(220, 220, 220, 0.4);
  transition: text-shadow 0.3s ease;
}

.atari-container #present-card:hover h2 {
  text-shadow: 0 0 6px rgba(192, 192, 192, 0.6), 0 0 10px rgba(220, 220, 220, 0.4);
  transition: text-shadow 0.3s ease;
}

.atari-container #future-card:hover h2 {
  text-shadow: 0 0 6px rgba(192, 192, 192, 0.6), 0 0 10px rgba(220, 220, 220, 0.4);
  transition: text-shadow 0.3s ease;
}

.atari-container .card:hover h3,
.atari-container .card:hover .card-name {
  text-shadow: 0 0 6px rgba(192, 192, 192, 0.6), 0 0 10px rgba(220, 220, 220, 0.4);
  transition: text-shadow 0.3s ease;
}

.atari-container .card:hover .description {
  text-shadow: 0 0 6px rgba(255, 255, 255, 0.4);
  transition: text-shadow 0.3s ease;
}

.description {
  font-size: 16px;
  color: #ffffff;
}

/* Game-style button with enhanced depth */
.atari-container #drawButton {
  background: linear-gradient(145deg, #ff9b00, #e68a00);
  border: 3px solid #ffa600;
  border-radius: 12px;
  color: #000000;
  text-shadow: 
    0 1px 3px rgba(255, 255, 255, 0.4),
    0 0 6px rgba(255, 255, 255, 0.3),
    0 0 9px rgba(255, 255, 255, 0.2);
  box-shadow: 
    0 8px 16px rgba(0, 0, 0, 0.5),
    0 4px 8px rgba(0, 0, 0, 0.4),
    0 2px 4px rgba(0, 0, 0, 0.3),
    0 0 15px rgba(255, 155, 0, 0.3),
    inset 0 2px 4px rgba(255, 255, 255, 0.4),
    inset 0 -2px 4px rgba(0, 0, 0, 0.3),
    inset 0 0 0 1px rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
  transform: translateY(0);
  position: relative;
  overflow: hidden;
  font-family: 'Press Start 2P', cursive;
  font-size: 12px;
  padding: 8px 16px;
  margin-top: 20px;
  cursor: pointer;
}

.atari-container #drawButton::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.1), transparent);
  border-radius: 12px;
  pointer-events: none;
}

.atari-container #drawButton:hover {
  background: linear-gradient(145deg, #ffa600, #ff9b00);
  border-color: #ffb300;
  color: #000000;
  text-shadow: 
    0 1px 3px rgba(255, 255, 255, 0.5),
    0 0 6px rgba(255, 255, 255, 0.4),
    0 0 12px rgba(255, 255, 255, 0.3);
  box-shadow: 
    0 12px 24px rgba(0, 0, 0, 0.6),
    0 6px 12px rgba(0, 0, 0, 0.5),
    0 3px 6px rgba(0, 0, 0, 0.4),
    0 0 20px rgba(255, 155, 0, 0.6),
    0 0 35px rgba(255, 155, 0, 0.4),
    inset 0 3px 6px rgba(255, 255, 255, 0.5),
    inset 0 -3px 6px rgba(0, 0, 0, 0.4),
    inset 0 0 0 1px rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.atari-container #drawButton:active {
  transform: translateY(2px);
  box-shadow: 
    0 4px 8px rgba(0, 0, 0, 0.5),
    0 2px 4px rgba(0, 0, 0, 0.4),
    0 1px 2px rgba(0, 0, 0, 0.3),
    0 0 10px rgba(255, 155, 0, 0.4),
    inset 0 2px 4px rgba(0, 0, 0, 0.4),
    inset 0 -2px 4px rgba(255, 255, 255, 0.2),
    inset 0 0 0 1px rgba(0, 0, 0, 0.2);
}

.atari-container #drawButton:disabled {
  background: linear-gradient(145deg, #2a2a2a, #1a1a1a);
  border-color: #4a4a4a;
  color: #666666;
  text-shadow: none;
  box-shadow: 
    0 6px 12px rgba(0, 0, 0, 0.4),
    0 3px 6px rgba(0, 0, 0, 0.3),
    0 1px 3px rgba(0, 0, 0, 0.2),
    inset 0 2px 4px rgba(0, 0, 0, 0.3),
    inset 0 -2px 4px rgba(0, 0, 0, 0.5),
    inset 0 0 0 1px rgba(0, 0, 0, 0.3);
  transform: translateY(0);
  cursor: not-allowed;
}

/* Mechanical control center footer - styles removed to prevent conflicts with button styling */

/* Individual link class styles removed to prevent conflicts with button styling */

.atari-container .page-description p {
  color: rgb(150, 91, 24);
  text-shadow: none;
}

/* Footer container styling */
.footer-container {
  background: rgba(0, 0, 0, 0.4);
  border: 2px solid rgba(255, 155, 0, 0.2);
  border-radius: 12px;
  padding: 20px;
  margin: 20px auto;
  max-width: 400px;
  box-shadow: 
    0 0 15px rgba(255, 155, 0, 0.1),
    inset 0 0 15px rgba(255, 155, 0, 0.05),
    0 4px 8px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(2px);
}

/* Footer links styling */
.footer-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
}

/* Atari-style button links */
.footer-links a {
  display: inline-block;
  padding: 6px 12px;
  border: 1px solid;
  border-radius: 4px;
  text-decoration: none;
  font-size: 7px;
  font-family: 'Press Start 2P', cursive;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
  text-align: center;
  width: 100%;
  max-width: 250px;
  box-shadow: 
    0 2px 4px rgba(0, 0, 0, 0.2),
    0 1px 2px rgba(0, 0, 0, 0.1),
    inset 0 1px 1px rgba(255, 255, 255, 0.1),
    inset 0 -1px 1px rgba(0, 0, 0, 0.1);
}

/* Bronze link styling - Love theme */
.bronze-link {
  background: linear-gradient(145deg, #D4A574, #B8860B);
  border-color: #DAA520;
  color: #F5F5F5;
  text-shadow: 
    0 1px 2px rgba(0, 0, 0, 0.6),
    0 0 4px rgba(0, 0, 0, 0.4);
}

.bronze-link:hover {
  background: linear-gradient(145deg, #E6B85C, #D4A574);
  border-color: #F4D03F;
  color: #FFFFFF;
  text-shadow: 
    0 1px 2px rgba(0, 0, 0, 0.7),
    0 0 4px rgba(0, 0, 0, 0.5);
  box-shadow: 
    0 3px 6px rgba(0, 0, 0, 0.3),
    0 1px 3px rgba(0, 0, 0, 0.2),
    0 0 10px rgba(212, 165, 116, 0.4),
    0 0 20px rgba(212, 165, 116, 0.2),
    inset 0 1px 1px rgba(255, 255, 255, 0.1),
    inset 0 -1px 1px rgba(0, 0, 0, 0.2);
  transform: translateY(-1px);
}

/* Gold link styling - Knowledge theme with special glow */
.gold-link {
  background: linear-gradient(145deg, #F4D03F, #D4AC0D);
  border-color: #F7DC6F;
  color: #F5F5F5;
  text-shadow: 
    0 1px 2px rgba(0, 0, 0, 0.6),
    0 0 4px rgba(0, 0, 0, 0.4);
  box-shadow: 
    0 2px 4px rgba(0, 0, 0, 0.2),
    0 0 10px rgba(244, 208, 63, 0.3),
    0 0 18px rgba(244, 208, 63, 0.2),
    0 0 25px rgba(244, 208, 63, 0.15);
  animation: goldGlowPulse 5s ease-in-out infinite;
  position: relative;
}

@keyframes goldGlowPulse {
  0%, 100% {
    box-shadow: 
      0 2px 4px rgba(0, 0, 0, 0.2),
      0 0 10px rgba(244, 208, 63, 0.3),
      0 0 18px rgba(244, 208, 63, 0.2),
      0 0 25px rgba(244, 208, 63, 0.15);
  }
  50% {
    box-shadow: 
      0 2px 4px rgba(0, 0, 0, 0.2),
      0 0 14px rgba(244, 208, 63, 0.4),
      0 0 22px rgba(244, 208, 63, 0.3),
      0 0 30px rgba(244, 208, 63, 0.2);
  }
}

.gold-link:hover {
  background: linear-gradient(145deg, #F7DC6F, #F4D03F);
  border-color: #F8C471;
  color: #FFFFFF;
  text-shadow: 
    0 1px 2px rgba(0, 0, 0, 0.7),
    0 0 4px rgba(0, 0, 0, 0.5),
    0 0 6px rgba(244, 208, 63, 0.4);
  box-shadow: 
    0 3px 6px rgba(0, 0, 0, 0.3),
    0 1px 3px rgba(0, 0, 0, 0.2),
    0 0 18px rgba(244, 208, 63, 0.5),
    0 0 28px rgba(244, 208, 63, 0.35),
    0 0 38px rgba(244, 208, 63, 0.25),
    inset 0 1px 1px rgba(255, 255, 255, 0.1),
    inset 0 -1px 1px rgba(0, 0, 0, 0.2);
  transform: translateY(-1px);
  animation: goldGlowPulseHover 3s ease-in-out infinite;
}

@keyframes goldGlowPulseHover {
  0%, 100% {
    box-shadow: 
      0 3px 6px rgba(0, 0, 0, 0.3),
      0 1px 3px rgba(0, 0, 0, 0.2),
      0 0 18px rgba(244, 208, 63, 0.5),
      0 0 28px rgba(244, 208, 63, 0.35),
      0 0 38px rgba(244, 208, 63, 0.25),
      inset 0 1px 1px rgba(255, 255, 255, 0.1),
      inset 0 -1px 1px rgba(0, 0, 0, 0.2);
  }
  50% {
    box-shadow: 
      0 3px 6px rgba(0, 0, 0, 0.3),
      0 1px 3px rgba(0, 0, 0, 0.2),
      0 0 24px rgba(244, 208, 63, 0.6),
      0 0 34px rgba(244, 208, 63, 0.45),
      0 0 44px rgba(244, 208, 63, 0.3),
      inset 0 1px 1px rgba(255, 255, 255, 0.1),
      inset 0 -1px 1px rgba(0, 0, 0, 0.2);
  }
}

/* Copper link styling - Oracle theme */
.copper-link {
  background: linear-gradient(145deg, #CD7F32, #A0522D);
  border-color: #D2691E;
  color: #F5F5F5;
  text-shadow: 
    0 1px 2px rgba(0, 0, 0, 0.6),
    0 0 4px rgba(0, 0, 0, 0.4);
}

.copper-link:hover {
  background: linear-gradient(145deg, #D2691E, #CD7F32);
  border-color: #E67E22;
  color: #FFFFFF;
  text-shadow: 
    0 1px 2px rgba(0, 0, 0, 0.7),
    0 0 4px rgba(0, 0, 0, 0.5);
  box-shadow: 
    0 3px 6px rgba(0, 0, 0, 0.3),
    0 1px 3px rgba(0, 0, 0, 0.2),
    0 0 10px rgba(205, 127, 50, 0.4),
    0 0 20px rgba(205, 127, 50, 0.2),
    inset 0 1px 1px rgba(255, 255, 255, 0.1),
    inset 0 -1px 1px rgba(0, 0, 0, 0.2);
  transform: translateY(-1px);
}

/* Active state for all links */
.footer-links a:active {
  transform: translateY(1px);
  box-shadow: 
    0 1px 2px rgba(0, 0, 0, 0.3),
    0 1px 1px rgba(0, 0, 0, 0.2),
    inset 0 1px 1px rgba(0, 0, 0, 0.2),
    inset 0 -1px 1px rgba(255, 255, 255, 0.1);
}

/* Page description styling */
.page-description {
  margin-top: 20px;
  padding: 0 20px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.page-description p {
  font-size: 10px;
  color: rgb(150, 91, 24);
  line-height: 1.4;
  text-align: center;
  margin: 0;
  opacity: 0.8;
  font-family: 'Press Start 2P', cursive;
}

/* Responsive Design */
@media (max-width: 768px) {
  header h1 {
    font-size: 14px; /* Reduce title size for tablets */
    margin-bottom: 15px;
    padding: 0 10px; /* Add horizontal padding */
  }

  .cards-row {
    flex-direction: column;
    align-items: center; /* Centers cards in a column layout */
  }

  .card {
    margin: 10px 0; /* Adjust margin for stacked layout */
  }

  #drawButton {
    font-size: 14px; /* Adjust button size on small screens */
    padding: 8px 16px;
  }
}

@media (max-width: 480px) {
  header h1 {
    font-size: 12px; /* Further reduce title size for small phones */
    margin-bottom: 10px;
    padding: 0 15px; /* More padding for very small screens */
    line-height: 1.2; /* Tighter line height */
  }

  .card {
    width: 100%; /* Ensure cards are full width on small screens */
  }
}

@media (max-width: 320px) {
  header h1 {
    font-size: 10px; /* Smallest size for very small screens */
    margin-bottom: 8px;
    padding: 0 20px; /* Maximum padding for tiny screens */
    line-height: 1.1; /* Very tight line height */
  }
}

/* Extra small screens - most aggressive sizing */
@media (max-width: 280px) {
  header h1 {
    font-size: 8px; /* Absolute smallest size */
    margin-bottom: 5px;
    padding: 0 15px; /* Maximum padding for tiny screens */
    line-height: 1.0; /* Tightest line height */
  }
}

/* What are Tarot Spreads link - Upper left of container */
.spreads-link {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 100;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.7);
  border: 2px solid rgba(192, 192, 192, 0.3);
  border-radius: 6px;
  padding: 0.4rem 0.6rem;
  color: #ffffff;
  font-family: 'Press Start 2P', cursive;
  font-size: 0.5rem;
  text-decoration: none;
  transition: all 0.3s ease;
  text-shadow: 0 0 6px rgba(255, 255, 255, 0.4);
  -webkit-tap-highlight-color: transparent;
  margin: 0;
  line-height: 1;
}

.spreads-link:hover {
  background: rgba(0, 0, 0, 0.9);
  border-color: rgba(192, 192, 192, 0.8);
  text-shadow: 
    0 0 8px rgba(255, 255, 255, 0.8),
    0 0 12px rgba(255, 255, 255, 0.6);
  transform: scale(1.05);
}

/* Mobile styles for spreads link */
@media (max-width: 768px) {
  .atari-container {
    position: relative !important;
    padding-top: 50px !important; /* Make room for button */
  }
  
  .spreads-link {
    position: absolute !important;
    top: 0.3rem !important;
    left: 0.3rem !important;
    right: auto !important;
    bottom: auto !important;
    font-size: 0.35rem !important;
    padding: 0.3rem 0.5rem !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(0, 0, 0, 0.7) !important;
    border: 2px solid rgba(192, 192, 192, 0.3) !important;
    border-radius: 6px !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    z-index: 100 !important;
    margin: 0 !important;
    float: none !important;
    clear: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    line-height: 1 !important;
    width: auto !important;
    height: auto !important;
  }
  
  /* Ensure header doesn't push button down */
  .atari-container header {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }
}

/* Home Button Styles */
.home-button {
  position: fixed;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 6px;
  padding: 0.35rem;
  transition: all 0.3s ease;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  box-shadow: none;
  gap: 0.25rem;
  opacity: 0.7;
}

.home-button:hover {
  background: transparent;
  transform: scale(1.05);
  box-shadow: none;
  opacity: 1;
}

.home-crystal {
  width: 48px;
  height: 48px;
  object-fit: contain;
  transition: all 0.3s ease;
  opacity: 0.7;
}

.home-button:hover .home-crystal {
  transform: scale(1.1);
  filter: brightness(1.2);
  opacity: 1;
}

.home-tooltip {
  position: absolute;
  bottom: 100%;
  right: 0;
  margin-bottom: 0.5rem;
  padding: 0.25rem 0.4rem;
  background: rgba(0, 0, 0, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  color: #ffffff;
  font-family: 'Press Start 2P', cursive;
  font-size: 0.3rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.home-button:hover .home-tooltip {
  opacity: 1;
}

.home-url {
  font-family: 'Press Start 2P', cursive;
  font-size: 0.28rem;
  color: #ffffff;
  text-shadow: 
    0 0 3px rgba(255, 255, 255, 0.8),
    0 0 6px rgba(255, 255, 255, 0.6);
  letter-spacing: 0.5px;
  text-decoration: none;
  transition: all 0.3s ease;
  opacity: 0.7;
}

.home-button:hover .home-url {
  color: #ffffff;
  text-shadow: 
    0 0 5px rgba(255, 255, 255, 1),
    0 0 10px rgba(255, 255, 255, 0.8);
  opacity: 1;
}

/* Mobile styles for home button */
@media (max-width: 768px) {
  .home-button {
    top: 0.1rem;
    right: 0.1rem;
    padding: 0.15rem;
    gap: 0.1rem;
  }
  
  .home-crystal {
    width: 24px;
    height: 24px;
  }
  
  .home-tooltip {
    font-size: 0.2rem;
    padding: 0.15rem 0.25rem;
    margin-bottom: 0.15rem;
  }
  
  .home-url {
    font-size: 0.18rem;
  }
}

