/*
 * 新拟态柔和风 - 网址卡片样式
 * 适用于 https://okfm.cn/ 浅色模式
 * 使用方法：在主题中引入此CSS文件
 */

/* ============================================
   基础变量覆盖 - 新拟态柔和主题
   ============================================ */
:root {
    /* 主题色 - 柔和蓝灰 */
    --theme-color: #5a7a9a;
    --theme-color-rgb: 90, 122, 154;
    --theme-color-bg: rgba(90, 122, 154, 0.1);
    --hover-color: #4a6a8a;
    --focus-color: var(--theme-color);
    --focus-shadow-color: rgba(90, 122, 154, 0.3);

    /* 文字颜色 - 柔和深灰 */
    --main-color: #4a5a6a;
    --main-shadow: rgba(0, 0, 0, 0.06);

    /* 背景色 - 浅灰 */
    --main-bg-color: #e0e5ec;
    --body-bg-color: #e0e5ec;

    /* 模糊背景 */
    --main-blur-bg-color: rgba(224, 229, 236, 0.9);
    --main-blur-bg-color2: rgba(224, 229, 236, 0.95);
    --main-blur-bg-color3: rgba(224, 229, 236, 0.85);

    /* 辅助色 */
    --muted-color: #7a8a9a;
    --muted-color2: #8a9aaa;
    --muted-color3: #6a7a8a;
    --muted-bg-color: #d5dae3;
    --muted-bg-color-l: #e5eaf0;
    --muted-shadow: rgba(163, 177, 198, 0.3);
    --muted-bg-a-color: rgba(90, 122, 154, 0.06);
    --muted-blur-bg-color: rgba(224, 229, 236, 0.85);

    /* 圆角 */
    --main-radius: 16px;
}

/* ============================================
   网址卡片核心样式 - 新拟态柔和效果
   ============================================ */

/* 基础卡片 - 凸起效果 */
.posts-item.sites-item {
    position: relative;
    background: #e0e5ec !important;
    border: none;
    border-radius: var(--main-radius);
    box-shadow:
        8px 8px 16px rgba(163, 177, 198, 0.5),
        -8px -8px 16px rgba(255, 255, 255, 0.7);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 卡片悬停效果 - 阴影增大 */
.posts-item.sites-item:hover {
    background: #e0e5ec !important;
    box-shadow:
        12px 12px 24px rgba(163, 177, 198, 0.6),
        -12px -12px 24px rgba(255, 255, 255, 0.8);
    transform: translateY(-2px);
}

/* 卡片按下效果 - 凹陷 */
.posts-item.sites-item:active {
    box-shadow:
        inset 4px 4px 8px rgba(163, 177, 198, 0.5),
        inset -4px -4px 8px rgba(255, 255, 255, 0.7);
    transform: translateY(0);
}

/* 顶部柔光线 */
.posts-item.sites-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.6) 50%,
        transparent 100%
    );
    pointer-events: none;
    z-index: 1;
}

/* ============================================
   卡片内部元素样式
   ============================================ */

/* 图标区域 - 凸起效果 */
.posts-item.sites-item .item-media {
    width: 44px;
    height: 44px;
    padding-bottom: 0;
    border-radius: 12px;
    background: #e0e5ec;
    border: none;
    box-shadow:
        4px 4px 8px rgba(163, 177, 198, 0.4),
        -4px -4px 8px rgba(255, 255, 255, 0.6);
    overflow: hidden;
}

.posts-item.sites-item .item-image {
    border-radius: 12px;
}

/* 图标悬停 */
.posts-item.sites-item:hover .item-media {
    box-shadow:
        6px 6px 12px rgba(163, 177, 198, 0.5),
        -6px -6px 12px rgba(255, 255, 255, 0.7);
}

/* 标题样式 */
.posts-item.sites-item .item-title {
    font-size: 14px;
    font-weight: 500;
    color: #4a5a6a;
}

.posts-item.sites-item .item-title b {
    color: #3a4a5a;
    font-weight: 600;
}

.posts-item.sites-item .item-title a {
    color: #4a5a6a;
    transition: color 0.3s;
}

.posts-item.sites-item:hover .item-title a {
    color: #3a5a7a;
}

/* 摘要文字 */
.posts-item.sites-item .text-muted {
    color: #7a8a9a !important;
}

/* ============================================
   不同尺寸卡片适配
   ============================================ */

/* 默认尺寸 */
.sites-item.style-sites-default .sites-body {
    padding: 12px 14px;
}

/* 小尺寸 */
.sites-item.style-sites-min .sites-body {
    padding: 8px 10px;
}

.sites-item.style-sites-min .item-media {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    box-shadow:
        3px 3px 6px rgba(163, 177, 198, 0.4),
        -3px -3px 6px rgba(255, 255, 255, 0.6);
}

/* 大尺寸 */
.sites-item.style-sites-big .item-media,
.sites-item.style-sites-max .item-media {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    box-shadow:
        6px 6px 12px rgba(163, 177, 198, 0.4),
        -6px -6px 12px rgba(255, 255, 255, 0.6);
}

/* MAX 模式 */
.posts-item.sites-item.style-sites-max {
    flex-direction: column;
    background: #e0e5ec !important;
}

.posts-item.sites-item.style-sites-max .sites-body {
    padding: 14px 14px 4px 14px;
}

.sites-item.style-sites-max .sites-tags {
    padding: 6px 14px 12px 14px;
    margin-top: 4px;
}

.sites-item.style-sites-max .sites-tags::before {
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(163, 177, 198, 0.3) 50%,
        transparent 100%
    );
    height: 1px;
}

/* ============================================
   直达按钮样式
   ============================================ */

.sites-item .togo {
    color: #5a7a9a;
    opacity: 0.5;
    transition: all 0.3s;
}

.sites-item:hover .togo {
    opacity: 0.9;
    color: #4a6a8a;
}

.sites-item:not(.style-sites-max) .togo {
    right: 8px;
}

.sites-item:not(.style-sites-max):hover .togo {
    opacity: 0.85;
    transform: translate(8px, -50%);
}

/* ============================================
   标签样式 - 凸起效果
   ============================================ */

.sites-item .item-tags .badge {
    background: #e0e5ec !important;
    color: #5a7a9a !important;
    border: none;
    box-shadow:
        3px 3px 6px rgba(163, 177, 198, 0.4),
        -3px -3px 6px rgba(255, 255, 255, 0.6);
    font-weight: 400;
}

.sites-item .item-tags .badge:hover {
    background: #e0e5ec !important;
    box-shadow:
        4px 4px 8px rgba(163, 177, 198, 0.5),
        -4px -4px 8px rgba(255, 255, 255, 0.7);
}

/* ============================================
   背景模糊效果
   ============================================ */

.blur-img-bg {
    filter: blur(12px) opacity(40%);
    opacity: 0.2;
}

.posts-item.sites-item:hover .blur-img-bg {
    transform: scale(1);
    opacity: 0.25;
}

/* ============================================
   其他卡片类型适配
   ============================================ */

/* 文章卡片 */
.posts-item.post-item {
    background: #e0e5ec;
    border: none;
    border-radius: var(--main-radius);
    box-shadow:
        8px 8px 16px rgba(163, 177, 198, 0.5),
        -8px -8px 16px rgba(255, 255, 255, 0.7);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.posts-item.post-item:hover {
    box-shadow:
        12px 12px 24px rgba(163, 177, 198, 0.6),
        -12px -12px 24px rgba(255, 255, 255, 0.8);
    transform: translateY(-2px);
}

.posts-item.post-item:active {
    box-shadow:
        inset 4px 4px 8px rgba(163, 177, 198, 0.5),
        inset -4px -4px 8px rgba(255, 255, 255, 0.7);
}

/* 应用卡片 */
.posts-item.app-item {
    background: #e0e5ec;
    border: none;
    border-radius: var(--main-radius);
    box-shadow:
        8px 8px 16px rgba(163, 177, 198, 0.5),
        -8px -8px 16px rgba(255, 255, 255, 0.7);
}

/* 书籍卡片 */
.posts-item.book-item {
    background: #e0e5ec;
    border: none;
    border-radius: var(--main-radius);
    box-shadow:
        8px 8px 16px rgba(163, 177, 198, 0.5),
        -8px -8px 16px rgba(255, 255, 255, 0.7);
}

/* ============================================
   链接卡片样式
   ============================================ */

.link-card {
    background: #e0e5ec;
    border: none;
    border-radius: var(--main-radius);
    box-shadow:
        8px 8px 16px rgba(163, 177, 198, 0.5),
        -8px -8px 16px rgba(255, 255, 255, 0.7);
    transition: all 0.3s;
}

.link-card:hover {
    box-shadow:
        12px 12px 24px rgba(163, 177, 198, 0.6),
        -12px -12px 24px rgba(255, 255, 255, 0.8);
}

.link-card:active {
    box-shadow:
        inset 4px 4px 8px rgba(163, 177, 198, 0.5),
        inset -4px -4px 8px rgba(255, 255, 255, 0.7);
}

.link-card .link-img {
    background: #e0e5ec;
    border: none;
    border-radius: 12px;
    box-shadow:
        4px 4px 8px rgba(163, 177, 198, 0.4),
        -4px -4px 8px rgba(255, 255, 255, 0.6);
}

/* ============================================
   导航和头部样式适配
   ============================================ */

/* 导航栏 - 凸起效果 */
.navbar {
    background: #e0e5ec !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: none;
    box-shadow:
        0 4px 8px rgba(163, 177, 198, 0.4),
        0 -2px 4px rgba(255, 255, 255, 0.5);
}

/* 搜索框 - 凹陷效果 */
.search-form .form-control {
    background: #e0e5ec;
    border: none;
    box-shadow:
        inset 3px 3px 6px rgba(163, 177, 198, 0.4),
        inset -3px -3px 6px rgba(255, 255, 255, 0.6);
    color: #4a5a6a;
}

.search-form .form-control:focus {
    background: #e0e5ec;
    box-shadow:
        inset 4px 4px 8px rgba(163, 177, 198, 0.5),
        inset -4px -4px 8px rgba(255, 255, 255, 0.7);
    outline: none;
}

/* ============================================
   侧边栏小部件
   ============================================ */

.io-sidebar-widget.card {
    background: #e0e5ec;
    border: none;
    border-radius: var(--main-radius);
    box-shadow:
        8px 8px 16px rgba(163, 177, 198, 0.5),
        -8px -8px 16px rgba(255, 255, 255, 0.7);
}

/* ============================================
   内容面板样式
   ============================================ */

.panel.site-content.card,
.panel.card {
    background: #e0e5ec;
    border: none;
    border-radius: var(--main-radius);
    box-shadow:
        8px 8px 16px rgba(163, 177, 198, 0.5),
        -8px -8px 16px rgba(255, 255, 255, 0.7);
}

/* ============================================
   滚动条样式
   ============================================ */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #e0e5ec;
    border-radius: 4px;
    box-shadow:
        inset 2px 2px 4px rgba(163, 177, 198, 0.3),
        inset -2px -2px 4px rgba(255, 255, 255, 0.5);
}

::-webkit-scrollbar-thumb {
    background: #d0d5dc;
    border-radius: 4px;
    box-shadow:
        2px 2px 4px rgba(163, 177, 198, 0.4),
        -2px -2px 4px rgba(255, 255, 255, 0.6);
}

::-webkit-scrollbar-thumb:hover {
    background: #c8cdd5;
    box-shadow:
        3px 3px 6px rgba(163, 177, 198, 0.5),
        -3px -3px 6px rgba(255, 255, 255, 0.7);
}

/* ============================================
   动画效果 - 柔和呼吸
   ============================================ */

@keyframes soft-breathe {
    0%, 100% {
        box-shadow:
            8px 8px 16px rgba(163, 177, 198, 0.5),
            -8px -8px 16px rgba(255, 255, 255, 0.7);
    }
    50% {
        box-shadow:
            10px 10px 20px rgba(163, 177, 198, 0.55),
            -10px -10px 20px rgba(255, 255, 255, 0.75);
    }
}

.posts-item.sites-item::after {
    animation: none;
}

/* ============================================
   响应式适配
   ============================================ */

@media (max-width: 768px) {
    .posts-item.sites-item {
        box-shadow:
            6px 6px 12px rgba(163, 177, 198, 0.5),
            -6px -6px 12px rgba(255, 255, 255, 0.7);
    }

    .posts-item.sites-item:hover {
        box-shadow:
            8px 8px 16px rgba(163, 177, 198, 0.55),
            -8px -8px 16px rgba(255, 255, 255, 0.75);
    }

    .sites-item.style-sites-default .sites-body {
        padding: 10px 12px;
    }

    .navbar {
        box-shadow:
            0 3px 6px rgba(163, 177, 198, 0.4),
            0 -1px 2px rgba(255, 255, 255, 0.5);
    }
}
