.nav-shadow {
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.08);
}

.btn-hover {
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.btn-hover:hover {
    box-shadow: 0 4px 12px rgba(22, 119, 255, 0.25);
    transform: translateY(-2px);
}

.menu-active {
    background: #eff6ff;
    border-left: 4px solid #1677ff;
    color: #1677ff;
}

.spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.tool-page,
.tool-workspace > * {
    min-width: 0;
}

.conversion-result-modal {
    position: fixed;
    z-index: 80;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(15, 23, 42, 0.45);
}

.conversion-result-modal.is-open {
    display: flex;
}

.conversion-result-modal-panel {
    display: flex;
    width: min(620px, 100%);
    max-height: calc(100vh - 32px);
    flex-direction: column;
    overflow: hidden;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 20px 48px rgba(15, 23, 42, 0.22);
}

.conversion-result-modal-header {
    display: flex;
    min-height: 56px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid #e5e7eb;
    padding: 0 16px 0 20px;
}

.conversion-result-modal-header h2 {
    margin: 0;
    color: #1f2937;
    font-size: 16px;
    font-weight: 600;
}

.conversion-result-modal-close {
    display: inline-flex;
    width: 36px;
    height: 36px;
    flex: none;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    color: #6b7280;
    font-size: 16px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.conversion-result-modal-close:hover {
    background: #f1f5f9;
    color: #1f2937;
}

.conversion-result-dialog {
    max-height: calc(100vh - 88px);
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

body.conversion-result-modal-open {
    overflow: hidden;
}

.conversion-result-actions {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 12px;
}

.conversion-result-list {
    display: grid;
    gap: 10px;
}

.conversion-result-item {
    display: flex;
    align-items: center;
    gap: 16px;
    border: 1px solid #f1f5f9;
    border-radius: 8px;
    padding: 12px;
}

.conversion-result-file {
    flex: 1;
    min-width: 0;
}

.conversion-result-name {
    overflow: hidden;
    color: #1f2937;
    font-size: 14px;
    font-weight: 500;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.conversion-result-size {
    margin-top: 4px;
    color: #9ca3af;
    font-size: 12px;
}

.conversion-result-download,
.conversion-result-download-all {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 36px;
    border-radius: 6px;
    font-size: 14px;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.conversion-result-download {
    border: 1px solid #1677ff;
    padding: 0 12px;
    color: #1677ff;
}

.conversion-result-download:hover {
    background: #1677ff;
    color: #ffffff;
}

.conversion-result-download-all {
    border: 1px solid #1f2937;
    padding: 0 14px;
    background: #1f2937;
    color: #ffffff;
}

.conversion-result-download-all:hover {
    border-color: #374151;
    background: #374151;
}

@media (max-width: 639px) {
    .tool-page.tool-page {
        padding: 12px;
    }

    .tool-page .tool-page-header {
        gap: 12px;
        margin-bottom: 16px;
    }

    .tool-page-header h1 {
        min-width: 0;
        font-size: 18px;
        line-height: 1.4;
    }

    .tool-page-header a {
        flex: none;
    }

    .tool-page .tool-workspace {
        gap: 16px;
    }

    .tool-page .tool-upload {
        min-height: 220px;
        padding: 40px 16px;
    }

    .tool-page .tool-settings {
        padding: 16px;
        border-radius: 12px;
    }

    .tool-page .tool-option-row {
        flex-wrap: wrap;
        column-gap: 12px;
        row-gap: 10px;
    }

    .tool-page .tool-actions {
        gap: 8px;
    }

    .tool-page .tool-actions > button:first-child {
        min-height: 44px;
    }

    .tool-page .tool-actions > button:last-child {
        flex: 0 0 44px;
        width: 44px;
        height: 44px;
    }

    .tool-page .tool-result-header {
        flex-wrap: wrap;
        gap: 12px;
    }

    .tool-page #progressCard > div:first-child {
        gap: 8px;
    }

    .tool-page #progressText {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .tool-page #progressPercent {
        flex: none;
    }

    .tool-page #resultList > div {
        align-items: stretch;
        flex-direction: column;
        gap: 12px;
    }

    .tool-page #resultList > div > div:first-child {
        min-width: 0;
    }

    .tool-page #resultList > div > div:first-child > div:first-child,
    .tool-page #fileName {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .tool-page #resultList > div > button {
        align-self: flex-start;
    }

    .tool-page #fileInfoCard > div:first-child > div:first-child {
        min-width: 0;
    }

    .conversion-result-dialog {
        max-height: calc(100vh - 84px);
        padding: 16px;
    }

    .conversion-result-item {
        align-items: stretch;
        flex-direction: column;
        gap: 10px;
    }

    .conversion-result-download {
        align-self: flex-start;
    }
}
