html {
    background: var(--bg-body) !important;
    color: var(--text-secondary);
    position: relative;
}

@font-face {
    font-family: 'ali-font';
    src: url('/font/iconfont.ttf') format('truetype');
}

.ali-font {
    font-family: "ali-font";
}

img {
    max-width: none;
}

a {
    text-decoration: none;
    color: var(--text-secondary);
}

a:hover {
    color: var(--accent-color);
}

body {
    position: relative;
    z-index: -100;
    width: 100%;
    background: var(--bg-body);
}

input {
    outline: none;
}

#nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
    padding: 0 10px;
    background: var(--bg-card);
    box-shadow: var(--shadow-main);
    border-bottom: 1px solid var(--border-color);
}

#nav img.logo {
    max-height: 40px;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.theme-toggle-entry {
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--bg-body);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.theme-toggle-icon {
    position: relative;
    width: 20px;
    height: 20px;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 太阳样式 */
.sun {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 12px;
    background: #f39c12;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 8px #f1c40f;
    transition: all 0.5s ease;
}

/* 月亮样式 */
.moon {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    background: transparent;
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0) rotate(-45deg);
    box-shadow: inset -4px -2px 0 0 #f1c40f;
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 主题切换逻辑 */
[data-theme='dark'] .theme-toggle-icon {
    transform: rotate(360deg);
}

[data-theme='dark'] .sun {
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
}

[data-theme='dark'] .moon {
    transform: translate(-50%, -50%) scale(1) rotate(0deg);
    opacity: 1;
}

[data-theme='light'] .sun {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

[data-theme='light'] .moon {
    transform: translate(-50%, -50%) scale(0) rotate(-45deg);
    opacity: 0;
}

.site-name {
    color: var(--accent-color);
    font-size: 20px;
    font-weight: 600;
}

.image-error {
    background: #f2f2f2 !important;
    background-image: none !important;
    position: relative;
    overflow: hidden;
}

.image-error::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 44px;
    height: 44px;
    transform: translate(-50%, -50%);
    background: url('/image/img-load-failed.svg') no-repeat center;
    background-size: contain;
    opacity: 0.55;
    z-index: 3;
    pointer-events: none;
}

.image-error::before {
    display: none !important;
}
