.hero-section {
    margin-bottom: 24px;
}

.hero-slider {
    width: 100%;
    height: 360px;
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    background: #ffffff;
    border: 1px solid #e9edf3;
}

.slide-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.slide-item.active {
    opacity: 1;
}

.slide-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 40px 20px 16px;
    background: linear-gradient(180deg, transparent 0%, rgba(15, 23, 42, 0.72) 100%);
}

.slide-title {
    display: block;
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

/* 轮播切换箭头 */
.slide-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    z-index: 5;
    transition: background 0.2s ease, opacity 0.2s ease;
    opacity: 0;
    user-select: none;
    -webkit-user-select: none;
}

.slide-arrow:hover {
    background: rgba(15, 23, 42, 0.6);
}

.slide-arrow.prev {
    left: 12px;
}

.slide-arrow.next {
    right: 12px;
}

.hero-slider:hover .slide-arrow {
    opacity: 1;
}

/* 圆点指示器 */
.slide-dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    z-index: 5;
    padding: 0 12px;
}

.slide-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    padding: 0;
    border: none;
    transition: width 0.25s ease, background 0.25s ease;
}

.slide-dot:hover {
    background: rgba(255, 255, 255, 0.85);
}

.slide-dot.active {
    width: 18px;
    border-radius: 4px;
    background: #fff;
}

.home-section {
    margin-bottom: 28px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    position: relative;
    padding-left: 12px;
}

.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 16px;
    background: #2563eb;
}

.section-more {
    color: #94a3b8;
    font-size: 13px;
    text-decoration: none;
    transition: color 0.2s ease;
}

.section-more:hover {
    color: #2563eb;
}

.comic-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.comic-card-sm {
    display: block;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    min-width: 0;
}

.card-sm-cover {
    position: relative;
    padding-top: 140%;
    overflow: hidden;
    background: #f1f5f9 url('/assets/images/default_cover.png') center/cover no-repeat;
    border-radius: 4px;
}

.card-sm-cover img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.comic-card-sm:hover .card-sm-cover img {
    transform: scale(1.05);
}

.card-sm-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    padding: 2px 7px;
    border-radius: 2px;
    font-size: 10px;
    color: #fff;
    line-height: 1.4;
}

.card-sm-info {
    padding: 8px 2px 0;
}

.card-sm-title {
    font-size: 13px;
    font-weight: 500;
    color: #1f2937;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    line-height: 1.4;
}

.card-sm-author {
    font-size: 11px;
    color: #94a3b8;
}

.grid-loading {
    display: none;
    justify-content: center;
    align-items: center;
    gap: 6px;
    padding: 24px 0;
}

.grid-loading.active {
    display: flex;
}

.loading-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #2563eb;
    animation: dotPulse 1.2s ease-in-out infinite;
}

.loading-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.loading-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes dotPulse {
    0%, 80%, 100% {
        opacity: 0.3;
        transform: scale(0.8);
    }
    40% {
        opacity: 1;
        transform: scale(1.2);
    }
}

@media (max-width: 768px) {
    .hero-slider {
        height: 220px;
        border-radius: 0;
        margin: 0 -16px;
        width: calc(100% + 32px);
    }

    .slide-caption {
        padding: 24px 12px 22px;
    }

    .slide-title {
        font-size: 14px;
    }

    .slide-arrow {
        width: 32px;
        height: 32px;
        font-size: 16px;
        opacity: 1;
    }

    .slide-arrow.prev {
        left: 8px;
    }

    .slide-arrow.next {
        right: 8px;
    }

    .slide-dots {
        bottom: 4px;
    }

    .comic-grid-3 {
        gap: 10px;
    }

    .card-sm-info {
        padding: 6px 2px 0;
    }

    .card-sm-title {
        font-size: 12px;
        line-height: 1.3;
    }
}

/* 首页公告 */
.notice-section {
  margin-bottom: 20px;
}

.notice-box {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #ffffff;
  border: 1px solid #e9edf3;
  border-radius: 4px;
  padding: 12px 16px;
  overflow: hidden;
}

.notice-icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  color: #2563eb;
}

.notice-icon .iconify {
  font-size: 20px;
}

.notice-viewport {
  flex: 1;
  min-width: 0;
  height: 22px;
  overflow: hidden;
  position: relative;
}

.notice-list {
  display: flex;
  flex-direction: column;
  transition: transform 0.4s ease;
}

.notice-item {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  height: 22px;
  line-height: 22px;
  cursor: pointer;
}

.notice-title {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 500;
  color: #2563eb;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notice-content {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  color: #64748b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 公告弹窗 */
.notice-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.notice-modal-mask {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.notice-modal-body {
  position: relative;
  width: 100%;
  max-width: 420px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.25);
  overflow: hidden;
  animation: noticeModalIn 0.3s ease;
}

@keyframes noticeModalIn {
  from { opacity: 0; transform: translateY(24px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.notice-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 100%);
  border-bottom: 1px solid #e9edf3;
}

.notice-modal-title {
  font-size: 16px;
  font-weight: 600;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
}

.notice-modal-title::before {
  content: '';
  width: 4px;
  height: 16px;
  background: linear-gradient(180deg, #3b82f6, #2563eb);
  border-radius: 2px;
}

.notice-modal-close {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.06);
  border: none;
  border-radius: 50%;
  font-size: 16px;
  color: #64748b;
  cursor: pointer;
  line-height: 1;
  transition: all 0.2s ease;
}

.notice-modal-close:hover {
  background: rgba(15, 23, 42, 0.12);
  color: #0f172a;
}

.notice-modal-content {
  padding: 20px;
  font-size: 14px;
  color: #475569;
  line-height: 1.8;
  overflow-y: auto;
  word-break: break-word;
}

.notice-modal-content a {
  color: #2563eb;
  text-decoration: underline;
}

.notice-modal-content img {
  max-width: 100%;
  border-radius: 8px;
  margin: 8px 0;
}

.notice-modal-content button,
.notice-modal-content .btn {
  display: inline-block;
  margin: 8px 4px 8px 0;
  padding: 8px 16px;
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
}
