/* 页面基础样式 */
body.tools-page {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    margin: 0;
    display: block;
    min-height: 100vh;
    overflow-x: hidden;
}

body {
    visibility: visible !important;
}

.content-wrapper, .tool-card, .tool-content, .tool-info, .page-header {
    visibility: visible !important;
    opacity: 1 !important;
    min-height: auto;
    height: auto;
}

/* 背景样式 - 整页统一滤镜，无上半部分阴影 */
.bg-container {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 0 !important;
    overflow: hidden !important;
    background: url('/image/tools.png') center/cover no-repeat fixed !important;
    pointer-events: none !important;
}

.bg-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 0;
}

/* 主题切换按钮 - 固定右下角 */
.theme-toggle-btn-fixed {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid rgba(80, 50, 60, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.theme-toggle-btn-fixed:hover {
    background: #0d6efd;
    color: white;
    border-color: #0d6efd;
    transform: scale(1.1);
}

.theme-toggle-btn-fixed i {
    font-size: 1.3rem;
}

/* 页面标题 */
.page-header {
    margin-bottom: 2rem;
    text-align: center;
    padding: 0 20px;
    margin-top: 50px;
    position: relative;
    z-index: 5;
}

.page-title {
    color: white;
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.page-subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
}

/* 工具容器 */
.tools-container {
    display: flex;
    gap: 20px;
    justify-content: flex-start;
    flex-wrap: wrap;
    position: relative;
    z-index: 5;
    margin-top: 2rem;
    min-height: 500px;
    padding: 0;
    padding-bottom: 100px;
}

.tool-column-left {
    flex-direction: column;
    gap: 20px;
    flex: 1;
    min-width: 300px;
    padding-left: 0;
}

.tool-column-right {
    flex-direction: column;
    gap: 20px;
    flex: 1;
    min-width: 300px;
}

/* 工具卡片 */
.tool-card {
    background-color: rgba(0, 0, 0, 0.3);
    backdrop-filter: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: none;
    transition: all 0.3s ease;
    cursor: pointer;
    overflow: hidden;
    position: relative;
    z-index: 10;
}

.tool-card:hover {
    border-color: rgba(255, 255, 255, 0.5);
    background-color: rgba(255, 255, 255, 0.2);
}

.tool-content {
    padding: 1rem 1.5rem 1rem 1.2rem;
    display: flex;
    align-items: center;
    gap: 15px;
}

.tool-icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    background: linear-gradient(135deg, #0d6efd, #6f42c1);
    color: white;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.tool-icon-image {
    background: none;
}

.tool-icon-img {
    width: 100%;
    height: 100%;
    border-radius: 4px;
}

.tool-card:hover .tool-icon {
    transform: scale(1.1);
}

.tool-info {
    flex-grow: 1;
    color: white;
    text-align: left;
    min-width: 0;
    max-width: 157px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.tool-info h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    margin: 0 0 0.25rem 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tool-info p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tool-card:hover .tool-info h3 {
    color: #0d6efd;
}

/* 页面容器 */
.page-container {
    display: flex;
    min-height: 100vh;
    overflow-y: visible;
    overflow-x: hidden;
    position: relative;
    width: 100%;
}

.main-content {
    flex-grow: 1;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
    margin-left: 150px;
    transition: margin-left 0.3s ease;
}

.content-wrapper {
    transition: all 0.3s ease;
    margin-left: 0;
    padding: 2rem 1rem 2rem 2rem;
    min-height: 120vh;
    height: auto;
}

/* 筛选栏区域 */
.filter-bar {
    display: flex;
    align-items: center;
    padding: 26px 20px;
    gap: 15px;
}

/* 切换按钮 - SVG三条杠 */
.toggle-sidebar-btn {
    background: transparent;
    color: #000;
    border: none;
    width: 26px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    margin-left: 8px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.toggle-sidebar-btn:hover {
    color: white;
}

.toggle-sidebar-btn:hover svg path {
    stroke: currentColor;
}

.toggle-sidebar-btn svg {
    width: 100%;
    height: 100%;
}

.toggle-sidebar-btn svg path {
    fill: none;
    stroke: currentColor;
    stroke-width: 8;
    stroke-linecap: round;
}

.filter-categories {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.page-container.sidebar-collapsed .filter-bar {
    padding-left: 25px;
}

/* 搜索栏样式 */
.search-wrapper {
    margin: 2rem auto;
    max-width: 800px;
    padding: 2rem;
    background-color: transparent;
    border-radius: 0;
}

.s-search {
    max-width: 700px;
    margin: 0 auto;
}

#search-list-menu .s-type-list {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

#search-list-menu .s-type-list label {
    cursor: pointer;
    padding-bottom: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.super-search-fm {
    position: relative;
    display: flex;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    overflow: hidden;
    background-color: rgba(255, 255, 255, 0.5);
    transition: border-color 0.3s ease;
}

.super-search-fm:focus-within {
    border-color: #0d6efd;
}

.super-search-fm input {
    flex-grow: 1;
    padding: 15px 20px;
    border: none;
    background-color: transparent;
    color: #333;
    font-size: 1rem;
    outline: none;
}

.super-search-fm input::placeholder {
    color: #666;
}

.super-search-fm button {
    padding: 0 20px;
    border: none;
    background-color: #0d6efd;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.super-search-fm button svg {
    width: 20px;
    height: 20px;
}

.super-search-fm button:hover {
    background-color: #0b5ed7;
}

#search-list .search-group {
    display: none;
}

#search-list .search-group.s-current {
    display: block;
}

#search-list .search-type {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
}

#search-list .search-type label {
    cursor: pointer;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

/* 个人工具框体样式 */
.personal-tool-wrapper {
    display: block;
    margin: 0;
    background-color: transparent;
    padding: 20px 0 0 0;
    text-align: left;
}

.personal-tool-wrapper .tool-card-link {
    display: revert;
    border-radius: 0;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease;
}

.personal-tool-wrapper .tool-card-link.personal-item {
    display: block;
    max-width: 350px;
    margin: 0;
    border-radius: 12px;
    overflow: hidden;
    text-align: left;
}

.personal-tool-wrapper .tool-card-link.personal-item:hover {
    transform: scale(1.05);
    z-index: 10;
}

.personal-tool-wrapper .category-title,
.movie-resource-wrapper .category-title {
    color: #fff;
    text-shadow: 0 0 3px rgba(255, 255, 255, 0.5), 0 0 5px rgba(255, 255, 255, 0.3);
    font-size: 1.5rem;
    padding: 0;
    background-color: transparent;
    border-radius: 0;
    margin-bottom: 20px;
    text-align: left;
    padding-left: 0;
    margin-left: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.category-title i {
    margin-right: 10px;
    color: inherit;
}

.category-icon svg {
    stroke: currentColor;
}

/* 个人工具卡片 */

.personal-tool-wrapper .tool-card,
.movie-resource-wrapper .tool-card {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 100%;
    max-width: none;
    border-radius: 12px;
}

.personal-tool-wrapper .tool-card .tool-content,
.movie-resource-wrapper .tool-card .tool-content {
    display: flex;
    align-items: center;
    padding: 1rem;
    position: relative;
    overflow: visible;
    min-height: 75px;
}

.personal-tool-wrapper .tool-icon,
.movie-resource-wrapper .tool-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-right: 10px;
    font-size: 1.8rem;
    position: relative;
    z-index: 2;
}

.personal-tool-wrapper .tool-info,
.movie-resource-wrapper .tool-info {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    width: calc(100% - 50px);
    position: relative;
    z-index: 2;
}

.personal-tool-wrapper .tool-info h3,
.movie-resource-wrapper .tool-info h3 {
    font-size: 1.05rem;
    margin: 0 0 6px 0;
    padding: 0;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #fff;
    font-weight: 600;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.personal-tool-wrapper .tool-info p,
.movie-resource-wrapper .tool-info p {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    padding: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
    line-height: 1.3;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    max-height: none !important;
}

.styled-card:hover .tool-info h3 {
    color: #0d6efd !important;
}

.styled-card .tool-card {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 245px;
    height: 75px;
    margin: 0;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.styled-card .tool-card:hover {
    border-color: #0d6efd;
    background-color: rgba(255, 255, 255, 0.15);
}

.styled-card .tool-content {
    display: flex;
    align-items: center;
    width: 100%;
    overflow: hidden;
}

.styled-card .tool-info {
    min-width: 0;
    max-width: 157px !important;
    flex: 1 1 auto;
}

.styled-card .tool-info h3,
.styled-card .tool-info p {
    color: #fff !important;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    max-width: 100%;
}

.styled-card:hover .tool-info h3 {
    color: #0d6efd;
}

.styled-card {
    display: block;
    text-align: left;
    text-decoration: none;
}

.styled-card .tool-card {
    background-color: var(--card-bg);
    border-color: var(--card-border);
}

.styled-card .tool-card:hover {
    border-color: var(--card-hover-border);
    background-color: var(--card-hover-bg);
}

.styled-card .tool-info h3,
.styled-card .tool-info p {
    color: var(--text-color) !important;
}

.sidebar.sidebar-collapsed .sidebar-link i {
    margin-right: 0;
}

.sidebar-custom-tooltip {
    position: fixed;
    display: none;
    padding: 8px 12px;
    background-color: #333;
    color: white;
    border-radius: 6px;
    z-index: 10001;
    font-size: 0.9rem;
    pointer-events: none;
}

.custom-tooltip {
    position: absolute;
    display: none;
    padding: 8px 12px;
    background-color: #333;
    color: #88d8b0;
    border-radius: 6px;
    z-index: 10001;
    font-size: 0.9rem;
    text-align: left;
    max-width: 300px;
    white-space: normal;
    word-wrap: break-word;
}

.custom-tooltip::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid #212529;
}

.tool-divider {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    margin: 25px 0;
}

.tool-cards-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.personal-tool-wrapper .tool-cards-grid,
.movie-resource-wrapper .tool-cards-grid,
.game-sites-wrapper .tool-cards-grid {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    margin-left: 0;
    padding-left: 0;
    gap: 20px;
}

.personal-tool-wrapper .tool-info {
    min-width: 0;
    z-index: 5 !important;
}

/* 图标预定义 */
.sidebar-link i.fa-th-large:before { content: "\f00a"; }
.sidebar-link i.fa-user-cog:before { content: "\f4fe"; }
.sidebar-link i.fa-film:before { content: "\f008"; }
.sidebar-link i.fa-gamepad:before { content: "\f11b"; }
.sidebar-link i.fa-angle-left:before { content: "\f104"; }
.sidebar-link i.fa-angle-right:before { content: "\f105"; }
.sidebar-link i.fa-search:before { content: "\f002"; }
.sidebar-link i.fa-home:before { content: "\f015"; }

.fas[class*="fa-"] {
    visibility: visible !important;
    opacity: 1 !important;
    display: inline-block !important;
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    -webkit-font-smoothing: antialiased;
    width: 1.25em !important;
    text-align: center !important;
}

body.icons-ready i.fas {
    animation: none !important;
}

/* 每日名言样式 */
.quote-container {
    text-align: center;
    margin: 20px auto;
    padding: 20px;
    background: transparent;
    box-shadow: none;
}

#daily-quote {
    font-size: 1.3rem;
    color: var(--quote-color);
    font-weight: bold;
    line-height: 1.6;
    text-shadow: 0px 1px 3px rgba(0, 0, 0, 0.5);
    max-width: 60ch;
    margin-left: auto;
    margin-right: auto;
}

.gequbao-icon-size {
    width: 53px !important;
    height: 53px !important;
}

.guanying-icon-size {
    width: 48px !important;
    height: 48px !important;
    font-size: 2rem;
}

.tools-page footer {
    max-width: none;
    margin-left: auto;
    margin-right: auto;
    width: calc(100% - 200px);
    padding: 2rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background-color: transparent;
    border-radius: 0;
}

.tools-page footer div[style*="margin-right: -190px"] {
    margin-right: -250px !important;
}

.tools-page .footer-box {
    width: auto !important;
    margin-left: 0 !important;
    background-color: transparent !important;
    border-top: none !important;
    padding: 0 !important;
}

@media (max-width: 1200px) {
    .tools-container {
        width: 100%;
        padding: 0 15px;
    }

    .tool-card {
        flex-basis: calc(50% - 10px);
    }
}