/* 工具中心 - 独立弹窗与页面样式 */

.gongjuzx-standalone-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    box-sizing: border-box;
}

.gongjuzx-standalone-modal.active {
    display: flex;
}

.gongjuzx-standalone-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.38);
    backdrop-filter: blur(2px);
}

.gongjuzx-standalone-panel {
    position: relative;
    width: min(1120px, calc(100vw - 40px));
    height: min(760px, calc(100vh - 48px));
    min-height: 420px;
    overflow: hidden;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 18px 52px rgba(15, 23, 42, 0.24);
    display: flex;
    flex-direction: column;
}

.gongjuzx-standalone-header {
    height: 48px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px 0 18px;
    border-bottom: 1px solid #eef1f5;
    background: #ffffff;
}

.gongjuzx-standalone-title {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: #111827;
}

.gongjuzx-standalone-close {
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #6b7280;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gongjuzx-standalone-close:hover {
    background: #f3f4f6;
    color: #374151;
}

.gongjuzx-standalone-body {
    position: relative;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.gongjuzx-page {
    position: relative;
    display: none;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.gongjuzx-search-container {
    flex-shrink: 0;
    padding: 12px 20px;
    background: linear-gradient(180deg, #ffffff 0%, #fcfcfc 100%);
    border-bottom: 1px solid rgba(209, 213, 219, 0.5);
}

.gongjuzx-search-box {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 620px;
    margin: 0 auto;
}

.gongjuzx-search-input-wrapper {
    position: relative;
    flex: 1;
    min-width: 0;
}

.gongjuzx-search-input {
    width: 100%;
    height: 36px;
    padding: 0 40px 0 14px;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    font-size: 13px;
    color: #374151;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
    outline: none;
}

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

.gongjuzx-search-input:hover {
    border-color: #9ca3af;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.gongjuzx-search-input:focus {
    border-color: #3d6dff;
    box-shadow: 0 4px 16px rgba(61, 109, 255, 0.15);
}

.gongjuzx-search-clear {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: #9ca3af;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
    padding: 0;
}

.gongjuzx-search-clear:hover {
    background: #f3f4f6;
    color: #6b7280;
}

.gongjuzx-search-btn {
    flex-shrink: 0;
    height: 36px;
    padding: 0 20px;
    background: #3d6dff;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(61, 109, 255, 0.3);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 6px;
}

.gongjuzx-search-btn:hover {
    background: #2d5ce6;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(61, 109, 255, 0.4);
}

.gongjuzx-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background: #f9fafb;
}

.gongjuzx-cards {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 14px;
}

.gongjuzx-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px;
    min-height: 112px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
    box-sizing: border-box;
    box-shadow: none;
    transition: none;
}

.gongjuzx-card:hover {
    border-color: #e5e7eb;
    box-shadow: none;
}

.gongjuzx-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
    margin-bottom: 0;
}

.gongjuzx-card-title {
    min-width: 0;
    max-width: 100%;
    flex: 1;
    font-size: 15px;
    font-weight: 600;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gongjuzx-card-actions {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    min-width: 0;
    max-width: 100%;
}

.gongjuzx-card-btn {
    padding: 2px 7px;
    font-size: 10px;
    color: #3d6dff;
    background: #e8f0ff;
    border: 1px solid #3d6dff;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.gongjuzx-card-btn:hover {
    background: #3d6dff;
    color: #ffffff;
}

.gongjuzx-card-desc {
    font-size: 11px;
    color: #6b7280;
    line-height: 1.45;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
    word-break: break-all;
    padding-bottom: 0;
    cursor: pointer;
    position: relative;
    margin: 0;
}

.gongjuzx-card-desc:hover {
    color: #3d6dff;
}

.gongjuzx-card-url {
    display: block;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 12px;
    color: #374151;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    padding: 4px 7px;
    line-height: 1.45;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    margin: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.gongjuzx-card-url::-webkit-scrollbar {
    display: none;
}

.gongjuzx-desc-tooltip {
    position: fixed;
    background: rgba(0, 0, 0, 0.9);
    color: #ffffff;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.6;
    max-width: 320px;
    z-index: 10020;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    pointer-events: auto;
    user-select: text;
    cursor: text;
    white-space: pre-wrap;
    word-break: break-all;
    animation: gongjuzx-tooltip-fade-in 0.15s ease-out;
}

@keyframes gongjuzx-tooltip-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.gongjuzx-empty {
    text-align: center;
    padding: 64px 20px;
    color: #9ca3af;
    grid-column: 1 / -1;
}

.gongjuzx-empty i {
    font-size: 46px;
    margin-bottom: 12px;
    color: #d1d5db;
}

.gongjuzx-empty-text {
    font-size: 14px;
}

.gongjuzx-add-fab {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #3d6dff;
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    font-size: 16px;
}

@media (hover: hover) {
    .gongjuzx-add-fab:hover {
        background: #2b5be0;
    }
}

.gongjuzx-add-fab:active {
    background: #1e4abf;
}

.gongjuzx-delete-modal {
    position: fixed;
    inset: 0;
    z-index: 10030;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gongjuzx-delete-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.35);
    backdrop-filter: blur(1px);
}

.gongjuzx-delete-content {
    position: relative;
    width: min(420px, calc(100vw - 28px));
    overflow: hidden;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.2);
}

.gongjuzx-delete-header {
    padding: 14px 16px;
    border-bottom: 1px solid #eef1f5;
}

.gongjuzx-delete-title {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #111827;
}

.gongjuzx-delete-body {
    padding: 16px;
}

.gongjuzx-delete-text {
    margin: 0 0 8px;
    font-size: 13px;
    color: #374151;
    line-height: 1.5;
}

.gongjuzx-delete-input {
    width: 100%;
    height: 38px;
    box-sizing: border-box;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    padding: 0 12px;
    font-size: 13px;
    color: #1f2937;
    outline: none;
    font-family: inherit;
}

.gongjuzx-delete-input:focus {
    border-color: #3d6dff;
    box-shadow: 0 0 0 3px rgba(61, 109, 255, 0.12);
}

.gongjuzx-delete-footer {
    display: flex;
    gap: 10px;
    padding: 12px 16px 16px;
    border-top: 1px solid #eef1f5;
}

.gongjuzx-delete-btn {
    flex: 1;
    height: 34px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
}

.gongjuzx-delete-cancel {
    background: #f3f4f6;
    color: #374151;
}

.gongjuzx-delete-confirm {
    background: #dc2626;
    color: #ffffff;
    font-weight: 600;
}

.gongjuzx-delete-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

@media (max-width: 768px) {
    .gongjuzx-standalone-modal {
        padding: 12px;
    }

    .gongjuzx-standalone-panel {
        width: calc(100vw - 24px);
        height: calc(100vh - 24px);
        min-height: 0;
    }

    .gongjuzx-search-container {
        padding: 10px 12px;
    }

    .gongjuzx-search-box {
        gap: 8px;
    }

    .gongjuzx-search-btn span {
        display: none;
    }

    .gongjuzx-search-btn {
        width: 38px;
        min-width: 38px;
        padding: 0;
        justify-content: center;
    }

    .gongjuzx-content {
        padding: 12px;
    }

    .gongjuzx-cards {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .gongjuzx-card-btn {
        padding: 2px 7px;
        font-size: 10px;
    }
}
