/* style.css */

/* Basic Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

html, body {
  width: 100%;
}

body {
  background-image:
    linear-gradient(rgba(102, 126, 234, 0.6), rgba(118, 75, 162, 0.6)),
    url('../images/Planetary-Forest-Background.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;

  min-height: 100vh;
  color: white;
  padding: 20px;

  display: flex;
  justify-content: center;
  align-items: flex-start;
}

body.modal-open {
  overflow: hidden;
}

.page {
  width: 100%;
  display: flex;
  justify-content: center;
  transition: filter 250ms ease, transform 250ms ease;
}

.page.is-blurred {
  filter: blur(10px);
  transform: scale(0.995);
}

.container {
  text-align: center;
  width: 100%;
  max-width: 400px;
  margin: 40px auto 20px;
}

.profile-img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  border: 3px solid white;
  object-fit: cover;
  margin-bottom: 15px;
}

h1 {
  font-size: 24px;
  margin-bottom: 10px;
}

p {
  font-size: 16px;
  margin-bottom: 30px;
  opacity: 0.9;
}

.main-content {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.links {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 15px;
  overflow: visible;
}

.link-btn {
  font-family: inherit;
  font-size: 16px;
  line-height: 1.2;
  font-weight: bold;

  width: 100%;
  padding: 15px 20px;
  border-radius: 30px;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  cursor: pointer;
  text-decoration: none;

  background: linear-gradient(135deg, #f6f8fa, #d9e2ec);
  color: #333;

  border: 2px solid transparent;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);

  position: relative;
  transform: scale(1);
  transform-origin: center;
  transition: all 0.3s ease;
}

.link-btn:hover {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border: 2px solid white;
  transform: scale(1.05);
  box-shadow: 0 8px 15px rgba(102, 126, 234, 0.6);
}

.link-btn:active {
  transform: scale(1.02);
}

.icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  flex-shrink: 0;
}

.left-icon {
  margin-right: 5px;
}

.right-icon {
  margin-left: 5px;
}

.extra-top-space {
  margin-top: 50px;
}

/* Modal / Overlay */
.modal-overlay {
  position: fixed;
  display: grid;
  background: rgba(0, 0, 0, 0.35);
  padding: 20px;
  z-index: 999;
  inset: 0;
  place-items: center;
}

.modal {
  width: min(720px, 100%);
  border-radius: 22px;
  padding: 22px;
  color: #f7f7fb;
  background: rgba(25, 20, 35, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.45);
}

.modal h2 {
  font-size: 20px;
  margin-bottom: 6px;
}

.modal p {
  margin-bottom: 16px;
  opacity: 0.9;
}

.modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.option-btn {
  display: grid;
  gap: 6px;
  padding: 16px 14px;
  border-radius: 16px;
  text-decoration: none;
  color: #0e0e14;
  font-weight: 800;

  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(230, 235, 255, 0.92));
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);

  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.option-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 40px rgba(102, 126, 234, 0.35);
  filter: saturate(1.05);
}

.option-btn:active {
  transform: translateY(0px) scale(0.99);
}

.option-sub {
  font-weight: 700;
  font-size: 12px;
  opacity: 0.7;
}

.modal-overlay[hidden] {
  display: none !important;
}

/* Copy URL Button Styling */
.copy-url-btn {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  background-color: #667eea;
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 22px;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(102, 126, 234, 0.6);
  transition: background-color 0.3s ease, filter 250ms ease, transform 250ms ease;
  z-index: 10;
  overflow: hidden;
  display: block;
}

.copy-url-btn:hover {
  background-color: #764ba2;
}

.copy-url-btn.is-blurred {
  filter: blur(10px);
  transform: scale(0.995);
}

.copy-url-btn .icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1);
  transition: opacity 0.4s ease, transform 0.4s ease;
  user-select: none;
  line-height: 1;
  width: 100%;
  text-align: center;
}

.clipboard-icon {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  z-index: 2;
}

.checkmark-icon {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.5);
  z-index: 1;
  color: #4CAF50;
}

.copy-url-btn.copied .clipboard-icon {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.5);
  z-index: 1;
}

.copy-url-btn.copied .checkmark-icon {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  z-index: 2;
}

/* Bouncing character */
#bouncingCharacterContainer {
  margin-top: 40px;
  margin-bottom: 0px;
  display: flex;
  justify-content: center;
  width: 100%;
  cursor: pointer;
  user-select: none;
}

#BouncingRainyPaintStyle {
  width: 44px;
  height: 44px;
  display: block;
  transform-origin: bottom center;
  will-change: transform;
}

/* Bottom stays visually anchored, only top "jiggles" vertically */
@keyframes topJiggle {
  0%   { transform: scaleY(1) translateY(0); }
  20%  { transform: scaleY(1.08) translateY(-2px); }
  40%  { transform: scaleY(0.94) translateY(0); }
  60%  { transform: scaleY(1.05) translateY(-1px); }
  80%  { transform: scaleY(0.97) translateY(0); }
  100% { transform: scaleY(1) translateY(0); }
}

.bounce {
  animation: topJiggle 0.55s ease;
}

/* Footer */
footer#footer {
  width: 100%;
  margin-top: 2px;
  padding: 10px 0 0;
  text-align: center;
  color: rgba(255, 255, 255, 0.88);
}

.footer-content {
  width: 100%;
}

.footer-content p {
  margin-bottom: 8px;
  font-size: 13px;
  opacity: 0.9;
}

.footer-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12px;
}

.footer-nav a {
  color: rgba(255, 255, 255, 0.84);
  text-decoration: none;
  transition: opacity 0.2s ease, color 0.2s ease;
}

.footer-nav a:hover {
  color: white;
  opacity: 1;
}

.footer-nav span {
  opacity: 0.6;
}

@media (max-width: 520px) {
  .modal-actions {
    grid-template-columns: 1fr;
  }

  .container {
    margin-top: 60px;
  }

  .link-btn {
    font-size: 15px;
    padding: 14px 16px;
  }
}
