/* ========================================
   Cookie同意横幅
======================================== */
.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.cookie-consent-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.cookie-consent-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.cookie-consent-content {
    flex: 1;
    min-width: 0;
}

.cookie-consent-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--color-text);
}

.cookie-consent-desc {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    line-height: 1.5;
    margin: 0;
}

.cookie-consent-desc a {
    color: var(--color-primary);
    text-decoration: underline;
    margin-left: 0.25rem;
}

.cookie-consent-desc a:hover {
    color: var(--color-primary-dark);
}

.cookie-consent-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .cookie-consent-inner {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
        gap: 1rem;
    }

    .cookie-consent-icon {
        display: none;
    }

    .cookie-consent-actions {
        width: 100%;
    }

    .cookie-consent-actions .btn {
        flex: 1;
    }
}

/* ========================================
   性能优化相关样式
======================================== */

/* 图片懒加载占位 */
img[loading="lazy"] {
    transition: opacity 0.3s ease;
}

/* 骨架屏样式（供后续扩展） */
.skeleton {
    background: linear-gradient(
        90deg,
        var(--color-bg-secondary) 25%,
        var(--color-border-light) 50%,
        var(--color-bg-secondary) 75%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* 减少动画（尊重用户偏好） */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
