/* ToolCat 工具猫 - 前台样式 */

/* 全局样式 */
:root {
    --primary-color: #1e88e5;
    --primary-dark: #1565c0;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --border-radius: 8px;
    --box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
    --gradient-start: #5b9df9;
    --gradient-end: #7ad1ff;
    --radius-lg: 14px;
    --shadow-soft: 0 6px 20px rgba(30,136,229,0.12);
    --shadow-hover: 0 10px 28px rgba(30,136,229,0.18);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
}

/* 导航栏样式 */
.navbar {
    background: linear-gradient(135deg, #1e88e5 0%, #1565c0 100%);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    padding: 0.75rem 0;
}

/* 现代化导航栏增强 */
.navbar.navbar-modern {
    background: linear-gradient(135deg, #ffffff 0%, #f3f4f7 100%);
    backdrop-filter: blur(8px) saturate(130%);
    -webkit-backdrop-filter: blur(8px) saturate(130%);
    border-bottom: 1px solid rgba(0,0,0,0.06);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    position: relative;
    z-index: 9999; /* 导航整体置于最顶层 */
}

/* Light/Dark 主题联动：在深色主题下保持深色导航 */
:root[data-theme="dark"] .navbar.navbar-modern {
    background: linear-gradient(135deg, #272a33 0%, #1f232b 100%);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 8px 24px rgba(0,0,0,0.18);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2b2f36 !important;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar-brand i {
    font-size: 1.75rem;
    background: linear-gradient(135deg, #6ee7ff, #a78bfa);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.navbar-brand:hover {
    opacity: 0.9;
    transition: var(--transition);
}

.navbar-nav {
    margin-left: 0;
}

.navbar.navbar-modern .nav-link {
    position: relative;
    color: #2b2f36 !important;
    margin: 0 0.25rem;
    /*padding: 0.5rem 0.85rem !important;*/
    transition: color 0.2s ease, background 0.2s ease;
    font-weight: 500;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    font-size: 0.92rem;
}
/* 图标与文字的默认间距与对齐（支持标题中插入 <i class="bi ...">） */
.navbar.navbar-modern .nav-link i.bi { margin-right: 0.35rem; vertical-align: middle; line-height: 1; font-size: 1rem; }

:root[data-theme="dark"] .navbar.navbar-modern .nav-link {
    color: rgba(255,255,255,0.92) !important;
}

.navbar.navbar-modern .nav-link:hover,
.navbar.navbar-modern .nav-link:focus {
    color: #111827 !important;
    background: rgba(0,0,0,0.06);
}

:root[data-theme="dark"] .navbar.navbar-modern .nav-link:hover,
:root[data-theme="dark"] .navbar.navbar-modern .nav-link:focus {
    color: #ffffff !important;
    background: rgba(255,255,255,0.12);
}

.navbar.navbar-modern .nav-link::after {
    content: "";
    position: absolute;
    left: 0; bottom: -2px;
    width: 0; height: 3px;
    border-radius: 2px;
    background: linear-gradient(90deg, #5b9df9, #7ad1ff);
    transition: width 200ms ease;
    pointer-events: none; /* 防止伪元素覆盖点击区域 */
}
.navbar.navbar-modern .nav-link:hover::after,
.navbar.navbar-modern .nav-link.active::after { width: 100%; }

:root[data-theme="dark"] .navbar.navbar-modern .nav-link::after {
    background: linear-gradient(90deg, #6ee7ff, #a78bfa);
}

.navbar.navbar-modern .dropdown-menu {
    border-radius: 10px;
    box-shadow: 0 10px 24px rgba(0,0,0,0.08);
    border: 1px solid rgba(0,0,0,0.06);
    background: #ffffff;
    z-index: 1100; /* 确保位于 hero 区域之上 */
    --bs-dropdown-link-active-bg: #d3d3d3; /* 浅色模式激活背景色 */
}

.navbar.navbar-modern .dropdown-item { display: flex; align-items: center; color: #2b2f36; }
.navbar.navbar-modern .dropdown-item:hover, .navbar.navbar-modern .dropdown-item:focus { 
    color: #111827; 
    background: rgba(91,157,249,0.08);
}
/* 下拉项图标与文字间距与对齐 */
.navbar.navbar-modern .dropdown-item i.bi { margin-right: 0.5rem; vertical-align: middle; line-height: 1; font-size: 1rem; }

:root[data-theme="dark"] .navbar.navbar-modern .dropdown-menu {
    background: linear-gradient(135deg, rgba(40,45,54,0.96), rgba(30,33,39,0.96));
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 12px 28px rgba(0,0,0,0.35);
}
:root[data-theme="dark"] .navbar.navbar-modern .dropdown-item { color: rgba(255,255,255,0.92); }
:root[data-theme="dark"] .navbar.navbar-modern .dropdown-item:hover, 
:root[data-theme="dark"] .navbar.navbar-modern .dropdown-item:focus {
    color: #ffffff; 
    background: linear-gradient(90deg, rgba(110,231,255,0.18), rgba(167,139,250,0.18));
}
}

/* 语言切换器 */
.navbar.navbar-modern .language-switcher .dropdown-toggle {
    background: rgba(0,0,0,0.04);
    border: 1px solid rgba(0,0,0,0.12);
    color: #2b2f36;
    padding: 0.375rem 0.75rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.navbar.navbar-modern .language-switcher .dropdown-toggle:hover {
    background: rgba(0,0,0,0.06);
    border-color: rgba(0,0,0,0.18);
}

:root[data-theme="dark"] .navbar.navbar-modern .language-switcher .dropdown-toggle {
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.28);
    color: #ffffff;
}
:root[data-theme="dark"] .navbar.navbar-modern .language-switcher .dropdown-toggle:hover {
    background: rgba(255,255,255,0.18);
    border-color: rgba(255,255,255,0.38);
}

.language-switcher .dropdown-menu {
    min-width: 150px;
    z-index: 1100; /* 语言下拉同样提升层级 */
    --bs-dropdown-link-active-bg: #d3d3d3; /* 浅色模式激活背景色 */
}

/* Hero Section with Search */
.hero-search-section {
    position: relative;
    padding: 5rem 0 6rem;
    margin-bottom: 0;
    text-align: center;
    overflow: visible; 
}

/* Canvas动态背景 */
.hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-search-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 50%, rgba(255,255,255,0.1) 0%, transparent 50%);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
}

.hero-search-section .container {
    position: relative;
    z-index: 3;
}

.hero-search-section .hero-icon {
    font-size: 4rem;
    color: #ffffff;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.hero-search-section .hero-title {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.hero-search-section .hero-subtitle {
    font-size: 1.2rem;
    color: rgba(255,255,255,0.95);
    font-weight: 400;
    line-height: 1.8;
    max-width: 700px;
    margin: 0 auto 2.5rem;
    text-shadow: 0 1px 5px rgba(0,0,0,0.1);
}

/* Index Search Box (首页搜索框) */
.index-search-box {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.index-search-box .input-group {
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    border-radius: 50px;
    overflow: hidden;
}

.index-search-box .input-group-text {
    background: white;
    border: none;
    padding: 0.75rem 1rem 0.75rem 1.5rem;
    color: var(--primary-color);
    font-size: 1.2rem;
}

.index-search-box .form-control {
    border: none;
    padding: 0.75rem 0.5rem;
    font-size: 1rem;
    box-shadow: none !important;
    background: white;
}

.index-search-box .form-control:focus {
    outline: none;
    box-shadow: none;
}

.index-search-box .index-search-btn {
    border: none;
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    color: white;
    font-weight: 600;
    border-radius: 0 50px 50px 0;
    transition: all 0.3s;
}

.index-search-box .index-search-btn:hover {
    background: #fff;
    color: #1e88e5;
    transform: translateX(2px);
}

.index-search-box .index-search-btn i {
    margin-right: 0.5rem;
}

/* Index Search Results Dropdown (首页搜索结果下拉框) */
.index-search-results {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    max-height: 500px;
    overflow-y: auto;
    z-index: 1000;
}

.search-results-content {
    padding: 0.5rem 0;
}

.search-result-item {
    display: block;
    padding: 1rem 1.5rem;
    text-decoration: none;
    color: var(--dark-color);
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background-color: #f8f9fa;
}

.search-result-title {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.25rem;
    color: var(--dark-color);
}

.search-result-title i {
    color: var(--primary-color);
    margin-right: 0.5rem;
}

.search-result-category {
    font-size: 0.75rem;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.search-result-description {
    font-size: 0.85rem;
    color: var(--secondary-color);
    line-height: 1.4;
}

.search-result-item mark {
    background-color: #fff3cd;
    padding: 0 2px;
    border-radius: 2px;
}

.search-result-more {
    display: block;
    padding: 0.75rem 1.5rem;
    text-align: center;
    color: var(--primary-color);
    font-size: 0.9rem;
    font-weight: 600;
    border-top: 1px solid #f0f0f0;
    text-decoration: none;
    transition: background-color 0.2s;
}

.search-result-more:hover {
    background-color: #f8f9fa;
    color: var(--primary-hover);
}

.search-result-more i {
    margin-right: 0.5rem;
}

.search-no-results {
    padding: 2rem 1.5rem;
    text-align: center;
    color: var(--secondary-color);
}

.search-no-results i {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
    opacity: 0.5;
}

.search-no-results p {
    margin: 0.5rem 0;
    font-weight: 500;
}

.search-no-results small {
    color: var(--secondary-color);
    opacity: 0.8;
}

.search-loading,
.search-error {
    padding: 1.5rem;
    text-align: center;
    color: var(--secondary-color);
}

.search-loading i,
.search-error i {
    font-size: 1.5rem;
    margin-right: 0.5rem;
}

.search-error {
    color: #dc3545;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-search-section {
        padding: 3rem 0 4rem;
    }

    .hero-search-section .hero-title {
        font-size: 2rem;
    }

    .hero-search-section .hero-subtitle {
        font-size: 1rem;
    }

    .index-search-box {
        max-width: 100%;
        padding: 0 1rem;
    }
}



/* No Results */
.no-results {
    text-align: center;
    padding: 4rem 2rem;
}

.no-results-icon {
    font-size: 5rem;
    color: var(--secondary-color);
    opacity: 0.3;
    margin-bottom: 1.5rem;
}

.no-results-title {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 1rem;
}

.no-results-text {
    font-size: 1.1rem;
    color: var(--secondary-color);
    margin-bottom: 2rem;
}

/* Search Suggestions */
.search-suggestions {
    max-width: 800px;
    margin: 3rem auto;
    text-align: left;
}

.search-suggestions h4 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 1rem;
}

.suggestion-card {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    text-decoration: none;
    color: var(--dark-color);
    transition: all 0.3s;
}

.suggestion-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(30, 136, 229, 0.15);
    transform: translateY(-2px);
}

.suggestion-card i {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-right: 1rem;
}

.suggestion-card span {
    font-weight: 500;
}

/* Tool Category Badge */
.tool-category {
    font-size: 0.85rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.tool-category i {
    margin-right: 0.25rem;
}

/* Section Styles */
.section {
    margin-bottom: 3rem;
    /* padding: 3rem 0; */

}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e9ecef;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark-color);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-title i {
    color: var(--primary-color);
    font-size: 1.25rem;
}

.section-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.95rem;
}

.section-link:hover {
    color: var(--primary-dark);
}

.section-link i {
    transition: transform 0.3s ease;
    font-size: 0.875rem;
}

.section-link:hover i {
    transform: translateX(3px);
}

/* 页面标题 */
.page-header {
    background: white;
    padding: 2rem 0;
    margin-bottom: 2rem;
    box-shadow: var(--box-shadow);
}

.page-title {
    font-size: 2rem;
    font-weight: bold;
    color: var(--dark-color);
    margin: 0;
}

.page-description {
    color: var(--secondary-color);
    margin-top: 0.5rem;
}

/* 卡片样式 */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    margin-bottom: 1.5rem;
}

/* .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
} */

.card-header {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
    border: none;
    border-radius: var(--border-radius) var(--border-radius) 0 0 !important;
    padding: 1rem 1.5rem;
    font-weight: 600;
}

.card-body {
    padding: 1.5rem;
}

/* 分类页面 */
.category-header {
    padding: 2rem 0;
    border-bottom: 2px solid #e9ecef;
}

.category-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.category-title i {
    color: var(--primary-color);
}

.category-description {
    font-size: 1rem;
    color: var(--secondary-color);
    margin: 0;
    line-height: 1.6;
}

/* 分类卡片 */
.category-card {
    background: white;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.category-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 16px rgba(30, 136, 229, 0.2);
}

.category-card .card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.category-card .card-title i {
    color: var(--primary-color);
}

.category-card .card-text {
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.category-card .btn {
    font-size: 0.875rem;
}

/* 工具卡片 */
.tool-card {
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    height: 100%;
    border: 1px solid rgba(30,136,229,0.06);
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
}

.tool-card:hover {
    transform: translateY(-4px);
    border-color: rgba(30,136,229,0.25);
    box-shadow: var(--shadow-hover);
}

.tool-icon {
    display: inline-block;
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.tool-card:hover .tool-icon {
    transform: none;
    box-shadow: none;
}

.tool-icon img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.08));
}

.tool-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 0.75rem;
    letter-spacing: 0.2px;
}

.tool-description {
    font-size: 0.92rem;
    color: #606c80;
    margin-bottom: 1.25rem;
    flex-grow: 1;
    line-height: 1.7;
}

.tool-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    padding: 0.6rem 1.35rem;
    border-radius: 999px;
    font-size: 0.95rem;
    box-shadow: 0 6px 16px rgba(30,136,229,0.25);
}

.tool-link:hover {
    filter: brightness(1.05);
    transform: translateX(2px);
    color: white;
}

.tool-link i {
    transition: transform 0.3s ease;
    font-size: 0.875rem;
}

.tool-link:hover i {
    transform: translateX(3px);
}

/* 工具页面样式 */
.tool-container {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--box-shadow);
    margin-bottom: 2rem;
}

.tool-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--light-color);
}

.tool-content {
    margin-bottom: 2rem;
}

.tool-textarea {
    width: 100%;
    min-height: 300px;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    resize: vertical;
}

.tool-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13,110,253,0.25);
}

.tool-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 1rem;
}

.tool-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13,110,253,0.25);
}

/* 按钮样式 */
.btn {
    border-radius: 20px;
    padding: 0.5rem 1.5rem;
    font-weight: 500;
    transition: var(--transition);
}

.btn-primary {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    border: none;
    box-shadow: 0 6px 16px rgba(30,136,229,0.25);
}

.btn-primary:hover {
    filter: brightness(1.06);
    transform: translateY(-2px);
}

.btn-group .btn {
    border-radius: 20px;
    margin: 0 0.25rem;
}

/* Section 标题样式 */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.section-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--dark-color);
    position: relative;
    padding-left: 0.75rem;
}

.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 24px;
    border-radius: 2px;
    background: linear-gradient(180deg, var(--gradient-start), var(--gradient-end));
}

/* 相关工具 */
.related-tools {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--box-shadow);
}

.related-tools h5 {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
    color: var(--dark-color);
}

.related-tool-item {
    display: flex;
    align-items: flex-start;
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 0.75rem;
    transition: var(--transition);
    border: 1px solid #e9ecef;
    text-decoration: none;
    color: inherit;
}

.related-tool-item:hover {
    background: var(--light-color);
    border-color: var(--primary-color);
    transform: translateX(5px);
    text-decoration: none;
}

.related-tool-icon {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-right: 1rem;
    flex-shrink: 0;
}

.related-tool-info h6 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--dark-color);
}

.related-tool-info p {
    font-size: 0.85rem;
    color: var(--secondary-color);
    margin: 0;
    line-height: 1.4;
}

/* 面包屑导航 */
.breadcrumb {
    background: white;
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 1.5rem;
}

/* 页脚样式 */
.footer {
    background: var(--dark-color);
    color: white;
    padding: 2rem 0;
    margin-top: 3rem;
}

.footer a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: var(--transition);
}

.footer a:hover {
    color: white;
}

/* 提示消息 */
.alert {
    border-radius: var(--border-radius);
    border: none;
    box-shadow: var(--box-shadow);
}

/* 工具内容介绍 */
.tool-content {
    line-height: 1.8;
    color: #555;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .section-title {
        font-size: 1.4rem;
    }

    .page-title {
        font-size: 1.5rem;
    }

    .tool-container {
        padding: 1rem;
    }

    .card-body {
        padding: 1rem;
    }

    .tool-card {
        padding: 1.5rem;
    }

    .category-tools-nav {
        padding: 1rem;
    }
}

/* Toast通知样式优化 */

.toast-container {
    z-index: 9999 !important;
    pointer-events: none;
}

.toast-container .toast { margin-bottom: 0.5rem; }

.toast {
    position: relative;
    min-width: 320px;
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(10px);
    overflow: hidden;
    color: #ffffff;
    pointer-events: auto;
}

/* 渐变背景按类型美化 */
.toast.bg-success { background: linear-gradient(135deg, #34c759, #2cc1a0); --toast-accent: #caffdb; }
.toast.bg-danger  { background: linear-gradient(135deg, #ff3b30, #ff6b6b); --toast-accent: #ffe4e4; }
.toast.bg-warning { background: linear-gradient(135deg, #ffcc00, #ffa000); --toast-accent: #fff0b3; }
.toast.bg-info    { background: linear-gradient(135deg, #0dcaf0, #4dabf7); --toast-accent: #cfe9ff; }

.toast-body {
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
}

.toast-body i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255,255,255,0.18);
    color: #fff;
    font-size: 1rem;
}

.toast .btn-close {
    filter: invert(1);
    opacity: 0.85;
    transition: transform 0.2s ease, opacity 0.2s ease;
}
.toast .btn-close:hover { opacity: 1; transform: scale(1.05); }

/* 进度条 */
.toast-progress {
    position: absolute;
    left: 0; bottom: 0;
    width: 100%; height: 3px;
    background: var(--toast-accent, rgba(255,255,255,0.45));
    transform-origin: left center;
    animation: toastProgress var(--toast-duration, 3000ms) linear forwards;
}

/* Toast动画优化 */
.toast.showing { animation: slideInRight 0.28s ease-out; }
.toast.hide     { animation: slideOutRight 0.25s ease-in; }

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

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

/* 进度条动画 */
@keyframes toastProgress {
    from { transform: scaleX(1); }
    to   { transform: scaleX(0); }
}

/* 按钮反馈动画 */
.btn-feedback {
    transition: all 0.3s ease;
}

.btn-feedback:active {
    transform: scale(0.95);
}

/* 移除旧的alert占位空间问题 */
.alert {
    margin-bottom: 0;
}
/* 主题切换按钮优化 */
#themeToggleBtn {
    background: rgba(0,0,0,0.06);
    border-color: rgba(0,0,0,0.18) !important;
    color: #2b2f36;
    border-radius: 999px;
    padding: 0.25rem 0.5rem;
    transition: transform 0.2s ease, background 0.2s ease;
}
#themeToggleBtn:hover { background: rgba(0,0,0,0.08); transform: translateY(-1px); }

:root[data-theme="dark"] #themeToggleBtn {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.28) !important;
    color: #ffffff;
}
:root[data-theme="dark"] #themeToggleBtn:hover { background: rgba(255,255,255,0.18); }
#themeToggleBtn:active { transform: translateY(0); }

/* 手机端折叠按钮视觉优化 */
.navbar-toggler { border-color: rgba(0,0,0,0.35) !important; }
.navbar-toggler:focus { box-shadow: 0 0 0 0.25rem rgba(91,157,249,0.35); }

/* 移除默认下拉三角以使用更柔和的 Chevron 图标 */
.navbar .dropdown-toggle::after { display: none !important; }

/* 下拉展开时旋转 Chevron 图标以增强反馈 */
.navbar.navbar-modern .nav-link .bi-chevron-down { font-size: 0.85rem; opacity: 0.6; transition: transform 0.2s ease, opacity 0.2s ease; }
.navbar.navbar-modern .nav-link[aria-expanded="true"] .bi-chevron-down { transform: rotate(180deg); opacity: 0.85; }

/* 深色主题下的折叠图标（白色线条） */
:root[data-theme="dark"] .navbar.navbar-modern .navbar-toggler { border-color: rgba(255,255,255,0.35) !important; }
:root[data-theme="dark"] .navbar.navbar-modern .navbar-toggler:focus { box-shadow: 0 0 0 0.25rem rgba(110,231,255,0.35); }
:root[data-theme="dark"] .navbar.navbar-modern .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255,255,255,0.85)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

