/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    height: 100%;
}

body {
    font-family: "PingFang SC", -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans GB", "Microsoft YaHei",
        "Helvetica Neue", Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
    font-weight: 400;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.5em;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

h5 {
    font-size: 1.125rem;
}

h6 {
    font-size: 1rem;
}

p {
    margin-bottom: 1em;
}

a {
    color: #4f46e5;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #3730a3;
}

.outline {
    width: 100%;
    height: auto;
    display: block;
    margin-bottom: 10px;
}

.inline {
    width: 100%;
    height: 32px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 0.5rem;
    /*border: none;*/
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
    border: 1px solid #d1d5db;
    background-color: white;
}

.btn-primary {
    background-color: #3b82f6;
    color: white;
}

.btn-primary:hover {
    background-color: #2563eb;
    color: white;
}

.btn-secondary {
    background-color: transparent;
    color: #3b82f6;
    border: 1px solid #3b82f6;
}

.btn-secondary:hover {
    background-color: #3b82f6;
    color: white;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 0.375rem;
    transition: background-color 0.2s ease;
    font-size: 1rem;
}

.btn-icon:hover {
    background-color: #f3f4f6;
}

.full-width {
    width: 100%;
}

/* Header */
.header {
    background: white;
    border-bottom: 1px solid #e5e7eb;
    /* position: sticky; */
    top: 0;
    z-index: 100;
    /* box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1); */
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 4rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
}

.logo-icon {
    width: 2rem;
    height: 2rem;
    background: #3b82f6;
    color: white;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.logo-icon img {
    width: 20px;
    height: 20px;
    filter: brightness(0) invert(1);
}

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

.nav-link {
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: #1f2937;
}

/* Page Loading Overlay */
.page-loading-overlay {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(17, 24, 39, 0.42);
    backdrop-filter: blur(4px);
    z-index: 2000;
}

.page-loading-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(17, 24, 39, 0.10);
    box-shadow: 0 18px 50px rgba(17, 24, 39, 0.20);
    color: #111827;
}

.page-loading-spinner {
    width: 18px;
    height: 18px;
    border-radius: 9999px;
    border: 2px solid rgba(17, 24, 39, 0.18);
    border-top-color: #2563eb;
    animation: page-loading-spin 0.8s linear infinite;
}

.page-loading-text {
    font-size: 0.95rem;
    font-weight: 600;
}

@keyframes page-loading-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Hero Section */
.hero {
    background: #FDFBF9;
    color: #1f2937;
    padding: 4rem 0;
    text-align: center;
}

.hero-content {
    max-width: 1000px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    line-height: 1.2;
    letter-spacing: -0.025em;
}

.hero-title .highlight {
    color: #3b82f6;
}

.hero-subtitle {
    font-size: 1.125rem;
    margin-bottom: 2rem;
    color: #535D6A;
    font-weight: 500;
    line-height: 1.6;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 3rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1em;
    /* background: #F4F4F5; */
    padding: 0.3rem 1rem;
    border-radius: 0.5rem;
    color: #30354E;
    font-weight: 550;
}

.stat-icon {
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon img {
    width: 20px;
    height: 20px;
    filter: brightness(0) saturate(100%) invert(19%) sepia(13%) saturate(1219%) hue-rotate(194deg) brightness(90%) contrast(89%);
}

/* Search Section */
.search-section {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.search-tabs {
    display: flex;
    margin-bottom: 1rem;
    border-radius: 0.5px;
    border: 1px solid #e2e8f0;
    padding: 2px;
    height: 35px;
    gap: 3px;
    background: #F4F4F5;
}

.search-tab {
    width: calc(50% - 1.5px);
    color: #6b7280;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 500;
    font-size: 0.9rem;
}

.search-tab img {
    width: 16px;
    height: 16px;
    filter: brightness(0) saturate(100%) invert(47%) sepia(15%) saturate(470%) hue-rotate(193deg) brightness(94%) contrast(87%);
    transition: filter 0.2s ease;
}

.search-tab.active {
    background: white;
    color: #1f2937;
    font-weight: 600;
}

.search-tab:hover {
    background: white;
    color: #1f2937;
}

.search-tab.active img {
    filter: brightness(0) saturate(100%) invert(12%) sepia(8%) saturate(1239%) hue-rotate(193deg) brightness(95%) contrast(92%);
}

.search-tab:hover img {
    filter: brightness(0) saturate(100%) invert(12%) sepia(8%) saturate(1239%) hue-rotate(193deg) brightness(95%) contrast(92%);
}

.search-input-area {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.search-input-group {
    flex: 1;
    background: #f8fafc;
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    min-height: 40px;
    display: flex;
    align-items: center;
}

.search-input {
    flex: 1;
    padding: 0.5rem 1.5rem;
    border: none;
    font-size: 1rem;
    outline: none;
    background: transparent;
    height: 38px;
    line-height: 1.4;
}

.search-input::placeholder {
    color: #9ca3af;
}

.search-btn {
    padding: 0.5rem 1.5rem;
    background-color: #1f2937;
    color: white;
    border: none;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    height: 40px;
    white-space: nowrap;
}

.search-btn img {
    width: 16px;
    height: 16px;
    filter: brightness(0) invert(1);
}

.search-btn:hover {
    background-color: #111827;
}

.search-suggestions {
    margin-top: 1.5rem;
    text-align: left;
}

.suggestion-label {
    color: #6b7280;
    font-size: 0.875rem;
    margin-right: 1rem;
    font-weight: 500;
}

.suggestion-tag {
    display: inline;
    padding: 0;
    background-color: transparent;
    color: #6b7280;
    font-size: 0.875rem;
    border-radius: 0;
    margin-right: 1.5rem;
    margin-bottom: 0;
    transition: color 0.2s ease;
    border: none;
    text-decoration: none;
}

.suggestion-tag:hover {
    color: #3b82f6;
    text-decoration: underline;
}

/* Statistics Section */
.statistics {
    padding: 4rem 0;
    background-color: #EFF6FF;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.stat-card {
    text-align: center;
    padding: 1rem;
    background: transparent;
    transition: transform 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 600;
    color: #3b82f6;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.stat-label {
    color: #6b7280;
    font-size: 0.875rem;
}

/* Features Section */
.features {
    padding: 4rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #1f2937;
    letter-spacing: -0.02em;
}

.section-header p {
    font-size: 1.125rem;
    color: #6b7280;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.feature-card {
    padding: 2rem;
    background: white;
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 64px;
}

.feature-icon img {
    width: 48px;
    height: 48px;
    filter: brightness(0) saturate(100%) invert(27%) sepia(99%) saturate(2142%) hue-rotate(219deg) brightness(97%) contrast(92%);
}

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #1f2937;
}

.feature-card p {
    color: #6b7280;
    line-height: 1.6;
}

/* CTA Section */
.cta {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.cta-content h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.cta-content p {
    font-size: 1.125rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

.email-input {
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    width: 300px;
    outline: none;
}

/* Latest Patents (SEO入口) */
.latest-patents {
    padding: 2.5rem 0;
    background: #FDFBF9;
}

.latest-box {
    background: #fff;
    border: 1px solid rgba(17, 24, 39, 0.08);
    border-radius: 1rem;
    padding: 1.75rem;
    box-shadow: 0 10px 30px rgba(17, 24, 39, 0.06);
}

.latest-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: #111827;
    letter-spacing: -0.01em;
}

.latest-header p {
    margin: 0.25rem 0 0;
    color: #6b7280;
    font-size: 0.95rem;
}

.latest-list {
    list-style: none;
    padding: 0;
    margin: 1.25rem 0 0;
}

.latest-item {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.5rem 0.75rem;
    padding: 0.9rem 0.5rem;
    border-top: 1px solid rgba(17, 24, 39, 0.06);
    border-radius: 0.75rem;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.latest-item:hover {
    background: #f9fafb;
    border-color: rgba(37, 99, 235, 0.12);
}

.latest-link {
    color: #111827;
    font-weight: 600;
    text-decoration: none;
    line-height: 1.5;
    flex: 1 1 420px;
    min-width: 260px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.latest-link:hover {
    color: #2563eb;
}

.latest-meta {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: #4b5563;
    font-size: 0.8125rem;
    padding: 0.2rem 0.55rem;
    border-radius: 9999px;
    border: 1px solid rgba(17, 24, 39, 0.08);
    background: rgba(249, 250, 251, 0.9);
}

.latest-empty {
    margin-top: 1rem;
    color: #6b7280;
    font-size: 0.95rem;
}

@media (max-width: 768px) {
    .latest-patents {
        padding: 2rem 0;
    }

    .latest-box {
        padding: 1.25rem;
        border-radius: 0.875rem;
    }

    .latest-item {
        padding: 0.85rem 0.25rem;
    }

    .latest-link {
        flex-basis: 100%;
        min-width: 0;
        -webkit-line-clamp: 3;
    }
}

/* Footer */
.footer {
    background-color: #1f2937;
    color: white;
    padding: 1.75rem 0;
    margin-top: auto;
    width: 100%;
}

.footer a {
    color: #9ca3af;
}

.footer a:hover {
    color: #fff;
}

.footer-bottom {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    color: #9ca3af;
    font-size: 0.875rem;
}

.footer-bottom p {
    margin: 0;
}

.icp-license {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
    flex-wrap: wrap;
    text-decoration: none;
    transition: color 0.2s ease, opacity 0.2s ease;
    line-height: 1.4;
}

.icp-license:hover {
    opacity: 0.9;
}

.icp-icon {
    height: 18px;
    width: auto;
}

.icp-text {
    font-size: 0.875rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .nav {
        display: none;
    }

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

    .hero-stats {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .email-input {
        width: 100%;
        max-width: 300px;
    }

    .footer {
        padding: 1.5rem 0;
    }

    .feature-card,
    .stat-card {
        padding: 1.5rem;
    }

    .hero {
        padding: 2rem 0;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .cta-content h2 {
        font-size: 2rem;
    }
}

@media (min-width: 768px) {
    .footer-bottom {
        flex-direction: row;
        align-items: center;
        gap: 1rem;
    }
    
    .footer-copyright {
        flex: 0 0 50%;
    }
    
    .footer-licenses {
        flex: 0 0 50%;
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .feature-icon {
        font-size: 2.5rem;
    }

    .search-input-group {
        flex-direction: column;
    }

    .search-btn {
        border-radius: 0 0 0.75rem 0.75rem;
    }

    .search-input {
        border-radius: 0.75rem 0.75rem 0 0;
    }
}

/* Animation classes */
.animate-in {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.animate-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Toast notification styles */
.toast {
    position: fixed;
    top: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    font-size: 0.875rem;
    max-width: 300px;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
}

.toast-success {
    background-color: #10b981;
    color: white;
}

.toast-error {
    background-color: #ef4444;
    color: white;
}

.toast-info {
    background-color: #4f46e5;
    color: white;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.patent-content {
  background-color: #fff;
  flex: 1 0 auto;
}

.patent-main-layout {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    width: 100%;
}

.patent-card {
    flex: 1;
    width: 100%;
    padding: 2rem;
    box-sizing: border-box;
    background: #fff;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    margin-bottom: 1rem;
}

.patent-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.patent-card-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.0625rem;
    font-weight: 600;
    color: #1f2937;
}

.patent-card-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.patent-card-badges .count-badge {
    margin: 0;
}

@media (max-width: 1200px) {
    .patent-card {
        padding: 1.5rem;
    }
}

@media (max-width: 900px) {
    .patent-main-layout {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .patent-card {
        padding: 1rem;
    }
}

/* Empty state helper */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 18.75rem; /* 300px，与PDF空态保持一致 */
    padding: 2rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    background-color: #f9fafb;
    text-align: center;
    color: #6b7280;
    gap: 0.75rem;
    width: 100%;
}

.empty-state .empty-state-icon {
    font-size: 3rem;
    color: #9ca3af;
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-state .empty-state-text {
    font-size: 1.125rem;
    color: #4b5563;
    margin: 0;
    font-weight: 500;
}

.action-btn {
    padding: 0.5rem 1rem;
    background-color: #f3f4f6;
    color: #374151;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-btn:hover {
    background-color: #e5e7eb;
}

.action-btn.active {
    background-color: #4f46e5;
    color: #fff;
}

.action-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    background-color: #f3f4f6;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-size: 1rem;
}

.action-icon:hover {
    background-color: #e5e7eb;
}
