:root {
  --bg: #f8f6f3;
  --surface: #ffffff;
  --text: #2b2b2b;
  --muted: #7a7a7a;
  --accent: #c45c7a;
  --accent-hover: #a84a64;
  --border: #e8e4df;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  --radius: 16px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

.app {
  max-width: 960px;
  margin: 0 auto;
  padding: 20px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  animation: fadeIn 0.6s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Banner */
.banner {
  text-align: center;
  padding: 24px 0 20px;
  animation: slideDown 0.6s ease both 0.1s;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}

.brand {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--accent);
}

.slogan {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}

/* Gallery */
.gallery {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Stage */
.stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.stage-frame {
  position: relative;
  flex: 1;
  max-width: 720px;
  aspect-ratio: 3 / 4;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stage-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity 280ms cubic-bezier(0.4, 0, 0.2, 1),
              transform 280ms cubic-bezier(0.4, 0, 0.2, 1);
  will-change: opacity, transform;
}

.stage-frame img.slide-out-left {
  opacity: 0;
  transform: translateX(-30px) scale(0.96);
}

.stage-frame img.slide-out-right {
  opacity: 0;
  transform: translateX(30px) scale(0.96);
}

.stage-frame img.slide-in {
  opacity: 1;
  transform: translateX(0) scale(1);
}

.stage-frame:hover img {
  transform: scale(1.015);
}

/* Loading */
.loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.9);
  color: var(--accent);
  font-size: 14px;
  backdrop-filter: blur(3px);
  transition: opacity 0.2s ease;
}

.loading::before {
  content: "";
  width: 36px;
  height: 36px;
  margin-bottom: 10px;
  border: 3px solid rgba(196, 92, 122, 0.18);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.hidden {
  display: none !important;
}

/* Nav arrows */
.nav-arrow {
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: var(--surface);
  color: var(--accent);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nav-arrow:hover {
  transform: scale(1.08);
  background: var(--accent);
  color: #fff;
  box-shadow: 0 6px 16px rgba(196, 92, 122, 0.3);
}

.nav-arrow:active {
  transform: scale(0.98);
}

@media (max-width: 600px) {
  .nav-arrow {
    width: 38px;
    height: 38px;
    font-size: 20px;
  }
}

/* Thumbnail strip */
.thumb-strip {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px;
  overflow: hidden;
}

.thumb-list {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 4px;
  scrollbar-width: thin;
  scrollbar-color: var(--accent) var(--border);
}

.thumb-list::-webkit-scrollbar {
  height: 6px;
}

.thumb-list::-webkit-scrollbar-track {
  background: var(--border);
  border-radius: 3px;
}

.thumb-list::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 3px;
}

.thumb-item {
  flex: 0 0 auto;
  width: 88px;
  height: 88px;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  scroll-snap-align: start;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

.thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.thumb-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.1);
}

.thumb-item:hover img {
  transform: scale(1.08);
}

.thumb-item.active {
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(196, 92, 122, 0.25);
}

.thumb-item.active::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 10px;
  box-shadow: inset 0 0 0 2px var(--accent);
  pointer-events: none;
}

@media (max-width: 600px) {
  .thumb-item {
    width: 72px;
    height: 72px;
  }
}

/* Buy panel */
.buy-panel {
  margin-top: 16px;
  background: linear-gradient(135deg, var(--surface) 0%, #fff8fa 100%);
  border-radius: var(--radius);
  padding: 22px 26px;
  box-shadow: var(--shadow);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  animation: slideUp 0.5s ease both 0.2s;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.buy-info h2 {
  margin: 0 0 6px;
  font-size: 20px;
}

.buy-info p {
  margin: 0 0 8px;
  font-size: 14px;
  color: var(--muted);
}

.price-tag {
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
}

.buy-button {
  padding: 14px 32px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  border-radius: 28px;
  font-weight: 500;
  font-size: 16px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  white-space: nowrap;
  animation: pulseSoft 2s ease-in-out infinite;
}

@keyframes pulseSoft {
  0%, 100% { box-shadow: 0 0 0 0 rgba(196, 92, 122, 0.25); }
  50% { box-shadow: 0 0 0 8px rgba(196, 92, 122, 0); }
}

.buy-button:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(196, 92, 122, 0.3);
  animation: none;
}

@media (max-width: 600px) {
  .buy-panel {
    flex-direction: column;
    align-items: flex-start;
  }

  .buy-button {
    width: 100%;
    text-align: center;
  }
}

/* Footer */
.footer {
  margin-top: 24px;
  padding: 16px;
  text-align: center;
  display: flex;
  justify-content: center;
  gap: 24px;
}

.footer a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s ease;
}

.footer a:hover {
  color: var(--accent);
}
