#qqGuildPhotoModal {
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.qqguild-photo-modal-content {
  width: 450px;
  max-width: calc(100vw - 20px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  animation: modalSlideUp 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}

.qqguild-photo-stack {
  position: relative;
  width: 320px;
  min-height: 180px;
  height: auto;
  perspective: 1200px;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  margin: 20px 0;
  cursor: grab;
  transition: height 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.qqguild-photo-stack:active {
  cursor: grabbing;
}

.qqguild-photo-card {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 300px;
  height: auto;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 14px;
  transition: all 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
  will-change: transform, opacity;
  box-shadow: 0 8px 32px rgba(0,0,0,0.35);
}

.qqguild-photo-blur-bg {
  position: absolute;
  top: -60px;
  bottom: -60px;
  left: -60px;
  right: -60px;
  background-size: cover;
  background-position: center;
  background-color: transparent;
  filter: blur(32px) saturate(1.1);
  opacity: 1;
  z-index: 0;
  pointer-events: none;
  transition: background-image 0.3s ease;
}

.qqguild-photo-card-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  padding: 10px 12px 12px;
  box-sizing: border-box;
}

.qqguild-photo-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
  margin-bottom: 6px;
  flex-shrink: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.qqguild-photo-header img {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.2));
}

.qqguild-photo-img-wrap {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 8px;
  margin: 4px 0;
  background: rgba(0,0,0,0.25);
}

.qqguild-photo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 6px;
  background: #000;
  display: block;
}

.qqguild-photo-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 6px;
  flex-shrink: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.qqguild-photo-user {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.qqguild-photo-user > img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,0.25);
  flex-shrink: 0;
  background: var(--glass);
}

.qqguild-photo-userinfo {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.qqguild-photo-userinfo span:first-child {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.qqguild-photo-userinfo span:last-child {
  font-size: 11px;
  color: rgba(255,255,255,0.65);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.qqguild-photo-join-btn {
  padding: 7px 16px;
  border-radius: 20px;
  background: #6BA3FF;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(107,163,255,0.3);
}

.qqguild-photo-join-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(107,163,255,0.4);
}

.qqguild-photo-join-btn:active {
  transform: scale(0.95);
}

.qqguild-photo-card.stack-1 {
  transform: translate(calc(-50% + 10px), calc(-50% + 16px)) rotate(8deg) scale(0.90);
  opacity: 1;
  z-index: 5;
}

.qqguild-photo-card.stack-2 {
  transform: translate(calc(-50% + 20px), calc(-50% + 32px)) rotate(-10deg) scale(0.82);
  opacity: 1;
  z-index: 4;
}

.qqguild-photo-card.hidden {
  transform: translate(-50%, -50%) scale(0.5);
  opacity: 0;
  z-index: 0;
  pointer-events: none;
}

.qqguild-photo-card:not(.active) .qqguild-photo-header,
.qqguild-photo-card:not(.active) .qqguild-photo-footer {
  opacity: 0;
  pointer-events: none;
}

.qqguild-photo-card.active {
  transform: translate(-50%, -50%) rotate(0) scale(1);
  opacity: 1;
  z-index: 10;
}

.qqguild-photo-card.is-exiting-left {
  transform: translate(calc(-50% - 150%), -50%) rotateY(35deg) scale(0.65) !important;
  opacity: 0 !important;
  transition-duration: 0.4s !important;
  z-index: 100 !important;
}

.qqguild-photo-card.is-exiting-right {
  transform: translate(calc(-50% + 150%), -50%) rotateY(-35deg) scale(0.65) !important;
  opacity: 0 !important;
  transition-duration: 0.4s !important;
  z-index: 100 !important;
}

.qqguild-photo-close-hint {
  position: absolute;
  bottom: 20px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 12px;
  color: rgba(255,255,255,0.55);
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
  padding: 4px 0;
  pointer-events: none;
  z-index: 5;
}

/* ============================================
   校园图集抽屉页
   ============================================ */
#qqguild-gallery-page {
  background: transparent;
}

.qqguild-gallery-content {
  width: 100%;
  max-width: 480px;
}

/* 替换原有的 .qqguild-gallery-grid */
.qqguild-gallery-grid {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.qqguild-gallery-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.qqguild-gallery-item {
  break-inside: avoid;
  margin-bottom: 10px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--glass);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  animation: galleryFadeIn 0.4s ease both;
  opacity: 0;
}

@keyframes galleryFadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.qqguild-gallery-item:active {
  transform: scale(0.96);
}

.qqguild-gallery-img-wrap {
  width: 100%;
  position: relative;
  overflow: hidden;
  background: rgba(128,128,128,0.08);
  min-height: 80px;
}

.qqguild-gallery-img-wrap.error {
  background: rgba(128,128,128,0.15);
  min-height: 120px;
}

.qqguild-gallery-img-wrap img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.qqguild-gallery-item:hover .qqguild-gallery-img-wrap img {
  transform: scale(1.03);
}

.qqguild-gallery-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
}

.qqguild-gallery-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--text-light);
}

.qqguild-gallery-meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  flex: 1;
}

.qqguild-gallery-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.qqguild-gallery-time {
  font-size: 10px;
  color: var(--subtext);
  opacity: 0.8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 暗色模式 */
@media (prefers-color-scheme: dark) {
  .qqguild-gallery-item {
    background: rgba(30, 30, 30, 0.5);
    border-color: rgba(255,255,255,0.12);
  }
  .qqguild-gallery-bar {
    background: rgba(30, 30, 30, 0.6);
    border-color: rgba(255,255,255,0.12);
  }
}
