/* 现代化样式文件 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #64748b;
    --accent-color: #0ea5e9;
    --background-color: #ffffff;
    --surface-color: #f8fafc;
    --border-color: #e2e8f0;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background: #FAFAFA;
    color: #111827;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 顶部横向导航栏 */
.top-navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.95));
    border-bottom: 1px solid rgba(226, 232, 240, 0.7);
    backdrop-filter: blur(20px);
    box-shadow: 0 22px 40px -28px rgba(15, 23, 42, 0.45);
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.75rem;
    padding: 0.85rem 0;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-brand-info {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.nav-brand-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.nav-brand-tagline {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem;
    background: rgba(241, 245, 249, 0.92);
    border-radius: 9999px;
    border: 1px solid rgba(226, 232, 240, 0.7);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.nav-link-horizontal {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.65rem 1.1rem;
    border-radius: 9999px;
    transition: all 0.2s ease;
    position: relative;
}

.nav-link-horizontal:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-sm);
}

.nav-link-horizontal.active {
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    box-shadow: 0 12px 25px -16px rgba(37, 99, 235, 0.8);
}

/* 下拉菜单样式 */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font: inherit;
    color: inherit;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.dropdown-toggle::after {
    content: '';
    width: 0.5rem;
    height: 0.5rem;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform 0.2s ease;
}

.dropdown:hover .dropdown-toggle::after {
    transform: rotate(225deg);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 0.75rem);
    left: 50%;
    transform: translate(-50%, -10px);
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
    min-width: 260px;
    padding: 0.75rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1001;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

.dropdown-section {
    padding: 0.5rem;
    border-radius: 0.75rem;
}

.dropdown-section-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.25rem 0.75rem 0.5rem;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 0.75rem;
    color: #1f2937;
    text-decoration: none;
    border-radius: 0.75rem;
    transition: all 0.2s ease;
    margin: 0.125rem 0;
}

.dropdown-item:hover {
    background: #eff6ff;
    color: var(--primary-color);
}

.dropdown-divider {
    height: 1px;
    background: rgba(226, 232, 240, 0.8);
    margin: 0.35rem 0;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.favorite-button,
.favorite-icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: none;
    border-radius: 9999px;
    cursor: pointer;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.3s ease;
    background: linear-gradient(135deg, #1d4ed8, #0ea5e9);
    color: #ffffff;
    box-shadow: 0 15px 30px -18px rgba(14, 165, 233, 0.6);
    padding: 0.55rem 1.1rem;
}

.favorite-icon-button {
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
}

.favorite-button:hover,
.favorite-icon-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 30px -16px rgba(37, 99, 235, 0.55);
}

.favorite-button:focus-visible,
.favorite-icon-button:focus-visible,
.mobile-favorite:focus-visible {
    outline: 2px solid rgba(14, 165, 233, 0.4);
    outline-offset: 3px;
}

.favorite-button.is-active,
.favorite-icon-button.is-active,
.mobile-favorite.is-active {
    background: linear-gradient(135deg, #0f172a, #1d4ed8);
    box-shadow: 0 18px 32px -18px rgba(15, 23, 42, 0.65);
}

.favorite-icon {
    width: 1.1rem;
    height: 1.1rem;
    transition: transform 0.2s ease;
}

.favorite-icon path {
    fill: none;
    stroke: currentColor;
    transition: fill 0.2s ease, stroke 0.2s ease;
}

.favorite-button.is-active .favorite-icon path,
.favorite-icon-button.is-active .favorite-icon path,
.mobile-favorite.is-active .favorite-icon path {
    fill: currentColor;
}

.favorite-button.is-active .favorite-icon,
.favorite-icon-button.is-active .favorite-icon,
.mobile-favorite.is-active .favorite-icon {
    transform: scale(1.05);
}

.favorite-button-label {
    font-size: 0.95rem;
    letter-spacing: 0.02em;
}

/* 移动端菜单 */
.mobile-menu-toggle {
    background: none;
    border: none;
    color: #4b5563;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.75rem;
    transition: all 0.2s ease;
}

.mobile-menu-toggle:hover {
    background: rgba(226, 232, 240, 0.6);
    color: var(--primary-color);
}

.mobile-nav-link {
    display: block;
    padding: 0.85rem 1.25rem;
    color: #1f2937;
    text-decoration: none;
    border-radius: 0.75rem;
    transition: all 0.2s ease;
}

.mobile-nav-link:hover {
    background: rgba(226, 232, 240, 0.5);
    color: var(--primary-color);
}

.mobile-nav-link.active {
    background: rgba(37, 99, 235, 0.08);
    color: var(--primary-color);
    font-weight: 600;
}

.mobile-menu {
    background: rgba(248, 250, 252, 0.98);
    border-top: 1px solid rgba(226, 232, 240, 0.7);
    border-bottom: 1px solid rgba(226, 232, 240, 0.7);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.mobile-menu a {
    color: inherit;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.mobile-menu a:hover {
    background: rgba(226, 232, 240, 0.5);
}

.mobile-favorite {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    margin-top: 0.75rem;
    padding: 0.85rem 1rem;
    border-radius: 0.85rem;
    border: none;
    background: linear-gradient(135deg, #1d4ed8, #0ea5e9);
    color: #ffffff;
    font-weight: 600;
    letter-spacing: 0.02em;
    box-shadow: 0 16px 30px -20px rgba(37, 99, 235, 0.6);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mobile-favorite:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 32px -18px rgba(14, 165, 233, 0.6);
}

.mobile-favorite svg {
    width: 1.1rem;
    height: 1.1rem;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.main-content {
    margin-left: 0;
    transition: margin-left 0.3s ease;
}

/* 现代化工具卡片 */
.tool-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    min-height: 120px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.tool-card--with-favicon {
    padding: 1.75rem 1.5rem;
}

.tool-card--with-favicon .tool-card__inner {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.tool-card--with-favicon .tool-card__text {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.tool-card--with-favicon .tool-card__text h3 {
    margin-bottom: 0;
}

.tool-favicon {
    width: 48px;
    height: 48px;
    border-radius: 9999px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.95), rgba(118, 75, 162, 0.95));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 24px -12px rgba(79, 70, 229, 0.45);
    position: relative;
    flex-shrink: 0;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tool-card--with-favicon:hover .tool-favicon {
    transform: scale(1.05);
    box-shadow: 0 16px 30px -12px rgba(79, 70, 229, 0.55);
}

.tool-favicon__initial {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #ffffff;
    transition: opacity 0.2s ease;
}

.tool-favicon__image {
    width: 60%;
    height: 60%;
    object-fit: contain;
    border-radius: 50%;
    display: none;
    filter: drop-shadow(0 2px 4px rgba(15, 23, 42, 0.25));
}

.tool-favicon--image .tool-favicon__image {
    display: block;
}

.tool-favicon--image .tool-favicon__initial {
    opacity: 0;
}

@media (prefers-color-scheme: dark) {
    .tool-card--with-favicon {
        background: rgba(17, 24, 39, 0.92);
        border-color: rgba(148, 163, 184, 0.2);
        box-shadow: 0 18px 32px -18px rgba(15, 23, 42, 0.7);
    }

    .tool-card--with-favicon .tool-card__text h3 {
        color: #f8fafc;
    }

    .tool-card--with-favicon .tool-card__text p {
        color: #cbd5f5;
    }

    .tool-favicon {
        background: linear-gradient(135deg, rgba(129, 140, 248, 0.9), rgba(167, 139, 250, 0.9));
        box-shadow: 0 18px 36px -18px rgba(129, 140, 248, 0.65);
    }
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.tool-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-color: rgba(102, 126, 234, 0.3);
}

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

/* 工具卡片文字样式优化 */
.tool-card h3 {
    color: #1f2937;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.tool-card p {
    color: #6b7280;
    font-size: 0.875rem;
    line-height: 1.5;
}

/* Clean category titles */
.category-title {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 2rem;
    text-align: center;
    color: var(--text-primary);
}

.category-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Simple animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Clean footer */
.footer {
    background: var(--surface-color);
    border-top: 1px solid var(--border-color);
    padding: 3rem 0 1.5rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.footer-section h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.footer-section a {
    color: var(--text-secondary);
    text-decoration: none;
    display: block;
    padding: 0.25rem 0;
    transition: color 0.2s ease;
}

.footer-section a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    margin-top: 2rem;
    padding-top: 1.5rem;
    text-align: center;
    color: var(--text-muted);
}

/* Responsive design */
@media (max-width: 768px) {
    .main-content {
        padding: 1rem;
    }
    
    .page-introduction {
        padding: 2rem 1rem;
    }
    
    .page-introduction h2 {
        font-size: 2rem;
    }
    
    .page-introduction p {
        font-size: 1rem;
    }
    
    .bg-gradient-to-r h1 {
        font-size: 2.5rem;
    }
    
    .bg-gradient-to-r p {
        font-size: 1.1rem;
    }
    
    .bg-gradient-to-r .flex {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* Clean section styling */
.section {
    padding: 4rem 0;
}

.section:nth-child(even) {
    background: var(--surface-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Clean grid layout */
.grid {
    display: grid;
    gap: 1.5rem;
}

.grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) {
    .grid-cols-4 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .grid-cols-3, .grid-cols-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .grid-cols-2, .grid-cols-3, .grid-cols-4 { grid-template-columns: repeat(1, 1fr); }
}

/* Clean link styling */
.tool-card a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
}

.tool-card a:hover {
    color: var(--primary-color);
}

.tool-description {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

/* Clean SVG icons */
.icon {
    width: 1.5rem;
    height: 1.5rem;
    fill: currentColor;
}

/* Clean button styles */
.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    cursor: pointer;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border-color: var(--border-color);
}

.btn-secondary:hover {
    background: var(--surface-color);
}

/* 公司卡片样式 */
.company-card {
    background: #FFFFFF;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #E5E7EB;
    position: relative;
    overflow: hidden;
    min-height: 200px;
}

.company-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border-color: #D1D5DB;
}

.company-logo-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.08;
    transition: all 0.3s ease;
    z-index: 1;
    filter: grayscale(100%) brightness(1.2);
}

.company-card:hover .company-logo-bg {
    opacity: 0.12;
    filter: grayscale(80%) brightness(1.1);
    transform: scale(1.05);
}

.company-content {
    position: relative;
    z-index: 2;
}

.company-title {
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: #2563EB;
}

.company-desc {
    color: #6B7280;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.company-link {
    background: #2563EB;
    color: #ffffff;
    border: 1px solid #2563EB;
    display: inline-block;
    border-radius: 8px;
    padding: 0.5rem 1.5rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.company-link:hover {
    background: #1D4ED8;
    color: #ffffff;
    transform: translateY(-1px);
}

.search-box {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 1rem;
    color: #111827;
    width: 100%;
    max-width: 500px;
    margin: 0 auto 2rem auto;
    display: block;
}

.search-box::placeholder {
    color: #9CA3AF;
}

/* LOGO加载动画 */
.company-logo-bg.loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
