/* Base Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html, body { height: 100%; width: 100%; }
body {
  font-family: 'Arial', sans-serif;
  background-color: #2c3e50; /* Fallback color while image loads */
  background-image: url('../../images/datpt-tayho.jpeg');
  background-size: cover;
  background-position: right top -20px;
  background-repeat: no-repeat;
  background-attachment: scroll; /* Changed from fixed to scroll for stability */
  display: flex;
  justify-content: center;
  align-items: center;
  color: #fff;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
  overflow: hidden; /* for rain */
}
body::after {
  content: '';
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: -1;
}
/* Rain Layer */
.rain-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 5;
}
.drop {
  position: absolute;
  bottom: 100%;
  width: 1px; /* thinner for light rain */
  height: 14px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.55), rgba(255,255,255,0));
  filter: blur(0.4px);
  animation: fall linear forwards;
  opacity: 0.55;
}
@keyframes fall {
  0% { transform: translate3d(var(--x,0), -5vh, 0); opacity: 0; }
  5% { opacity: 1; }
  95% { opacity: 1; }
  100% { transform: translate3d(var(--x,0), 105vh, 0); opacity: 0; }
}
/* Splash effect (optional small circle) */
.splash {
  position: absolute;
  bottom: 0;
  width: 8px; height: 2px;
  background: radial-gradient(circle, rgba(255,255,255,0.6) 0%, rgba(255,255,255,0) 70%);
  transform: scale(0.2);
  animation: splash 0.6s ease-out forwards;
  opacity: 0.5;
  pointer-events: none;
}
@keyframes splash {
  to { transform: scale(1); opacity: 0; }
}
/* Content */
.container { 
  text-align: center; 
  padding: 2rem; 
  max-width: 800px; 
  width: 90%; 
  position: relative; 
  z-index: 10;
  opacity: 0;
  transform: translateY(50px);
  animation: fadeInUp 1s ease-out 0.2s forwards;
}

.profile-img { 
  width:150px; 
  height:150px; 
  border-radius:50%; 
  object-fit:cover; 
  border:4px solid #fff; 
  margin-bottom:1.5rem; 
  box-shadow:0 4px 8px rgba(0,0,0,0.3);
  opacity: 0;
  transform: scale(0.5);
  animation: scaleIn 1.2s ease-out 0.5s forwards;
  transition: transform 0.3s ease;
}

.profile-img:hover {
  transform: scale(1.05);
}

h1 { 
  font-size:2.5rem; 
  margin-bottom:0.5rem;
  opacity: 0;
  transform: translateX(-100px);
  animation: slideInLeft 1s ease-out 0.7s forwards;
  transition: color 0.3s ease;
}

h1:hover {
  color: #f0f0f0;
  text-shadow: 2px 2px 8px rgba(0,0,0,0.9);
}

h2 { 
  font-size:1.5rem; 
  margin-bottom:2rem; 
  font-weight:400;
  opacity: 0;
  transform: translateX(100px);
  animation: slideInRight 1s ease-out 0.9s forwards;
}

p { 
  font-size:1.1rem; 
  line-height:1.6; 
  margin-bottom:2rem;
  opacity: 0;
  animation: fadeIn 1.2s ease-out 1.1s forwards;
  transition: transform 0.3s ease;
}

p:hover {
  transform: translateY(-2px);
}

.buttons { 
  display:flex; 
  justify-content:center; 
  flex-wrap:wrap; 
  gap:1rem;
  opacity: 0;
  transform: translateY(30px);
  animation: slideInUp 1s ease-out 1.3s forwards;
}

.btn { 
  display:inline-block; 
  padding:0.8rem 1.5rem; 
  background:rgba(255,255,255,0.2); 
  color:#fff; 
  text-decoration:none; 
  border-radius:30px; 
  border:2px solid #fff; 
  font-weight:bold; 
  transition:all .3s ease; 
  min-width:150px; 
  position:relative; 
  overflow:hidden;
  opacity: 0;
  transform: translateY(20px) scale(0.8);
  animation: buttonPop 0.6s ease-out forwards;
}

.btn:nth-child(1) { animation-delay: 1.5s; }
.btn:nth-child(2) { animation-delay: 1.7s; }
.btn:nth-child(3) { animation-delay: 1.9s; }

.btn:hover { 
  background:rgba(255,255,255,0.4); 
  transform:translateY(-3px) scale(1.05);
  box-shadow: 0 8px 16px rgba(0,0,0,0.3);
}

/* Animation Keyframes */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.5);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-100px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(100px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes buttonPop {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.8);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Add a simple loading state */
.container > * {
  will-change: transform, opacity;
}

/* Symbol animations */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-3px); }
  20%, 40%, 60%, 80% { transform: translateX(3px); }
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.capricorn-symbol {
  display: inline-block;
  animation: bounce 5s ease-in-out infinite;
}

.isfj-symbol {
  display: inline-block;
  animation: bounce 5s ease-in-out infinite;
}

/* Responsive */
@media (max-width:600px) {
  body {
    align-items: flex-end;
    padding-bottom: 2rem;
    background-position: right top;
  }
  
  .container { 
    margin-top: 0;
    margin-bottom: 50px;
  }
  
  h1 { font-size:2rem; }
  h2 { font-size:1.2rem; }
  .profile-img { width:120px; height:120px; }
  .btn { padding:0.6rem 1rem; min-width:120px; }
}
