/* AI办公效率工具箱 - 样式表 */

/* ==================== 基础变量 ==================== */
:root {
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --secondary: #7c3aed;
    --accent: #06b6d4;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    
    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==================== 重置样式 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: var(--gray-50);
    color: var(--gray-800);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==================== 头部区域 ==================== */
.header {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 30%, #4c1d95 60%, #0e7490 100%);
    color: white;
    padding: 60px 0 50px;
    position: relative;
    overflow: hidden;
}

/* 动态背景层 */
.header-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    pointer-events: none;
}

/* 浮动图标 */
.floating-shape {
    position: absolute;
    font-size: 2rem;
    opacity: 0.15;
    animation: float 6s ease-in-out infinite;
    filter: blur(1px);
}

.shape-1 { top: 15%; left: 8%; animation-delay: 0s; }
.shape-2 { top: 25%; right: 12%; animation-delay: 1s; font-size: 2.5rem; }
.shape-3 { bottom: 30%; left: 15%; animation-delay: 2s; }
.shape-4 { bottom: 20%; right: 8%; animation-delay: 3s; font-size: 1.8rem; }
.shape-5 { top: 60%; left: 5%; animation-delay: 4s; }

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

/* 渐变光球 */
.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.4;
    animation: pulse 8s ease-in-out infinite;
}

.orb-1 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, #60a5fa 0%, transparent 70%);
    top: -100px;
    right: -50px;
    animation-delay: 0s;
}

.orb-2 {
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, #a78bfa 0%, transparent 70%);
    bottom: -80px;
    left: -30px;
    animation-delay: 2s;
}

.orb-3 {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, #22d3ee 0%, transparent 70%);
    top: 40%;
    left: 30%;
    opacity: 0.2;
    animation-delay: 4s;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.4; }
    50% { transform: scale(1.1); opacity: 0.6; }
}

/* 网格背景 */
.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.5;
}

.header .container {
    position: relative;
    z-index: 1;
}

.logo-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.logo-icon {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.logo-icon svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.2));
}

.logo-text-group {
    text-align: left;
}

.logo-text {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.logo-subtitle {
    font-size: 0.95rem;
    opacity: 0.9;
    margin-top: 4px;
}

.logo-subtitle strong {
    font-size: 1.1rem;
    color: #fde047;
}

.slogan {
    font-size: 1.35rem;
    font-weight: 500;
    text-align: center;
    margin: 0 auto 30px;
    max-width: 600px;
    opacity: 0.95;
    line-height: 1.5;
}

.header-features {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.feature-card {
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 16px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
    cursor: default;
}

.feature-card:hover {
    background: rgba(255,255,255,0.12);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}

.feature-icon {
    font-size: 1.8rem;
    line-height: 1;
}

.feature-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.feature-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: white;
}

.feature-desc {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.7);
}

/* 旧的 feature-tag 样式保留兼容 */
.feature-tag {
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid rgba(255,255,255,0.2);
}

/* ==================== 主导航 ==================== */
.main-nav {
    background: var(--gray-800);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.main-nav .container {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.main-nav .container::-webkit-scrollbar {
    display: none;
}

.nav-link {
    color: var(--gray-400);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 16px 20px;
    border-bottom: 3px solid transparent;
    transition: var(--transition);
    white-space: nowrap;
}

.nav-link:hover {
    color: white;
}

.nav-link.active {
    color: white;
    border-bottom-color: var(--accent);
}

/* 导航下拉菜单 */
.nav-dropdown {
    position: relative;
}

.nav-dropdown > .nav-link {
    cursor: pointer;
}

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    min-width: 180px;
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
    z-index: 1001;
    margin-top: 0;
    border: 1px solid var(--gray-200);
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown-menu:hover {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    color: var(--gray-700);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    white-space: nowrap;
    border-bottom: 1px solid var(--gray-100);
}

.nav-dropdown-item:last-child {
    border-bottom: none;
}

.nav-dropdown-item:hover {
    background: var(--gray-50);
    color: var(--primary);
}

/* 下拉菜单箭头动画 */
.nav-dropdown > .nav-link::after {
    content: '▼';
    font-size: 0.7rem;
    margin-left: 4px;
    transition: transform 0.3s;
}

.nav-dropdown:hover > .nav-link::after {
    transform: rotate(180deg);
}

/* ==================== 筛选栏（搜索+分类合并sticky） ==================== */
.filter-bar {
    position: sticky;
    top: 51px;
    z-index: 999;
    background: white;
    box-shadow: var(--shadow-sm);
}

/* ==================== 搜索区域 ==================== */
.search-section {
    background: white;
    padding: 16px 0 12px;
    border-bottom: 1px solid var(--gray-200);
}

.search-box {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--gray-400);
    pointer-events: none;
}

#search-input {
    width: 100%;
    padding: 14px 44px 14px 48px;
    font-size: 1rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-xl);
    background: var(--gray-50);
    transition: var(--transition);
    outline: none;
}

#search-input:focus {
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

#search-input::placeholder {
    color: var(--gray-400);
}

.search-clear {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border: none;
    background: var(--gray-200);
    color: var(--gray-500);
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
    display: none;
    transition: var(--transition);
}

.search-clear:hover {
    background: var(--gray-300);
    color: var(--gray-700);
}

.search-stats {
    text-align: center;
    margin-top: 12px;
    font-size: 0.9rem;
    color: var(--gray-500);
}

/* ==================== 分类导航 ==================== */
.category-nav {
    background: white;
    padding: 10px 0;
    border-bottom: 1px solid var(--gray-200);
}

.category-scroll {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
    scrollbar-color: var(--gray-300) transparent;
}

.category-scroll::-webkit-scrollbar {
    height: 4px;
}

.category-scroll::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 2px;
}

.category-btn {
    padding: 10px 18px;
    border: 1px solid var(--gray-200);
    background: white;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--gray-600);
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition);
}

.category-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(79, 70, 229, 0.05);
}

.category-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    box-shadow: var(--shadow-md);
}

/* ==================== 主内容区 ==================== */
.main {
    padding: 30px 0 60px;
}

/* 筛选标签 */
.filter-tags {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.filter-label {
    font-size: 0.9rem;
    color: var(--gray-500);
    font-weight: 500;
}

.filter-tag {
    padding: 6px 14px;
    border: 1px solid var(--gray-200);
    background: white;
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--gray-600);
    cursor: pointer;
    transition: var(--transition);
}

.filter-tag:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.filter-tag.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* ==================== 工具网格 ==================== */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* 工具卡片 */
.tool-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 20px;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid var(--gray-100);
    position: relative;
    overflow: hidden;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transform: scaleX(0);
    transition: transform 0.3s;
}

.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: transparent;
}

.tool-card:hover::before {
    transform: scaleX(1);
}

.tool-card:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.tool-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.tool-icon {
    font-size: 2.5rem;
    line-height: 1;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    overflow: hidden;
}

.tool-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 10px;
}

.tool-meta {
    text-align: right;
}

.tool-category {
    display: block;
    font-size: 0.75rem;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.tool-rating {
    font-size: 0.85rem;
    color: var(--warning);
    font-weight: 600;
}

.tool-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 8px;
    line-height: 1.3;
}

.tool-tagline {
    font-size: 0.9rem;
    color: var(--gray-500);
    line-height: 1.5;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tool-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tool-price {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 12px;
}

.price-free {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.price-paid {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.tool-arrow {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-100);
    border-radius: 50%;
    color: var(--gray-400);
    transition: var(--transition);
}

.tool-card:hover .tool-arrow {
    background: var(--primary);
    color: white;
}

/* ==================== 空状态 ==================== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: var(--radius-lg);
    border: 2px dashed var(--gray-200);
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 1.3rem;
    color: var(--gray-700);
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--gray-500);
    margin-bottom: 20px;
}

/* ==================== 弹窗 ==================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    padding: 20px;
    overflow-y: auto;
    align-items: flex-start;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: var(--radius-lg);
    max-width: 600px;
    width: 100%;
    margin: 40px auto;
    position: relative;
    animation: modalSlideIn 0.3s ease;
    box-shadow: var(--shadow-xl);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border: none;
    background: var(--gray-100);
    border-radius: 50%;
    font-size: 1.5rem;
    color: var(--gray-500);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.modal-close:hover {
    background: var(--gray-200);
    color: var(--gray-700);
}

.modal-body {
    padding: 28px;
}

.modal-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.modal-icon {
    font-size: 3rem;
    line-height: 1;
}

.modal-title-group h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 4px;
}

.modal-category {
    font-size: 0.85rem;
    color: var(--gray-500);
}

.modal-rating-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.modal-rating {
    color: var(--warning);
    font-weight: 600;
}

.modal-price {
    padding: 4px 12px;
    background: var(--gray-100);
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-600);
}

.modal-tagline {
    font-size: 1.1rem;
    color: var(--gray-600);
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--gray-100);
}

.modal-section {
    margin-bottom: 20px;
}

.modal-section h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 10px;
}

.modal-section p {
    color: var(--gray-600);
    line-height: 1.7;
}

.modal-section.highlight {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.05) 0%, rgba(124, 58, 237, 0.05) 100%);
    padding: 16px;
    border-radius: var(--radius);
    border-left: 3px solid var(--primary);
}

.modal-list {
    list-style: none;
    padding: 0;
}

.modal-list li {
    padding: 6px 0 6px 24px;
    position: relative;
    color: var(--gray-600);
    line-height: 1.6;
}

.modal-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 12px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.modal-list.pros li::before {
    background: var(--success);
}

.modal-list.cons li::before {
    background: var(--danger);
}

.modal-tips {
    background: rgba(6, 182, 212, 0.1);
    padding: 12px 16px;
    border-radius: var(--radius);
    border-left: 3px solid var(--accent);
}

.modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--gray-100);
}

/* 按钮 */
.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    border: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
    flex: 1;
    justify-content: center;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--gray-100);
    color: var(--gray-700);
}

.btn-secondary:hover {
    background: var(--gray-200);
}

/* ==================== 联系我们 ==================== */
.contact-section {
    background: var(--gray-50);
    padding: 60px 0;
}

.contact-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-lg);
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.contact-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 16px;
}

.contact-divider {
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 2px;
    margin: 0 auto 24px;
}

.contact-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.contact-desc {
    font-size: 1.05rem;
    color: var(--gray-600);
    line-height: 1.8;
    max-width: 600px;
}

.contact-email-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 14px 32px;
    border-radius: 50px;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
}

.contact-email-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.contact-email-icon {
    font-size: 1.2rem;
}

@media (max-width: 768px) {
    .contact-section {
        padding: 40px 0;
    }
    
    .contact-card {
        padding: 30px 20px;
    }
    
    .contact-title {
        font-size: 1.5rem;
    }
    
    .contact-desc {
        font-size: 0.95rem;
    }
    
    .contact-email-btn {
        padding: 12px 24px;
        font-size: 0.9rem;
    }
}

/* ==================== 页脚 ==================== */
.footer {
    background: var(--gray-800);
    color: var(--gray-300);
    padding: 40px 0 20px;
}

.footer-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--gray-700);
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-logo {
    width: 40px;
    height: 40px;
}

.footer-logo svg {
    width: 100%;
    height: 100%;
}

.footer-brand-text {
    display: flex;
    flex-direction: column;
}

.footer-brand-name {
    font-weight: 700;
    color: white;
}

.footer-brand-slogan {
    font-size: 0.8rem;
    color: var(--gray-400);
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    color: var(--gray-400);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

.footer-links a:hover {
    color: white;
}

.footer-note {
    text-align: center;
    font-size: 0.85rem;
    color: var(--gray-500);
    margin-bottom: 12px;
}

.footer-copyright {
    text-align: center;
    font-size: 0.8rem;
    color: var(--gray-600);
}

/* ==================== 回到顶部 ==================== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    border: none;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-lg);
    z-index: 999;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* ==================== Toast提示 ==================== */
.toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--gray-800);
    color: white;
    padding: 12px 24px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    opacity: 0;
    transition: all 0.3s;
    z-index: 1001;
    box-shadow: var(--shadow-lg);
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 768px) {
    .header {
        padding: 40px 0 30px;
    }
    
    .logo-text {
        font-size: 1.5rem;
    }
    
    .logo-icon {
        width: 48px;
        height: 48px;
    }
    
    .slogan {
        font-size: 1rem;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        margin: 20px auto;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .footer-main {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }
    
    .category-btn {
        padding: 8px 14px;
        font-size: 0.85rem;
    }
    
    .filter-tags {
        gap: 8px;
    }
    
    .filter-tag {
        padding: 5px 10px;
        font-size: 0.8rem;
    }
    
    .tool-card {
        padding: 16px;
    }
}

/* ==================== 打印样式 ==================== */
@media print {
    .header,
    .main-nav,
    .search-section,
    .category-nav,
    .footer,
    .back-to-top {
        display: none;
    }
    
    .tool-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}

/* ==================== 无障碍 ==================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* 焦点样式 */
:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* 高对比度模式 */
@media (prefers-contrast: high) {
    .tool-card {
        border: 2px solid var(--gray-800);
    }
    
    .btn-primary {
        border: 2px solid var(--gray-800);
    }
}
