/* style.css - 优化完整版本 */
/* 移除冗余代码，统一管理样式 */

/* 基础重置和字体 */
* {
    margin: 0;
    padding: 0;
}

body {
    margin: 0;
    padding: 20px;
    color: #333;
    /*font-family: 'Roboto Mono', monospace;*/
    line-height: 1.6;
    background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAIAAACRXR/mAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAABnSURBVHja7M5RDYAwDEXRDgmvEocnlrQS2SwUFST9uEfBGWs9c97nbGtDcquqiKhOImLs/UpuzVzWEi1atGjRokWLFi1atGjRokWLFi1atGjRokWLFi1af7Ukz8xWp8z8AAAA//8DAJ4LoEAAlL1nAAAAAElFTkSuQmCC") repeat 0 0;
    animation: bg-scrolling-reverse 0.92s infinite linear;
}

@keyframes bg-scrolling-reverse {
    100% {
        background-position: 50px 50px;
    }
}

/* 页面切换动画 */
.page {
    display: none;
    position: relative;
    min-height: calc(100vh - 120px);
}

.page.active {
    display: block;
}

.slide-in-right {
    animation: slideInRight 0.3s ease-out forwards;
}

.slide-in-left {
    animation: slideInLeft 0.3s ease-out forwards;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 标题样式 */
.title-container {
    display: flex;
    justify-content: center;
    margin: 50px auto 40px;
    width: 100%;
}

.underline-box {
    display: inline-block;
    overflow: hidden;
    padding: 20px 0;
}

.jump-reveal .letter {
    animation: jump-reveal 0.6s normal forwards cubic-bezier(0, 0.5, 0.4, 2);
    color: #333;
    display: inline-block;
    padding: 0 2px;
    transform: translate3d(0, 200%, 0);
    font-family: 'Raleway', sans-serif;
    font-size: 36px;
    font-weight: 200;
}

.jump-reveal .letter:nth-child(1) { animation-delay: 0.03s; }
.jump-reveal .letter:nth-child(2) { animation-delay: 0.06s; }
.jump-reveal .letter:nth-child(3) { animation-delay: 0.09s; }
.jump-reveal .letter:nth-child(4) { animation-delay: 0.12s; }
.jump-reveal .letter:nth-child(5) { animation-delay: 0.15s; }

@keyframes jump-reveal {
    100% {
        transform: translate3d(0, 0, 0);
    }
}

/* 导航栏样式 */
.navibar-wrapper {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    z-index: 1000;
    padding: 10px 0;
    background: transparent;
}

.navibar-wrapper .wrapper {
    border-radius: 1rem;
    overflow: hidden;
    width: 22rem;
    background: var(--activeclr);
    box-shadow: rgba(100, 100, 111, 0.2) 0px 7px 29px 0px;
    transition: height 0.3s ease;
    height: 4.5rem;
}

.navibar-wrapper .wrapper.expanded {
    height: 9rem;
}

.navibar-wrapper .navbar {
    display: flex;
    justify-content: space-between;
    height: 4.5rem;
    background: white;
    padding: 0 0.75rem;
    transition: padding 300ms ease;
}

.navibar-wrapper .navbar:has(.navsearch.active) {
    padding: 0 0.75rem;
}

.navibar-wrapper .navitem, 
.navibar-wrapper .navsearch {
    position: relative;
    display: grid;
    place-content: center;
    color: #fff;
    width: 4.5rem;
    text-align: center;
    color: black;
    font-size: 1.5rem;
    transition: width 300ms ease, flex-grow 300ms ease;
}

.navibar-wrapper .navbar:has(.navsearch.active) .navitem {
    width: 3rem;
}

.navibar-wrapper .hoverindicator {
    position: absolute;
    width: 2.5rem;
    inset: 50% auto auto 50%;
    transform: translate(-50%, -50%);
    background: var(--activeclr);
    opacity: 0;
    border-radius: 0.5rem;
    height: 0.25rem;
    inset: auto auto -0.25rem 50%;
    transition: inset 300ms ease, opacity 300ms ease;
}

@media (hover: hover) {
    .navibar-wrapper .navitem:not(.active):hover .hoverindicator {
        border-radius: 1.25rem;
        height: 2.5rem;
        opacity: 1;
        transition: opacity 150ms ease;
    }
    
    .navibar-wrapper .navsearch:not(.active):hover::before {
        content: '';
        position: absolute;
        inset: 1rem;
        background: var(--activeclr);
        border-radius: 1.25rem;
        opacity: 1;
        transition: opacity 150ms ease;
    }
}

.navibar-wrapper .active .hoverindicator {
    opacity: 1;
    border-radius: 0.5rem;
    height: 0.25rem;
    inset: auto auto 0.25rem 50%;
    transition: inset 300ms ease, height 300ms ease, border-radius 300ms ease;
}

.navibar-wrapper .navsearch.active {
    flex-grow: 1;
}

.navibar-wrapper .searchbox {
    position: absolute;
    inset: 1rem;
    background: transparent;
    border-radius: 1.25rem;
    opacity: 0;
    transition: inset 300ms ease, padding 300ms ease, color 100ms ease, opacity 300ms ease, background 300ms ease;
    -webkit-appearance: none;
    border: none;
    padding: 0 1rem 0 1rem;
    font-size: 1rem;
    color: transparent;
    z-index: 1;
}

.navibar-wrapper .active .searchbox {
    inset: 1rem 0.25rem;
    height: 2.5rem;
    border-radius: 1.25rem;
    padding: 0 2.5rem 0 1rem;
    opacity: 1;
    color: black;
    background: var(--activeclr);
    transition: inset 300ms ease, padding 300ms ease, color 200ms ease 50ms, opacity 300ms ease, background 300ms ease;
}

.navibar-wrapper .searchicon {
    position: absolute;
    inset: 0 0 0 auto;
    width: 4.5rem;
    display: grid;
    place-content: center;
    transition: width 300ms ease;
    z-index: 2;
}

.navibar-wrapper .active .searchicon {
    width: 3rem;
}

.navibar-wrapper .subnavbar {
    display: flex;
    justify-content: space-between;
    height: 0;
    background: transparent;
    padding: 0 0.75rem;
    overflow: hidden;
    transition: height 300ms ease, padding 300ms ease;
    opacity: 0;
}

.navibar-wrapper .subnavbar.active {
    height: 4.5rem;
    padding: 0 0.75rem;
    opacity: 1;
}

.navibar-wrapper .subnavitem {
    position: relative;
    display: grid;
    place-content: center;
    width: 4.5rem;
    text-align: center;
    color: black;
    font-size: 1.5rem;
    transition: all 300ms ease;
    cursor: pointer;
    background: transparent;
}

.navibar-wrapper .subhoverindicator {
    position: absolute;
    width: 2.5rem;
    inset: 50% auto auto 50%;
    transform: translate(-50%, -50%);
    background: white;
    opacity: 0;
    border-radius: 0.5rem;
    height: 0.25rem;
    inset: auto auto -0.25rem 50%;
    transition: inset 300ms ease, opacity 300ms ease;
}

@media (hover: hover) {
    .navibar-wrapper .subnavitem:hover .subhoverindicator {
        border-radius: 1.25rem;
        height: 2.5rem;
        opacity: 1;
        transition: opacity 150ms ease;
    }
}

.navibar-wrapper .subnavitem.active .subhoverindicator {
    opacity: 1;
    border-radius: 0.5rem;
    height: 0.25rem;
    inset: auto auto 0.25rem 50%;
    transition: inset 300ms ease, height 300ms ease, border-radius 300ms ease;
    background: white;
}

.navibar-wrapper .wrapper:not(.expanded) .subnavbar {
    display: none;
}

/* 本地图标样式 */
.local-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.local-icon svg {
    width: 1em;
    height: 1em;
}

/* 确保导航栏图标正确显示 */
.navitem .local-icon,
.subnavitem .local-icon,
.searchicon .local-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 联系按钮图标调整 */
.contact-btn .local-icon {
    width: 16px;
    height: 16px;
}

/* 作者统计图标调整 */
.author-stats .local-icon {
    width: 16px;
    height: 16px;
}

/* 控制按钮图标调整 */
.m-p-g__btn .local-icon {
    width: 24px;
    height: 24px;
}

/* 搜索栏激活状态样式 */
.navsearch.active .searchicon {
    cursor: pointer;
}

/* 确保搜索框点击区域正确 */
.searchbox {
    cursor: text;
}

.navsearch.active .searchbox {
    cursor: auto;
}

/* 作者页样式 */
.authors-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 80px;
}

.authors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin: 0 auto;
}

.author-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.author-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.author-header {
    display: flex;
    align-items: center;
    padding: 15px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.author-avatar {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    object-fit: cover;
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.author-info {
    margin-left: 15px;
    flex: 1;
}

.author-name {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0 0 5px 0;
    color: #333;
}

.author-stats {
    display: flex;
    gap: 15px;
}

.stat {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.85rem;
    color: #666;
}

.stat ion-icon {
    font-size: 1rem;
}

.author-works {
    padding: 15px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.author-work-thumb {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 6px;
    background: #f0f0f0;
    transition: transform 0.2s ease;
}

.author-work-thumb:hover {
    transform: scale(1.05);
}

.author-work-placeholder {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #f0f0f0;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 0.8rem;
}

/* 图片加载动画 */
.image-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
    display: block;
}

.image-loading::before {
    content: '';
    display: block;
    width: 20px;
    height: 12px;
    background: transparent;
}

.dots-loading {
    display: flex;
    gap: 3px;
    width: 20px;
    height: 12px;
    justify-content: center;
    align-items: center;
}

.dots-loading div {
    width: 4px;
    height: 4px;
    background: #333;
    border-radius: 50%;
    animation: bounce 1.4s ease-in-out infinite both;
}

.dots-loading div:nth-child(1) { animation-delay: -0.32s; }
.dots-loading div:nth-child(2) { animation-delay: -0.16s; }

@keyframes bounce {
    0%, 80%, 100% { 
        transform: scale(0);
        opacity: 0.5;
    }
    40% { 
        transform: scale(1);
        opacity: 1;
    }
}

/* 基础心形按钮样式 */
.heart-button {
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.heart-button:hover {
    transform: scale(1.1);
    background: rgba(0, 0, 0, 0.3);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.heart-button.heart-animate {
    animation: heart-pulse 0.6s ease;
}

.heart-button.liked {
    background: rgba(231, 76, 60, 0.2);
}

.heart-button.liked:hover {
    background: rgba(231, 76, 60, 0.3);
}

/* 基础点赞计数样式 */
.heart-count {
    position: absolute;
    top: 45%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Raleway', sans-serif;
    font-weight: 600;
    color: rgba(0, 0, 0, 0.5);;
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 2;
}

.heart-count.heart-count-bounce {
    animation: count-bounce 0.3s ease;
}

/* 基础心形SVG样式 */
.heart-button svg {
    stroke: #ffffff;
    fill: #ffffff;
    transition: all 0.3s ease;
    z-index: 1;
    position: relative;
}

.heart-button:hover svg {
    stroke: #e74c3c;
    fill: #e74c3c;
}

.heart-button:hover .heart-count {
    color: #ffffff;
}

.heart-button.liked svg {
    stroke: #e74c3c;
    fill: #e74c3c;
}

.heart-button.liked .heart-count {
    color: white;
}

/* 缩略图点赞样式 */
.thumb-like-container {
    position: absolute;
    bottom: 65px;
    right: 5px;
    z-index: 10;
}

.thumb-heart {
    width: 42px;
    height: 42px;
    padding: 4px;
}

.thumb-like-count {
    font-size: 0.8rem;
}

.thumb-heart svg {
    width: 32px;
    height: 32px;
}

/* 全屏模式点赞样式 */
.fullscreen-like-container {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1002;
    display: none;
}

.fullscreen-heart {
    width: 60px;
    height: 60px;
    padding: 8px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.3);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.fullscreen-heart:hover {
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.fullscreen-like-count {
    font-size: 1rem;
}

.fullscreen-heart svg {
    width: 42px;
    height: 42px;
}

.fullscreen-heart.heart-button.liked {
    background: rgba(231, 76, 60, 0.3);
}

.fullscreen-heart.heart-button.liked:hover {
    background: rgba(231, 76, 60, 0.4);
}

@keyframes count-bounce {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.3); }
}

@keyframes heart-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* MATERIAL PHOTO GALLERY */
.m-p-g {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  padding-bottom: 80px;
}

.m-p-g__thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 15px;
  margin: 0 auto;
}

.m-p-g__thumb-item {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    background: #fff;
    aspect-ratio: 1 / 1;
    max-height: 300px;
    /*padding-bottom: 60px;*/
}

.m-p-g__thumbs-img {
  width: 100%;
  height: calc(100% - 60px);
  object-fit: contain;
  border-radius: 8px 8px 0 0;
  cursor: pointer;
  opacity: 1;
  filter: brightness(100%);
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  transition: all 0.3s ease;
  background-color: #f0f0f0;
}

.m-p-g__thumbs-img.lazy {
  opacity: 0.8;
  filter: blur(5px);
  transition: opacity 0.3s ease, filter 0.3s ease;
}

.m-p-g__thumbs-img.lazy-loaded {
  opacity: 1;
  filter: blur(0);
}

.m-p-g__thumbs-img:hover {
  filter: brightness(110%);
  transform: scale(1.02);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.m-p-g__thumbs-img.active {
  z-index: 50;
}

.m-p-g__fullscreen {
  position: fixed;
  z-index: 1000;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100vh;
  background: rgba(0, 0, 0, 0);
  visibility: hidden;
  transition: background 0.3s ease-out;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.m-p-g__fullscreen.active {
  visibility: visible;
  background: rgba(0, 0, 0, 0.95);
}

.m-p-g__fullscreen-container {
  position: relative;
  max-width: 90%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: default;
}

.m-p-g__fullscreen-img {
  max-width: 85%;
  max-height: 75vh;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 8px;
  margin-bottom: 20px;
}

.m-p-g__fullscreen.active .m-p-g__fullscreen-img {
  opacity: 1;
}

.m-p-g__fullscreen-info {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  backdrop-filter: blur(10px);
  padding: 15px 20px;
  color: white;
  text-align: center;
  z-index: 1001;
  max-height: 25vh;
  overflow-y: auto;
  background: rgba(0, 0, 0, 0.7);
}

.m-p-g__fullscreen-author {
  font-weight: 500;
  margin: 0 0 8px 0;
  font-size: 1rem;
  opacity: 0.9;
}

.m-p-g__fullscreen-name {
  font-weight: 600;
  margin: 0 0 10px 0;
  font-size: 1.2rem;
  color: #fff;
}

.m-p-g__fullscreen-description {
  margin: 0 0 12px 0;
  line-height: 1.5;
  opacity: 0.9;
  font-size: 0.95rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.m-p-g__fullscreen-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.m-p-g__fullscreen-tags .tag {
  background: rgba(255, 255, 255, 0.2);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
  backdrop-filter: blur(5px);
}

.m-p-g__controls {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.m-p-g__controls.active {
  opacity: 1;
  visibility: visible;
}

.m-p-g__controls-close,
.m-p-g__controls-arrow {
  appearance: none;
  border: none;
  background: none;
  cursor: pointer;
}

.m-p-g__controls-close:focus,
.m-p-g__controls-arrow:focus {
  outline: none;
}

.m-p-g__controls-arrow {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2001;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.m-p-g__controls-arrow:hover {
  opacity: 1;
}

.m-p-g__controls-arrow--prev {
  left: 20px;
}

.m-p-g__controls-arrow--next {
  right: 20px;
}

.m-p-g__controls-close {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 2001;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.m-p-g__controls-close:hover {
  opacity: 1;
}

.m-p-g__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.m-p-g__btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

.fullscreen-like-container {
    display: none;
}

/* 快速筛选栏样式 */
.quick-filter-container {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  padding: 15px 0;
  margin-bottom: 20px;
  align-items: center;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

.category-filters, .sort-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.filter-label {
  font-size: 14px;
  color: #666;
  font-weight: 500;
}

.category-tags {
  display: flex;
  gap: 8px;
}

.category-tag {
  padding: 6px 16px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 14px;
  color: #333;
}

.category-tag:hover {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(0, 0, 0, 0.25);
}

.category-tag.active {
  background: rgba(0, 0, 0, 0.1);
  border-color: rgba(0, 0, 0, 0.3);
}

.sort-dropdown {
  padding: 6px 12px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  font-family: 'Roboto Mono', monospace;
  font-size: 14px;
}

/* 图片元信息样式 */
.image-meta-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(10px);
  padding: 8px 10px;
  border-radius: 0 0 8px 8px;
  font-size: 12px;
  line-height: 1.4;
  z-index: 5;
}

.meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.meta-row:last-child {
  margin-bottom: 0;
}

.image-name {
  font-weight: 600;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 60%;
}

.image-price {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #333;
  white-space: nowrap;
}

.price-icon {
  font-size: 10px;
}

.author-link {
  color: #333;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 50%;
}

.author-link:hover {
  text-decoration: underline;
}

.image-size {
  color: #666;
  font-size: 11px;
  white-space: nowrap;
}

.contact-btn {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(10px);
  font-size: 12px;
  color: #333;
  z-index: 6;
}

.contact-btn:hover {
  background: rgba(255, 255, 255, 1);
}

/* 确保大图查看时导航栏隐藏 */
.m-p-g__fullscreen.active ~ .navibar-wrapper {
  display: none !important;
}

/* 新增样式：资源加载提示 */
.app-ready-prompt {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #4CAF50;
    color: white;
    padding: 12px 20px;
    border-radius: 5px;
    z-index: 10000;
    font-family: 'Roboto Mono', monospace;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    animation: app-slide-in-right 0.5s ease;
    display: flex;
    align-items: center;
}

/* 就绪提示动画 */
@keyframes app-slide-in-right {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 加载动画样式 */
.app-dots-loading {
    display: flex;
    gap: 3px;
    width: 20px;
    height: 12px;
    justify-content: center;
    align-items: center;
}

.app-dots-loading div {
    width: 4px;
    height: 4px;
    background: #333;
    border-radius: 50%;
    animation: app-bounce 1.4s ease-in-out infinite both;
}

.app-dots-loading div:nth-child(1) { animation-delay: -0.32s; }
.app-dots-loading div:nth-child(2) { animation-delay: -0.16s; }

@keyframes app-bounce {
    0%, 80%, 100% { 
        transform: scale(0);
        opacity: 0.5;
    }
    40% { 
        transform: scale(1);
        opacity: 1;
    }
}

/* 快速筛选栏显示修复 */
.quick-filter-bar {
    display: flex !important;
    flex-wrap: wrap;
    gap: 15px;
    padding: 15px 0;
    margin-bottom: 20px;
    align-items: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
}

/* 分类标签激活状态 */
.category-tag.active {
    background: rgba(0, 0, 0, 0.1);
    border-color: rgba(0, 0, 0, 0.3);
}

/* 作者作品图片占位样式 */
.author-work-thumb {
    background-color: #f5f5f5; /* 浅灰色背景 */
    border: 1px dashed #ddd;   /* 虚线边框 */
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    min-height: 80px; /* 确保有最小高度 */
    width: 100%;
    object-fit: cover; /* 保持图片比例 */
}

/* 图片加载失败时的特殊样式 */
.author-work-thumb[data-fallback-handled="true"] {
    background-color: #f9f9f9;
    border-color: #ccc;
}

/* 可选：添加占位图标 */
.author-work-thumb:not([src*="http"]),
.author-work-thumb[data-fallback-handled="true"] {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Ccircle cx='8.5' cy='8.5' r='1.5'%3E%3C/circle%3E%3Cpolyline points='21 15 16 10 5 21'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 24px 24px;
}

/* 图片正常加载时移除背景和边框 */
.author-work-thumb[src*="http"]:not([data-fallback-handled="true"]) {
    background: none;
    border: none;
}

/* 确保作者作品容器布局正常 */
.author-works {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 12px;
}

.author-work-placeholder {
    background-color: #f5f5f5;
    border: 1px dashed #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80px;
    color: #999;
    font-size: 12px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navibar-wrapper .wrapper {
        width: 20rem;
    }
    
    .m-p-g {
        padding: 0 15px;
        padding-bottom: 110px;
    }
    
    .m-p-g__thumbs {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 10px;
    }
    
    .m-p-g__thumb-item {
        max-height: 250px;
    }
    
    .thumb-heart {
        width: 38px;
        height: 38px;
    }
    
    .thumb-heart svg {
        width: 28px;
        height: 28px;
    }
    
    .thumb-like-count {
        font-size: 0.75rem;
    }
    
    .fullscreen-like-container {
        top: -90px;
    }
    
    .fullscreen-heart {
        width: 54px;
        height: 54px;
    }
    
    .fullscreen-heart svg {
        width: 38px;
        height: 38px;
    }
    
    .fullscreen-like-count {
        font-size: 0.9rem;
    }
    
    /* 作者页响应式 */
    .authors-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 15px;
    }
    
    .author-header {
        padding: 12px;
    }
    
    .author-avatar {
        width: 56px;
        height: 56px;
    }
    
    .author-name {
        font-size: 1.1rem;
    }
    
    .app-ready-prompt {
        top: 10px;
        right: 10px;
        left: 10px;
        text-align: center;
    }
    
    .quick-filter-bar {
        padding-left: 15px;
        padding-right: 15px;
        gap: 10px;
    }
    
    .category-filters, .sort-controls {
        flex-wrap: wrap;
    }
    
    /* 移动端移除hover效果 */
    .m-p-g__thumbs-img:hover {
        filter: brightness(100%) !important;
        transform: none !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    }
    
    .heart-button:hover {
        transform: none !important;
    }
    
    .author-card:hover {
        transform: none !important;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
    }
    
    .author-work-thumb:hover {
        transform: none !important;
    }
    
    /* 修复移动端搜索框点击问题 */
    .navsearch .searchbox {
        cursor: text;
    }
    
    .navsearch.active .searchbox {
        cursor: auto;
    }
}

@media (max-width: 480px) {
    .navibar-wrapper .wrapper {
        width: 18rem;
    }
    
    .m-p-g {
        padding: 0 10px;
        padding-bottom: 100px;
    }
    
    .m-p-g__thumbs {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 8px;
    }
    
    .m-p-g__thumb-item {
        max-height: 200px;
    }
    
    .thumb-heart {
        width: 34px;
        height: 34px;
    }
    
    .thumb-heart svg {
        width: 24px;
        height: 24px;
    }
    
    .thumb-like-count {
        font-size: 0.7rem;
    }
    
    .fullscreen-like-container {
        top: -80px;
    }
    
    .fullscreen-heart {
        width: 48px;
        height: 48px;
    }
    
    .fullscreen-heart svg {
        width: 32px;
        height: 32px;
    }
    
    .fullscreen-like-count {
        font-size: 0.85rem;
    }
    
    /* 作者页移动端优化 */
    .authors-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .author-header {
        padding: 10px;
    }
    
    .author-avatar {
        width: 48px;
        height: 48px;
    }
    
    .author-name {
        font-size: 1rem;
    }
    
    .author-stats {
        gap: 10px;
    }
    
    .stat {
        font-size: 0.8rem;
    }
}