* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
    background: #f9f9f9;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.header {
    background: #fff;
    border-bottom: 1px solid #e8e8e8;
    padding: 12px 0;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 20px;
    font-weight: bold;
    color: #333;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: #3b82f6;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.nav-buttons {
    display: flex;
    gap: 8px;
}

.nav-button {
    padding: 8px 16px;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    background: white;
    color: #374151;
    font-size: 14px;
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: all 0.3s;
    cursor: pointer;
}

.nav-button:hover {
    border-color: #3b82f6;
    color: #3b82f6;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.1);
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.search-container {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto 10px;
}

.search-box {
    display: flex;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    overflow: hidden;
    background: white;
    transition: border-color 0.3s;
}

.search-box:focus-within {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-filter {
    padding: 12px;
    background: #f9fafb;
    border-right: 1px solid #e5e7eb;
    cursor: pointer;
    color: #6b7280;
}

.search-filter:hover {
    color: #3b82f6;
}

.search-input {
    flex: 1;
    border: none;
    padding: 12px 16px;
    font-size: 14px;
    outline: none;
}

.search-submit {
    padding: 12px 20px;
    background: white;
    border: none;
    cursor: pointer;
    color: #6b7280;
    transition: color 0.3s;
}

.search-submit:hover {
    color: #3b82f6;
}

.hot-keywords {
    width: 100%;
    max-width: 900px;
    padding: 0 20px;
    margin-top: 20px;
    margin-bottom: 20px;
}

.hot-keywords-title {
    font-size: 13px;
    color: #1d1e21;
    margin-bottom: 8px;
    font-weight: 800;
}

.hot-keywords-list ul {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.hot-keywords-list li {
    margin: 0;
}

.hot-keyword {
    padding: 6px 12px;
    background: #f9fafb;
    border-radius: 6px;
    font-size: 13px;
    color: #4b5563;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
    border: none;
    white-space: nowrap;
}

.hot-keyword:hover {
    background: #3b82f6;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
}

.hot-keyword:active {
    transform: translateY(0);
}

.category-tabs {
    display: flex;
    padding: 12px 20px;
    border-bottom: 1px solid #e5e7eb;
    gap: 20px;
    overflow-x: auto;
}

.category-tab {
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    color: #6b7280;
    font-size: 14px;
    transition: all 0.3s;
    border: 1px solid transparent;
    white-space: nowrap;
}

.category-tab:hover {
    background: #f9fafb;
}

.category-tab.active {
    background: #eff6ff;
    color: #3b82f6;
    border-color: #3b82f6;
}

.empty-state {
    width: 100%;
    max-width: 1100px;
    background: white;
    border-radius: 12px;
    padding: 80px 20px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    margin: 0 auto;
    display: block;
}

.empty-state.hidden {
    display: none !important;
}

.empty-state.show {
    display: block !important;
}

.empty-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    background: #f3f4f6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
}

.empty-text {
    color: #6b7280;
    font-size: 16px;
}

.loading-state {
    width: 100%;
    max-width: 1100px;
    background: white;
    border-radius: 12px;
    padding: 80px 20px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    margin: 0 auto;
    display: none;
}

.loading-state.hidden {
    display: none !important;
}

.loading-state.show {
    display: block !important;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    margin: 0 auto 30px;
    position: relative;
}

.spinner-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 4px solid transparent;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

.spinner-ring:nth-child(2) {
    width: 80%;
    height: 80%;
    top: 10%;
    left: 10%;
    border: 4px solid transparent;
    border-top-color: #60a5fa;
    animation-duration: 0.9s;
    animation-direction: reverse;
}

.spinner-ring:nth-child(3) {
    width: 60%;
    height: 60%;
    top: 20%;
    left: 20%;
    border: 4px solid transparent;
    border-top-color: #93c5fd;
    animation-duration: 0.6s;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-text {
    color: #374151;
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 12px;
}

.loading-hint {
    color: #6b7280;
    font-size: 14px;
    background: #fef3c7;
    padding: 10px 16px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
}

.loading-hint svg {
    width: 16px;
    height: 16px;
    color: #d97706;
}

.results-container {
    width: 100%;
    max-width: 1100px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    margin: 0 auto;
    overflow: hidden;
    display: none;
}

.results-container.hidden {
    display: none !important;
}

.results-container.show {
    display: block !important;
}

.results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
}

.results-info {
    display: flex;
    align-items: center;
    gap: 16px;
    color: #6b7280;
    font-size: 14px;
}

.results-info span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.results-info strong {
    color: #1f2937;
}

.refresh-btn {
    padding: 8px 16px;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    background: white;
    cursor: pointer;
    color: #6b7280;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s;
}

.refresh-btn:hover {
    border-color: #3b82f6;
    color: #3b82f6;
}

.result-list {
    padding: 0;
}

.result-item {
    padding: 16px 20px;
    border-bottom: 1px solid #f3f4f6;
    transition: all 0.3s;
}

.result-item:hover {
    background: #f9fafb;
}

.result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    gap: 12px;
}

.result-title-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.result-title {
    font-size: 15px;
    color: #1f2937;
    font-weight: 500;
    line-height: 1.4;
    flex: 1;
    min-width: 0;
}

.result-tags {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.tag {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    background: #eff6ff;
    color: #3b82f6;
    border: 1px solid #dbeafe;
    line-height: 1;
    height: fit-content;
}

.tag.password {
    background: #fef3c7;
    color: #d97706;
    border-color: #fde68a;
}

.result-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.get-link-btn {
    padding: 6px 12px;
    border-radius: 4px;
    background: #3b82f6;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s;
}

.get-link-btn:hover {
    background: #2563eb;
}

.get-link-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

.result-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.result-date {
    color: #9ca3af;
    font-size: 12px;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-overlay.show {
    display: flex;
}

.modal {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #6b7280;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: #1f2937;
}

.modal-body {
    padding: 20px;
    flex: 1;
    overflow-y: auto;
}

.link-loading-container {
    text-align: center;
    padding: 40px 20px;
    display: none;
}

.link-loading-container.hidden {
    display: none !important;
}

.link-loading-container.show {
    display: block !important;
}

.link-loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.link-loading-spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 20px;
    position: relative;
}

.link-loading-spinner .spinner-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 4px solid transparent;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

.link-loading-spinner .spinner-ring:nth-child(2) {
    width: 80%;
    height: 80%;
    top: 10%;
    left: 10%;
    border: 4px solid transparent;
    border-top-color: #60a5fa;
    animation-duration: 0.9s;
    animation-direction: reverse;
}

.link-loading-spinner .spinner-ring:nth-child(3) {
    width: 60%;
    height: 60%;
    top: 20%;
    left: 20%;
    border: 4px solid transparent;
    border-top-color: #93c5fd;
    animation-duration: 0.6s;
}

.link-loading-text {
    color: #374151;
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 12px;
}

.link-loading-hint {
    color: #6b7280;
    font-size: 14px;
    background: #fef3c7;
    padding: 10px 16px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
}

.link-loading-hint svg {
    width: 16px;
    height: 16px;
    color: #d97706;
}

.modal-content {
    display: none;
}

.modal-content.hidden {
    display: none !important;
}

.modal-content.show {
    display: block !important;
}

.qrcode-container {
    text-align: center;
    margin-bottom: 20px;
    padding: 20px;
    background: #f9fafb;
    border-radius: 8px;
}

.qrcode-title {
    font-size: 16px;
    color: #374151;
    margin-bottom: 15px;
    font-weight: 500;
}

.qrcode-wrapper {
    display: inline-block;
    padding: 10px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    margin-bottom: 15px;
}

#qrcode {
    display: inline-block;
}

.scan-hint {
    font-size: 13px;
    color: #6b7280;
    margin-top: 10px;
}

.footer {
    background: #fff;
    border-top: 1px solid #e8e8e8;
    padding: 20px 0;
    text-align: center;
    color: #9ca3af;
    font-size: 13px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 10px;
}

.footer-link {
    color: #6b7280;
    text-decoration: none;
}

.footer-link:hover {
    color: #3b82f6;
}

.no-data {
    padding: 40px;
    text-align: center;
    color: #9ca3af;
    display: none;
}

.no-data.show {
    display: block;
}
