/* === Base Styles === */
body {
  margin: 0;
  padding: 0;
  font-family: 'Courier New', monospace;
  height: 100vh;
  
   justify-content: center; /* Horizontal center */
  align-items: center; /* Vertical center */
  overflow: hidden;
  cursor: url('https://thebullofphalaris.neocities.org/candle.png'),  auto;



    background-image: url(back.jpg);
    background-repeat: no-repeat;
    background-position: center;
    background-attachment: fixed;
    background-size: cover;


}





/* === Text Area (3/4 screen) === */
.text-container {
  height: 90vh;
  background: rgba(0, 0, 0, 0.6);
  color: #ffcc99;
  padding: 20px;
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
  
  background: #00000080; /* 50% opacity black */
  padding: 20px;
  border: 0.3px solid #5a3d2b; /* Bronze border */

}

.ancient-text {
  font-size: 1.2rem;
  line-height: 0.3;
  filter: brightness(0);
  
  
  /* Horizontal centering */
  text-align: center;
  
  /* Vertical centering container */
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center; /* Center-aligns text within its box */
  
  min-height: 100%; /* Fill available space */
  
  /* Remove default margins */
  margin: 0 auto;
  padding: 20px;
  

 
  transition: filter 0.2s ease;
  mask-image: radial-gradient(
    circle at var(--mouse-x) var(--mouse-y),
    rgba(0,0,0,0.9) 0%,
    rgba(0,0,0,0) 150px
  );
  
  -webkit-mask-image: radial-gradient(
    circle at var(--mouse-x) var(--mouse-y),
    rgba(0,0,0,0.9) 0%,
    rgba(0,0,0,0) 130px
  );
}




.download-btn {
  display: block;
  width: 60%;
  max-width: 300px;
  margin: 0 auto 15px; /* Centers button + adds space below */
  padding: 20px;
  background: #00000044; /* Your chosen transparency */
  color: #ff6600;
  border: 1px solid #5a3d2b;
  text-align: center;
  text-decoration: none;
  font-family: 'Courier New', monospace;
  transition: all 0.3s;
}

.download-btn:hover {
  background: #00000066; /* Darker on hover */
  border-color: #ff6600;
}
/* === Social Links === */
.social-links {
  margin-top: 25px;
  position: center;
  color: #d4a373;
}

.social-links a {
  color: #d4a373;
  text-decoration: none;
}

.social-links a:hover {
  text-decoration: underline;
}

/* === NEW SOCIAL LINKS CENTERING === */
.player-container .social-links {
  text-align: center;
  padding: 15px 0;
  margin: 0 auto;
  width: 100%;
}

.player-container .social-links a {
  margin: 0 10px;
}

.social-links a {
  transition: all 0.3s ease;
}
.social-links a:hover {
  color: #ff944d; /* Brighter orange */
  text-shadow: 0 0 8px #ff6600; /* Glow effect */
}

.download-btn {
  display: block; /* Change from inline-block to block */
  width: fit-content; /* Shrinks to content width */
  margin: 0 auto 10px; /* Centering magic */
  padding: 6px 22px;
  background: #00000044;
  color: #ff6600;
  border: 1px solid #5a3d2b;
  font-size: 14px;
  text-align: center; /* Ensures text stays centered */
  text-decoration: none;
  transition: all 0.3s;
  box-shadow: 0 0 0 transparent;
}

.download-btn {
  background: linear-gradient(135deg, #5a3d2b 0%, #3e2a1a 100%);
  color: #ff944d;
  border: 1px solid #ff6600;
  text-shadow: 0 1px 2px #000;
  box-shadow: 
    inset 0 2px 4px #ffffff10, /* Inner highlight */
    0 2px 5px #00000080; /* Outer shadow */
}

/* Add this at the bottom of your CSS */
body::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  box-shadow: inset 0 0 200px 30px #000000aa; /* Soft bronze-appropriate vignette */
  z-index: 9999;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at center, transparent 60%, #000000cc 80%);
  pointer-events: none;
  z-index: 9998;
}

/* === Dynamic Text Glow === */
.handwritten-note p {
  transition: 
    color 0.3s ease,
    text-shadow 0.3s ease;
}

body:hover .handwritten-note p {
  color: transparent; /* Hide default text */
  text-shadow: 
    0 0 5px #ff6600, /* Inner orange glow */
    0 0 15px #ff944d, /* Middle warm light */
    0 0 3px #000; /* Outer shadow for depth */
}



.text-container:hover p {
  color: #ff944d; /* Orange text */
  text-shadow: 
    0 0 5px #ff6600,
    0 0 15px #ff660055;
}

/* 4. Restrict glow to cursor area */
.text-container {
  mask: radial-gradient(
    ellipse at var(--mouse-x) var(--mouse-y),
    transparent 0%,
    black var(--glow-size)
  );
  -webkit-mask: radial-gradient(
    ellipse at var(--mouse-x) var(--mouse-y),
    transparent 0%,
    black var(--glow-size)
  );
}



/* === DARK FLICKER + BRIGHT TEXT (Add last) === */
.text-container p {
  transition: color 0.2s ease;
  will-change: color; /* Optional: Smoother animation */
}

.text-container:hover p {
  color: #ffcc99 !important; /* Bright text */
  mix-blend-mode: lighten; /* Lets text shine through dark glow */
}

/* Preserve your existing dark mask */
.text-container {
  mask: radial-gradient(
    circle at var(--mouse-x) var(--mouse-y),
    transparent 0%,
    #000 var(--glow-size)
  );
}

.text-container p {
  will-change: color; /* Optimizes animation */
}

.text-container:hover p {
  color: #ffcc99 !important;
}


/* Optional: Add pulse animation for emphasis */
@keyframes text-pulse {
  0%, 100% { opacity: 0.95; }
  50% { opacity: 1; }
}
.text-container:hover p {
  animation: text-pulse 1.5s ease infinite;
}

.text-container {
  mask: 
    radial-gradient(
      ellipse var(--glow-width) var(--glow-height) at var(--mouse-x) var(--mouse-y),
      transparent 0%,
      black 100%
    );
  -webkit-mask:
    radial-gradient(
      ellipse var(--glow-width) var(--glow-height) at var(--mouse-x) var(--mouse-y),
      transparent 0%,
      black 100%
    );
}

.social-links a {
  position: relative;
}

.social-links a::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 0;
  height: 1px;
  background: #ff6600;
  transition: width 0.3s;
}

.social-links a:hover::after {
  width: 100%;
  box-shadow: 0 0 5px #ff6600;
}

.player-container {
  position: relative;
}

.player-container::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 20%;
  width: 60%;
  height: 5px;
  background: #ff6600;
  filter: blur(10px);
  opacity: 0;
  transition: opacity 0.3s;
}

.player-container:hover::after {
  opacity: 0.7;
}

/* === Mobile/Touch Devices === */
@media (hover: none) and (max-width: 1024px) {
  /* Disable hover effects */
  body {
    cursor: default !important;
    --glow-size: 200px !important; /* Larger glow area for touch */
  }
  
  /* Stack elements vertically */
  .text-container, .player-container {
    width: 95% !important;
    margin: 10px auto !important;
  }
  
  /* Adjust text sizing */
  .ancient-text p {
    font-size: 1.2rem !important;
    line-height: 1.5 !important;
  }
  
  /* Touch-friendly buttons */
  .download-btn, .social-links a {
    padding: 12px 24px !important;
    font-size: 1.1rem !important;
    margin: 8px 4px !important;
    display: inline-block;
  }
  
  /* Replace hover with touch activation */
  .text-container {
    mask: none !important;
    -webkit-mask: none !important;
  }
  
  .ancient-text p {
    color: #ffcc99 !important; /* Always visible */
    opacity: 0.9;
    transition: opacity 0.3s;
  }
  
  .ancient-text p:active {
    opacity: 1;
    text-shadow: 0 0 10px #ff6600 !important;
  }
}

/* === Mobile Adaptations === */
@media (max-width: 768px) {
  .text-container {
    transform: scale(0.8); /* Shrink text container */
    transform-origin: top center;
    padding-bottom: 100px; /* Allow scrolling */
    overflow-y: auto; /* Enable vertical scroll */
    height: 90vh; /* Limit height */
  }

  .player-container {
    position: relative; /* Move player below text */
    margin-top: 50px;
  }
}

/* Default desktop (no scroll) */
.text-container {
  height: auto;
  overflow-y: hidden;
}

/* Mobile/tablet scroll */
@media (hover: none) and (max-width: 1024px) {
  .text-container {
    height: 90vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch; /* Smooth iOS scrolling */
  }
  
  .player-container {
    margin-top: 30px !important;
  }
}
