/* ==================== CUSTOM STYLES ==================== */
/* Anniversary Website - Custom CSS */
/* All text content is configurable via config.json */

/* ==================== BASE STYLES ==================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: #000000;
  min-height: 100vh;
  line-height: 1.6;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
  background: #C1121F;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #FF0000;
}

/* ==================== TYPOGRAPHY ==================== */
.font-display {
  font-family: 'Playfair Display', serif;
}

.font-body {
  font-family: 'Montserrat', sans-serif;
}

/* ==================== HERO SECTION ==================== */
#hero {
  background: 
    radial-gradient(ellipse at center top, rgba(193, 18, 31, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at center bottom, rgba(193, 18, 31, 0.1) 0%, transparent 50%),
    #000000;
}

/* Hero text glow effect */
#hero h1 {
  text-shadow: 
    0 0 40px rgba(193, 18, 31, 0.3),
    0 0 80px rgba(193, 18, 31, 0.1);
}

#hero h2 {
  text-shadow: 
    0 0 30px rgba(193, 18, 31, 0.5),
    0 0 60px rgba(193, 18, 31, 0.2);
}

/* ==================== MEMORY CARDS ==================== */
.memory-card {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.memory-card.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Card image container */
.memory-card .image-container {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
}

.memory-card .image-container::before {
  content: '';
  position: absolute;
  inset: 0;
  border: 2px solid transparent;
  border-radius: 1rem;
  background: linear-gradient(135deg, #C1121F, transparent, #C1121F) border-box;
  -webkit-mask: 
    linear-gradient(#fff 0 0) padding-box, 
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  z-index: 10;
  pointer-events: none;
}

.memory-card .image-container img {
  transition: transform 0.5s ease;
}

.memory-card:hover .image-container img {
  transform: scale(1.05);
}

/* Card text content */
.memory-card .text-content {
  position: relative;
}

.memory-card .text-content::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(to bottom, #C1121F, transparent);
  border-radius: 2px;
}

/* ==================== GAME SECTION ==================== */
#gameSection {
  /* Prevent pull-to-refresh on mobile when in this section */
  overscroll-behavior: contain;
}

#gameWrapper {
  /* Disable all touch interactions that might interfere */
  touch-action: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

#gameCanvas {
  display: block;
  background: linear-gradient(to bottom, #1a1a2e 0%, #16213e 50%, #0f0f23 100%);
  /* Ensure canvas handles touch properly */
  touch-action: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

#gameOverlay {
  backdrop-filter: blur(4px);
  /* Make overlay touchable on mobile */
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}

/* Active state for touch feedback */
#gameWrapper:active,
#gameOverlay:active {
  opacity: 0.95;
}

/* ==================== ANIMATIONS ==================== */
/* Pulse animation for hearts */
@keyframes pulse-heart {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

.pulse-heart {
  animation: pulse-heart 2s ease-in-out infinite;
}

/* Glow animation */
@keyframes glow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(193, 18, 31, 0.3);
  }
  50% {
    box-shadow: 0 0 40px rgba(193, 18, 31, 0.6);
  }
}

.glow {
  animation: glow 3s ease-in-out infinite;
}

/* Float animation */
@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

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

/* Fade in up animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 1s ease-out forwards;
}

/* Stagger delays for animations */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }

/* ==================== RESPONSIVE ADJUSTMENTS ==================== */
@media (max-width: 768px) {
  .memory-card .text-content::before {
    display: none;
  }
  
  .memory-card .text-content {
    padding-left: 0;
    text-align: center;
  }
  
  /* Add top border instead for mobile */
  .memory-card .text-content::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: linear-gradient(to right, transparent, #C1121F, transparent);
    margin: 0 auto 1rem auto;
    position: absolute;
    top: -0.5rem;
    left: 50%;
    transform: translateX(-50%);
  }
  
  /* Game section mobile optimizations */
  #gameSection {
    padding-top: 2rem;
    padding-bottom: 2rem;
  }
  
  #gameWrapper {
    border-radius: 0.75rem;
    /* Larger touch target */
    min-height: 200px;
  }
  
  #gameCanvas {
    min-height: 200px;
  }
}

/* Extra small screens */
@media (max-width: 380px) {
  #gameCanvas {
    min-height: 180px;
  }
  
  #gameOverlay h3 {
    font-size: 1.25rem;
  }
}

/* Landscape mode on mobile */
@media (max-height: 500px) and (orientation: landscape) {
  #hero {
    min-height: auto;
    padding-top: 2rem;
    padding-bottom: 2rem;
  }
  
  #gameCanvas {
    max-height: 180px;
  }
}

/* ==================== SNOWFLAKE CANVAS ==================== */
#snowCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 100;
}

/* ==================== SELECTION STYLES ==================== */
::selection {
  background: rgba(193, 18, 31, 0.5);
  color: white;
}

::-moz-selection {
  background: rgba(193, 18, 31, 0.5);
  color: white;
}

/* ==================== LOADING STATE ==================== */
body.loading {
  overflow: hidden;
}

body.loading::before {
  content: '';
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 9999;
  animation: fadeOut 0.5s ease-out 0.5s forwards;
}

@keyframes fadeOut {
  to {
    opacity: 0;
    pointer-events: none;
  }
}

