﻿.comic-page-body {
  min-height: 100vh;
}

.comic-hero {
  padding-top: 1.1rem;
  padding-bottom: 0.8rem;
}

.comic-back-link {
  text-decoration: none;
  color: inherit;
}

.comic-main {
  padding-top: 0;
}

.comic-card {
  width: min(940px, 94vw);
  height: clamp(620px, 80vh, 860px);
  margin: 0 auto;
  padding: clamp(0.8rem, 2vw, 1.2rem);
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  border-radius: 24px;
  border: 1px solid rgba(214, 240, 210, 0.2);
  background:
    radial-gradient(circle at 14% 10%, rgba(155, 226, 119, 0.11), transparent 42%),
    radial-gradient(circle at 92% 88%, rgba(241, 213, 138, 0.12), transparent 38%),
    linear-gradient(152deg, rgba(9, 20, 28, 0.86), rgba(13, 25, 33, 0.9));
  box-shadow:
    0 34px 74px rgba(0, 0, 0, 0.46),
    inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  animation: comicCardFloat 5.8s ease-in-out infinite;
}

.comic-frame {
  flex: 1 1 auto;
  min-height: 0;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: linear-gradient(170deg, rgba(6, 14, 20, 0.9), rgba(5, 11, 16, 0.95));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem;
  overflow: hidden;
  position: relative;
}

.comic-frame::after {
  content: "";
  position: absolute;
  inset: -20% auto -20% -28%;
  width: 40%;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.14), transparent);
  transform: translateX(-180%) rotate(8deg);
  animation: comicSheen 6.2s ease-in-out infinite;
  pointer-events: none;
}

.comic-image {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.28);
  object-fit: contain;
  object-position: center center;
  object-position: center;
  cursor: pointer;
  transition: box-shadow 180ms ease;
}

.comic-image:hover {
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.35);
}

.comic-image.switch-next {
  animation: comicSwitchNext 320ms ease;
}

.comic-image.switch-prev {
  animation: comicSwitchPrev 320ms ease;
}

.comic-card.is-glow-pop {
  box-shadow:
    0 34px 74px rgba(0, 0, 0, 0.46),
    0 0 0 1px rgba(155, 226, 119, 0.2),
    0 0 30px rgba(155, 226, 119, 0.16);
}

.comic-controls {
  flex: 0 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 120px 1fr 120px;
  align-items: center;
  gap: 0.7rem;
  min-height: 48px;
}

.comic-btn {
  width: 120px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.06);
  color: #f6f4ea;
  border-radius: 999px;
  padding: 0.56rem 1.15rem;
  font: 600 0.94rem/1 'Manrope', sans-serif;
  cursor: pointer;
  transition: transform 170ms ease, border-color 170ms ease, background 170ms ease;
}

.comic-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(243, 211, 149, 0.8);
  background: rgba(243, 211, 149, 0.16);
}

.comic-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.comic-counter {
  margin: 0;
  text-align: center;
  color: rgba(247, 243, 224, 0.9);
  font: 600 0.92rem/1.2 'Manrope', sans-serif;
}

.comic-hint {
  flex: 0 0 auto;
  margin: 0;
  text-align: center;
  color: rgba(241, 233, 203, 0.7);
  font-size: 0.86rem;
}

@media (max-width: 760px) {
  .comic-card {
    height: clamp(540px, 78vh, 740px);
    border-radius: 18px;
    padding: 0.7rem;
  }

  .comic-controls {
    grid-template-columns: 96px 1fr 96px;
  }

  .comic-btn {
    width: 96px;
    padding: 0.52rem 0.6rem;
  }
}

@keyframes comicSwitchNext {
  0% { opacity: 0.78; transform: translateX(14px) scale(0.985); }
  100% { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes comicSwitchPrev {
  0% { opacity: 0.78; transform: translateX(-14px) scale(0.985); }
  100% { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes comicSheen {
  0%, 76%, 100% { transform: translateX(-180%) rotate(8deg); opacity: 0; }
  84% { opacity: 0.9; }
  96% { transform: translateX(420%) rotate(8deg); opacity: 0; }
}

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

@media (prefers-reduced-motion: reduce) {
  .comic-card,
  .comic-frame::after,
  .comic-image.switch-next,
  .comic-image.switch-prev {
    animation: none !important;
  }
}
