/* ====================== */
/* CORE STYLES */
/* ====================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --pntd-c-red: #d90429;
  --pntd-c-turquoise: #00d9bf;
  --pntd-c-fuchsia: #e725e7;
  --pntd-c-yellow: #e8cf00;
  --pntd-c-black: #0a0a0a;
  --primary-white: #ffffff;
  --default-glow: rgba(231, 37, 231, 0.2);
  --transition-speed: 1.8s;
}

body {
  background: var(--pntd-bg);
  font-family: var(--pntd-font);
  color: white;
  overflow: hidden;
  height: 100vh;
  width: 100vw;
}

/* ====================== */
/* GALLERY CONTAINER */
/* ====================== */
#gallery-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
}

.art-stage {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity var(--transition-speed) ease;
  z-index: 10;
}

.art-stage.active {
  opacity: 1;
  z-index: 20;
}

.artwork-container {
  position: relative;
  max-width: 90%;
  max-height: 80%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.artwork-frame {
  border-radius: 6px;
  overflow: hidden;
  display: inline-flex;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.8);
  transition: box-shadow 1s ease-out;
  position: relative;
}

.artwork-image {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  transform-origin: center center;
  display: block;
}

/* ====================== */
/* ARTWORK INFORMATION */
/* ====================== */
.art-info {
  position: absolute;
  padding: 1.5rem;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(12px);
  border-radius: 12px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
  z-index: 30;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.15);
  max-width: 500px;
  max-height: 30vh;
  overflow: hidden;
}

.art-info.show {
  opacity: 1;
  transform: translateY(0);
}

.art-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  background: var(--primary-white);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 15px rgba(0, 0, 0, 0.7);
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.art-meta {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  font-size: 1.2rem;
  opacity: 0.9;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  white-space: nowrap;
}

.meta-item i {
  color: var(--pntd-c-fuchsia);
  width: 24px;
  text-align: center;
}

/* ====================== */
/* PROGRESS & CONTROLS */
/* ====================== */
#progress-timeline {
  position: fixed;
  bottom: 3rem;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  max-width: 800px;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
  z-index: 100;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(
    90deg,
    var(--pntd-c-fuchsia),
    var(--pntd-c-turquoise)
  );
  transition: width 0.2s linear;
  position: relative;
  overflow: hidden;
}

.progress-bar::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  animation: progressGlow 2s infinite linear;
}

.nav-area {
  position: fixed;
  top: 0;
  height: 100%;
  width: 15%;
  z-index: 50;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.nav-area:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.2);
}

.nav-area::before {
  content: "";
  position: absolute;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 2rem;
  color: white;
  transition: all 0.3s ease;
}

.nav-area.left {
  left: 0;
}

.nav-area.left::before {
  content: "❮";
}

.nav-area.right {
  right: 0;
}

.nav-area.right::before {
  content: "❯";
}

.signature-container {
  position: fixed;
  left: 3rem;
  bottom: 3rem;
  color: rgba(255, 255, 255, 0.7);
  font-family: var(--pntd-font);
  font-size: 2rem;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 1000;
}

.paintedd-signature {
  font-family: sans-serif;
  font-weight: bold;
  font-size: 24px;
  color: white;
  text-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
}

.art-count {
  position: fixed;
  bottom: 3rem;
  right: 3rem;
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.8rem;
  z-index: 100;
  font-weight: 400;
}

.preloader {
  position: absolute;
  top: -9999px;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

/* ====================== */
/* LOADING & ERROR STATES */
/* ====================== */
.loading-indicator {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  font-size: 1.5rem;
  color: white;
}

.error-message {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.9);
  z-index: 1000;
  padding: 20px;
  text-align: center;
  color: #ff5555;
}

.error-message i {
  font-size: 3rem;
  margin-bottom: 1rem;
  display: block;
}

.image-error {
  border: 2px solid var(--pntd-c-red);
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 300px;
  min-height: 300px;
  background: rgba(217, 4, 41, 0.1);
}

.image-error span {
  color: var(--pntd-c-red);
  font-size: 1.2rem;
}

/* ====================== */
/* SLIDESHOW FULL SCREEN  */
/* ====================== */
#fullscreen-btn {
  background: rgba(0, 0, 0, 0.3);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  cursor: pointer;
  color: white;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s;
}

#fullscreen-btn:hover {
  background: rgba(0, 0, 0, 0.5);
}

/* ====================== */
/* ANIMATIONS */
/* ====================== */
@keyframes progressGlow {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

@keyframes subtleZoom {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

/* ====================== */
/* RESPONSIVE ADJUSTMENTS */
/* ====================== */
@media (max-width: 768px) {
  .art-title {
    font-size: 2rem;
  }

  .art-meta {
    font-size: 1rem;
  }

  .artwork-container {
    max-width: 95%;
    max-height: 75%;
  }

  .art-info {
    padding: 1.2rem;
    max-width: 90%;
    max-height: 35vh;
  }

  #progress-timeline {
    width: 90%;
  }

  .paintedd-signature,
  .art-count {
    font-size: 1.5rem;
  }

  .nav-area {
    width: 20%;
  }
}

@media (max-width: 480px) {
  .art-title {
    font-size: 1.8rem;
    -webkit-line-clamp: 3;
  }

  .art-meta {
    font-size: 0.9rem;
  }

  .artwork-container {
    max-width: 98%;
    max-height: 70%;
  }

  .paintedd-signature,
  .art-count {
    font-size: 1.3rem;
    bottom: 4rem;
  }

  .nav-area {
    width: 25%;
  }

  .nav-area::before {
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
  }
}
