/* ============================================
   WeChat AI Chat - Discover & Moments Styles
   ============================================ */

.discover-page {
  flex: 1;
  overflow-y: auto;
  background: var(--wx-bg);
}

.discover-page .cell-group {
  margin-bottom: 8px;
}

.discover-page .cell-icon {
  width: 24px;
  height: 24px;
  margin-right: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  color: white;
}

.discover-page .cell-icon.moments { background: #FA5151; }
.discover-page .cell-icon.channels { background: #FA5151; }
.discover-page .cell-icon.live { background: #FA9D3B; }
.discover-page .cell-icon.scan { background: #07C160; }
.discover-page .cell-icon.shake { background: #576B95; }
.discover-page .cell-icon.nearby { background: #07C160; }
.discover-page .cell-icon.shopping { background: #FA9D3B; }
.discover-page .cell-icon.games { background: #FA5151; }
.discover-page .cell-icon.mini { background: #576B95; }
.discover-page .cell-icon.search { background: #07C160; }

.moments-page {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--wx-bg-white);
  overflow: hidden;
}

.moments-cover {
  position: relative;
  height: 280px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  overflow: hidden;
  flex-shrink: 0;
}

.moments-cover .cover-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(transparent, rgba(0,0,0,0.3));
}

.moments-cover .cover-title {
  position: absolute;
  bottom: 16px;
  right: 80px;
  color: white;
  font-size: 18px;
  font-weight: 600;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.moments-cover .cover-avatar {
  position: absolute;
  bottom: -20px;
  right: 16px;
  width: 72px;
  height: 72px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid var(--wx-bg-white);
  box-shadow: var(--wx-shadow);
}

.moments-list {
  flex: 1;
  overflow-y: auto;
  padding-top: 28px;
  background: var(--wx-bg-white);
}

.moment-item {
  display: flex;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--wx-border-light);
}

.moment-item .moment-avatar {
  width: 42px;
  height: 42px;
  border-radius: 5px;
  overflow: hidden;
  flex-shrink: 0;
  cursor: pointer;
}

.moment-item .moment-content {
  flex: 1;
  min-width: 0;
}

.moment-item .moment-name {
  font-size: 15px;
  font-weight: 500;
  color: #576B95;
  margin-bottom: 4px;
  cursor: pointer;
}

.moment-item .moment-text {
  font-size: 15px;
  color: var(--wx-text);
  line-height: 1.5;
  margin-bottom: 8px;
  word-wrap: break-word;
}

.moment-item .moment-images {
  display: grid;
  gap: 4px;
  margin-bottom: 8px;
}

.moment-item .moment-images.single { grid-template-columns: 1fr; max-width: 240px; }
.moment-item .moment-images.double { grid-template-columns: 1fr 1fr; max-width: 200px; }
.moment-item .moment-images.multi { grid-template-columns: repeat(3, 1fr); max-width: 240px; }

.moment-item .moment-images img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 4px;
  cursor: pointer;
}

.moment-comments {
  background: var(--wx-bg-light);
  border-radius: 4px;
  padding: 8px 10px;
  margin-top: 8px;
}

.moment-comments .like-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--wx-border-light);
  margin-bottom: 6px;
}

.moment-comments .comment-item {
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 4px;
  word-wrap: break-word;
}

.moment-comments .comment-item .comment-name {
  color: var(--wx-text-link);
  cursor: pointer;
  font-weight: 500;
}

.scan-page {
  flex: 1;
  background: #000;
  position: relative;
  overflow: hidden;
}

.scan-page .scan-frame {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 260px;
  height: 260px;
}

.scan-page .scan-frame .corner {
  position: absolute;
  width: 24px;
  height: 24px;
  border-color: var(--wx-green);
  border-style: solid;
}

.scan-page .scan-frame .corner.tl { top: 0; left: 0; border-width: 3px 0 0 3px; }
.scan-page .scan-frame .corner.tr { top: 0; right: 0; border-width: 3px 3px 0 0; }
.scan-page .scan-frame .corner.bl { bottom: 0; left: 0; border-width: 0 0 3px 3px; }
.scan-page .scan-frame .corner.br { bottom: 0; right: 0; border-width: 0 3px 3px 0; }

.scan-page .scan-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--wx-green);
  box-shadow: 0 0 10px var(--wx-green);
  animation: scanMove 2s ease-in-out infinite;
}

@keyframes scanMove {
  0%, 100% { top: 0; }
  50% { top: calc(100% - 2px); }
}

.search-page {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--wx-bg-white);
  overflow: hidden;
}

.search-result-item {
  padding: 12px 16px;
  border-bottom: 1px solid var(--wx-border-light);
  cursor: pointer;
}

.search-result-item:active {
  background: var(--wx-bg-hover);
}
