@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Splash screen styles */
#splash {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background: linear-gradient(135deg, #000000 0%, #1a1a1a 100%);
  color: #00ff00;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  user-select: none;
  z-index: 9999;
  opacity: 0;
  transform: translateY(20px);
  animation: splashEnter 1.5s ease-out forwards;
  transition: opacity 1s ease-out, transform 1s ease-out;
}

#splash pre {
  font-size: clamp(8px, 1.5vw, 16px);
  text-align: center;
  text-shadow: 0 0 10px #00ff00;
  animation: glow 2s ease-in-out infinite alternate;
  margin-bottom: 20px;
  opacity: 0;
  animation: asciiAppear 2s ease-out 0.5s forwards;
}

@keyframes glow {
  from { text-shadow: 0 0 10px #00ff00; }
  to { text-shadow: 0 0 20px #00ff00, 0 0 30px #00ff00; }
}

#splash.fade-out {
  opacity: 0;
  transform: translateY(-20px);
  animation: none;
}

@keyframes splashEnter {
  0% {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  50% {
    opacity: 0.7;
    transform: translateY(10px) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes asciiAppear {
  0% {
    opacity: 0;
    transform: translateY(10px);
    filter: blur(2px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

/* Start button */
#startBtn {
  margin-top: 30px;
  padding: 15px 30px;
  font-size: clamp(12px, 1.5vw, 16px);
  font-family: 'Press Start 2P', cursive;
  background: transparent;
  color: #00ff00;
  border: 2px solid #00ff00;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-shadow: 0 0 10px #00ff00;
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: translateY(10px);
  animation: buttonAppear 1s ease-out 1.5s forwards;
}

#startBtn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 255, 0, 0.2), transparent);
  transition: left 0.5s;
}

#startBtn:hover::before {
  left: 100%;
}

#startBtn:hover {
  background: #00ff00;
  color: black;
  text-shadow: none;
  box-shadow: 0 0 20px #00ff00;
  transform: translateY(-2px);
}

@keyframes buttonAppear {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Main body styles */
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden; 
  position: relative;  
  color: white;
  background: radial-gradient(ellipse at center, #1a1a1a 0%, #000000 100%);
  filter: grayscale(100%);
  font-family: 'Press Start 2P', cursive;
}

/* Background grid pattern */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
  pointer-events: none;
  z-index: 1;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#main {
  position: relative;
  z-index: 2;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(30px);
  transition: opacity 1.2s ease-out, transform 1.2s ease-out, visibility 0s linear 1.2s;
}

#main.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity 1.2s ease-out, transform 1.2s ease-out, visibility 0s linear;
}

/* Other elements smooth entrance */
.back-button, #playing {
  opacity: 0;
  visibility: hidden;
  transform: translateX(-20px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out, visibility 0s linear 0.8s;
}

.back-button.show, #playing.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out, visibility 0s linear;
}

#profile {
  text-align: center;
  margin-bottom: 60px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1.5s ease-out, transform 1.5s ease-out;
}

#profile.show {
  opacity: 1;
  transform: translateY(0);
}

#profilepic {
  width: 200px;
  height: 200px;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
  transition: all 0.3s ease;
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

#profilepic:hover {
  border-color: rgba(255, 255, 255, 0.6);
  transform: scale(1.05);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
}

#name {
  color: white;
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  margin: 30px 0 15px 0;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
  letter-spacing: 2px;
}

#text {
  color: rgba(255, 255, 255, 0.8);
  font-size: clamp(0.5rem, 1.5vw, 0.7rem);
  margin-bottom: 20px;
  background: rgba(255, 255, 255, 0.05);
  padding: 15px 25px;
  border-radius: 25px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  display: inline-block;
}

#buttons {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1.5s ease-out 0.3s, transform 1.5s ease-out 0.3s;
}

#buttons.show {
  opacity: 1;
  transform: translateY(0);
}

#buttons a {
  color: white;
  text-decoration: none;
  font-size: clamp(10px, 1.2vw, 14px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 30px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  min-width: 120px;
}

#buttons a::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.5s;
}

#buttons a:hover::before {
  left: 100%;
}

#buttons a:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.6);
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
  color: white;
}

#buttons a p {
  margin: 0;
  z-index: 1;
  position: relative;
}

/* Back to main button */
.back-button {
  position: fixed;
  top: 30px;
  left: 30px;
  z-index: 10;
}

.back-button.hide {
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
}

/* Playing indicator */
#playing {
  position: fixed;
  top: 30px;
  right: 30px;
  z-index: 10;
  font-size: clamp(0.6rem, 1.5vw, 0.8rem);
  color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.05);
  padding: 15px 25px;
  border-radius: 25px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
}

.back-button a {
  color: white;
  text-decoration: none;
  font-size: clamp(10px, 1vw, 12px);
  padding: 15px 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 10px;
}

.back-button a:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.6);
  transform: translateY(-2px);
}

/* Socials section styles */
#socials-section {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: transparent;
  z-index: 5;
  opacity: 1;
  transition: all 0.3s ease;
}

#socials-section.hidden {
  display: none;
}

.back-to-profile {
  position: fixed;
  top: 30px;
  left: 30px;
  color: white;
  background: none;
  border: none;
  font-size: clamp(0.5rem, 1vw, 0.6rem);
  font-family: 'Press Start 2P', cursive;
  padding: 15px 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  cursor: pointer;
  z-index: 10;
}

.back-to-profile:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.6);
  transform: translateY(-2px);
}

.socials-container {
  max-width: 600px;
  margin: 0 auto;
  padding: 20px;
  text-align: center;
}

.socials-header {
  margin-bottom: 40px;
}

.socials-header h1 {
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  margin-bottom: 20px;
  color: white;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
  letter-spacing: 2px;
}

.socials-header p {
  font-size: clamp(0.5rem, 1.2vw, 0.7rem);
  color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.05);
  padding: 15px 25px;
  border-radius: 25px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  display: inline-block;
}

.socials-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 25px;
  margin-bottom: 40px;
  justify-items: center;
  max-width: 550px;
  margin: 0 auto 40px auto;
}

/* Center any odd-numbered card that would be alone on its row */
.social-card:nth-child(odd):last-child {
  grid-column: 1 / -1;
  justify-self: center;
}

.social-card {
  width: 250px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 15px;
  padding: 30px 25px;
  text-decoration: none;
  color: white;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: block;
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.social-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.5s;
}

.social-card:hover::before {
  left: 100%;
}

.social-card:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.6);
  transform: translateY(-5px);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.4);
}

.social-icon {
  width: 70px;
  height: 70px;
  margin: 0 auto 20px auto;
  display: block;
  transition: all 0.3s ease;
}

.social-card:hover .social-icon {
  transform: scale(1.1);
}

.social-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: brightness(0) invert(1);
  transition: all 0.3s ease;
}

.social-card:hover .social-icon img {
  filter: brightness(0) invert(0);
  transform: rotate(5deg);
}

.social-name {
  font-size: clamp(0.6rem, 1.4vw, 0.8rem);
  margin-bottom: 15px;
  color: inherit;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
  position: relative;
  z-index: 1;
}

.social-username {
  font-size: clamp(0.4rem, 0.9vw, 0.55rem);
  color: inherit;
  opacity: 0.8;
  position: relative;
  z-index: 1;
}

/* Transition animations - Optimized for smoothness */
.slide-out-left {
  animation: slideOutLeft 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  will-change: transform, opacity;
}

.slide-in-left {
  animation: slideInLeft 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  will-change: transform, opacity;
}

.slide-out-right {
  animation: slideOutRight 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  will-change: transform, opacity;
}

.slide-in-right {
  animation: slideInRight 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  will-change: transform, opacity;
}

@keyframes slideOutLeft {
  to {
    transform: translate3d(-100%, 0, 0);
    opacity: 0;
  }
}

@keyframes slideInLeft {
  from {
    transform: translate3d(-100%, 0, 0);
    opacity: 0;
  }
  to {
    transform: translate3d(0, 0, 0);
    opacity: 1;
  }
}

@keyframes slideOutRight {
  to {
    transform: translate3d(100%, 0, 0);
    opacity: 0;
  }
}

@keyframes slideInRight {
  from {
    transform: translate3d(100%, 0, 0);
    opacity: 0;
  }
  to {
    transform: translate3d(0, 0, 0);
    opacity: 1;
  }
}

/* Update buttons to work as buttons instead of links */
#buttons button {
  background: none;
  border: none;
  color: inherit;
  font-family: inherit;
  cursor: pointer;
  padding: 0;
  width: 100%;
  height: 100%;
  text-align: center;
}

#buttons button p {
  margin: 0;
  pointer-events: none;
}

/* Ensure button container has proper styling */
#buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 40px;
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

#buttons.show {
  opacity: 1;
  transform: translateY(0);
}

#buttons button {
  font-family: 'Press Start 2P', cursive;
  font-size: clamp(0.6rem, 1.4vw, 0.8rem);
  color: white;
  text-decoration: none;
  padding: 20px 30px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(15px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  min-width: 120px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

#buttons button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.5s;
}

#buttons button:hover::before {
  left: 100%;
}

#buttons button:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.6);
  transform: translateY(-3px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

/* Responsive design */
@media (max-width: 768px) {
  #profile {
    margin-bottom: 40px;
  }
  
  #profilepic {
    width: 150px;
    height: 150px;
  }
  
  #buttons {
    gap: 15px;
    padding: 0 20px;
  }
  
  #buttons a {
    padding: 15px 20px;
    min-width: 100px;
  }
  
  .back-button {
    top: 20px;
    left: 20px;
  }
  
  .back-to-profile {
    top: 20px;
    left: 20px;
  }
  
  .socials-container {
    margin: 30px auto;
    padding: 15px;
  }
  
  .socials-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .social-card {
    padding: 25px 20px;
  }
  
  .social-icon {
    width: 60px;
    height: 60px;
  }
}
