.global-patent-search-body .main-content * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.global-patent-search-body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f5f7fa;
    min-height: 100vh;
    display: flex;
    padding-top: 0 !important;
    margin: 0;
    overflow-x: hidden;
}

body.global-patent-search-body .sidebar {
    width: 260px;
    height: 100vh;
    min-height: 100vh;
    background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 0;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.06);
    position: fixed;
    left: 0;
    top: 0;
    z-index: 100;
    border-right: 1px solid rgba(0, 0, 0, 0.04);
    box-sizing: border-box;
}

body.global-patent-search-body .sidebar .logo,
body.global-patent-search-body .sidebar .logo-icon,
body.global-patent-search-body .sidebar .logo-icon img {
    background: transparent !important;
}

.main-content {
    flex: 1;
    min-height: 100vh;
    margin-left: 260px;
}

.global-patent-search-page {
    min-height: 100vh;
    background: #f5f7fa;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.global-patent-search-page .page-header {
    margin-bottom: 20px;
}

.global-patent-search-page .page-title {
    font-size: 26px;
    font-weight: 600;
    color: #1a1a2e;
    margin: 0;
}

.global-patent-search-page .page-desc {
    font-size: 15px;
    color: #8a8f99;
    margin-top: 6px;
    margin-bottom: 0;
}

.search-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    flex: 1;
}

.search-section {
    width: 100%;
}

.results-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 400px;
}

.search-section .form-box {
    background: #ffffff;
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.search-section .form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.search-section .form-group label {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

.search-section .form-group select,
.search-section .form-group input {
    padding: 12px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    font-size: 14px;
    color: #374151;
    background: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-section .form-group select:hover,
.search-section .form-group input:hover {
    border-color: #f75444;
}

.search-section .form-group select:focus,
.search-section .form-group input:focus {
    outline: none;
    border-color: #f75444;
    box-shadow: 0 0 0 3px rgba(247, 84, 68, 0.1);
}

.search-section .upload-area {
    background: #f9fafb;
    border: 2px dashed #d0d5dd;
    border-radius: 10px;
    padding: 30px 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-section .upload-area:hover,
.search-section .upload-area.dragover {
    border-color: #f75444;
    background: #fff5f5;
}

.search-section .upload-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    color: #8a8f99;
    transition: color 0.3s ease;
}

.search-section .upload-area:hover .upload-icon,
.search-section .upload-area.dragover .upload-icon {
    color: #f75444;
}

.search-section .upload-icon svg {
    width: 100%;
    height: 100%;
}

.search-section .upload-area p {
    color: #8a8f99;
    font-size: 13px;
    margin: 0;
}

.search-section .image-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.search-section .image-preview img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 8px;
    object-fit: contain;
}

.global-patent-search-body .search-section .btn-remove {
    padding: 6px 16px;
    background: #fff1f0;
    border: 1px solid #ffccc7;
    border-radius: 8px;
    color: #e8453c;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    letter-spacing: 0.3px;
}

.global-patent-search-body .search-section .btn-remove:hover {
    background: #ffe0db;
    border-color: #ff4d4f;
    color: #cf3a32;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(255, 77, 79, 0.15);
}

.global-patent-search-body .search-section .btn-remove:active {
    transform: translateY(0);
    box-shadow: none;
}

.search-section .form-row {
    display: flex;
    gap: 16px;
}

.search-section .form-group.half {
    flex: 1;
}

.search-section .date-range {
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-section .date-range input {
    flex: 1;
}

.search-section .date-separator {
    color: #8a8f99;
    font-weight: 500;
}

.search-section .collapse-section {
    border-top: 1px solid #f0f0f0;
    padding-top: 12px;
    margin-top: 8px;
}

.search-section .collapse-header {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 10px 12px;
    background: #f9fafb;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.search-section .collapse-header:hover {
    background: #f3f4f6;
}

.search-section .collapse-icon {
    width: 16px;
    height: 16px;
    color: #6b7280;
    transition: transform 0.3s ease;
}

.search-section .collapse-header.active .collapse-icon {
    transform: rotate(180deg);
}

.search-section .collapse-header span {
    font-size: 14px;
    color: #374151;
}

.search-section .collapse-hint {
    font-size: 13px !important;
    color: #9ca3af !important;
}

.search-section .collapse-content {
    display: none;
    padding: 16px 0;
    gap: 16px;
    border-top: 1px dashed #e5e7eb;
    margin-top: 12px;
    padding-top: 20px;
}

.search-section .collapse-content.show {
    display: flex;
    flex-direction: column;
}

.search-section .form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 8px;
}

.global-patent-search-body .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 18px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    letter-spacing: 0.3px;
    user-select: none;
    white-space: nowrap;
    text-decoration: none;
    line-height: 1.4;
}

.global-patent-search-body .btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.global-patent-search-body .btn:active {
    transform: scale(0.97);
}

.global-patent-search-body .btn-primary {
    background: linear-gradient(135deg, #f75444 0%, #ff7875 100%);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(247, 84, 68, 0.35);
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.global-patent-search-body .btn-primary:hover,
.global-patent-search-body .btn-primary:focus {
    background: linear-gradient(135deg, #e64a3a 0%, #ff6b68 100%);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(247, 84, 68, 0.45);
}

.global-patent-search-body .btn-primary:active {
    transform: translateY(0) scale(0.97);
    box-shadow: 0 2px 8px rgba(247, 84, 68, 0.3);
}

.global-patent-search-body .btn-primary:disabled,
.global-patent-search-body .btn-primary.disabled {
    background: linear-gradient(135deg, #ccc 0%, #ddd 100%);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    text-shadow: none;
}

.global-patent-search-body .btn-secondary {
    background: #ffffff;
    color: #374151;
    border: 1.5px solid #d1d5db;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.global-patent-search-body .btn-secondary:hover,
.global-patent-search-body .btn-secondary:focus {
    background: #f9fafb;
    border-color: #9ca3af;
    color: #1a1a2e;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.06);
}

.global-patent-search-body .btn-secondary:active {
    background: #f3f4f6;
    transform: translateY(0) scale(0.97);
}

.global-patent-search-body .btn-large {
    padding: 14px 28px;
    font-size: 15px;
    border-radius: 12px;
    gap: 8px;
}

.global-patent-search-body .btn-large svg {
    width: 18px;
    height: 18px;
}

.results-section .results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.results-section .results-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a2e;
    margin: 0;
}

.results-section .results-header span {
    font-size: 14px;
    color: #8a8f99;
}

.results-section .results-container {
    background: #ffffff;
    border-radius: 14px;
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 400px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    overflow-y: auto;
}

.results-section .table-wrapper {
    overflow-x: scroll;
    overflow-y: hidden;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    -ms-overflow-style: scrollbar;
    scrollbar-width: auto;
}

.results-section .empty-state {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #8a8f99;
    gap: 16px;
}

.results-section .empty-state svg {
    width: 64px;
    height: 64px;
    opacity: 0.5;
}

.results-section .empty-state p {
    font-size: 14px;
    margin: 0;
}

.results-section .patent-card {
    display: flex;
    gap: 20px;
    padding: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.results-section .patent-card:hover {
    border-color: #f75444;
    box-shadow: 0 2px 12px rgba(247, 84, 68, 0.1);
}

.results-section .patent-image {
    width: 120px;
    height: 120px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: #f3f4f6;
}

.results-section .patent-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.results-section .patent-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.results-section .patent-title {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a2e;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.results-section .patent-meta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.results-section .meta-item {
    font-size: 13px;
    color: #6b7280;
}

.results-section .patent-score {
    font-size: 14px;
    font-weight: 500;
    color: #f75444;
    margin-top: auto;
}

@media (max-width: 1024px) {
    .search-container {
        flex-direction: column;
        height: auto;
    }
    
    .search-section {
        width: 100%;
    }
}

.results-section .patent-table {
    width: 100%;
    min-width: 1400px;
    border-collapse: collapse;
    font-size: 13px;
    table-layout: auto;
    will-change: transform;
    contain: layout paint size;
}

.results-section .patent-table thead {
    background: #f9fafb;
}

.results-section .patent-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: #374151;
    border-bottom: 2px solid #e5e7eb;
    white-space: nowrap;
}

.results-section .patent-table th:first-child {
    width: 80px;
}

.results-section .patent-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    color: #4b5563;
    vertical-align: middle;
}

.results-section .patent-table tbody tr {
    height: 84px;
}

.results-section .patent-table tbody tr:hover {
    background: #f9fafb;
}

.results-section .patent-table tbody tr:last-child td {
    border-bottom: none;
}

.results-section .patent-img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    background: #f3f4f6;
    display: block;
    min-width: 60px;
    min-height: 60px;
}

.results-section .pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
}

.global-patent-search-body .results-section .page-btn {
    width: 38px;
    height: 38px;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
    color: #4b5563;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
    padding: 0;
    line-height: 1;
}

.global-patent-search-body .results-section .page-btn:hover:not(:disabled):not(.active) {
    border-color: #f75444;
    color: #f75444;
    background: #fff5f5;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(247, 84, 68, 0.12);
}

.global-patent-search-body .results-section .page-btn:active:not(:disabled):not(.active) {
    transform: translateY(0) scale(0.95);
}

.global-patent-search-body .results-section .page-btn.active {
    background: linear-gradient(135deg, #f75444 0%, #ff7875 100%);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 3px 10px rgba(247, 84, 68, 0.3);
}

.global-patent-search-body .results-section .page-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    background: #f9fafb;
}

.global-patent-search-body .results-section .page-btn svg {
    width: 16px;
    height: 16px;
}

.global-patent-search-body .results-section .page-info {
    margin-left: 12px;
    font-size: 13px;
    color: #9ca3af;
    font-weight: 500;
}

@media (max-width: 768px) {
    .global-patent-search-page {
        padding: 12px;
    }

    .global-patent-search-page .page-title {
        font-size: 22px;
    }

    .global-patent-search-page .page-desc {
        font-size: 14px;
    }

    .search-section .form-box {
        padding: 16px;
    }

    .results-section .results-list {
        padding: 16px;
    }
}

.history-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.history-modal .modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.history-modal .modal-content {
    position: relative;
    background: #fff;
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    max-height: 70vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.history-modal .modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #f0f0f0;
}

.history-modal .modal-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a2e;
    margin: 0;
}

.global-patent-search-body .history-modal .btn-close {
    width: 34px;
    height: 34px;
    border: 1.5px solid #e5e7eb;
    background: #fff;
    border-radius: 10px;
    color: #6b7280;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
    padding: 0;
}

.global-patent-search-body .history-modal .btn-close:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    color: #374151;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.06);
}

.global-patent-search-body .history-modal .btn-close:active {
    transform: translateY(0) scale(0.95);
}

.history-modal .btn-close svg {
    width: 16px;
    height: 16px;
}

.history-modal .modal-body {
    flex: 1;
    padding: 20px 24px;
    overflow-y: auto;
}

.history-modal .modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: flex-end;
}

.history-modal .history-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.history-modal .history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: #f9fafb;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.history-modal .history-item:hover {
    background: #f3f4f6;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.history-modal .history-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.history-modal .history-type {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

.history-modal .history-country,
.history-modal .history-count,
.history-modal .history-time {
    font-size: 13px;
    color: #6b7280;
}

.history-modal .history-action {
    flex-shrink: 0;
}

.global-patent-search-body .history-modal .btn-sm {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
    border: 1.5px solid #d1d5db;
    background: #fff;
    color: #374151;
    cursor: pointer;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    line-height: 1.4;
}

.global-patent-search-body .history-modal .btn-sm:hover {
    background: #f9fafb;
    border-color: #f75444;
    color: #f75444;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(247, 84, 68, 0.12);
}

.global-patent-search-body .history-modal .btn-sm:active {
    transform: translateY(0) scale(0.97);
}

.history-modal .loading {
    text-align: center;
    color: #8a8f99;
    padding: 40px;
}

.history-modal .error {
    text-align: center;
    color: #f75444;
    padding: 20px;
}
