
:root {
  --gif-size: 120px;
  --gif-gap: 10px;
  --gif-radius: 12px;
  --gif-z: 9999;
  --gif-trans: 0.5s cubic-bezier(0.4,0,0.2,1);
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
  color: #e0e0e0;
  overflow-x: hidden;
}

@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

main {
  margin-top: 80px;
  position: relative;
  width: 100%;
  min-height: calc(100vh - 80px);
  overflow: hidden;
}

.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(20, 20, 30, 0.95);
  color: #ddd;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 0.8rem 2rem;
  z-index: 1000;
  border-bottom: 1px solid #333;
  box-shadow: 0 0 20px rgba(165, 142, 255, 0.3);
  animation: slideDown 0.8s ease-out;
}

@keyframes slideDown {
  from { transform: translateY(-100%); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

.logo {
  font-size: 1.4rem;
  font-weight: bold;
  color: #a58eff;
  margin-bottom: 0.5rem;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: #ddd;
  text-decoration: none;
  position: relative;
  padding: 0.3rem;
  transition: color 0.3s;
}

.nav-links a::after {
  content: "";
  position: absolute;
  height: 2px;
  width: 0;
  left: 0;
  bottom: -2px;
  background: #a58eff;
  transition: width 0.3s;
}

.nav-links a:hover { color: #fff; }
.nav-links a:hover::after { width: 100%; }

.page {
  position: absolute;
  width: 100%;
  top: 80px;
  left: 100%;
  opacity: 0;
  transition: all 0.6s ease-in-out;
  min-height: calc(100vh - 80px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 1rem;
}

.page.active { left: 0; opacity: 1; }

#home.active { animation: fadeInUp 1s ease-out; }
@keyframes fadeInUp {
  from { transform: translateY(30px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

.cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  padding: 1rem;
}

.card {
  background: #2a2a38;
  border: 1px solid #444;
  border-radius: 12px;
  padding: 1.5rem;
  width: 220px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}

.card:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(165, 142, 255, 0.6);
  border-color: #a58eff;
}

.card h3 { color: #e0e0e0; }
.card p  { color: #ccc; }

.price {
  font-weight: bold;
  color: #a58eff;
  margin-top: 0.5rem;
}

#overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(10, 10, 15, 0.85);
  z-index: 2000;
  animation: fadeIn 0.3s ease-out;
}

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

#content {
  background: #23232d;
  border-radius: 12px;
  padding: 1.5rem;
  max-width: 600px;
  text-align: center;
  position: relative;
  color: #e0e0e0;
  border: 1px solid #444;
  animation: zoomIn 0.4s ease-out;
}

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

#closeBtn {
  position: absolute;
  top: 10px;
  right: 15px;
  border: none;
  background: none;
  color: #ccc;
  font-size: 1.2rem;
  cursor: pointer;
}
#closeBtn:hover { color: #fff; }

#gallery-view {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1rem;
}
#gallery-view img {
  max-width: 400px;
  max-height: 300px;
  border-radius: 8px;
  margin: 0 1rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.7);
  border: 1px solid #555;
}
#gallery-view button {
  background: #444;
  color: #e0e0e0;
  border: none;
  padding: 0.6rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1.3rem;
  transition: background-color 0.3s;
}
#gallery-view button:hover { background: #666; }

#home header {
  text-align: center;
  max-width: 800px;
  padding: 2rem;
}
#home h2 {
  font-size: clamp(1.5rem, 5vw, 3rem);
  margin-bottom: 1rem;
  color: #a58eff;
  text-shadow: 0 0 20px rgba(165,142,255,0.5);
}

#contact {
  text-align: center;
  padding: 1rem 2rem 2rem 2rem;
  scroll-margin-top: 90px;
}
#contact h2 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  margin-bottom: 1rem;
  color: #a58eff;
}
#contact p { font-size: clamp(1rem, 2.5vw, 1.2rem); margin-bottom: 1.5rem; }
#contact ul { list-style: none; padding: 0; margin: 0; }
#contact li {
  font-size: clamp(1rem, 2.5vw, 1.1rem);
  padding: 0.8rem;
  margin: 0.5rem 0;
  background: rgba(42,42,56,0.6);
  border-radius: 8px;
  border: 1px solid #444;
  display: inline-block;
  min-width: 280px;
  transition: transform 0.3s, box-shadow 0.3s;
}
#contact li:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 15px rgba(165,142,255,0.4);
}
#contact a { color: #a58eff; text-decoration: none; transition: color 0.3s; }
#contact a:hover { color: #c5a8ff; }


#corner-gif-wrapper {
  position: fixed;
  width: var(--gif-size);
  height: var(--gif-size);
  z-index: var(--gif-z);
  pointer-events: none;
  transition: top var(--gif-trans), left var(--gif-trans), right var(--gif-trans), bottom var(--gif-trans);
}
#corner-gif-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: var(--gif-radius);
}
body.home-gif #corner-gif-wrapper { top: var(--gif-gap); left: var(--gif-gap); right: auto; bottom: auto; }
body.commissions-gif #corner-gif-wrapper { top: var(--gif-gap); right: var(--gif-gap); left: auto; bottom: auto; }
body.gallery-gif #corner-gif-wrapper { bottom: var(--gif-gap); left: var(--gif-gap); right: auto; top: auto; }
body.contact-gif #corner-gif-wrapper { bottom: var(--gif-gap); right: var(--gif-gap); left: auto; top: auto; }

@keyframes gifPop {
  0% { transform: scale(0.8) rotate(0deg); opacity: 0.6; }
  40% { transform: scale(1.3) rotate(10deg); opacity: 1; }
  70% { transform: scale(0.9) rotate(-6deg); }
  100% { transform: scale(1) rotate(0deg); }
}
#corner-gif-wrapper.moving { animation: gifPop 0.6s ease-out; }


.scroll-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-height: 70vh;
  overflow-y: auto;
  padding: 1rem;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: #a58eff #1c1c2b;
  animation: fadeInScroll 0.8s ease-in-out;
}
@keyframes fadeInScroll {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}


#loadMoreBtn {
  display: block;
  margin: 32px auto 48px auto;
  padding: 16px 44px;
  background: linear-gradient(90deg, #a58eff 0%, #6c63ff 100%);
  border: none;
  border-radius: 14px;
  color: #fff;
  font-size: 1.18rem;
  font-weight: bold;
  cursor: pointer;
  letter-spacing: 0.5px;
  box-shadow: 0 0 16px 2px #a58eff, 0 0 32px 4px #6c63ff44;
  text-shadow: 0 0 8px #a58eff, 0 0 16px #6c63ff;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s, color 0.2s;
  outline: none;
  position: relative; 
  z-index: 1;
  width: fit-content;
  background-clip: padding-box;
}
#loadMoreBtn:hover, #loadMoreBtn:focus {
  background: linear-gradient(90deg, #6c63ff 0%, #a58eff 100%);
  color: #fffbe6;
  transform: translateY(-3px) scale(1.06);
  box-shadow: 0 0 32px 8px #a58eff, 0 0 48px 16px #6c63ff99;
}


@media (max-width: 1024px) {
  main { margin-top: 100px; }
}

@media (max-width: 768px) {
  .navbar { padding: 0.6rem 1rem; }
  .logo { font-size: 1.2rem; margin-bottom: 0.3rem; }
  .nav-links { gap: 1rem; flex-wrap: wrap; justify-content: center; }
  .nav-links a { font-size: 0.9rem; }
  main { margin-top: 100px; }
  .page { min-height: calc(100vh - 100px); }
  .card { width: 180px; padding: 1rem; }
  #post-list { grid-template-columns: repeat(2, 1fr); } /* safe default on smaller */
}


@media (max-width: 480px) {
  .logo { font-size: 1rem; }
  .nav-links { gap: 0.5rem; }
  main { margin-top: 110px; }
  .card { width: 150px; padding: 0.8rem; }
  #post-list { grid-template-columns: 1fr; }
  #loadMoreBtn {
    margin: 24px auto 48px auto;
    width: 100%;
    max-width: 320px;
    padding: 12px 0;
    border-radius: 12px;
    font-size: 1rem;
  }
}


#gallery .gallery-flex-row {
  display: block;
  width: 100%;
  max-width: 1300px;
  margin: 0 auto;
}

#post-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr); 
  gap: 20px;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
  padding-bottom: 120px;
  max-height: 70vh;
  overflow-y: auto;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: #a58eff #1c1c2b;
  border-radius: 10px;
  background: rgba(30, 30, 50, 0.3);
  box-sizing: border-box;
}


.bluesky-post {
  background: #1c1c1c;
  border-radius: 10px;
  padding: 10px;
  box-shadow: 0 0 8px rgba(0,0,0,0.4);
  color: #fff;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

.bluesky-post:hover {
  transform: scale(1.03);
  box-shadow: 0 0 12px rgba(165,142,255,0.5);
}

.bluesky-post img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
  margin-bottom: 8px;
}

.bluesky-post p {
  font-size: 0.95rem;
  color: #ccc;
  margin: 6px 0 0 0;
}

.bluesky-post a {
  color: #a58eff;
  text-decoration: none;
  margin-top: 6px;
  font-size: 0.9em;
}
.bluesky-post a:hover { color: #fff; }


#post-list::-webkit-scrollbar { width: 8px; }
#post-list::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 4px;
}
#post-list::-webkit-scrollbar-thumb:hover { background: #555; }


#gallery {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

@media (max-width: 1024px) {
  #post-list {
    grid-template-columns: repeat(2, 1fr);
    max-height: 65vh;
    padding-bottom: 140px;
  }
}

@media (max-width: 700px) {
  #gallery .gallery-flex-row { width: 100%; }
  #post-list {
    grid-template-columns: 1fr;
    max-height: 60vh;
    padding: 16px 4vw 8px 4vw;
    padding-bottom: 160px;
    gap: 18px;
  }
  #loadMoreBtn {
    margin: 18px auto 0 auto;
    width: 100%;
    max-width: 320px;
    min-width: 0;
    height: 48px;
    align-self: center;
    display: block;
  }
}

.popup-copy {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(165, 142, 255, 0.95);
  color: #fff;
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 1rem;
  box-shadow: 0 0 12px rgba(165, 142, 255, 0.7);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease;
  z-index: 5000;
}

.popup-copy.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0); 
}



.contact-buttons {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
}

@media (max-width: 600px) {
  .contact-buttons {
    grid-template-columns: 1fr;
  }
}

.contact-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #2a2a38;
  border: 1px solid #444;
  color: #fff;
  padding: 14px 20px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 1.1rem;
  justify-content: center;
  transition: 
    transform 0.25s ease,
    box-shadow 0.25s ease,
    background 0.25s ease,
    border-color 0.3s ease;
}

.contact-btn:hover {
  transform: translateY(-4px) scale(1.03);
}

.icon {
  width: 26px;
  height: 26px;
  background-size: contain;
  background-repeat: no-repeat;
}

.bluesky-icon {
  background-image: url("https://cdn.jsdelivr.net/gh/simple-icons/simple-icons/icons/bluesky.svg");
}

.twitter-icon {
  background-image: url("https://cdn.jsdelivr.net/gh/simple-icons/simple-icons/icons/x.svg");
}

.deviantart-icon {
  background-image: url("https://cdn.jsdelivr.net/gh/simple-icons/simple-icons/icons/deviantart.svg");
}

.discord-icon {
  background-image: url("https://cdn.jsdelivr.net/gh/simple-icons/simple-icons/icons/discord.svg");
}

.contact-btn.bluesky:hover {
  border-color: #0285ff;
  box-shadow: 0 0 20px #0285ff55;
  background: #0285ff25;
}

.contact-btn.twitter:hover {
  border-color: #ffffff;
  box-shadow: 0 0 20px #ffffff55;
  background: #ffffff15;
  color: #fff;
}

.contact-btn.deviantart:hover {
  border-color: #05cc47;
  box-shadow: 0 0 20px #05cc4755;
  background: #05cc4720;
}

.contact-btn.discord:hover {
  border-color: #5865f2;
  box-shadow: 0 0 20px #5865f255;
  background: #5865f220;
}


