/* index.css */

body {
    font-family: 'Noto Sans SC', sans-serif;
}

.blur-control-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 50%;
    z-index: 1000;
    cursor: pointer;
    transition: all 0.3s ease;
}

.blur-control-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.blur-slider-container {
    position: fixed;
    top: 20px; /* 与按钮顶部对齐 */
    right: 65px; /* 位于按钮左侧 */
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 10px;
    padding: 10px;
    z-index: 1000;
    width: 140px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.blur-slider {
    width: 100px;
    margin: 0 auto 5px;
}

.blur-value-display {
    text-align: center;
    font-size: 12px;
    color: white;
    margin-bottom: 5px;
}

/* 新增：侧栏按钮样式 */
#favorites-btn {
    /* 继承 blur-control-btn 的样式，只需调整位置 */
    right: 70px; /* 位于模糊按钮左侧 */
}

/* 新增：侧栏样式 */
.favorites-sidebar {
    position: fixed;
    top: 0;
    right: -350px; /* 初始位置在屏幕外 */
    width: 320px; /* 侧栏宽度 */
    height: 100%;
    background: rgba(42, 42, 42, 0.6); /* 毛玻璃背景 */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 15px 0 0 15px; /* 左侧圆角 */
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1); /* 左侧阴影 */
    z-index: 1001; /* 位于其他内容之上 */
    transition: right 0.3s ease; /* 滑入滑出动画 */
    display: flex;
    flex-direction: column;
}

.favorites-sidebar.open {
    right: 0; /* 显示时的位置 */
}

.favorites-sidebar-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto; /* 内容溢出时可滚动 */
}

.favorites-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1); /* 分隔线 */
}

.favorites-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 调整为2列 */
    grid-auto-rows: max-content; /* 关键：让网格行高度由内容决定 */
    gap: 8px; /* 保持较小的间距 */
    flex: 1;
}

.favorite-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px 5px; /* 进一步减小内边距 */
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    color: white;
    text-decoration: none;
    transition: all 0.2s ease-in-out;
    /* 移除 aspect-ratio: 3 / 1; */
    /* 移除 min-height: 40px; */
    /* 移除 height: auto; */
    text-align: center;
    /* 让元素高度由内容决定 */
    height: auto;
    align-self: start; /* 关键：让网格项对齐到网格区域的起始位置，而不是拉伸 */
}

.favorite-item:hover {
    background: rgba(255, 255, 255, 0.25);
    /* 移除 transform: translateY(-2px); 如果希望保持原地悬停效果 */
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.favorite-label {
    font-size: 14px;
    word-break: break-word;
    line-height: 1.2;
    width: 100%;
    display: block;
    margin: 0; /* 确保内部没有额外的边距 */
}

/* 自定义透明度类 */
.opacity-custom-60 {
    opacity: 0.6; /* 设置透明度为 60% */
}

.opacity-custom-70 {
    opacity: 0.7; /* 可选：设置透明度为 70% */
}

.opacity-custom-50 {
    opacity: 0.5; /* 可选：设置透明度为 50% */
}

/* 为运行时间显示中的 *所有* 直接子元素之间添加间距 */
#uptime-display {
    gap: 0.25rem; /* Tailwind 的 gap-1 等于 0.25rem */
}